You are on page 1of 48

A

Project Report
On

College Timetable Management System


Submitted in partial fulfillment of the requirements for the award of degree of
Bachelor of Science (Computer Science)

Submitted By:

1. Shetkar Sangam Sadashiv : ZC5146

2. Bhosle Pankaj Govind : ZC4960


3. Anerao Praful Rajendra : ZC4949
Academic Year: 2019 – 2020

Submitted to:

Swami Ramanand Teerth Marathwada University, Nanded

Royal Education Society’s

College of Computer Science and Information Technology, Latur


Royal Education Society’s

COLLEGE OF COMPUTER SCIENCE AND INFORMATION


TECHNOLOGY, LATUR.

CERTIFICATE

This is to certify that the project entitled “College Time Table Management
System” has been carried out by Shetkar Sangam Sadashiv, Bhosle Pankaj
Govind, Anerao Praful Rajendra under my guidance in partial fulfillment
of the degree Bachelor of Computer Science of SRTMU, Nanded during the
academic year 2019-2020.

Mr. A. S. Shinde Mrs. D. H. Mahamuni


Head
Guide Department

2
ACKNOWLEDGEMENT

We would like to convey our gratitude to Dr. N. S. Zulpe, Principal


of College of Computer Science and Information Technology, Latur who
gave us necessary information and guidance for project.

We are grateful to Swami Ramanand Teerth Marathwada


University, Nanded for giving an opportunity to deliver project.

We would like to thank Project In-Charge and Project Guide Mr. A.S.
Shinde who guided us through doing these project development process,
provided with invaluable advice, helped us in difficult periods and provided
practical assistant for our project. Their willingness to motivate us
contributed tremendously to the success of this project.

We would like to express our special thanks of gratitude to our Head of


the Department of Computer Science Mrs. D. H. Mahamuni who helped us
a lot in finalizing this project.

Besides we would like to thank all staff members who helped us by


giving advice and providing equipment which we needed.

Last but not in least we would like to thank all who helped and motivated us.

With Sincere Thanks,

1. Shetkar Sangam Sadashiv


2. Bhosle Pankaj Govind
3. Anerao Praful Rajendra

3
Index
Sr.
Topic Name Page No.
No.
1 Abstract 1
2 Introduction:
2.1 Project Overview 2
2.2 Project Plan (Gantt chart) 3
3 Project Requirement:
3.1 Hardware Requirement 4
3.2 Software Requirement 4
3.3 Field Work 5
3.4 Front End 5
3.5 Back End 5
4 System Design:
4.1 E-R Diagram 6
4.2 Data Flow Diagram (First Level) 7
5 Coding: 8 to 40
6 Future scope of project: 41
7 Conclusion: 41
8 Bibliography: 42
9.1 Book(s)
9.2 Website(s)

4
5
Abstract:
This project aims to manage School Timetable to help students and teachers.
Nowadays there
are many Subjects and courses in School. The teaching staff may get
confused in order to
remember Lecture timings without Timetable management system. With the
Timetable we
can help Students and Teachers to remember their timings. Timetable
management is the
problem that concerns every teaching institute. Implementing this prototype
in school will
return in many benefits for both the School staff and the students for their
ease.

1
Introduction:
Project Overview:

The main objective of “College Timetable Management System” is to


maintain timetable scheduling process in colleges or any educational
institutions to minimize the human work and maximize the efficiency. The
timetable is stored at a centralized server which could be easy to access
everywhere. A key factor in running an educational institution is the need for
a well planned and clash free timetable. Back in the days when technology
was not in wide use,timetables were manually created by the academic
institution. As demand for education increases and diversifies, so does the
difficulty of designing workable timetables for academic institutions. The
proposed timetabling system is designed to handle events of course lectures
which are served at colleges systematically and the proper arrangement
scheduling of those classes and also helps students and teachers to go directly
towards their proposed classes.

2
Project Plan (Gantt chart):

Sr Task Name 30- 7- 18-Aug 1-Sep 20-


.n July Au Sep
o g To
25-
Sep
1 Requirement
Gathering
2 Planning

3 Designing
4 Coding
5 Testing and
Deployment

3
Project Requirement:
Hardware Requirement:

1) Processor: i3 3rd gen or above


2) RAM: 4GB and above
3) Hard Disk: 160 GB or above
Software Requirement:

• Frontend-IDE: VS Code, Apache Server


• Language: HTML, CSS, JavaScript, Bootstrap, PHP
• Browser: Chrome
• Backend-Database: MySQL

4
Field Work:

1. We visited to Dayanand college, Latur for information gathering and


2. to know how Collage Timetable system works.
3. We collect samples of Timetable Papers from Internet.

Front End :

1. Frontend-IDE: VS Code, Apache Server


2. Language: HTML, CSS, JavaScript, jQuery, Bootstrap

Back End :

1. MySQL

5
System Design:

ER Diagram:

6
DFD:

7
Coding:

Admin Login Page :

<?php if(!isset($Translation)){ @header('Location: index.php?signIn=1');


exit; } ?>
<?php include_once("$currDir/header.php"); ?>

<?php if($_GET['loginFailed']){ ?>


<div class="alert alert-danger"><?php echo $Translation['login failed'];
?></div>
<?php } ?>

<div class="row">
<div class="col-sm-6 col-lg-4" id="login_splash">
<!-- customized splash content here -->
</div>
<div class="col-sm-6 col-lg-4">
<div class="panel panel-success">

<div class="panel-body">
<form method="post" action="index.php">
<div class="form-group">
<label class="control-label"
8
for="username"><?php echo $Translation['username']; ?></label>
<input class="form-control"
name="username" id="username" type="text" placeholder="<?php echo
$Translation['username']; ?>" required>
</div>
<div class="form-group">
<label class="control-label"
for="password"><?php echo $Translation['password']; ?></label>
<input class="form-control"
name="password" id="password" type="password" placeholder="<?php echo
$Translation['password']; ?>" required>

</div>

<div class="row">
<div class="col-sm-offset-3 col-sm-6">
<button name="signIn"
type="submit" id="submit" value="signIn" class="btn btn-primary btn-lg
btn-block"><?php echo $Translation['sign in']; ?></button>
</div>
</div>
</form>
</div>

