Tourist Management System
Tourist Management System
Tourist Management System
PROJECT REPORT
(LAB ON PROJECT)
Submitted in partial fulfilment of the requirements for the award of the degree of
BACHELOR OF COMPUTER APPLICATIONS
at the Bharathiar University
By
ANDREW PATRICK L KAVINKUMAR B
(Reg. No.:211CA103) (Reg. No.:21CA114)
ANISH M MANOJ V
(Reg. No.:211CA104) (Reg. No.: 211CA121)
ROSHAN A
(Reg. No.: 211CA132)
Under the Guidance of
NOVEMBER- 2023
DECLARATION
ANISH M MANOJ V
(Reg. No.:211CA104) (Reg. No.: 211CA121)
ROSHAN A
(Reg. No.: 211CA132)
Place: Coimbatore
Date:
CERTIFICATE
Place: Coimbatore
Date:
Internal Examiner
ACKNOWLEDGEMENT
This project was the most significant accomplishment in our life and it would
not have been possible without the blessing of God almighty and those who supported
and believed in our caliber.
We express our sincere thanks to our family and friends for their encouragement, love,
prayer, moral support, advice and sacrifice without which we would not have been able to pursue
the course of our study.
ABSTRACT
·High security
· Data consistency
· Easy to handle
1 INTRODUCTION
2 SYSTEM CONFIGURATION
3 SYSTEM ANALYSIS
4 SYSTEM DESIGN
4.1 ER DIAGRAM
7 CONCLUSION
8 BIBLIOGRAPHY
9 APPENDICES
9.1 SCREENSHOTS
In the modern era, tourism has emerged as one of the largest and fastest-growing industries
worldwide. The allure of exploring new destinations, experiencing diverse cultures, and
escaping from the routines of daily life has fuel this exponential growth. However, the sheer
magnitude of this industry has led to new challenges, primarily in managing the various
aspects of tourism effectively.
The need for efficient management of tourist activities and resources has prompted the
development of the Tourist Management System (TMS). This project aims to address the
complexities of the tourism sector by integrating technology and management strategies to
enhance the overall tourist experience. TMS not only benefits tourists in planning and
enjoying their trips but also aids tourism authorities, service providers, and destination
managers in optimizing their operations.
This project report delves into the concepts, design, implementation, and impact of the
Tourist Management System. It provides an insight into the challenges faced by the tourism
industry and how TMS offers innovative solutions to these challenges. Furthermore, it
explores the architecture and features of the system, shedding light on how it streamlines the
management of tourist information, resources, and services.
Extensibility: VS Code offers a vast library of extensions that can be installed to tailor the
editor to specific programming languages, frameworks, and development needs. This
extensibility makes it a versatile choice for various development tasks.
Customizable Themes: The editor allows users to customize its appearance with themes
and color schemes to create a comfortable and visually appealing coding environment.
Code Navigation: Features like "Go to Definition" and "Find All References" simplify
code navigation, making it easy to explore and understand large codebases.
Integrated Git Version Control: VS Code has built-in Git support, enabling developers to
manage version control, commit changes, and work with Git repositories directly within
the editor.
Task Runner: VS Code can automate tasks using task runners like Grunt and Gulp. This
feature streamlines repetitive development tasks.
Live Share: Visual Studio Live Share is an extension that enables real-time collaboration
between developers. It allows multiple developers to edit and debug code together, even if
they are in different locations.
Intelligent Code Suggestions: The editor provides intelligent code suggestions and
autocompletion, which can significantly boost productivity by reducing the need to type
out repetitive code manually.
Extensions for Popular Frameworks: You can find a plethora of extensions tailored for
popular frameworks and libraries, enhancing your development experience for specific
projects.
Integrated Package Manager: VS Code can be used with package managers like npm
and yarn, simplifying the process of installing and managing project dependencies.
Interactive Playground: The "Jupyter" extension allows for creating interactive code
notebooks for data analysis, making it a powerful tool for data science and machine
learning projects.
Integrated Stack: XAMPP provides a complete web development stack, including Apache
HTTP Server, MySQL database, PHP, and Perl. This integrated stack simplifies the setup of a
local web server for testing and development.
Control Panel: The control panel provides a graphical interface for starting, stopping, and
configuring the individual components of the stack (e.g., Apache and MySQL). This
simplifies server management and saves time.
Apache Web Server: XAMPP includes the Apache HTTP Server, a widely used web server
software, for serving web pages and applications. It supports features like virtual hosts and
SSL/TLS.
MySQL Database: XAMPP incorporates MySQL, a powerful open-source relational
database management system. It allows for easy database creation, management, and
integration into web applications.
PHP Support: XAMPP includes PHP, a popular scripting language for web development. It
supports various PHP versions and extensions, making it suitable for a wide range of web
applications.
Perl Support: In addition to PHP, XAMPP provides Perl support, enabling developers to
work with Perl scripts and applications.
File and Directory Permissions: XAMPP simplifies file and directory permission settings,
ensuring that web applications can access and modify files as needed.
Security Features: While designed for development and testing, XAMPP includes some
basic security features to protect the local environment, such as password protection for
phpMyAdmin.
Extensions and Add-Ons: Users can extend XAMPP's functionality by adding plugins,
modules, and extensions to the Apache server and other components.
Portability: XAMPP's portability allows developers to easily transfer and share their local
development environment, making it convenient for collaborative projects.
Open Source and Free: XAMPP is open-source software and freely available, making it an
accessible tool for both individual developers and small teams.
Community and Support: XAMPP benefits from a supportive community of users and
developers who provide resources, tutorials, and troubleshooting assistance.
HTML 5
CSS 4.15
PHP 8.2.0
SQL 16.0
PHP 8.2.0:
Readonly Classes
PHP 8.1 introduced the readonly feature for class properties. Now, PHP 8.2 is adding
support to declare the entire class as readonly.
If you declare a class as readonly, all its properties will automatically inherit the readonly
feature. Thus, declaring a class readonly is the same as declaring every class property as
readonly.
For example, with PHP 8.1, you had to write this tedious code to declare all class
properties as readonly:
class MyClass { public readonly string $myValue, public readonly int $myOtherValue
public readonly string $myAnotherValue public readonly int $myYetAnotherValue }
Imagine the same with many more properties. Now, with PHP 8.2, you can just write this:
readonly class MyClass { public string $myValue, public int $myOtherValue public string
$myAnotherValue public int $myYetAnotherValue
}
You can also declare abstract or final classes as readonly. Here, the order of the keywords
doesn’t matter.
You can also declare a readonly class with no properties. Effectively, this prevents
dynamic properties while still allowing child classes to declare their readonly properties
explicitly.
Next up, readonly classes can only contain typed properties — the same rule for declaring
individual readonly properties.
You can use the mixed type property if you cannot declare a strictly typed property.
Trying to declare a readonly class without a typed property will result in a Fatal error:
readonly class Type { public $nope; } Fatal error: Readonly property Type::$nope must
have type in ... on line .
Attempting to declare any of these features as readonly will result in a Parse error.
readonly interface Destiny {} Parse error: syntax error, unexpected token "interface",
expecting "abstra
As is the case for all PHP keywords, the readonly keyword is case insensitive.
PHP 8.2 also deprecates dynamic properties (more on that later). But you cannot prevent
dynamic properties from being added to a class. However, doing so for a readonly class
will only result in a Fatal Error.
Fatal error: Readonly property Test::$test must have type in ... on line .
function spam(): null {} function eggs(): false {} Fatal error: Null can not be used as a
standalone type in ... on line ...
To avoid this scenario, PHP 8.2 is adding support for using false and null as standalone
types. With this addition, PHP’s type system is more expressive and complete. You can
now declare the return, parameter, and property types precisely.
Also, PHP still doesn’t include a true type, which seems to be a natural counterpart of the
false type. PHP 8.2 fixes that and adds support for the true type as well. It doesn’t allow
coercion, exactly like how the false type behaves.
Both true and false types are essentially a union type of PHP’s bool type. To avoid
redundancy, you cannot declare these three types together in a union type. Doing so will
result in a compile-time fatal error.
Fatal error: False can not be used as a standalone type in ... on line ...
With DNF types, you can perform type declarations for properties, parameters, and return
values like so:
In some cases, the properties may not be in DNF forms. Declaring them as such will result
in a parse error. But you can always rewrite them as:
A&(B|D)
// Can be rewritten as (A&B)|(A&D)
A|(B&(D|W)|null)
// Can be rewritten as A|(B&D)|(B&W)|null
You should note that each segment of a DNF type must be unique. For instance, declaring
(A&B)|(B&A) is invalid as the two ORed segments are logically the same.
Adding to this, segments that are strict subsets of the other segment aren’t allowed either.
That’s because the superset will already have all instances of the subset, making it
redundant to use DNF.
One common “offender” is PDO which takes the database password as a constructor
parameter and immediately attempts to connect to the database within the constructor,
instead of having a pure constructor and a separate ->connect() method. Thus when the
database connection fails the stack trace will include the database password:
PHP 8.2 allows you to mark such sensitive parameters with a new \SensitiveParameter
attribute. Any parameter marked sensitive will not be listed in your backtraces. Thus, you
can share them without concerns with any third-party services.
Here’s a straightforward example with a single sensitive parameter:
<?php
/*
Fatal error: Uncaught Exception: Error in test.php:8 Stack trace:
#0 test.php(11): test('ham', Object(SensitiveParameterValue), 'butter')
#1 {main}
thrown in test.php on line 8 */
When you generate a backtrace, any parameter with the \SensitiveParameter attribute will
be replaced with a \SensitiveParameterValue object, and its real value will never be stored
in the trace. The SensitiveParameterValue object encapsulates the actual parameter value
— if you need it for any reason.
Have you ever used the mysqli_query() function with dangerously escaping user values
just to run a parameterized MySQLi query?
PHP 8.2 makes running parameterized MySQLi queries easier with the new
mysqli_execute_query($sql, $params) function and mysqli::execute_query method.
And just to be safe, this RFC also includes support for the nullsafe operator ?->.
PHP includes a way to reuse code called Traits. They’re great for code reuse across
classes.
Currently, Traits only allow defining methods and properties, but not constants. That
means you cannot define invariants expected by a Trait within the Trait itself. To get
around this limitation, you need to define constants in its composing class or an interface
implemented by its composing class.
This RFC proposes to allow defining constants in Traits. These constants can be defined
just like you’d define class constants. This example taken straight from the RFC clears the
air around its usage:
trait Foo { public const FLAG_1 = 1; protected const FLAG_2 = 2; private const
FLAG_3 = 2;
Trait constants are also merged into the composing class definition, the same as a Trait’s
property and method definitions. They also have similar restrictions as properties of Traits.
As noted in the RFC, this proposal — though a good start — needs further work to flesh
out the feature.
We can now move to explore all the deprecations in PHP 8.2. This list isn’t quite as big as
its new features:
Up until PHP 8.1, you could dynamically set and retrieve undeclared class properties in
PHP.
For example:
class Post { private int $pid; }
Here, the Post class doesn’t declare a name property. But because PHP allows dynamic
properties, you can set it outside the class declaration. That’s its biggest — and possibly,
the only — advantage.
Dynamic properties allow unexpected bugs and behaviour to crop up in your code. For
instance, if you make any mistake while declaring a class property outside of the class, it’s
easy to lose track of it — especially when debugging any errors within that class.
From PHP 8.2 onwards, dynamic properties are deprecated. Setting a value to an
undeclared class property will emit a deprecation notice the first time the property is set.
However, from PHP 9.0 onwards, setting the same will throw an ErrorException error.
If your code is full of dynamic properties — and there’s a lot of PHP code that is — and if
you want to stop these deprecation notices after upgrading to PHP 8.2, you can use PHP
8.2’s new #[AllowDynamicProperties] attribute to allow dynamic properties on classes.
Another PHP 8.2 change, albeit with a more negligible impact, is to deprecate partially
supported callables.
These callables are termed partially supported because you cannot interact with them
directly via $callable(). You can only get to them with the call_user_func($callable)
function. The list of such callables is not long:
"self::method"
"parent::method"
"static::method"
["self", "method"]
["parent", "method"]
["static", "method"]
["Foo", "Bar::method"]
[new Foo, "Bar::method"]
From PHP 8.2 onwards, any attempts to invoke such callables — such as via
call_user_func() or array_map() functions — will throw a deprecation warning.
The original RFC gives solid reasoning behind this deprecation:
Apart from the last two cases, all of these callables are context-dependent. The method
that "self::method" refers to depends on which class the call or callability check is
performed from. In practice, this usually also holds for the last two cases, when used in the
form of [new Foo, "parent::method"].
As per the original RFC, the is_callable() function and the callable type will continue to
accept these callables as exceptions. But only until support for them is removed entirely
from PHP 9.0 onwards.
To avoid confusion, this deprecation notice scope was expanded with a new RFC — it
now includes these exceptions.
It’s good to see PHP moving towards having a well-defined callable type.
PHP’s built-in functions utf8_encode() and utf8_decode() convert strings encoded in ISO-
8859-1 (“Latin 1”) to and from UTF-8.
However, their names suggest a more general use than their implementation allows. The
“Latin 1” encoding is commonly confused with other encodings like the “Windows Code
Page 1252.”
Furthermore, you’ll usually see Mojibake when these functions cannot convert any string
properly. The lack of error messages also means it’s difficult to spot them, especially
within a sea of otherwise legible text.
PHP 8.2 deprecates both #utf8_encode() and utf8_decode() functions. If you invoke them,
you’ll see these deprecation notices:
Deprecated: Function utf8_encode() is deprecated
Deprecated: Function utf8_decode() is deprecated
The RFC suggests using PHP’s supported extensions like mbstring, iconv, and intl instead.
PHP allows embedding variables in strings with double-quotes (") and heredoc (<<<) in
several ways:
The first two ways have their pros and cons, while the latter two have complex and
conflicting syntax. PHP 8.2 deprecates the last two ways of string interpolation.
You should steer clear of interpolating strings this way going forward:
"Hello, ${world}!";
Deprecated: Using ${} in strings is deprecated
"Hello, ${(world)}!";
Deprecated: Using ${} (variable variables) in strings is deprecated.Starting with PHP 9.0,
these deprecations will be upgraded to throw an exception error.
PHP’s mbstring (multi-byte string) functions help us work with Unicode, HTML
entities, and other legacy text encodings.
However, Base64, Uuencode, and QPrint aren’t text encodings and are still a part of these
functions — primarily due to legacy reasons. PHP also includes separate implementations
of these encodings.
As for HTML entities, PHP has built-in functions — htmlspecialchars() and htmlentities()
— to deal with these better. For example, unlike with mbstring, these functions will also
convert <. >, and & characters to HTML entities.
Moreover, PHP is always improving its built-in functions — just like PHP 8.1 with HTML
encoding and decoding functions.
So, keeping all that in mind, PHP 8.2 is deprecating the use of mbstring for these
encodings (the labels are case-insensitive):
BASE64
UUENCODE
HTML-ENTITIES
html (alias of HTML-ENTITIES) Quoted-Printable
qprint (alias of Quoted-Printable)
From PHP 8.2 onwards, using mbstring to encode/decode any of the above will emit a
deprecation notice. PHP 9.0 will remove mbstring support for these encodings altogether.
As of now, PHP allows both mysqli and PDO_mysql drivers to build against
mysqlnd and libmysql libraries. However, the default and recommended driver since PHP
5.4 has been mysqlnd.
Both these drivers have many advantages and disadvantages. However, removing support
for one of them — ideally, removing libmysql as it’s not the default — will simplify PHP’s
code and unit tests.
To make an argument for this favour, the RFC lists down many advantages of mysqlnd:
In addition, the RFC lists many disadvantages of libmysql — incompatibility with the PHP
memory model, many failing tests, memory leaks, differing functionalities between
versions, etc.
Keeping all this in mind, PHP 8.2 removed support for building mysqli against libmysql.
If you want to add any functionality that’s only available with libmysql, you’ll have to add
it explicitly to mysqlnd as a feature request. Also, you cannot add auto-reconnect.
As of now, PHP’s random functionality heavily relies on the Mersenne Twister state.
However, this state is implicitly stored in PHP’s global area — there’s no way a user can
access it. Adding randomization functions between the initial seeding stage and the
intended usage would break the code.
Maintaining such code can be even more complicated when your code uses external
packages.
Thus, PHP’s current random functionality cannot reproduce random values consistently. It
even fails empirical statistical tests of uniform random number generators, like TestU01’s
Crush and BigCrush. Mersenne Twister’s 32-bit limitation further exacerbates that.
Thus, using PHP’s built-in functions — shuffle(), str_shuffle(), array_rand() — is not
recommended if you need cryptographically secure random numbers. In such cases, you’ll
need to implement a new function using random_int() or similar functions.
However, several issues with this RFC were raised after the voting had begun. This
setback forced the PHP team to note all the issues in a separate RFC, with a ballot option
created for each issue. They’ll decide on moving further only after reaching a consensus.
PHP 8.2 also includes many new functions and minor changes. We’ll mention them below
with links to additional resources:
1. New curl_upkeep function: PHP 8.2 adds this new function to its Curl extension. It calls
the curl_easy_upkeep() function in libcurl, the underlying C library that the PHP Curl
extension uses.
2. New ini_parse_quantity function: PHP INI directives accept data sizes with a multiplier
suffix. For instance, you can write 25 Megabytes as 25M, or 42 Gigabytes as just 42G.
These suffixes are common in PHP INI files but are uncommon elsewhere. This new
function parses the PHP INI values and returns their data size in bytes.
3. New memory_reset_peak_usage function: This function resets the peak memory usage
returned by the memory_get_peak_usage function. It can be handy when you’re running
the same action multiple times and want to record each run’s peak memory usage.
4. Support for no-capture modifier (/n) in preg_* functions: In regex, the () metacharacters
indicate a capturing group. That means all matches for the expression within the bracket
are returned. PHP 8.2 adds a no-capture modifier (/n) to stop this behavior.
5. Make the iterator_*() family accept all iterables: As of now, PHP’s iterator_*() family only
accepts \Traversables (i.e. no plain arrays allowed). It’s unnecessarily limiting, and this
RFC fixes that.
SQL:
What is a database? Quite simply, it’s an organized collection of data. A database
management system (DBMS) such as Access, FileMaker Pro, Oracle or SQL Server
provides you with the software tools you need to organize that data in a flexible manner. It
includes facilities to add, modify or delete data from the database, ask questions (or
queries) about the data stored in the database and produce reports summarizing selected
contents.
Database Tables:
A database most often contains one or more tables. Each table is identified by a name (e.g.
“Customers” or “Orders”). Tables contain records (rows) with data.
Queries:
A query is a question or a request. With MySQL, we can query a database for
Syntax
Example :
In the following example we store the connection in a variable ($con) for later use in the
script. The “die” part will be executed if the connection fails:
Closing a Connection:
The connection will be closed automatically when the script ends. To close the
connection before, use the mysql_close() function:
Create a Database:
Syntax:
To get PHP to execute the statement above we must use the mysql_query()
function. This function is used to send a query or command to a MySQL connection.
Create a Table:
The CREATE TABLE statement is used to create a table in MySQL
Syntax
CREATE TABLE table_name
column_name1
data_type,
column_name2
data_type,
column_name3
data_type,
....
)
MySQL Functions:
MySQL query
mysql_errno — Returns the numerical value of the error message from previous MySQL
operation mysql_error — Returns the text of the error message from previous MySQL
database mysql_set_charset
mysql_tablename —
Number of Modules
After careful analysis the system has been identified to have the following modules:
1. Administrator module
3. Guest user
Package: Admin will create the packages and manage the packages (Create, Update, delete)
Booking: Admin will responsible for manage booking. Admin can confirm and cancel a
booking of traveller.
Manage issues/ Complaint: Admin can take action on any issue /complaint raised by
user(traveller) and Put remark.
Manage pages: Admin can edit the info of all pages that are display on the website,
Dashboard: Here admin can view all count of booking, issues, Enquiries and Users.
Change password: Admin can change own password.
2.5.2.USER(TRAVELLER) MODULE:
Sign in: Here user can login with valid username and password.
Forgot Password: User can recover his/her own password.
Tour history: After login user can book any tour that will show in Tour history. User can
cancel his/her booking before 24 hr of travelling.
Write-us: Here user can raise any issue related to booking. Cancelation etc.
Guest user can visit the website and view the all content of website. Guest user can also
Enquiry.
3.SYSTEM STUDY
4.SYSTEM DESIGN
4.1 ER DIAGRAM(USERS)
ER DIAGRAM (ADMIN)
ER DIAGRAM (PACKAGE):
INPUT STAGES:
• Data recording
• Data transcription
• Data conversion
• Data verification
• Data control
• Data transmission
• Data validation
• Data correction
INPUT TYPES:
At this stage choice has to be made about the input media. To conclude
about the input media consideration has to be given to;
• Type of input
• Flexibility of format
• Speed
• Accuracy
• Verification methods
• Rejection rates
• Ease of correction
• Security
• Easy to use
• Portability
Keeping in view the above description of the input types and input media, it can
be said that most of the inputs are of the form of internal and interactive. As Input
data is to be the directly keyed in by the user, the keyboard can be considered to
be the most suitable input device.
OUTPUT DESIGN:
Outputs from computer systems are required primarily to communicate the results
of processing to users. They are also used to provide a permanent copy of the
results for later consultation. The various types of outputs in general are:
OUTPUT DEFINITION:
OUTPUT MEDIA:
In the next stage it is to be decided that which medium is the most appropriate for
the output. The main considerations when deciding about the output media are:
The outputs were needed to be generated as a hard copy and as well as queries to be
viewed on the screen. Keeping in view these outputs, the format for the output is
taken from the outputs, which are currently being obtained after manual processing.
The standard printer is to be used as output media for hard copies.
5.SYSTEM TESTING & IMPLEMENTATION
The software which has been developed has to be tested to prove its validity. Testing is
considered to be the least creative phase of the whole cycle of system design. In real sense it
is the phase, which helps to bring out the creativity of the other phases, and makes it shine.
By using the technique, it was tested that all the individual logical paths were
executed at least once.
All the logical decisions were tested on both their true and false sides.
All the loops were tested with the data in between the ranges and especially at the
boundary values.
Here this testing is performed to check the user interface.
By the use of these techniques the missing functions are identified and placed in their
positions.
The errors in the interfaces were identified and corrected.
This technique was also used to identify the initialization and termination errors and
correct them.
Login: Entering invalid credentials and checking for error messages.
Login: Entering valid credentials and checking the login.
SOFTWARE TESTING STRATERGIES:
Any software has to be tested with pre planned strategies. To carry out the testing in an
efficient manner certain amount of strategic planning has to be done. Any testing strategy
must incorporate test planning, test case design, test execution and the resultant data
collection and evaluation.
UNIT TESTING:
In Unit testing, we have to test the programs making up the system. The software units in a
system are called modules and routines that are assembled and integrated to perform a
specific function. Unit testing focuses first on the modules, independently of one another, to
locate errors.
This enables to detect errors in coding and logic that are contained within the module. In the
lines of this strategy all the individual functions and modules were put to the test
independently. This method was applied in combination with white and black box testing
techniques to find the errors in each module.
INTEGRATED TESTING:
Again, this software testing strategy has two different approaches namely the top- down
approach in which the integration is carried out from the top-level module to the bottom and
the bottom-up approach in which the integration is carried out from the low-level modules to
the top.
The module was tested using the bottom-up approach by introducing stubs for the top-level
functions. This test was used to identify the errors in the interfaces, the errors in passing the
parameters between the functions and to correct them.
VALIDATION TESTING:
Software validation is achieved through a series of black box test that demonstrate
conformity with requirements. Both plan and procedure are designed to ensure that all
functional required area achieved.
Using validation testing we have tested this project. The user should not leave any input area
blank and it is not allowed to enter improper data. Many validations are needed for each and
every file in the form like textbox validations.
SYSTEM TESTING:
The software and hardware are integrated and a full range of system tests are conducted in an
attempt to uncover error at the software and hardware interface. Before the system is released
to user, testing is the sole duty of the developer to see that the system is free from all kinds of
bugs.
The main purpose of testing an information system is to find out errors and correct them.
Testing was done in two phases
Foreground testing
Background testing
The Foreground testing includes the testing of all kinds of bugs that would be visible to the
user on the screen.
Language Support:
Expand language support to cater to a more diverse group of tourists. This might
include real-time translation services or multilingual content.
Offline Functionality:
Ensure that the system can work offline, as tourists may not always have a reliable
internet connection.
Accessibility Features:
Enhance accessibility features to accommodate tourists with disabilities.
7.CONCLUSION:
To conclude the description about the project: The project, developed using PHP and
MySQL is based on the requirement specification of the user and the analysis of the existing
system, with flexibility for future enhancement.
Thereby the number of hostels are also increasing for the accommodation of the
students studying in this institution. And hence there is a lot of strain on the person who are
running the hostel and software’s are not usually used in this context. This particular project
deals with the problems on managing a hostel and avoids the problems which occur when
carried manually.
2. in.php.net
3. en.wikipedia.org/wiki/PHP
4. www.hotscripts.com/category/php/
5. http://www.apache.org/
6.www.mysql.com/
9.APPENDICES
9.1 SCREENSHOTS:
ADMIN LOGIN:
ADMIN DASHBOARD:
CREATING TOUR PACAKGES:
MANAGING PACKAGE:
UPDATE PACKAGE:
MANAGE USERS:
MANAGE BOOKING:
MANAGE ISSUES:
MANAGE ENQUIRY:
MANAGE PAGES:
USER SIGN-UP:
USER SIGN-IN:
HOME PAGE:
USER PROFILE:
PACKAGE LIST:
PACKAGE DETAILS:
BOOKING:
TICKET ISSUING:
TOUR HISTORY:
HELP:
9.2 SAMPLE CODE
Home Page:
<?php
session_start();
error_reporting(0);
include('includes/config.php');
?>
<!DOCTYPE HTML>
<html>
<head>
<link href='//fonts.googleapis.com/css?family=Roboto+Condensed:400,700,300'
rel='stylesheet' type='text/css'>
<script src="js/jquery-1.12.0.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<!--animate-->
<script src="js/wow.min.js"></script>
<script>
new WOW().init();
</script>
<!--//end-animate-->
</head>
<body>
<?php include('includes/header.php');?>
<div class="banner">
<div class="container">
</div>
</div>
<div class="container">
<div class="rupes">
<div class="col-md-4 rupes-left wow fadeInDown animated animated" data-wow-
delay=".5s" style="visibility: visible; animation-delay: 0.5s; animation-name: fadeInDown;">
<div class="rup-left">
</div>
<div class="rup-rgt">
</div>
<div class="clearfix"></div>
</div>
<div class="rup-left">
</div>
<div class="rup-rgt">
</div>
<div class="clearfix"></div>
</div>
<div class="col-md-4 rupes-left wow fadeInDown animated animated" data-wow-
delay=".5s" style="visibility: visible; animation-delay: 0.5s; animation-name: fadeInDown;">
<div class="rup-left">
</div>
<div class="rup-rgt">
</div>
<div class="clearfix"></div>
</div>
</div>
</div>
<!---holiday---->
<div class="container">
<div class="holiday">
<h3>Package List</h3>
$query = $dbh->prepare($sql);
$query->execute();
$results=$query->fetchAll(PDO::FETCH_OBJ);
$cnt=1;
if($query->rowCount() > 0)
foreach($results as $result)
{ ?>
<div class="rom-btm">
</div>
</div>
</div>
<div class="clearfix"></div>
</div>
<?php }} ?>
</div>
<div class="clearfix"></div>
</div>
<div class="routes">
<div class="container">
<div class="rou-left">
</div>
<h3>80000</h3>
<p>Enquiries</p>
</div>
<div class="clearfix"></div>
</div>
<div class="col-md-4 routes-left">
<div class="rou-left">
</div>
<div class="rou-rgt">
<h3>1900</h3>
<p>Regestered users</p>
</div>
<div class="clearfix"></div>
</div>
<div class="rou-left">
</div>
<div class="rou-rgt">
<h3>7,00,00,000+</h3>
<p>Booking</p>
</div>
<div class="clearfix"></div>
</div>
<div class="clearfix"></div>
</div>
</div>
<?php include('includes/footer.php');?>
<?php include('includes/signup.php');?>
<?php include('includes/signin.php');?>
<?php include('includes/write-us.php');?>
</body>
</html>
PROFILE PAGE:
<?php
session_start();
error_reporting(0);
include('includes/config.php');
if(strlen($_SESSION['login'])==0)
header('location:index.php');
else{
if(isset($_POST['submit6']))
$name=$_POST['name'];
$mobileno=$_POST['mobileno'];
$email=$_SESSION['login'];
$query = $dbh->prepare($sql);
$query->bindParam(':name',$name,PDO::PARAM_STR);
$query->bindParam(':mobileno',$mobileno,PDO::PARAM_STR);
$query->bindParam(':email',$email,PDO::PARAM_STR);
$query->execute();
?>
<!DOCTYPE HTML>
<html>
<head>
<link href='//fonts.googleapis.com/css?family=Roboto+Condensed:400,700,300'
rel='stylesheet' type='text/css'>
<script src="js/jquery-1.12.0.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<!--animate-->
<script src="js/wow.min.js"></script>
<script>
new WOW().init();
</script>
<style>
.errorWrap {
padding: 10px;
margin: 0 0 20px 0;
background: #fff;
.succWrap{
padding: 10px;
margin: 0 0 20px 0;
background: #fff;
</style>
</head>
<body>
<div class="top-header">
<?php include('includes/header.php');?>
<div class="container">
</div>
</div>
<div class="privacy">
<div class="container">
else if($msg){?><div
class="succWrap"><strong>SUCCESS</strong>:<?php echo htmlentities($msg); ?>
</div><?php }?>
<?php
$useremail=$_SESSION['login'];
$query->execute();
$results=$query->fetchAll(PDO::FETCH_OBJ);
$cnt=1;
if($query->rowCount() > 0)
foreach($results as $result)
{ ?>
</p>
<b>Mobile Number</b>
</p>
<b>Email Id</b>
</p>
</p>
</p>
<?php }} ?>
</p>
</form>
</div>
</div>
<?php include('includes/footer.php');?>
<?php include('includes/signup.php');?>
<?php include('includes/signin.php');?>
</body>
</html>
<?php } ?>
SIGN IN PAGE:
<?php
session_start();
if(isset($_POST['signin']))
$email=$_POST['email'];
$password=md5($_POST['password']);
$query-> execute();
$results=$query->fetchAll(PDO::FETCH_OBJ);
if($query->rowCount() > 0)
$_SESSION['login']=$_POST['email'];
} else{
echo "<script>alert('Invalid Details');</script>";
?>
<div class="modal-header">
</div>
<div class="login-grids">
<div class="login">
<div class="login-left">
<ul>
</ul>
</div>
</form>
</div>
<div class="clearfix"></div>
</div>
</div>
</div>
</div>
</div>
</div>
SIGN-UP PAGE:
<?php
error_reporting(0);
if(isset($_POST['submit']))
{
$fname=$_POST['fname'];
$mnumber=$_POST['mobilenumber'];
$email=$_POST['email'];
$password=md5($_POST['password']);
$query = $dbh->prepare($sql);
$query->bindParam(':fname',$fname,PDO::PARAM_STR);
$query->bindParam(':mnumber',$mnumber,PDO::PARAM_STR);
$query->bindParam(':email',$email,PDO::PARAM_STR);
$query->bindParam(':password',$password,PDO::PARAM_STR);
$query->execute();
$lastInsertId = $dbh->lastInsertId();
if($lastInsertId)
header('location:thankyou.php');
else
header('location:thankyou.php');
?>
<!--Javascript for check email availabilty-->
<script>
function checkAvailability() {
$("#loaderIcon").show();
jQuery.ajax({
url: "check_availability.php",
data:'emailid='+$("#email").val(),
type: "POST",
success:function(data){
$("#user-availability-status").html(data);
$("#loaderIcon").hide();
},
error:function (){}
});
</script>
<div class="modal-content">
<div class="modal-header">
<section>
<div class="login-grids">
<div class="login">
<div class="login-left">
<ul>
</ul>
</div>
<div class="login-right">
</form>
</div>
<div class="clearfix"></div>
</div>
</div>
</div>
</section>
</div>
</div>
</div>
session_start();
error_reporting(0);
include('includes/config.php');
if(isset($_POST['submit2']))
$pid=intval($_GET['pkgid']);
$useremail=$_SESSION['login'];
$fromdate=$_POST['fromdate'];
$todate=$_POST['todate'];
$comment=$_POST['comment'];
$status=0;
$query = $dbh->prepare($sql);
$query->bindParam(':pid',$pid,PDO::PARAM_STR);
$query->bindParam(':useremail',$useremail,PDO::PARAM_STR);
$query->bindParam(':fromdate',$fromdate,PDO::PARAM_STR);
$query->bindParam(':todate',$todate,PDO::PARAM_STR);
$query->bindParam(':comment',$comment,PDO::PARAM_STR);
$query->bindParam(':status',$status,PDO::PARAM_STR);
$query->execute();
$lastInsertId = $dbh->lastInsertId();
if($lastInsertId)
$msg="Booked Successfully";
else
?>
<!DOCTYPE HTML>
<html>
<head>
<link href='//fonts.googleapis.com/css?family=Roboto+Condensed:400,700,300'
rel='stylesheet' type='text/css'>
<script src="js/jquery-1.12.0.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<!--animate-->
<script src="js/wow.min.js"></script>
<script>
new WOW().init();
</script>
<script src="js/jquery-ui.js"></script>
<script>
$(function() {
$( "#datepicker,#datepicker1" ).datepicker();
});
</script>
<style>
.errorWrap {
padding: 10px;
margin: 0 0 20px 0;
background: #fff;
.succWrap{
padding: 10px;
margin: 0 0 20px 0;
background: #fff;
</style>
</head>
<body>
<?php include('includes/header.php');?>
<div class="banner-3">
<div class="container">
</div>
</div>
<div class="selectroom">
<div class="container">
<?php
$pid=intval($_GET['pkgid']);
$query = $dbh->prepare($sql);
$results=$query->fetchAll(PDO::FETCH_OBJ);
$cnt=1;
if($query->rowCount() > 0)
foreach($results as $result)
{ ?>
<div class="selectroom_top">
</div>
<div class="ban-bottom">
<div class="bnr-right">
<label class="inputLabel">From</label>
</div>
<div class="bnr-right">
<label class="inputLabel">To</label>
</div>
</div>
<div class="clearfix"></div>
<div class="grand">
<p>Grand Total</p>
<h3>Rs.60000</h3>
</div>
</div>
<h3>Package Details</h3>
<div class="clearfix"></div>
</div>
<div class="selectroom_top">
<h2>Travels</h2>
<ul>
<li class="spe">
<label class="inputLabel">Total Passengers(Adult-Male/Female,
Children-Male/Female)</label>
</li>
<?php if($_SESSION['login'])
{?>
</li>
<?php } ?>
<div class="clearfix"></div>
</ul>
</div>
</div>
</form>
<?php }} ?>
</div>
</div>
<!--- /selectroom ---->
<?php include('includes/footer.php');?>
<?php include('includes/signup.php');?>
<?php include('includes/signin.php');?>
<?php include('includes/write-us.php');?>
</body>
</html>
MANAGE BOOKING:
<?php
session_start();
error_reporting(0);
include('includes/config.php');
if(strlen($_SESSION['alogin'])==0)
header('location:index.php');
else{
// code for cancel
if(isset($_REQUEST['bkid']))
$bid=intval($_GET['bkid']);
$status=2;
$cancelby='a';
$query = $dbh->prepare($sql);
if(isset($_REQUEST['bckid']))
$bcid=intval($_GET['bckid']);
$status=1;
$cancelby='a';
$query = $dbh->prepare($sql);
$query -> bindParam(':status',$status, PDO::PARAM_STR);
?>
<!DOCTYPE HTML>
<html>
<head>
<script src="js/jquery-2.1.4.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$('#table').basictable();
$('#table-breakpoint').basictable({
breakpoint: 768
});
$('#table-swap-axis').basictable({
swapAxis: true
});
$('#table-force-off').basictable({
forceResponsive: false
});
$('#table-no-resize').basictable({
noResize: true
});
$('#table-two-axis').basictable();
$('#table-max-height').basictable({
tableWrapper: true
});
});
</script>
<link href='//fonts.googleapis.com/css?family=Roboto:700,500,300,100italic,100,400'
rel='stylesheet' type='text/css'/>
<style>
.errorWrap {
padding: 10px;
margin: 0 0 20px 0;
background: #fff;
.succWrap{
padding: 10px;
margin: 0 0 20px 0;
background: #fff;
</style>
</head>
<body>
<div class="page-container">
<!--/content-inner-->
<div class="left-content">
<div class="mother-grid-inner">
<?php include('includes/header.php');?>
</div>
<ol class="breadcrumb">
</ol>
<div class="agile-grids">
<div class="agile-tables">
<div class="w3l-table-info">
<h2>Manage Bookings</h2>
<table id="table">
<thead>
<tr>
<th>Booikn id</th>
<th>Name</th>
<th>Mobile No.</th>
<th>Email Id</th>
<th>RegDate </th>
<th>Comment </th>
<th>Status </th>
<th>Action </th>
</tr>
</thead>
<tbody>
$results=$query->fetchAll(PDO::FETCH_OBJ);
$cnt=1;
if($query->rowCount() > 0)
foreach($results as $result)
{ ?>
<tr>
<td><?php if($result->status==0)
echo "Pending";
if($result->status==1)
echo "Confirmed";
}
if($result->status==2 and $result->cancelby=='a')
?></td>
<?php if($result->status==2)
?><td>Cancelled</td>
<?php }?>
</tr>
</tbody>
</table>
</div>
</table>
</div>
<script>
$(document).ready(function() {
var navoffeset=$(".header-main").offset().top;
$(window).scroll(function(){
var scrollpos=$(window).scrollTop();
if(scrollpos >=navoffeset){
$(".header-main").addClass("fixed");
}else{
$(".header-main").removeClass("fixed");
});
});
</script>
<div class="inner-block">
</div>
<?php include('includes/footer.php');?>
</div>
</div>
<!--//content-inner-->
<!--/sidebar-menu-->
<?php include('includes/sidebarmenu.php');?>
<div class="clearfix"></div>
</div>
<script>
$(".sidebar-icon").click(function() {
if (toggle)
$(".page-container").addClass("sidebar-collapsed").removeClass("sidebar-collapsed-back");
$("#menu span").css({"position":"absolute"});
else
$(".page-container").removeClass("sidebar-collapsed").addClass("sidebar-collapsed-back");
setTimeout(function() {
$("#menu span").css({"position":"relative"});
}, 400);
toggle = !toggle;
});
</script>
<!--js -->
<script src="js/jquery.nicescroll.js"></script>
<script src="js/scripts.js"></script>
<script src="js/bootstrap.min.js"></script>
</body>
</html>
<?php } ?>
ADMIN DASHBOARD:
<?php
session_start();
include('includes/config.php');
if(strlen($_SESSION['alogin'])==0)
header('location:index.php');
else{
?>
<!DOCTYPE HTML>
<html>
<head>
<script src="js/jquery-2.1.4.min.js"></script>
<!-- //jQuery -->
<link href='//fonts.googleapis.com/css?family=Roboto:700,500,300,100italic,100,400'
rel='stylesheet' type='text/css'/>
</head>
<body>
<div class="page-container">
<!--/content-inner-->
<div class="left-content">
<div class="mother-grid-inner">
<?php include('includes/header.php');?>
<ol class="breadcrumb">
</ol>
<!--four-grids here-->
<div class="four-grids">
<div class="four-agileits">
<div class="icon">
</div>
<div class="four-text">
<h3>User</h3>
$query->execute();
$results=$query->fetchAll(PDO::FETCH_OBJ);
$cnt=$query->rowCount();
</div>
</div>
</div>
<div class="four-agileinfo">
<div class="icon">
</div>
<div class="four-text">
<h3>Bookings</h3>
$query1->execute();
$results1=$query1->fetchAll(PDO::FETCH_OBJ);
$cnt1=$query1->rowCount();
?>
</div>
</div>
</div>
<div class="four-w3ls">
<div class="icon">
</div>
<div class="four-text">
<h3>Enquiries</h3>
$query2->execute();
$results2=$query2->fetchAll(PDO::FETCH_OBJ);
$cnt2=$query2->rowCount();
?>
</div>
</div>
</div>
<div class="four-wthree">
<div class="icon">
</div>
<div class="four-text">
<h3>Toatal packages</h3>
$query3->execute();
$results3=$query3->fetchAll(PDO::FETCH_OBJ);
$cnt3=$query3->rowCount();
?>
</div>
</div>
</div>
<div class="clearfix"></div>
</div>
<div class="four-grids">
<div class="four-w3ls">
<div class="icon">
</div>
<div class="four-text">
<h3>Issues Riaised</h3>
$query5->execute();
$results5=$query5->fetchAll(PDO::FETCH_OBJ);
$cnt5=$query5->rowCount();
?>
</div>
</div>
</div>
<div class="clearfix"></div>
</div>
<!--//four-grids here-->
<div class="inner-block">
</div>
<?php include('includes/footer.php');?>
</div>
</div>
<!--/sidebar-menu-->
<?php include('includes/sidebarmenu.php');?>
<div class="clearfix"></div>
</div>
<script>
if (toggle)
$(".page-container").addClass("sidebar-collapsed").removeClass("sidebar-collapsed-back");
$("#menu span").css({"position":"absolute"});
else
$(".page-container").removeClass("sidebar-collapsed").addClass("sidebar-collapsed-back");
setTimeout(function() {
$("#menu span").css({"position":"relative"});
}, 400);
toggle = !toggle;
});
</script>
<!--js -->
<script src="js/jquery.nicescroll.js"></script>
<script src="js/scripts.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/raphael-min.js"></script>
<script src="js/morris.js"></script>
<script>
$(document).ready(function() {
jQuery('.small-graph-box').hover(function() {
jQuery(this).find('.box-button').fadeIn('fast');
}, function() {
jQuery(this).find('.box-button').fadeOut('fast');
});
jQuery('.small-graph-box .box-close').click(function() {
jQuery(this).closest('.small-graph-box').fadeOut(200);
return false;
});
//CHARTS
graphArea2 = Morris.Area({
element: 'hero-area',
padding: 10,
behaveLikeLine: true,
gridEnabled: false,
gridLineColor: '#dddddd',
axes: true,
resize: true,
smooth:true,
pointSize: 0,
lineWidth: 0,
fillOpacity:0.85,
data: [
],
lineColors:['#ff4a43','#a2d200','#22beef'],
xkey: 'period',
redraw: true,
ykeys: ['iphone', 'ipad', 'itouch'],
pointSize: 2,
hideHover: 'auto',
resize: true
});
});
</script>
</body>
</html>
<?php } ?>