Professional Documents
Culture Documents
BY
PROJECT TITLE:
This report is submitted to Garissa University School of Pure and Applied Sciences in
Technology
ABSTRACT
Online Bus Booking System is a Web based application that works within a
centralized network. This project presents a review on the software program “Online
Bus Booking System” (OBBS) as should be used in a bus transportation system, a
facility which is used to reserve seats, cancellation of booking and different types of
route enquiries used on securing quick bookings. OBBS is built for managing and
computerizing the traditional database, ticket booking and tracking bus and travel
made. It maintains all customer details, bus details, booking details.
PHP Hypertext Preprocessor (PHP) language was used for the front- end of the
software while the back end was designed using MySQL. The software achieved is
capable of improving the customer hand and relationship management in booking
operations. It is recommended that despite the present functionality of the designed
software, an additional functionality such as the use of Phone Number of the
customers should be there for contacting customers who booked the bus, should be
implemented into the system. Furthermore, other operations carried by the bus
industry such as the courier services should also be integrated in order to enhance the
system.
i
DECLARATION
I hereby declare that the project entitled “Bus Booking System” submitted by me to Garissa
University, impartial fulfilment of the requirement for the award of Diploma in Information
of bona fide project work carried out by me under the guidance of Mr. Mbugua.
Student:
Supervisor:
ii
ACKNOWLEDGEMENT
Thank to Almighty who has given me the ability to successfully complete my project.
Likewise I really acknowledge families and friend that gave me the inspiration to accomplish
this project. Nevertheless I sincerely appreciate my project supervisor Mr. Mbugua for the
iii
Table of Contents
ABSTRACT............................................................................................................................................. i
DECLARATION .................................................................................................................................... ii
ACKNOWLEDGEMENT ..................................................................................................................... iii
LIST OF FIGURES ...................................................................................................................................... v
LIST OF TABLES ........................................................................................................................................ v
1. CHAPTER ONE ......................................................................................................................... - 1 -
1.1 BACKGROUND OF STUDY .................................................................................................... - 1 -
1.2 Fact finding ......................................................................................................................... - 2 -
1.3 SYSTEM ANALYSIS ........................................................................................................ - 2 -
1.4 Challenges of the Current System (Manual Bus Booking System) .................................... - 2 -
1.5 The proposed system (Online Bus Booking System) ......................................................... - 3 -
1.5.1 Objective of the Proposed System .............................................................................. - 3 -
1.5.2 Functional Requirements ............................................................................................ - 4 -
1.5.3 Non-functional Requirements ..................................................................................... - 5 -
1.6 User Requirements: ............................................................................................................. - 5 -
1.7 System Architecture, Tools & Technology .......................................................................... - 5 -
2. CHAPTER TWO ........................................................................................................................ - 7 -
2.1 SYSTEM DESIGN (METHODOLOGY) ..................................................................................... - 7 -
2.1.1 DATA FLOW DIAGRAM (DFD) ...................................................................................... - 8 -
2.1.2 Database Design........................................................................................................ - 11 -
3. CHAPTER THREE .................................................................................................................... - 14 -
3.1 SYSTEM CODING ............................................................................................................... - 14 -
3.2 Input .................................................................................................................................. - 14 -
3.2.1 Home Page Coding ................................................................................................... - 14 -
3.2.2 Database Config.php ................................................................................................. - 19 -
3.2.3 Login Page coding .................................................................................................... - 20 -
3.2.4 Bookings Page Coding .............................................................................................. - 22 -
4. CHAPTER FOUR ................................................................................................................. - 25 -
4.1 SYETEM TESTING AND IMPLEMENTATION ........................................................... - 25 -
4.1.1 FRONT PAGE .......................................................................................................... - 25 -
4.1.2 Logging out ............................................................................................................... - 26 -
RECOMMENDATION .................................................................................................................... - 27 -
CONCLUSION ................................................................................................................................. - 27 -
REFERENCES ................................................................................................................................. - 28 -
iv
LIST OF FIGURES
Figure 1.6-1:Waterfall Methodology .................................................................................................. - 7 -
Figure 1.6-2 User View on Online Bus Booking ................................................................................ - 8 -
Figure 1.6-3 Admin View on Bus Booking System ........................................................................... - 9 -
Figure 1.6-4 Admin Login Module ................................................................................................... - 10 -
Figure 1.6-5 Database Design Structure ........................................................................................... - 11 -
Figure 1.6-6 Routes Screenshot ........................................................................................................ - 13 -
Figure 3.2-2 Home Page Coding....................................................................................................... - 19 -
Figure 3.2-3 Database Config.php ................................................................................................... - 20 -
Figure 3.2-4 Login page Code Screenshot ........................................................................................ - 22 -
Figure 3.2-5 Bookings Page Code Snapshot ..................................................................................... - 24 -
Figure 4.1-1 FRONT PAGE CAPTION ........................................................................................... - 25 -
Figure 4.2-3 Sign Out ....................................................................................................................... - 26 -
LIST OF TABLES
Table 2.1-1 Users Table Structure .................................................................................................... - 11 -
Table 2.1-2 1.8.2.3 Customers Table Structure ............................................................................. - 12 -
Table 2.1-3 Bookings Table Structure .............................................................................................. - 12 -
v
1. CHAPTER ONE
information gathering, processing and dissemination, popularly called the information age. For this
reason, managers and other users of information especially in transport industries are demanding more
kinds of information to support management and operations. They must therefore respond to the
Electronic tickets, or e-tickets, gives evidence that their holders have the permission to enter a place of
entertainment, use a means of transportation, or have access to some Internet services. The design of
this online system will be beneficial to the company because it has not existed before.
Therefore, Bus Transport industry a viable investment whose primary objectives are: to spread comfort
and hospitality to passengers away from their home, to make profit, will definitely appreciate a system
which can automate its manual operations in the area of bus ticket booking in order to meet customers
increasing demand during peak and off peak seasons. The ultimate expectation is to inspire a
feasibility study aimed at providing proper guidance and awareness to any future potential investors,
Currently, staff at the bus ticket counter is using an internal system to sell tickets at the counter and
customers who are unable to buy bus ticket online at this moment would have to go to the counter to a
buy bus ticket. Sometimes, customers’ needs to queue up a long queue to buy bus ticket and ask for
-1-
However, Online Bus Booking System enables the customer to buy bus ticket, make payment, and ask
for information online easily. Furthermore, staff can sell bus ticket using Bus Ticket Booking System
after checking the bus ticket availability for the customer and print the bus ticket to the customer.
Observation
Observation method was used to develop this project. Currently, staff at the bus ticket counter is using
an internal system to sell tickets at the counter and customers who are unable to buy bus ticket online
at this moment would have to go to the counter to a buy bus ticket. Sometimes, customers’ needs to
queue up a long queue to buy bus ticket and ask for information and this brings a lot of inconveniences
to customers. .
Also called requirement analysis, there must be some requirement needed to design and implement the
proposed system. The requirement should be based on policies and plans of the organization and on
Currently, the type of system being used at the counter is an internal system which is manually
used in selling the bus tickets. The problems facing the company are that customers have to go
to the counter to buy bus ticket or ask for bus schedule, customers will also have to queue up for
a long time in order to secure a bus ticket and will also need to pay cash when they buy the bus
ticket.
-2-
1.5 The proposed system (Online Bus Booking System)
The proposed online bus booking system will provide remarkable solutions to all these problems
Badariah, (2007) emphasized that the Online Transport Booking System was to make sure that users
could make their online booking or bookings to their desired transport companies with facilities
provided by the new system. He pointed out that the methodology and technology being used in this
new transport system could be applied to other areas of activities. The user who wants to use the
Similarly, after considering the type of system which Badariah adopted, this project will be designed
with the same aim of presenting the customers with the opportunity of making bookings at the comfort
of their homes or offices without being faced with the challenges of queuing at counters before
embarking on any journey. This project will also enlighten prospective customers and users of the
system on the need to patronize the system as it displays more advantages over the old system by
providing an easy to use Graphic User interface (GUI) interaction, checking availability of routes
The main purpose of this study is to automate the manual procedures of booking a bus ticket for any
journey made. This system is said to be an automatic system and customers can select seats by
-3-
Providing a web-based bus ticket booking function where a customer can buy bus ticket
through the online system without a need to queue up at the counter to purchase a bus ticket.
Enabling customers to check the availability and types of busses online. Customer can check
Admin user privileges in updating and canceling payment, route and vehicle records.
Sign In
The Passenger & Admin have the login page to access the pages of the site using user id and
password. They would be redirected to the pages and the rights are provides as per the role of
the user.
Sign Up
The Passenger has to provide his/her following detail for once and they can sign in to the site
and book the ticket online.
Admin can handle the Bus schedule and also see the booking chart.
Search Buses
The passenger can search many buses from site as he wants and he/she has to book the ticket by
signing in to the system.
-4-
View Bus Layout
Passenger can view the bus layout with free seats and reserved seats.
- The application should provide security for the data in database by use of passwords in
1. User has to register with the system in order to use all the facilities available in the system
2. Registration is by using
3. Password is a case sensitive, users should choose a password that can be remembered.
4. After use of the system, it advised you logout (refer to user manual on how to logout)
Software Requirements
FRONT-END :- PHP (v5.3.5)
-5-
Web Server :- Apache Web Server (v2.2.17)
Hardware Requirements
RAM :- 2GB
Hard-Disk :- 500GB
-6-
2. CHAPTER TWO
For any project to be completed, it has to go through stages called Development Life Cycles. System
Development Life Cycle (SDLC) is the process of understanding how an Information System (IS) can
support business needs, designing the system, building it and delivering it to users. The SDLC
In order for this project to be developed, the methodology that will be used is the System Structured
Analysis and Design Methodology. The SSADM is classified as a Waterfall Development. With
Waterfall Development, analyst and users proceed sequentially from one phase to the next and each
phase can be mapped out and evaluated (Hevner, 2004). Below, in figure 1.6-1 is a diagram on the
waterfall methodology.
Design
Implementation
System
-7-
2.1.1 DATA FLOW DIAGRAM (DFD)
A data flow diagram (DFD) is a graphical representation of the "flow" of data through an
information system, modeling its process aspects. A DFD shows what kind of information will
be input to and output from the system, where the data will come from and go to, and where the
The development of DFD’S is done in several levels. Each process in lower level diagrams can
be broken down into a more detailed DFD in the next level. The Top-level diagram is often
called context diagram. It consist a single process bit, which plays vital role in studying the
current system. The process in the context level diagram is exploded into other process at the
USER Inquiry/Booking/Paym
1
Bus
Tickets/service details
Booking
System
Maintain Master
ADMIN
Generate
-8-
ADMIN VIEW ON BUS BOOKING SYSTEM
1
USER
ViewSchedule
Booking/booking
3
2.
Pri Booking/Cancellation Make
nt Verifydetails
booking and
Tic payment
ket
Update booking information
Response to queries
4 Database
from outside of that system (the user). In figure 1.6 -4 , a use case of the activities in a bus
-9-
Bus Availability Enqu
iry
Make Booking
User
Cancel Booking
Print Ticket
Administrator
Login
Update Route
Update Bus
In other words a use case describes “who” can do “what” with the system in
question. The use case technique is used to capture a system’s behavioural
requirements by detailing scenario-driven threads through the functional
requirements.
- 10 -
2.1.2 Database Design
- 11 -
2.1.2.3 Customers Table Structure
- 12 -
Figure 2.1-6 Routes Screenshot
- 13 -
3. CHAPTER THREE
3.2 Input
The platform used to develop this program is basically PHP 4.7.4 as backbone, HTML, CSS as Front
End and JavaScript. Also there are some other web scripting languages like JQuery and bootstrap CSS.
<?php
/*
Classes of first and other blocks
---------------------------------
For possible classes, refer to the Bootstrap grid columns, panels and buttons
documentation:
Grid columns: http://getbootstrap.com/css/#grid
Panels: http://getbootstrap.com/components/#panels
Buttons: http://getbootstrap.com/css/#buttons
*/
$block_classes = array(
'first' => array(
'grid_column' => 'col-sm-12 col-md-8 col-lg-6',
'panel' => 'panel-warning',
- 14 -
'link' => 'btn-warning'
),
'other' => array(
'grid_column' => 'col-sm-6 col-md-4 col-lg-3',
'panel' => 'panel-info',
'link' => 'btn-info'
)
);
?>
<style>
.panel-body-description{
margin-top: 10px;
height: 100px;
overflow: auto;
}
.panel-body .btn img{
margin: 0 10px;
max-height: 32px;
}
</style>
<?php
/* accessible tables */
$arrTables = get_tables_info();
if(is_array($arrTables) && count($arrTables)){
/* how many table groups do we have? */
$groups = get_table_groups();
$multiple_groups = (count($groups) > 1 ? true : false);
$i = 0; $current_group = '';
foreach($tg as $tn => $tgroup){
$tc = $arrTables[$tn];
/* is the current table filter-first? */
$tChkFF = array_search($tn, array());
/* hide current table in homepage? */
$tChkHL = array_search($tn, array());
- 15 -
/* allow homepage 'add new' for current table? */
$tChkAHAN = array_search($tn, array());
$t_perm = getTablePermissions($tn);
$can_insert = $t_perm['insert'];
- 16 -
<?php if($tChkHL === false || $tChkHL === null){ /* if table is
not set as hidden in homepage */ ?>
<div id="<?php echo $tn; ?>-tile" class="<?php echo (!$i ?
$block_classes['first']['grid_column'] : $block_classes['other']['grid_column']);
?>">
<div class="panel <?php echo (!$i ?
$block_classes['first']['panel'] : $block_classes['other']['panel']); ?>">
<div class="panel-body">
<?php if($can_insert && $tChkAHAN !== false &&
$tChkAHAN !== null){ ?>
- 17 -
<div class="row custom_links" id="custom_links">
<?php
/* custom home links, as defined in "hooks/links-
home.php" */
echo get_home_links($homeLinks, $block_classes['other'],
'*');
?>
</div>
<?php } ?>
<?php if($i == (count($arrTables) - 1) && $multiple_groups){ /*
grouping, end last group & row */ ?>
<script>
$j(function(){
var table_descriptions_exist = false;
$j('div[id$="-tile"] .panel-body-description').each(function(){
if($j.trim($j(this).html()).length) table_descriptions_exist = true;
});
if(!table_descriptions_exist){
$j('div[id$="-tile"] .panel-body-description').css({height: 'auto'});
}
- 18 -
$j('.panel-body .btn').height(32);
$j('.btn-add-new').click(function(){
var tn = $j(this).attr('id').replace(/_add_new$/, '');
modal_window({
url: tn + '_view.php?addNew_x=1&Embedded=1',
size: 'full',
title: $j(this).prev().children('.table-caption').text() + ": <?php
echo html_attr($Translation['Add New']); ?>"
});
return false;
});
<?php
$dbServer = 'localhost';
$dbUsername = 'root';
$dbPassword = '';
$dbDatabase = 'busbooking';
$adminConfig = array(
- 19 -
'adminUsername' => "admin",
'adminPassword' => "21232f297a57a5a743894a0e4a801fc3",
'notifyAdminNewMembers' => "0",
'defaultSignUp' => "1",
'anonymousGroup' => "anonymous",
'anonymousMember' => "guest",
'groupsPerPage' => "10",
'membersPerPage' => "10",
'recordsPerPage' => "10",
'custom1' => "",
'custom2' => "",
'custom3' => "",
'custom4' => "",
'MySQLDateFormat' => "%m/%d/%Y",
'PHPDateFormat' => "n/j/Y",
'PHPDateTimeFormat' => "m/d/Y, h:i a",
'senderName' => "Membership management",
'senderEmail' => "admin@admin.com",
'approvalSubject' => "Your membership is now approved",
'approvalMessage' => "Dear member,\r\n\r\nYour membership is now approved by
the admin. You can log in to your account
here:\r\nhttp://localhost/busbooking\r\n\r\nRegards,\r\nAdmin",
'hide_twitter_feed' => "",
'maintenance_mode_message' => "<b>Our website is currently down for
maintenance</b><br>\r\nWe expect to be back in a couple hours. Thanks for your
patience.",
'mail_function' => "mail",
'smtp_server' => "",
'smtp_encryption' => "",
'smtp_port' => "25",
'smtp_user' => "",
'smtp_pass' => ""
);
- 20 -
<div class="row">
<div class="col-sm-6 col-lg-8" id="login_splash">
<!-- customized splash content here -->
</div>
<div class="col-sm-6 col-lg-4">
<div class="panel panel-success">
<div class="panel-heading">
<h1 class="panel-title"><strong><?php echo $Translation['sign in
here']; ?></strong></h1>
<?php if(sqlValue("select count(1) from membership_groups where
allowSignup=1")){ ?>
<a class="btn btn-success pull-right"
href="membership_signup.php"><?php echo $Translation['sign up']; ?></a>
<?php } ?>
<div class="clearfix"></div>
</div>
<div class="panel-body">
<form method="post" action="index.php">
<div class="form-group">
<label class="control-label" 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>
<span class="help-block"><?php echo $Translation['forgot
password']; ?></span>
</div>
<div class="checkbox">
<label class="control-label" for="rememberMe">
<input type="checkbox" name="rememberMe" id="rememberMe"
value="1">
<?php echo $Translation['remember me']; ?>
</label>
</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>
- 21 -
</div>
</form>
</div>
</div>
</div>
</div>
<script>document.getElementById('username').focus();</script>
<?php include_once("$currDir/footer.php"); ?>
<?php
$currDir = dirname(__FILE__);
include("$currDir/defaultLang.php");
include("$currDir/language.php");
include("$currDir/lib.php");
handle_maintenance();
$table_perms = getTablePermissions('bookings');
if(!$table_perms[0]){ die('// Access denied!'); }
$mfk = $_GET['mfk'];
$id = makeSafe($_GET['id']);
$rnd1 = intval($_GET['rnd1']); if(!$rnd1) $rnd1 = '';
if(!$mfk){
die('// No js code available!');
}
switch($mfk){
- 22 -
case 'id_number':
if(!$id){
?>
$j('#fullname<?php echo $rnd1; ?>').html(' ');
$j('#phone<?php echo $rnd1; ?>').html(' ');
<?php
break;
}
$res = sql("SELECT `customers`.`id` as 'id', `customers`.`fullname` as
'fullname', `customers`.`phone` as 'phone', `customers`.`id_number` as 'id_number'
FROM `customers` WHERE `customers`.`id`='{$id}' limit 1", $eo);
$row = db_fetch_assoc($res);
?>
$j('#fullname<?php echo $rnd1; ?>').html('<?php echo
addslashes(str_replace(array("\r", "\n"), '', nl2br($row['fullname']))); ?> ');
$j('#phone<?php echo $rnd1; ?>').html('<?php echo
addslashes(str_replace(array("\r", "\n"), '', nl2br($row['phone']))); ?> ');
<?php
break;
case 'bus':
if(!$id){
?>
$j('#amount<?php echo $rnd1; ?>').html(' ');
$j('#date<?php echo $rnd1; ?>').html(' ');
$j('#time<?php echo $rnd1; ?>').html(' ');
<?php
break;
}
$res = sql("SELECT `availability`.`id` as 'id', IF(
CHAR_LENGTH(`buses1`.`number`), CONCAT_WS('', `buses1`.`number`), '') as 'bus', IF(
CHAR_LENGTH(`routes1`.`name`) || CHAR_LENGTH(`routes1`.`time`), CONCAT_WS('',
`routes1`.`name`, ' :', `routes1`.`time`), '') as 'route', IF(
CHAR_LENGTH(`routes1`.`amount`), CONCAT_WS('', `routes1`.`amount`), '') as
'amount', if(`availability`.`date`,date_format(`availability`.`date`,'%m/%d/%Y'),'')
as 'date', TIME_FORMAT(`availability`.`time`, '%r') as 'time',
`availability`.`status` as 'status' FROM `availability` LEFT JOIN `buses` as buses1
ON `buses1`.`id`=`availability`.`bus` LEFT JOIN `routes` as routes1 ON
`routes1`.`id`=`availability`.`route` WHERE `availability`.`id`='{$id}' limit 1",
$eo);
$row = db_fetch_assoc($res);
?>
$j('#amount<?php echo $rnd1; ?>').html('<?php echo
addslashes(str_replace(array("\r", "\n"), '', nl2br($row['amount']))); ?> ');
$j('#date<?php echo $rnd1; ?>').html('<?php echo
addslashes(str_replace(array("\r", "\n"), '', nl2br($row['date']))); ?> ');
- 23 -
$j('#time<?php echo $rnd1; ?>').html('<?php echo
addslashes(str_replace(array("\r", "\n"), '', nl2br($row['time']))); ?> ');
<?php
break;
?>
Figure 3.2-4 Bookings Page Code Snapshot
- 24 -
4. CHAPTER FOUR
User Login area – if you’re a registered user, you need to enter your username and password to login.
- 25 -
Sign Up – If you are new to the system, click SIGN UP button at the top right corner of the form.
SIGN UP.
Users can sign out the system by clicking the arrow at the top-right corner of the page.
- 26 -
RECOMMENDATION
Research and development are continuous processes; this is the same in computer and software
development. However, this work is recommended for Imo Transport Company Limited,
Owerri, since their operation are still carried out manually and it can also be useful to other Bus
Transportation industries whose processes are still manually done. The system can contribute
more on those bus representatives handling the account if it can generate reports by trip so that
they will no longer go to a certain module to check the reservation and its details. Also, it will
be more beneficial to both clients and bus representatives if clients can create an account just
like in airlines websites. With that, the system can record the modifications made. Other
functionalities such as E-Mail facility for sending Ticket to passenger, Online Payment with
Credit Card / Debit Card etc. could also be integrated into the system in order to enhance user
CONCLUSION
It can be observed that computer applications are very important in every field of human endeavor.
Here all the information about customer that made reservation can be gotten just by clicking a button
with this new system, some of the difficulties encountered with the manual system are overcome. It
will also reduce the workload of the staff, reduce the time used for making reservation at the bus
terminal and also increase efficiency. The application also has the ability to update records in various
files automatically thereby relieving the company’s staff the stress of working from file security of
data.
This project, as a whole, will give a new way in bus reservations and ticketing processes. The
automation and management of seats and reservations will be done online. However, this project does
not limit the walk-in passengers that is passengers who visit the company’s counter because it also
caters for them. This also lessens the use of papers like in the traditional way of ticketing
- 27 -
REFERENCES
Hevner A., March S., Park J., and Ram, S. (2004): Design Science in Information
Kevin O. C., (2012): Web-Based Bus Reservation and Ticketing System: College of
Computer Studies, Ateneo de Naga University, Naga City, Philippines February 26,
2012
http:/!en.wikipedia.ordwiki,Web application
- 28 -