</div>
</div>
</div>

<script>document.getElementById('username').focus();</script>
<?php include_once("$currDir/footer.php"); ?>

9
Dashboard Page :

<?php @include("{$currDir}/hooks/links-home.php"); ?>


<?php if(!defined('PREPEND_PATH')) define('PREPEND_PATH', ''); ?>
<?php if(!defined('datalist_db_encoding')) define('datalist_db_encoding',
'UTF-8'); ?>
<?php include'libs/redirect.php'; ?>
<?php include 'libs/data.php'; ?>
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1,
shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">
<title>Timetable companion</title>
<!-- Bootstrap core CSS-->
<link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<!-- Custom fonts for this template-->
<link href="vendor/font-awesome/css/font-awesome.min.css"
rel="stylesheet" type="text/css">
10
<!-- Custom styles for this template-->
<link href="css/sb-admin.css" rel="stylesheet">
</head>

<body class="fixed-nav sticky-footer bg-dark" id="page-top">


<!-- Navigation-->
<nav class="navbar navbar-expand-lg navbar-dark bg-dark fixed-top"
id="mainNav">
<a class="navbar-brand" href="index.html">College Timetable
Management System</a>
<button class="navbar-toggler navbar-toggler-right" type="button" data-
toggle="collapse" data-target="#navbarResponsive" aria-
controls="navbarResponsive" aria-expanded="false" aria-label="Toggle
navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarResponsive">
<ul class="navbar-nav navbar-sidenav" id="exampleAccordion">
<li class="nav-item" data-toggle="tooltip" data-placement="right"
title="Dashboard">
<a class="nav-link" href="index.html">
<i class="fa fa-fw fa-dashboard"></i>
<span class="nav-link-text">Dashboard</span>
</a>
</li>
<?php include'sidenav.php'; ?>
</ul>
<ul class="navbar-nav sidenav-toggler">
<li class="nav-item">
<a class="nav-link text-center" id="sidenavToggler">
<i class="fa fa-fw fa-angle-left"></i>
</a>
</li>
</ul>
<ul class="navbar-nav ml-auto">
<li class="nav-item">
<a class="nav-link" data-toggle="modal" data-
target="#exampleModal">
<i class="fa fa-fw fa-sign-out"></i><?php echo
getLoggedMemberID(); ?></a>
</li>
</ul>
11
</div>
</nav>
<div class="content-wrapper">
<div class="container-fluid">
<!-- Breadcrumbs-->
<ol class="breadcrumb">
<li class="breadcrumb-item">
<a href="index.html">Dashboard</a>
</li>
<li class="breadcrumb-item active"><?php echo
getLoggedMemberID(); ?></li>
</ol>
<?php checkdetailsStudent(); ?>
<div class="row">
<div class="col-12">
<?php include 'main.php'; ?>
</div>
</div>
</div>
<!-- /.container-fluid-->
<!-- /.content-wrapper-->
<footer class="sticky-footer">
<div class="container">

</div>
</footer>
<!-- Scroll to Top Button-->
<a class="scroll-to-top rounded" href="#page-top">
<!-- <i class="fa fa-angle-up"></i> -->
</a>
<!-- Logout Modal-->
<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog"
aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Hello <?php echo
getLoggedMemberID(); ?></h5>
<button class="close" type="button" data-dismiss="modal" aria-
label="Close">
<span aria-hidden="true">×</span>
</button>
12
</div>
<div class="modal-body">Here are some quick options:
<a href="<?php echo PREPEND_PATH; ?>membership_profile.php"
class="btn btn-primary btn-block"><i class="fa fa-user"></i> <strong>My
profile</strong></a>
<?php if(getLoggedAdmin()){ ?>
<a href="<?php echo PREPEND_PATH; ?>admin/pageHome.php"
class="btn btn-danger btn-block navbar-btn btn-sm visible-xs btn-sm"><i
class="fa fa-cog"></i> <strong><?php echo $Translation['admin area'];
?></strong></a>
<?php } ?>
<?php if(!$_GET['signIn'] && !$_GET['loginFailed']){ ?>
<?php if(getLoggedMemberID() ==
$adminConfig['anonymousMember']){ ?>
<p class="navbar-text navbar-right">&nbsp;</p>
<a href="<?php echo PREPEND_PATH; ?>index.php?signIn=1"
class="btn btn-success navbar-btn btn-sm navbar-right"><strong><?php echo
$Translation['sign in']; ?></strong></a>
<p class="navbar-text navbar-right">
<?php echo $Translation['not signed in']; ?>
</p>
<?php }else{ ?>
<ul class="nav navbar-nav navbar-right hidden-xs" style="min-
width: 330px;">
</ul>
<ul class="nav navbar-nav visible-xs">
</ul>
<?php } ?>
<?php } ?>
<!--login/logout area ends-->
</div>
<div class="modal-footer">
<button class="btn btn-secondary" type="button" data-
dismiss="modal">Back</button>
<a class="btn btn-primary" href="index.php?signOut=1">Logout</a>
</div>
</div>
</div>
</div>
<!-- Bootstrap core JavaScript-->
<script src="vendor/jquery/jquery.min.js"></script>
<script src="vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
13
<!-- Core plugin JavaScript-->
<script src="vendor/jquery-easing/jquery.easing.min.js"></script>
<!-- Custom scripts for all pages-->
<script src="js/sb-admin.min.js"></script>
</div>
</body>

</html>

Departments Page :

<?php
// This script and data application were generated by AppGini 5.72
// Download AppGini for free from https://bigprof.com/appgini/download/

$currDir=dirname(__FILE__);
include("$currDir/defaultLang.php");
include("$currDir/language.php");
include("$currDir/lib.php");
14
@include("$currDir/hooks/departments.php");
include("$currDir/departments_dml.php");

// mm: can the current member access this page?


$perm=getTablePermissions('departments');
if(!$perm[0]){
echo error_message($Translation['tableAccessDenied'], false);
echo
'<script>setTimeout("window.location=\'index.php?signOut=1\'",
2000);</script>';
exit;
}

$x = new DataList;
$x->TableName = "departments";

// Fields that can be displayed in the table view


$x->QueryFieldsTV = array(
"`departments`.`id`" => "id",
"`departments`.`name`" => "name",
"IF( CHAR_LENGTH(`schools1`.`name`), CONCAT_WS('',
`schools1`.`name`), '') /* School */" => "school"
);
// mapping incoming sort by requests to actual query fields
$x->SortFields = array(
1 => '`departments`.`id`',
2 => 2,
3 => '`schools1`.`name`'
);

// Fields that can be displayed in the csv file


$x->QueryFieldsCSV = array(
"`departments`.`id`" => "id",
"`departments`.`name`" => "name",
"IF( CHAR_LENGTH(`schools1`.`name`), CONCAT_WS('',
`schools1`.`name`), '') /* School */" => "school"
);
// Fields that can be filtered
$x->QueryFieldsFilters = array(
"`departments`.`id`" => "ID",
"`departments`.`name`" => "Name",
"IF( CHAR_LENGTH(`schools1`.`name`), CONCAT_WS('',
15
`schools1`.`name`), '') /* School */" => "School"
);

// Fields that can be quick searched


$x->QueryFieldsQS = array(
"`departments`.`id`" => "id",
"`departments`.`name`" => "name",
"IF( CHAR_LENGTH(`schools1`.`name`), CONCAT_WS('',
`schools1`.`name`), '') /* School */" => "school"
);

// Lookup fields that can be used as filterers


$x->filterers = array( 'school' => 'School');

$x->QueryFrom = "`departments` LEFT JOIN `schools` as schools1 ON


`schools1`.`id`=`departments`.`school` ";
$x->QueryWhere = '';
$x->QueryOrder = '';

$x->AllowSelection = 1;
$x->HideTableView = ($perm[2]==0 ? 1 : 0);
$x->AllowDelete = $perm[4];
$x->AllowMassDelete = true;
$x->AllowInsert = $perm[1];
$x->AllowUpdate = $perm[3];
$x->SeparateDV = 1;
$x->AllowDeleteOfParents = 0;
$x->AllowFilters = 1;
$x->AllowSavingFilters = 0;
$x->AllowSorting = 1;
$x->AllowNavigation = 1;
$x->AllowPrinting = 1;
$x->AllowCSV = 1;
$x->RecordsPerPage = 100;
$x->QuickSearch = 1;
$x->QuickSearchText = $Translation["quick search"];
$x->ScriptFileName = "departments_view.php";
$x->RedirectAfterInsert = "departments_view.php?SelectedID=#ID#";
$x->TableTitle = "Departments";
$x->TableIcon = "resources/table_icons/chart_organisation.png";
$x->PrimaryKey = "`departments`.`id`";

16
$x->ColWidth = array( 150, 150);
$x->ColCaption = array("Name", "School");
$x->ColFieldName = array('name', 'school');
$x->ColNumber = array(2, 3);

// template paths below are based on the app main directory


$x->Template = 'templates/departments_templateTV.html';
$x->SelectedTemplate = 'templates/departments_templateTVS.html';
$x->TemplateDV = 'templates/departments_templateDV.html';
$x->TemplateDVP = 'templates/departments_templateDVP.html';

$x->ShowTableHeader = 1;
$x->TVClasses = "";
$x->DVClasses = "";
$x->HighlightColor = '#FFF0C2';

// mm: build the query based on current member's permissions


$DisplayRecords = $_REQUEST['DisplayRecords'];
if(!in_array($DisplayRecords, array('user', 'group'))){ $DisplayRecords =
'all'; }
if($perm[2]==1 || ($perm[2]>1 && $DisplayRecords=='user' &&
!$_REQUEST['NoFilter_x'])){ // view owner only
$x->QueryFrom.=', membership_userrecords';
$x->QueryWhere="where
`departments`.`id`=membership_userrecords.pkValue and
membership_userrecords.tableName='departments' and
lcase(membership_userrecords.memberID)='".getLoggedMemberID()."'";
}elseif($perm[2]==2 || ($perm[2]>2 && $DisplayRecords=='group' &&
!$_REQUEST['NoFilter_x'])){ // view group only
$x->QueryFrom.=', membership_userrecords';
$x->QueryWhere="where
`departments`.`id`=membership_userrecords.pkValue and
membership_userrecords.tableName='departments' and
membership_userrecords.groupID='".getLoggedGroupID()."'";
}elseif($perm[2]==3){ // view all
// no further action
}elseif($perm[2]==0){ // view none
$x->QueryFields = array("Not enough permissions" => "NEP");
$x->QueryFrom = '`departments`';
$x->QueryWhere = '';
$x->DefaultSortField = '';
}
17
// hook: departments_init
$render=TRUE;
if(function_exists('departments_init')){
$args=array();
$render=departments_init($x, getMemberInfo(), $args);
}

if($render) $x->Render();

// hook: departments_header
$headerCode='';
if(function_exists('departments_header')){
$args=array();
$headerCode=departments_header($x->ContentType,
getMemberInfo(), $args);
}
if(!$headerCode){
include_once("$currDir/header.php");
}else{
ob_start(); include_once("$currDir/header.php");
$dHeader=ob_get_contents(); ob_end_clean();
echo str_replace('<%%HEADER%%>', $dHeader, $headerCode);
}

echo $x->HTML;
// hook: departments_footer
$footerCode='';
if(function_exists('departments_footer')){
$args=array();
$footerCode=departments_footer($x->ContentType,
getMemberInfo(), $args);
}
if(!$footerCode){
include_once("$currDir/footer.php");
}else{
ob_start(); include_once("$currDir/footer.php");
$dFooter=ob_get_contents(); ob_end_clean();
echo str_replace('<%%FOOTER%%>', $dFooter, $footerCode);
}
?>

18
Staff Details Page :

Manage Category Page :

19
<?php

$currDir=dirname(__FILE__);
include("$currDir/defaultLang.php");
include("$currDir/language.php");
include("$currDir/lib.php");
@include("$currDir/hooks/student_details.php");
include("$currDir/student_details_dml.php");

// mm: can the current member access this page?


$perm=getTablePermissions('student_details');
if(!$perm[0]){
echo error_message($Translation['tableAccessDenied'], false);
echo
'<script>setTimeout("window.location=\'index.php?signOut=1\'",
2000);</script>';
exit;
}

$x = new DataList;
$x->TableName = "student_details";

// Fields that can be displayed in the table view


$x->QueryFieldsTV = array(
"`student_details`.`id`" => "id",
"`student_details`.`full_name`" => "full_name",
"IF( CHAR_LENGTH(`schools1`.`name`), CONCAT_WS('',
`schools1`.`name`), '') /* School */" => "school",
"IF( CHAR_LENGTH(`departments1`.`name`), CONCAT_WS('',
`departments1`.`name`), '') /* Department */" => "department",
"`student_details`.`year_of_study`" => "year_of_study",
"`student_details`.`reg_no`" => "reg_no"
);
// mapping incoming sort by requests to actual query fields
$x->SortFields = array(
1 => '`student_details`.`id`',
2 => 2,
3 => '`schools1`.`name`',
4 => '`departments1`.`name`',
5 => 5,
6 => 6
);
20
// Fields that can be displayed in the csv file
$x->QueryFieldsCSV = array(
"`student_details`.`id`" => "id",
"`student_details`.`full_name`" => "full_name",
"IF( CHAR_LENGTH(`schools1`.`name`), CONCAT_WS('',
`schools1`.`name`), '') /* School */" => "school",
"IF( CHAR_LENGTH(`departments1`.`name`), CONCAT_WS('',
`departments1`.`name`), '') /* Department */" => "department",
"`student_details`.`year_of_study`" => "year_of_study",
"`student_details`.`reg_no`" => "reg_no"
);
// Fields that can be filtered
$x->QueryFieldsFilters = array(
"`student_details`.`id`" => "ID",
"`student_details`.`full_name`" => "Full name",
"IF( CHAR_LENGTH(`schools1`.`name`), CONCAT_WS('',
`schools1`.`name`), '') /* School */" => "School",
"IF( CHAR_LENGTH(`departments1`.`name`), CONCAT_WS('',
`departments1`.`name`), '') /* Department */" => "Department",
"`student_details`.`year_of_study`" => "Year of study",
"`student_details`.`reg_no`" => "Reg no"
);

// Fields that can be quick searched


$x->QueryFieldsQS = array(
"`student_details`.`id`" => "id",
"`student_details`.`full_name`" => "full_name",
"IF( CHAR_LENGTH(`schools1`.`name`), CONCAT_WS('',
`schools1`.`name`), '') /* School */" => "school",
"IF( CHAR_LENGTH(`departments1`.`name`), CONCAT_WS('',
`departments1`.`name`), '') /* Department */" => "department",
"`student_details`.`year_of_study`" => "year_of_study",
"`student_details`.`reg_no`" => "reg_no"
);

// Lookup fields that can be used as filterers


$x->filterers = array( 'school' => 'School', 'department' => 'Department');

$x->QueryFrom = "`student_details` LEFT JOIN `schools` as schools1


ON `schools1`.`id`=`student_details`.`school` LEFT JOIN `departments` as
departments1 ON `departments1`.`id`=`student_details`.`department` ";
21
$x->QueryWhere = '';
$x->QueryOrder = '';

$x->AllowSelection = 1;
$x->HideTableView = ($perm[2]==0 ? 1 : 0);
$x->AllowDelete = $perm[4];
$x->AllowMassDelete = true;
$x->AllowInsert = $perm[1];
$x->AllowUpdate = $perm[3];
$x->SeparateDV = 1;
$x->AllowDeleteOfParents = 0;
$x->AllowFilters = 1;
$x->AllowSavingFilters = 1;
$x->AllowSorting = 1;
$x->AllowNavigation = 1;
$x->AllowPrinting = 1;
$x->AllowCSV = 1;
$x->RecordsPerPage = 100;
$x->QuickSearch = 1;
$x->QuickSearchText = $Translation["quick search"];
$x->ScriptFileName = "student_details_view.php";
$x->RedirectAfterInsert = "student_details_view.php?SelectedID=#ID#";
$x->TableTitle = "Collegedetails";
$x->TableIcon = "resources/table_icons/administrator.png";
$x->PrimaryKey = "`student_details`.`id`";

$x->ColWidth = array( 150, 150, 150, 150, 150);


$x->ColCaption = array("Full name", "School", "Department", "Year of
study", "Reg no");
$x->ColFieldName = array('full_name', 'school', 'department',
'year_of_study', 'reg_no');
$x->ColNumber = array(2, 3, 4, 5, 6);

// template paths below are based on the app main directory


$x->Template = 'templates/student_details_templateTV.html';
$x->SelectedTemplate = 'templates/student_details_templateTVS.html';
$x->TemplateDV = 'templates/student_details_templateDV.html';
$x->TemplateDVP = 'templates/student_details_templateDVP.html';

$x->ShowTableHeader = 1;
$x->TVClasses = "";
$x->DVClasses = "";
22
$x->HighlightColor = '#FFF0C2';

// mm: build the query based on current member's permissions


$DisplayRecords = $_REQUEST['DisplayRecords'];
if(!in_array($DisplayRecords, array('user', 'group'))){ $DisplayRecords =
'all'; }
if($perm[2]==1 || ($perm[2]>1 && $DisplayRecords=='user' &&
!$_REQUEST['NoFilter_x'])){ // view owner only
$x->QueryFrom.=', membership_userrecords';
$x->QueryWhere="where
`student_details`.`id`=membership_userrecords.pkValue and
membership_userrecords.tableName='student_details' and
lcase(membership_userrecords.memberID)='".getLoggedMemberID()."'";
}elseif($perm[2]==2 || ($perm[2]>2 && $DisplayRecords=='group' &&
!$_REQUEST['NoFilter_x'])){ // view group only
$x->QueryFrom.=', membership_userrecords';
$x->QueryWhere="where
`student_details`.`id`=membership_userrecords.pkValue and
membership_userrecords.tableName='student_details' and
membership_userrecords.groupID='".getLoggedGroupID()."'";
}elseif($perm[2]==3){ // view all
// no further action
}elseif($perm[2]==0){ // view none
$x->QueryFields = array("Not enough permissions" => "NEP");
$x->QueryFrom = '`student_details`';
$x->QueryWhere = '';
$x->DefaultSortField = '';
}
// hook: student_details_init
$render=TRUE;
if(function_exists('student_details_init')){
$args=array();
$render=student_details_init($x, getMemberInfo(), $args);
}

if($render) $x->Render();

// hook: student_details_header
$headerCode='';
if(function_exists('student_details_header')){
$args=array();
$headerCode=student_details_header($x->ContentType,
23
getMemberInfo(), $args);
}
if(!$headerCode){
include_once("$currDir/header.php");
}else{
ob_start(); include_once("$currDir/header.php");
$dHeader=ob_get_contents(); ob_end_clean();
echo str_replace('<%%HEADER%%>', $dHeader, $headerCode);
}

echo $x->HTML;
// hook: student_details_footer
$footerCode='';
if(function_exists('student_details_footer')){
$args=array();
$footerCode=student_details_footer($x->ContentType,
getMemberInfo(), $args);
}
if(!$footerCode){
include_once("$currDir/footer.php");
}else{
ob_start(); include_once("$currDir/footer.php");
$dFooter=ob_get_contents(); ob_end_clean();
echo str_replace('<%%FOOTER%%>', $dFooter, $footerCode);
}
?>

24
Class Time Table Page :

<?php
session_start();
error_reporting(0);
include('includes/dbconnection.php');
if (strlen($_SESSION['vpmsaid']==0)) {
header('location:logout.php');
} else{

?>
<!doctype html>

<html class="no-js" lang="">


<head>

<title>VPMS - Manage Incoming Vehicle</title>

<link rel="apple-touch-icon" href="https://i.imgur.com/QRAUqs9.png">


<link rel="shortcut icon" href="https://i.imgur.com/QRAUqs9.png">

<link rel="stylesheet"
25
href="https://cdn.jsdelivr.net/npm/normalize.css@8.0.0/normalize.min.css">
<link rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/bootstrap@4.1.3/dist/css/bootstrap.min.css
">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/font-
awesome@4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/lykmapipo/themify-
icons@0.1.2/css/themify-icons.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/pixeden-stroke-7-
icon@1.2.3/pe-icon-7-stroke/dist/pe-icon-7-stroke.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/flag-
icon-css/3.2.0/css/flag-icon.min.css">
<link rel="stylesheet" href="assets/css/cs-skin-elastic.css">
<link rel="stylesheet" href="assets/css/style.css">

<link
href='https://fonts.googleapis.com/css?family=Open+Sans:400,600,700,800'
rel='stylesheet' type='text/css'>

</head>
<body>
<!-- Left Panel -->

<?php include_once('includes/sidebar.php');?>

<!-- Left Panel -->

<!-- Right Panel -->

<?php include_once('includes/header.php');?>

<div class="breadcrumbs">
<div class="breadcrumbs-inner">
<div class="row m-0">
<div class="col-sm-4">
<div class="page-header float-left">
<div class="page-title">
<h1>Dashboard</h1>
</div>
</div>
</div>
<div class="col-sm-8">
26
<div class="page-header float-right">
<div class="page-title">
<ol class="breadcrumb text-right">
<li><a href="dashboard.php">Dashboard</a></li>
<li><a href="manage-incomingvehicle.php">Manage
Vehicle</a></li>
<li class="active">Manage Incoming Vehicle</li>
</ol>
</div>
</div>
</div>
</div>
</div>
</div>

<div class="content">
<div class="animated fadeIn">
<div class="row">

<div class="col-lg-12">
<div class="card">
<div class="card-header">
<strong class="card-title">Manage Incoming
Vehicle</strong>
</div>
<div class="card-body">
<table class="table">
<thead>
<tr>
<tr>
<th>S.NO</th>

<th>Parking Number</th>
<th>Owner Name</th>
<th>Vehicle Reg Number</th>

<th>Action</th>
</tr>
</tr>
27
</thead>
<?php
$ret=mysqli_query($con,"select *from tblvehicle where Status=''");
$cnt=1;
while ($row=mysqli_fetch_array($ret)) {
?>

<tr>
<td><?php echo $cnt;?></td>

<td><?php echo $row['ParkingNumber'];?></td>


<td><?php echo $row['OwnerName'];?></td>
<td><?php echo $row['RegistrationNumber'];?></td>

<td><a href="view-incomingvehicle-detail.php?viewid=<?php
echo $row['ID'];?>">View</a> |

<a href="print.php?vid=<?php echo $row['ID'];?>" style="cursor:pointer"


target="_blank">Print</a>
</td>
</tr>
<?php
$cnt=$cnt+1;
}?>
</table>

</div>
</div>
</div>

</div>
</div><!-- .animated -->
</div><!-- .content -->

<div class="clearfix"></div>

</div><!-- /#right-panel -->

28
<!-- Right Panel -->

<!-- Scripts -->


<script
src="https://cdn.jsdelivr.net/npm/jquery@2.2.4/dist/jquery.min.js"></script>
<script
src="https://cdn.jsdelivr.net/npm/popper.js@1.14.4/dist/umd/popper.min.js">
</script>
<script
src="https://cdn.jsdelivr.net/npm/bootstrap@4.1.3/dist/js/bootstrap.min.js"><
/script>
<script src="https://cdn.jsdelivr.net/npm/jquery-match-
height@0.7.2/dist/jquery.matchHeight.min.js"></script>
<script src="assets/js/main.js"></script>

</body>
</html>
<?php } ?>

Exam Time Table Page :

29
<?php
$currDir=dirname(__FILE__);
include("$currDir/defaultLang.php");
include("$currDir/language.php");
include("$currDir/lib.php");
@include("$currDir/hooks/exam_time_table.php");
include("$currDir/exam_time_table_dml.php");

// mm: can the current member access this page?


$perm=getTablePermissions('exam_time_table');
if(!$perm[0]){
echo error_message($Translation['tableAccessDenied'], false);
echo
'<script>setTimeout("window.location=\'index.php?signOut=1\'",
2000);</script>';
exit;
}

$x = new DataList;
$x->TableName = "exam_time_table";

// Fields that can be displayed in the table view


$x->QueryFieldsTV = array(
"`exam_time_table`.`id`" => "id",

"if(`exam_time_table`.`date`,date_format(`exam_time_table`.`date`,'%m/
%d/%Y'),'')" => "date",
"TIME_FORMAT(`exam_time_table`.`time_start`, '%r')" =>
"time_start",
"TIME_FORMAT(`exam_time_table`.`time_end`, '%r')" =>
"time_end",
"`exam_time_table`.`unit_code`" => "unit_code",
"`exam_time_table`.`venue`" => "venue",
"IF( CHAR_LENGTH(`schools1`.`name`), CONCAT_WS('',
`schools1`.`name`), '') /* School */" => "school",
"IF( CHAR_LENGTH(`departments1`.`name`), CONCAT_WS('',
`departments1`.`name`), '') /* Department */" => "department",
"`exam_time_table`.`year_of_study`" => "year_of_study"
);
// mapping incoming sort by requests to actual query fields
30
$x->SortFields = array(
1 => '`exam_time_table`.`id`',
2 => '`exam_time_table`.`date`',
3 => '`exam_time_table`.`time_start`',
4 => '`exam_time_table`.`time_end`',
5 => 5,
6 => 6,
7 => '`schools1`.`name`',
8 => '`departments1`.`name`',
9 => 9
);

// Fields that can be displayed in the csv file


$x->QueryFieldsCSV = array(
"`exam_time_table`.`id`" => "id",

"if(`exam_time_table`.`date`,date_format(`exam_time_table`.`date`,'%m/
%d/%Y'),'')" => "date",
"TIME_FORMAT(`exam_time_table`.`time_start`, '%r')" =>
"time_start",
"TIME_FORMAT(`exam_time_table`.`time_end`, '%r')" =>
"time_end",
"`exam_time_table`.`unit_code`" => "unit_code",
"`exam_time_table`.`venue`" => "venue",
"IF( CHAR_LENGTH(`schools1`.`name`), CONCAT_WS('',
`schools1`.`name`), '') /* School */" => "school",
"IF( CHAR_LENGTH(`departments1`.`name`), CONCAT_WS('',
`departments1`.`name`), '') /* Department */" => "department",
"`exam_time_table`.`year_of_study`" => "year_of_study"
);
// Fields that can be filtered
$x->QueryFieldsFilters = array(
"`exam_time_table`.`id`" => "ID",
"`exam_time_table`.`date`" => "Date",
"`exam_time_table`.`time_start`" => "Time Start",
"`exam_time_table`.`time_end`" => "Time End",
"`exam_time_table`.`unit_code`" => "Unit code",
"`exam_time_table`.`venue`" => "Venue",
"IF( CHAR_LENGTH(`schools1`.`name`), CONCAT_WS('',
`schools1`.`name`), '') /* School */" => "School",
"IF( CHAR_LENGTH(`departments1`.`name`), CONCAT_WS('',
`departments1`.`name`), '') /* Department */" => "Department",
31
"`exam_time_table`.`year_of_study`" => "Year of study"
);

// Fields that can be quick searched


$x->QueryFieldsQS = array(
"`exam_time_table`.`id`" => "id",

"if(`exam_time_table`.`date`,date_format(`exam_time_table`.`date`,'%m/
%d/%Y'),'')" => "date",
"TIME_FORMAT(`exam_time_table`.`time_start`, '%r')" =>
"time_start",
"TIME_FORMAT(`exam_time_table`.`time_end`, '%r')" =>
"time_end",
"`exam_time_table`.`unit_code`" => "unit_code",
"`exam_time_table`.`venue`" => "venue",
"IF( CHAR_LENGTH(`schools1`.`name`), CONCAT_WS('',
`schools1`.`name`), '') /* School */" => "school",
"IF( CHAR_LENGTH(`departments1`.`name`), CONCAT_WS('',
`departments1`.`name`), '') /* Department */" => "department",
"`exam_time_table`.`year_of_study`" => "year_of_study"
);

// Lookup fields that can be used as filterers


$x->filterers = array( 'school' => 'School', 'department' => 'Department');

$x->QueryFrom = "`exam_time_table` LEFT JOIN `schools` as schools1


ON `schools1`.`id`=`exam_time_table`.`school` LEFT JOIN `departments` as
departments1 ON `departments1`.`id`=`exam_time_table`.`department` ";
$x->QueryWhere = '';
$x->QueryOrder = '';

$x->AllowSelection = 1;
$x->HideTableView = ($perm[2]==0 ? 1 : 0);
$x->AllowDelete = $perm[4];
$x->AllowMassDelete = true;
$x->AllowInsert = $perm[1];
$x->AllowUpdate = $perm[3];
$x->SeparateDV = 1;
$x->AllowDeleteOfParents = 0;
$x->AllowFilters = 1;
$x->AllowSavingFilters = 1;
$x->AllowSorting = 1;
32
$x->AllowNavigation = 1;
$x->AllowPrinting = 1;
$x->AllowCSV = 1;
$x->RecordsPerPage = 100;
$x->QuickSearch = 1;
$x->QuickSearchText = $Translation["quick search"];
$x->ScriptFileName = "exam_time_table_view.php";
$x->RedirectAfterInsert =
"exam_time_table_view.php?SelectedID=#ID#";
$x->TableTitle = "Exam time table";
$x->TableIcon = "resources/table_icons/books.png";
$x->PrimaryKey = "`exam_time_table`.`id`";

$x->ColWidth = array( 150, 150, 150, 150, 150, 150, 150, 150);
$x->ColCaption = array("Date", "Time Start", "Time End", "Unit code",
"Venue", "School", "Department", "Year of study");
$x->ColFieldName = array('date', 'time_start', 'time_end', 'unit_code',
'venue', 'school', 'department', 'year_of_study');
$x->ColNumber = array(2, 3, 4, 5, 6, 7, 8, 9);

// template paths below are based on the app main directory


$x->Template = 'templates/exam_time_table_templateTV.html';
$x->SelectedTemplate = 'templates/exam_time_table_templateTVS.html';
$x->TemplateDV = 'templates/exam_time_table_templateDV.html';
$x->TemplateDVP = 'templates/exam_time_table_templateDVP.html';

$x->ShowTableHeader = 1;
$x->TVClasses = "";
$x->DVClasses = "";
$x->HighlightColor = '#FFF0C2';

// mm: build the query based on current member's permissions


$DisplayRecords = $_REQUEST['DisplayRecords'];
if(!in_array($DisplayRecords, array('user', 'group'))){ $DisplayRecords =
'all'; }
if($perm[2]==1 || ($perm[2]>1 && $DisplayRecords=='user' &&
!$_REQUEST['NoFilter_x'])){ // view owner only
$x->QueryFrom.=', membership_userrecords';
$x->QueryWhere="where
`exam_time_table`.`id`=membership_userrecords.pkValue and
membership_userrecords.tableName='exam_time_table' and
lcase(membership_userrecords.memberID)='".getLoggedMemberID()."'";
33
}elseif($perm[2]==2 || ($perm[2]>2 && $DisplayRecords=='group' &&
!$_REQUEST['NoFilter_x'])){ // view group only
$x->QueryFrom.=', membership_userrecords';
$x->QueryWhere="where
`exam_time_table`.`id`=membership_userrecords.pkValue and
membership_userrecords.tableName='exam_time_table' and
membership_userrecords.groupID='".getLoggedGroupID()."'";
}elseif($perm[2]==3){ // view all
// no further action
}elseif($perm[2]==0){ // view none
$x->QueryFields = array("Not enough permissions" => "NEP");
$x->QueryFrom = '`exam_time_table`';
$x->QueryWhere = '';
$x->DefaultSortField = '';
}
// hook: exam_time_table_init
$render=TRUE;
if(function_exists('exam_time_table_init')){
$args=array();
$render=exam_time_table_init($x, getMemberInfo(), $args);
}

if($render) $x->Render();

// hook: exam_time_table_header
$headerCode='';
if(function_exists('exam_time_table_header')){
$args=array();
$headerCode=exam_time_table_header($x->ContentType,
getMemberInfo(), $args);
}
if(!$headerCode){
include_once("$currDir/header.php");
}else{
ob_start(); include_once("$currDir/header.php");
$dHeader=ob_get_contents(); ob_end_clean();
echo str_replace('<%%HEADER%%>', $dHeader, $headerCode);
}

echo $x->HTML;
// hook: exam_time_table_footer
$footerCode='';
34
if(function_exists('exam_time_table_footer')){
$args=array();
$footerCode=exam_time_table_footer($x->ContentType,
getMemberInfo(), $args);
}
if(!$footerCode){
include_once("$currDir/footer.php");
}else{
ob_start(); include_once("$currDir/footer.php");
$dFooter=ob_get_contents(); ob_end_clean();
echo str_replace('<%%FOOTER%%>', $dFooter, $footerCode);
}
?>

Notices Page :

<?php

$currDir=dirname(__FILE__);
include("$currDir/defaultLang.php");
include("$currDir/language.php");
include("$currDir/lib.php");
@include("$currDir/hooks/notices.php");
35
include("$currDir/notices_dml.php");

// mm: can the current member access this page?


$perm=getTablePermissions('notices');
if(!$perm[0]){
echo error_message($Translation['tableAccessDenied'], false);
echo
'<script>setTimeout("window.location=\'index.php?signOut=1\'",
2000);</script>';
exit;
}

$x = new DataList;
$x->TableName = "notices";

// Fields that can be displayed in the table view


$x->QueryFieldsTV = array(
"`notices`.`id`" => "id",
"`notices`.`notice`" => "notice",
"IF( CHAR_LENGTH(`schools1`.`name`), CONCAT_WS('',
`schools1`.`name`), '') /* School */" => "school",
"IF( CHAR_LENGTH(`departments1`.`name`), CONCAT_WS('',
`departments1`.`name`), '') /* Department */" => "department",
"`notices`.`year_of_study`" => "year_of_study",
"if(`notices`.`date`,date_format(`notices`.`date`,'%m/%d/%Y'),'')"
=> "date"
);
// mapping incoming sort by requests to actual query fields
$x->SortFields = array(
1 => '`notices`.`id`',
2 => 2,
3 => '`schools1`.`name`',
4 => '`departments1`.`name`',
5 => 5,
6 => '`notices`.`date`'
);

// Fields that can be displayed in the csv file


$x->QueryFieldsCSV = array(
"`notices`.`id`" => "id",
"`notices`.`notice`" => "notice",
"IF( CHAR_LENGTH(`schools1`.`name`), CONCAT_WS('',
36
`schools1`.`name`), '') /* School */" => "school",
"IF( CHAR_LENGTH(`departments1`.`name`), CONCAT_WS('',
`departments1`.`name`), '') /* Department */" => "department",
"`notices`.`year_of_study`" => "year_of_study",
"if(`notices`.`date`,date_format(`notices`.`date`,'%m/%d/%Y'),'')"
=> "date"
);
// Fields that can be filtered
$x->QueryFieldsFilters = array(
"`notices`.`id`" => "ID",
"`notices`.`notice`" => "Notice",
"IF( CHAR_LENGTH(`schools1`.`name`), CONCAT_WS('',
`schools1`.`name`), '') /* School */" => "School",
"IF( CHAR_LENGTH(`departments1`.`name`), CONCAT_WS('',
`departments1`.`name`), '') /* Department */" => "Department",
"`notices`.`year_of_study`" => "Year of study",
"`notices`.`date`" => "Date"
);

// Fields that can be quick searched


$x->QueryFieldsQS = array(
"`notices`.`id`" => "id",
"`notices`.`notice`" => "notice",
"IF( CHAR_LENGTH(`schools1`.`name`), CONCAT_WS('',
`schools1`.`name`), '') /* School */" => "school",
"IF( CHAR_LENGTH(`departments1`.`name`), CONCAT_WS('',
`departments1`.`name`), '') /* Department */" => "department",
"`notices`.`year_of_study`" => "year_of_study",
"if(`notices`.`date`,date_format(`notices`.`date`,'%m/%d/%Y'),'')"
=> "date"
);

// Lookup fields that can be used as filterers


$x->filterers = array( 'school' => 'School', 'department' => 'Department');

$x->QueryFrom = "`notices` LEFT JOIN `schools` as schools1 ON


`schools1`.`id`=`notices`.`school` LEFT JOIN `departments` as departments1
ON `departments1`.`id`=`notices`.`department` ";
$x->QueryWhere = '';
$x->QueryOrder = '';

$x->AllowSelection = 1;
37
$x->HideTableView = ($perm[2]==0 ? 1 : 0);
$x->AllowDelete = $perm[4];
$x->AllowMassDelete = true;
$x->AllowInsert = $perm[1];
$x->AllowUpdate = $perm[3];
$x->SeparateDV = 1;
$x->AllowDeleteOfParents = 0;
$x->AllowFilters = 1;
$x->AllowSavingFilters = 1;
$x->AllowSorting = 1;
$x->AllowNavigation = 1;
$x->AllowPrinting = 1;
$x->AllowCSV = 1;
$x->RecordsPerPage = 10;
$x->QuickSearch = 1;
$x->QuickSearchText = $Translation["quick search"];
$x->ScriptFileName = "notices_view.php";
$x->RedirectAfterInsert = "notices_view.php?SelectedID=#ID#";
$x->TableTitle = "Notices";
$x->TableIcon = "resources/table_icons/clipboard_empty.png";
$x->PrimaryKey = "`notices`.`id`";

$x->ColWidth = array( 150, 150, 150, 150, 150);


$x->ColCaption = array("Notice", "School", "Department", "Year of
study", "Date");
$x->ColFieldName = array('notice', 'school', 'department', 'year_of_study',
'date');
$x->ColNumber = array(2, 3, 4, 5, 6);

// template paths below are based on the app main directory


$x->Template = 'templates/notices_templateTV.html';
$x->SelectedTemplate = 'templates/notices_templateTVS.html';
$x->TemplateDV = 'templates/notices_templateDV.html';
$x->TemplateDVP = 'templates/notices_templateDVP.html';

$x->ShowTableHeader = 1;
$x->TVClasses = "";
$x->DVClasses = "";
$x->HighlightColor = '#FFF0C2';

// mm: build the query based on current member's permissions


$DisplayRecords = $_REQUEST['DisplayRecords'];
38
if(!in_array($DisplayRecords, array('user', 'group'))){ $DisplayRecords =
'all'; }
if($perm[2]==1 || ($perm[2]>1 && $DisplayRecords=='user' &&
!$_REQUEST['NoFilter_x'])){ // view owner only
$x->QueryFrom.=', membership_userrecords';
$x->QueryWhere="where
`notices`.`id`=membership_userrecords.pkValue and
membership_userrecords.tableName='notices' and
lcase(membership_userrecords.memberID)='".getLoggedMemberID()."'";
}elseif($perm[2]==2 || ($perm[2]>2 && $DisplayRecords=='group' &&
!$_REQUEST['NoFilter_x'])){ // view group only
$x->QueryFrom.=', membership_userrecords';
$x->QueryWhere="where
`notices`.`id`=membership_userrecords.pkValue and
membership_userrecords.tableName='notices' and
membership_userrecords.groupID='".getLoggedGroupID()."'";
}elseif($perm[2]==3){ // view all
// no further action
}elseif($perm[2]==0){ // view none
$x->QueryFields = array("Not enough permissions" => "NEP");
$x->QueryFrom = '`notices`';
$x->QueryWhere = '';
$x->DefaultSortField = '';
}
// hook: notices_init
$render=TRUE;
if(function_exists('notices_init')){
$args=array();
$render=notices_init($x, getMemberInfo(), $args);
}

if($render) $x->Render();

// hook: notices_header
$headerCode='';
if(function_exists('notices_header')){
$args=array();
$headerCode=notices_header($x->ContentType, getMemberInfo(),
$args);
}
if(!$headerCode){
include_once("$currDir/header.php");
39
}else{
ob_start(); include_once("$currDir/header.php");
$dHeader=ob_get_contents(); ob_end_clean();
echo str_replace('<%%HEADER%%>', $dHeader, $headerCode);
}

echo $x->HTML;
// hook: notices_footer
$footerCode='';
if(function_exists('notices_footer')){
$args=array();
$footerCode=notices_footer($x->ContentType, getMemberInfo(),
$args);
}
if(!$footerCode){
include_once("$currDir/footer.php");
}else{
ob_start(); include_once("$currDir/footer.php");
$dFooter=ob_get_contents(); ob_end_clean();
echo str_replace('<%%FOOTER%%>', $dFooter, $footerCode);
}
?>

40
Future scope of project:

The timetabling problem being the hard combinational problem that is would
take more that
just the application of only one principle. The timetable problem only be
solved when the
constraints and allocations are clearly defined and simplified thoroughly and
more than one
principle is applied to it that is hybrid a solution combination of different
solution techniqes.
This system is user friendly and provides faster and better generation of
timetable, which in
turn saves time. There are few points that justify the need of this system:
user friendly
faster and better generation of timetable
Saving time and manpower.

41
Conclusion:
The timetabling problem being the hard combinational problem that is would
take more that just the application of only one principle. The timetable
problem only be solved when the constraints and allocations are clearly
defined and simplified thoroughly and more than one
principle is applied to it that is hybrid a solution combination of different
solution techniqes.

42
Bibliography:

Books:
1. HTML & CSS:The Complete Reference,Fifth Edition by Thomas A.Powell

Web references:

1. https://www.wikipedia.org

2. https://www.tutorialspoint.com

3. https://www.youtube.com

43

You might also like