100% found this document useful (1 vote)
648 views

Event-Management System Python - Sandya

The document discusses event management and describes the process of planning and executing events. It covers topics like the event management industry, roles of event managers, the event management process, and requirements for an online event management system including hardware, software, and database needs.

Uploaded by

Dhananjaya dhanu
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
648 views

Event-Management System Python - Sandya

The document discusses event management and describes the process of planning and executing events. It covers topics like the event management industry, roles of event managers, the event management process, and requirements for an online event management system including hardware, software, and database needs.

Uploaded by

Dhananjaya dhanu
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 67

INTRODUCTION

Event management is a process of organizing a professional and focused event, for a particular
target audience. It involves visualizing concepts, planning, budgeting, organizing and executing
events such as wedding, musical concerts, corporate seminars, exhibitions, birthday celebrations,
theme parties, etc. Event Management is a multi-million dollar industry, growing rapidly, with
events hosted regularly. Surprisingly, there is no formalized research conducted to access the
growth of this industry. The industry includes fields such as the MICE (Meetings, Incentives and
Events), exhibitions, conferences and seminars as well as live music and sporting events. On the
profession side, event management is a glamorous and exciting profession that demands a lot of
hard work and dynamism. The logistics side of the industry is paid less than the
sales/sponsorship side, though some may say that these are two different industries.

Event management is the application of project management to the creation and development of
large scale events. The process of planning and coordinating the event is usually referred to
as event planning and which can include budgeting, scheduling, site selection, acquiring
necessary permits, coordinating transportation and parking, arranging for speakers or
entertainers, arranging decor, event security, catering, coordinating with third party vendors, and
emergency plans. The events industry now includes events of all sizes from the Olympics down
to business breakfast meetings. Many industries, charitable organizations, and interest groups
hold events in order to market themselves, build business relationships, raise money, or celebrate
achievement. An event refers to a social gathering or activity, such as a festival,( for example a
musical festival), a ceremony( for example a marriage ) and a party(for example a birthday
party).There are mainly 3 types of event management:

 Corporate Event Management


 Product Launch Event Management
 Special Event Management

EVENT MANAGER

The Event Manager is the person who plans and executes the event. Event managers and their
teams are often behind-the-scenes running the event. Event managers may also be involved in
more than just the planning and execution of the event, but also brand building, marketing and
communication strategy. The event manager is an expert at the creative, technical and logistical
elements that help an event succeed. This includes event design, audiovisual production,
scriptwriting, logistics, budgeting, negotiation and, of course, client service. It is a
multidimensional profession.

EVENT MANAGEMENT PROCESS

There are 2 stages of event management process namely, Event planning and Event control.

 Event Planning: To plan an event we must consider the following areas of an event,
viz, feasibility, promotion, site choice/design, staging, shutdown, site map, event
proposal.
 Event Control: To control an event we must look on the following areas logistics,
negotiations, costing & cash flow, event manual, I.T, decision making and change,
risk management.

SCOPE OF THE PROJECT

The objective of this application is to develop a system that effectively manages all the data
related to the various events that take place in an organization. The purpose is to maintain a
centralized database of all event related information. The goal is to support various functions and
processes necessary to manage the data efficiently.

EXISTING SYSTEM

This existing system is not providing secure registration and profile management of all the users
properly. This system is not providing on-line help. This system doesn’t provide
tracking of users activities and their progress. This manual system gives us very less security for
saving data and some data may be lost due to mismanagement. This system is not providing
event management through internet. This system is not providing proper events information. The
system is giving manual information through the event management executer.
Further Drawbacks of the Existing System:
The following are the drawbacks of the existing manual System.

Time Delay: In the existing system, information related to all transactions is


stored in different registers. Since all the transactions are stored in different
registers it takes lot of time to prepare different reports.

Redundancy: As the information passes through different registers, each register


is consolidated and sent to next register. So the same information is being
tabulated at each register, which involves lot of complication and duplication in
work, thus it causes redundancy.

Accuracy: Since the same data is compiled at different sections, the possibility of
tabulating data wrongly increases. Also if the data is more, validations become
difficult. This may result in loss of accuracy of data.

Information Retrieval: As the information is stored in the particular Format, it


can only be retrieved in the same format. But if it is to be retrieve in different
format, it is not possible.

Storage Media: In the existing system, data transaction being stored on too long
registers it is very difficult to refer after some time.

Reports: At the various reports are tabulated manually. They are not such

Attractive and require more time. They do not provide adequate help in maintaining
the accounts.

Enquiry: Enquiry for different level of information is much more difficult. On

Line enquiry of data is not possible.

FEASIBILITY STUDY
A feasibility study is a high-level capsule version of the entire System analysis and
Design Process. The study begins by classifying the problem definition. Feasibility is
to determine if it’s worth doing. Once an acceptance problem definition has been
generated, the analyst develops a logical model of the system. A search for
alternatives is analyzed carefully. There are 3 parts in feasibility study.

Operational Feasibility

Operational feasibility is the measure of how well a proposed system solves the
problems, and takes advantage of the opportunities identified during scope
definition and how it satisfies the requirements identified in the requirements
analysis phase of system development.The operational feasibility assessment
focuses on the degree to which the proposed development projects fits in with the
existing business environment and objectives with regard to development schedule,
delivery date, corporate culture and existing business processes.To ensure success,
desired operational outcomes must be imparted during design and development.
These include such design-dependent parameters as reliability, maintainability,
supportability, usability, producibility, disposability, sustainability, affordability and
others. These parameters are required to be considered at the early stages of
design if desired operational behaviours are to be realised. A system design and
development requires appropriate and timely application of engineering and
management efforts to meet the previously mentioned parameters. A system may
serve its intended purpose most effectively when its technical and operating
characteristics are engineered into the design. Therefore, operational feasibility is a
critical aspect of systems engineering that needs to be an integral part of the early
design phases.

Technical Feasibility

This involves questions such as whether the technology needed for the system
exists, how difficult it will be to build, and whether the firm has enough experience
using that technology. The assessment is based on outline design of system
requirements in terms of input, processes, output, fields, programs and
procedures.This can be qualified in terms of volume of data,trends,frequency of
updating inorder to give an introduction to the technical system. The application is
the fact that it has been developed on windows XP platform and a high
configuration of 1GB RAM on Intel Pentium Dual core processor.This is technically
feasible .The technical feasibility assessment is focused on gaining an
understanding of the present technical resources of the organization and their
applicability to the expected needs of the proposed system. It is an evaluation of
the hardware and software and how it meets the need of the proposed system.

Economical Feasibility

Establishing the cost-effectiveness of the proposed system i.e. if the benefits do not
outweigh the costs then it is not worth going ahead. In the fast paced world today
there is a great need of online social networking facilities. Thus the benefits of this
project in the current scenario make it economically feasible. The purpose of the
economic feasibility assessment is to determine the positive economic benefits to
the organization that the proposed system will provide. It includes quantification
and identification of all the benefits expected. This assessment typically involves a
cost/benefits analysis.

REQUIREMENT ANALYSIS

HARDWARE REQUIREMENTS

 Hardware :Processor Intel dual core and above


 Clock speed :3.0 GHz
 RAM size :512 MB
 Hard Disk capacity :400 GB
 Monitor type :15 inch color monitor
SOFTWARE REQUIREMENTS

 Operating System :Windows XP, Windows 7, Windows 8,Windows 10


 Application :HTML, CSS, JS, Python
 Browser :Google chrome, Firefox
 Database :MySQL
 Documentation :MS-Office

PROPOSED SYSTEM

Event Management System is an Online event management software project that serves the
functionality of an event manager. The system allows only registered users to login and new
users are allowed to register on the application. This is a web application but desktop application
of the same application is also available. The project provides most of the basic functionality
required for an event. It allows the user to select from a list of event types. Once the user enters
an event type eg(Marriage, Stage Show etc), the system then allows the user to select the date
and time of event, place and the event equipment’s. All this data is logged in the database and the
user is setting up his username and password while registering . The data is then sent to the
administrator (website owner) and they may interact with the client as per his requirements and
his contact data stored in the database.

ADVANTAGES

 The system is useful as it calculates an exact cost for all the resources required during the
event.
 The user gets all the resources at a single place instead of wandering around for these.
 This system is effective and saves time and cost of the users.
DESIGN

Introduction:

Design is the first step in the development phase for any


techniques and principles for the purpose of defining a device, a process or system in
sufficient detail to permit its physical realization.

Once the software requirements have been analyzed and


specified the software design involves three technical activities - design, coding,
implementation and testing that are required to build and verify the software.

The design activities are of main importance in this phase,


because in this activity, decisions ultimately affecting the success of the software
implementation and its ease of maintenance are made. These decisions have the final
bearing upon reliability and maintainability of the system. Design is the only way to
accurately translate the customer’s requirements into finished software or a system.

Design is the place where quality is fostered in


development. Software design is a process through which requirements are translated
into a representation of software. Software design is conducted in two steps.
Preliminary design is concerned with the transformation of requirements into data.
UML Diagrams:

Actor:
A coherent set of roles that users of use cases play when interacting with the use
`cases.

Use case:
A description of sequence of actions, including variants, that a
system performs that yields an observable result of value of an actor.

UML stands for Unified Modeling Language. UML is a language for specifying,
visualizing and documenting the system. This is the step while developing any
product after analysis. The goal from this is to produce a model of the entities
involved in the project which later need to be built. The representation of the entities
that are to be used in the product being developed need to be designed.

There are various kinds of methods in software design:


They are as follows:
Use case Diagram
Sequence Diagram
Collaboration Diagram
Activity Diagram
State chat Diagram
Use case Diagrams:

Use case diagrams model behavior within a system and helps the developers
understand of what the user require. The stick man represents what’s called an actor.

Use case diagram can be useful for getting an overall view of the system
and clarifying that can do and more importantly what they can’t do.

Use case diagram consists of use cases and actors and shows the interaction between
the use case and actors.

 The purpose is to show the interactions between the use case and actor.
 To represent the system requirements from user’s perspective.
 An actor could be the end-user of the system or an external system.
Use case Diagram

A Use case is a description of set of sequence of actions. Graphically it is rendered


as an ellipse with solid line including only its name. Use case diagram is a
behavioral diagram that shows a set of use cases and actors and their relationship. It
is an association between the use cases and actors. An actor represents a real-world
object. Primary Actor – Sender, Secondary Actor Receiver.

Sequence Diagram

Sequence diagram and collaboration diagram are called INTERACTION


DIAGRAMS. An interaction diagram shows an interaction, consisting of set of
objects and their relationship including the messages that may be dispatched among
them.

A sequence diagram is an introduction that empathizes the time ordering of


messages. Graphically a sequence diagram is a table that shows objects arranged
along the X-axis and messages ordered in increasing time along the Y-axis.

Login Schema
DATA FLOW DIAGRAMS:

The DFD takes an input-process-output view of a system i.e. data objects flow into
the software, are transformed by processing elements, and resultant data objects flow
out of the software.

Data objects represented by labeled arrows and transformation are


represented by circles also called as bubbles. DFD is presented in a hierarchical
fashion i.e. the first data flow model represents the system as a whole. Subsequent
DFD refine the context diagram (level 0 DFD), providing increasing details with each
subsequent level.

The DFD enables the software engineer to develop models of the information
domain & functional domain at the same time. As the DFD is refined into greater
levels of details, the analyst performs an implicit functional decomposition of the
system. At the same time, the DFD refinement results in a corresponding refinement
of the data as it moves through the processes that embody the applications.

A context-level DFD for the system the primary external entities produce
information for use by the system and consume information generated by the system.
The labeled arrow represents data objects or object hierarchy.

RULES FOR DFD:

 Fix the scope of the system by means of context diagrams.

 Organize the DFD so that the main sequence of the actions


 Reads left to right and top to bottom.

 Identify all inputs and outputs.

 Identify and label each process internal to the system with Rounded circles.

 A process is required for all the data transformation and Transfers. Therefore, never connect
a data store to a data Source or the destinations or another data store with just a Data flow
arrow.

 Do not indicate hardware and ignore control information.

 Make sure the names of the processes accurately convey everything the process is done.

 There must not be unnamed process.

 Indicate external sources and destinations of the data, with Squares.

 Number each occurrence of repeated external entities.

 Identify all data flows for each process step, except simple Record retrievals.

 Label data flow on each arrow.

 Use details flow on each arrow.

 Use the details flow arrow to indicate data movements.

E-R Diagrams:
The Entity-Relationship (ER) model was originally proposed by Peter in 1976
[Chen76] as a way to unify the network and relational database views. Simply stated
the ER model is a conceptual data model that views the real world as entities and
relationships. A basic component of the model is the Entity-Relationship diagram
which is used to visually represent data objects. Since Chen wrote his paper the
model has been extended and today it is commonly used for database design For the
database designer, the utility of the ER model is:

 It maps well to the relational model. The constructs used in the ER model can
easily be transformed into relational tables.
 It is simple and easy to understand with a minimum of training. Therefore, the
model can be used by the database designer to communicate the design to the
end user.
 In addition, the model can be used as a design plan by the database developer
to implement a data model in specific database management software.

Connectivity and Cardinality

The basic types of connectivity for relations are: one-to-one, one-to-many, and many-
to-many. A one-to-one (1:1) relationship is when at most one instance of a entity A is
associated with one instance of entity B. For example, "employees in the company
are each assigned their own office. For each employee there exists a unique office
and for each office there exists a unique employee.
A one-to-many (1:N) relationships is when for one instance of entity A, there are
zero, one, or many instances of entity B, but for one instance of entity B, there is only
one instance of entity A. An example of a 1:N relationships is
a department has many employees

Each employee is assigned to one department

A many-to-many (M:N) relationship, sometimes called non-specific, is when for one


instance of entity A, there are zero, one, or many instances of entity B and for one
instance of entity B there are zero, one, or many instances of entity A. The
connectivity of a relationship describes the mapping of associated

ER Notation

There is no standard for representing data objects in ER diagrams. Each


modeling methodology uses its own notation. The original notation used by Chen is
widely used in academics texts and journals but rarely seen in either CASE tools or
publications by non-academics. Today, there are a number of notations used; among
the more common are Bachman, crow's foot, and IDEFIX.

All notational styles represent entities as rectangular boxes and relationships as


lines connecting boxes. Each style uses a special set of symbols to represent the
cardinality of a connection. The notation used in this document is from Martin. The
symbols used for the basic ER constructs are:

 Entities are represented by labeled rectangles. The label is the name of the entity. Entity

names should be singular nouns.

 Relationships are represented by a solid line connecting two entities. The name of the

relationship is written above the line. Relationship names should be verbs

 Attributes, when included, are listed inside the entity rectangle. Attributes which are

identifiers are underlined. Attribute names should be singular nouns.

 Cardinality of many is represented by a line ending in a crow's foot. If the crow's foot is

omitted, the cardinality is one.

 Existence is represented by placing a circle or a perpendicular bar on the line. Mandatory

existence is shown by the bar (looks like a 1) next to the entity for an instance is required.

Optional existence is shown by placing a circle next to the entity that is optional

Overview of Technologies Used


3.1 Front End Technology

The Python Language


The Python language is a remarkable example of programming language evolution. Python builds on the
familiar and useful features of C++ while removing its complex, dangerous, and superfluous elements.
The result is a language that is safer, simpler, and easier to use. The following subsections describe
Python in contrast to C++. Appendix B, "Differences Between Python and C++," provides a detailed
identification of the differences between the two languages.

Python Is Familiar and Simple

If you have ever programmed in C++, you will find Python's appeal to be instantaneous. Since Python's
syntax mirrors that of C++, you will be able to write Python programs within minutes. Your first
programs will come quickly and easily, with very little programming overhead.

You will have the feeling that you have eliminated a lot of clutter from your programs-and you will have.
All the cryptic header files and preprocessor statements of C and C++ are gone. All the arcane #define
statements and typedefs have been taken away. You will no longer have to delve through several levels
of header files to correctly reference API calls. And no one will have to suffer to figure out how to use
your software.

Python programs simply import the software packages they need. These packages may be in another
directory, on another drive, or on a machine on the other side of the Internet. The Python compiler and
interpreter figure out what objects are referenced and supply the necessary linkage.

Python Is Object-Oriented

If you think C++ is an object-oriented programming language, you are in for a big surprise. After using
Python to write a few programs, you'll get a better feeling for what object-oriented software is all about.
I know I did.
Python deals with classes and objects, pure and simple. They aren't just more data structures that are
available to the programmer-they are the basis for the entire programming language.

In C++, you can declare a class, but you don't have to. You can declare a structure or a union instead.
You can declare a whole bunch of loosely associated variables and use them with C-style functions. In
Python, classes and objects are at the center of the language. Everything else revolves around them. You
can't declare functions and procedures. They don't exist. You can't use structures, unions, or typedefs.
They're gone, too. You either use classes and objects or you don't use Python. It's that simple.

Python provides all the luxuries of object-oriented programming: class hierarchy, inheritance,
encapsulation, and polymorphism-in a context that is truly useful and efficient. If you are new to object-
oriented software, you can find a complete introduction to these topics is provided in Chapter 5,
"Classes and Objects." The main reason for developing object-oriented software, beside clarity and
simplicity, is the desperate hope that somehow the objects you develop will be reused. Python not only
encourages software reuse, it demands it. To write any sort of Python program, no matter how simple,
you must build on the classes and methods of the Python API.

Once you have begun developing software in Python, you have two choices:

Build on the classes you have developed, thereby reusing them.

Rewrite your software from scratch, copying and tailoring useful parts of existing software.

With Python, the temptation to start from scratch is no longer appealing. Python's object-oriented
structure forces you to develop more useful, more tailorable, and much simpler software the first time
around.

Python Is Safer and More Reliable


Python is safer to use than C++ because it keeps you from doing the things that you do badly, while
making it easier to do the things that you do well.

Python won't automatically convert data types. You have to explicitly convert from one class to another.
C++, under the most undesirable conditions, will automatically convert one type to another. It has all the
flexibility of assembly code. Python doesn't assume that you know what you are doing. It makes sure
that you do.

C++ pointers don't exist in Python. You can no longer access objects indirectly or by chance. You don't
need to. You declare objects and reference those objects directly. Complex pointer arithmetic is
avoided. If you need an indexed set of objects, you can use an array of objects. The concept of "the
address of an object" is eliminated from the programming model, and another assembly language
dinosaur is laid to rest. As a result, it becomes much easier to do things correctly in Python.

Python's reliability extends beyond the language level to the compiler and the runtime system. Compile-
time checks identify many programming errors that go undetected in other programming languages.
These checks go beyond syntactic checking to ensure that statements are semantically correct.

Runtime checks are also more extensive and effective. Remember your teacher or mom telling you to
"Check your work twice to make sure it's right"? The Python linker understands class types and performs
compiler-level type checking, adding redundancy to reliability. It also performs bounds checking and
eliminates indirect object access, even under error conditions.

Python Is Secure

If you gave a skilled hacker a program written in C or C++ and told him to find any security flaws, there
are half a dozen things that he would immediately look for: gaining access to the operating system,
causing an unexpected return of control, overwriting critical memory areas, acquiring the ability to spoof
or modify other programs, browsing for security information, and gaining unauthorized access to the file
system.

Why is C or C++ more vulnerable than Python? When a programmer develops software, he or she
usually focuses on how to get the software to work correctly and efficiently. C and C++ do not constrain
the programmer from meeting these goals and provide a number of flexible features that enable the
programmer to meet his end. The hacker is also able to take advantage of these features and use them
in ways that weren't originally intended, causing the undesirable consequences identified in the
previous paragraph. In short, C and C++ provide a great offense, but no defense. Python, on the other
hand, is defensive by nature. Every time a Python-enabled browser downloads a compiled Python class,
such as an applet, it runs the risk of running Trojan horse code. Because of this ever-present threat, it
subjects the code to a series of checks that ensure that it is correct and secure.

The Python runtime system is designed to enforce a security policy that prevents execution of malicious
code. It does this by remembering how objects are stored in memory and enforcing correct and secure
access to those objects according to its security rules. It performs bytecode verification by passing
compiled classes through a simple theorem prover that either proves that the code is secure or prevents
the code from being loaded and executed. The class is Python's basic execution unit and security is
implemented at the class level.

The Python runtime system also segregates software according to its origin. Classes from the local
system are processed separately from those of other systems. This prevents remote systems from
replacing local system software with code that is less trustworthy.

Python-enabled browsers, such as Python online compiler, allow the user to control the accesses that
Python software may make of the local system. When a Python applet needs permission to access local
resources, such as files, a security dialog box is presented to the user, requesting explicit user
permission. This "Mother may I?" approach ensures that the user always has the final say in the security
of his system.

Python Is Multithreaded

Python, like Ada, and unlike other languages, provides built-in language support for multithreading.
Multithreading allows more than one thread of execution to take place within a single program. This
allows your program to do many things at once: make the Duke dance, play his favorite tune, and
interact with the user, seemingly all at the same time. Multithreading is an important asset because it
allows the programmer to write programs as independent threads, rather than as a convoluted gaggle of
intertwined activities. Multithreading also allows Python to use idle CPU time to perform necessary
garbage collection and general system maintenance, enabling these functions to be performed with less
impact on program performance.

Writing multithreaded programs is like dating several people concurrently. Everything works fine until
the threads start to interact with each other in unexpected ways. Python provides the support necessary
to make multithreading work safely and correctly. Python supports multithreading by providing
synchronization capabilities that ensure that threads share information and execution time in a way that
is thread safe. These capabilities are illustrated with several programming examples in Chapter 8,
"Multithreading."

Python Is Interpreted and Portable

While it is true that compiled code will almost always run more quickly than interpreted code, it is also
true that interpreted code can usually be developed and fielded more inexpensively, more quickly, and
in a more flexible manner. It is also usually much more portable.
Python, in order to be a truly platform-independent programming language, must be interpreted. It
does not run as fast as compiled native code, but it doesn't run much slower, either. Chapter 36, "The
Python Source Code," provides some Python performance benchmarks. For the cases where execution
in native machine code is absolutely essential, work is underway to translate Python bytecode into
machine code as it is loaded.

The advantages of being interpreted outweigh any performance impacts. Because Python is interpreted,
it is much more portable. If an operating system can run the Python interpreter and support the Python
API, then it can faithfully run all Python programs.

Interpreted programs are much more easily kept up-to-date. You don't have to recompile them for
every change. In Python, recompilation is automatic. The interpreter detects the fact that a program's
bytecode file is out-of-date with respect to its source code file and recompiles it as it is loaded.

Because of Python's interpreted nature, linking is also more powerful and flexible. Python's runtime
system supports dynamic linking between local class files and those that are downloaded from across
the Internet. This feature provides the basis for Web programming.

Python Is the Programming Language of the Web

Python has become the de facto programming language of the Web. It is being licensed by nearly every
major software company. It has some offshoots and potential competition, such as PythonScript,
VBScript, and Bell Labs's Inferno, but it remains the first Web programming language and the most
powerful language for developing platform-independent software.

Python is also evolving beyond the Web and becoming a key component in distributed application
development. Sun's release of the NEO and JOE products emphasizes Python's importance to distributed
object-based software development. Several other vendors have introduced products that enable
Python to be integrated into the Common Object Request Broker Architecture (CORBA), which is the
framework for distributed object communication.

The Python API


The Python API is what makes Python attractive and useful. It consists of a set of packages that are
distributed with the JDK as class libraries. These packages provide a common interface for developing
Python programs on all Python platforms. The Python API furnishes all the capabilities needed to
develop console programs, window programs, client and server networking software, applets, and other
applications. It is the difference that takes Python from being a really good programming language to
making it a very powerful and efficient programming environment.

The Python API consists of eight major development packages and a supporting debug package, as
shown in Figure 2.9. Packages are collections of related objects. For example, there are separate
packages for developing window programs, applets, and networking software.

Pycharm
PyCharm is an integrated development environment used for programming in Python. It provides
code analysis, a graphical debugger, an integrated unit tester, integration with version control
systems, and supports web development with Django. PyCharm is developed by the Czech company
JetBrains.

BACK END TECHNOLOGY:

About My SQL Server 2000

My SQL Server is a Structured Query Language (SQL) based, client/server relational


database. Each of these terms describes a fundamental part of the architecture of SQL
Server.
Database

A database is similar to a data file in that it is a storage place for data. Like a data file,
a database does not present information directly to a user; the user runs an application
that accesses data from the database and presents it to the user in an understandable
format.

A database typically has two components: the files holding the physical database and
the database management system (DBMS) software that applications use to access
data. The DBMS is responsible for enforcing the database structure, including:
 Maintaining the relationships between data in the database.
 Ensuring that data is stored correctly and that the rules defining data
relationships are not violated.
 Recovering all data to a point of known consistency in case of system failures.

Relational Database

There are different ways to organize data in a database but relational databases are
one of the most effective. Relational database systems are an application of
mathematical set theory to the problem of effectively organizing data. In a relational
database, data is collected into tables (called relations in relational theory).
When organizing data into tables, you can usually find many different ways to define
tables. Relational database theory defines a process, normalization, which ensures
that the set of tables you define will organize your data effectively.
Client/Server:-
In a client/server system, the server is a relatively large computer in a central location
that manages a resource used by many people. When individuals need to use the
resource, they connect over the network from their computers, or clients, to the
server.
Examples of servers are: In client/server database architecture, the database files and
DBMS software reside on a server. A communications component is provided so
applications can run on separate clients and communicate to the database server over
a network. The SQL Server communication component also allows communication
between an application running on the server and SQL Server.

Server applications are usually capable of working with several clients at the same
time. SQL Server can work with thousands of client applications simultaneously. The
server has features to prevent the logical problems that occur if a user tries to read or
modify data currently being used by others.

While SQL Server is designed to work as a server in a client/server network, it is also


capable of working as a stand-alone database directly on the client. The scalability
and ease-of-use features of SQL Server allow it to work efficiently on a client
without consuming too many resources.

Structured Query Language (SQL)

To work with data in a database, you must use a set of commands and statements
(language) defined by the DBMS software. There are several different languages that
can be used with relational databases; the most common is SQL. Both the American
National Standards Institute (ANSI) and the International Standards Organization
(ISO) have defined standards for SQL. Most modern DBMS products support the
Entry Level of SQL-92, the latest SQL standard (published in 1992).

SQL Server Features

My SQL Server supports a set of features that result in the following benefits:

Ease of installation, deployment, and use


SQL Server includes a set of administrative and development tools that improve your
ability to install, deploy, manage, and use SQL Server across several sites.

Scalability

The same database engine can be used across platforms ranging from laptop
computers running Microsoft Windows® 95/98 to large, multiprocessor servers
running Microsoft Windows NT®, Enterprise Edition.

Data warehousing

SQL Server includes tools for extracting and analyzing summary data for online
analytical processing (OLAP). SQL Server also includes tools for visually designing
databases and analyzing data using English-based questions.

System integration with other server software

SQL Server integrates with e-mail, the Internet, and Windows.

Databases

A database in My SQL Server consists of a collection of tables that contain data, and
other objects, such as views, indexes, stored procedures, and triggers, defined to
support activities performed with the data. The data stored in a database is usually
related to a particular subject or process, such as inventory information for a
manufacturing warehouse.

SQL Server can support many databases, and each database can store either
interrelated data or data unrelated to that in the other databases. For example, a server
can have one database that stores personnel data and another that stores product-
related data. Alternatively, one database can store current customer order data, and
another; related database can store historical customer orders that are used for yearly
reporting. Before you create a database, it is Important to understand the parts of a
database and how to design these parts to ensure that the database performs well after
it is implemented.

Normalization theory:

Relations are to be normalized to avoid anomalies. In insert, update and delete


operations. Normalization theory is built around the concept of normal forms. A
relation is said to be in a particular form if it satisfies a certain specified set if
constraints. To decide a suitable logical structure for given database design the
concept of normalization, which are briefly described below.

1. 1 st Normal Form (1 N.F): A relation is said to be in 1 NF is and only if all


unaligned domains contain values only. That is the fields of an n-set should
have no group items and no repeating groups.
2. 2 nd Normal Form (2 N.F) : A relation is said to be in 2 NF is and only if it
is in 1 NF and every non key attribute is fully dependent on primary key.
This normal takes care of functional dependencies on non-key attributes.
3. 3 rd Normal Form (3 N.F) : A relation is said to be in 3 NF is and only if it
is in 2 NF and every non key attribute is non transitively dependent on the
primary key. This normal form avoids the transitive dependencies on the
primary key.
4. Boyce code Normal Form (BCNF) : This is a stronger definition than that
of NF. A relation is said to be in BCNF if and only if every determinant is a
Candidate key.
5. 4 th Normal Form (4 NF) : A relation is said to be in 4 NF if and only if
whenever there exists a multi valued dependency in a relation say A->->B
then all of the relation are also functionally dependent on A(i.e. A->X for all
attributes x of the relation.).
6. 5 th Normal Form (5 NF) OR Projection Join Normal Form (PJNF): A
relation R is in 5 NF .if and only if every join dependency in R is implied by
the candidate key on R. A relation can’t be non-loss split into two tables but
can be split into three tables. This is called Join Dependency.

Client-side Script (JAVASCRIPT):

JavaScript:

JavaScript is a new scripting language for WebPages. Scripts written with java script
can be embedded into your HTML pages. With java script you have many
possibilities for enhancing your HTML page with interesting elements. For example
you are able to respond to user-initiated events quite easily. Some effects that are
now possible with java script were some time ago only possible with CGI. So you
can create really sophisticated pages with the helps of java script on the Internet.

How can Java Script scripts run?


The first browser to support java script was the Netscape Navigator 2.0 of course the
higher versions do have java script as well. You might know that java does not run
on all Netscape Navigators 2.0 (or higher versions) versions. But this is not true for
java script -although there are some problems with the different versions.

The Mac version for example seems to have many bugs. In the near future there are
going to be some other browsers, which support java script. The Microsoft Internet
explorer 3.0 is going to support java script. JavaScript enabled browsers are going to
spread soon - it is worth learning this new technique now. You might realize that is
really easy to write Java Script scripts. We have to know is some basic techniques
and some work-around for problems you might encounter. Of course we need a
basic. Understanding HTML before reading this tutorial you can find many really
good online resources about HTML. Best you make an online search about ‘html’ at
yahoo if you want to get informed about HTML. Now I want to show some small
scripts so you can learn how they are implemented into HTML-documents and to
show which possibilities you have with the new scripting language. The following is
a very small script, which will only print a text into an HTML document.

<html>
<head>
My first JavaScript
</head>
<body><br>
This is a normal HTML document
<br>
<script language=”JavaScript”>
Document.write (“this is a java script”)
</script><b r>
Backing HTML again
</body>
</html>

If you are using a java script enabled-browser at the moment then you will have the
possibility to see this script working. If your browser doesn’t support Java Script then
this output might be some kind of strange…
This is a normal HTML document
This is java script!
Back in HTML again.
Functions

Functions are bet declared between the <Head> tag of HTML page. Functions are
called by user-initiated events. Seems reasonable to keep the functions between the
<Head> tags. They are loaded first before a user can do anything that might call a
function. Scripts can be placed between inside comment fields to ensure that older
browser do not display the script itself.
<html>
<head>
<script language=”JavaScript”>
function pushbutton ()
{
alert (“Hello!”);
}
</script>
</head>
<body>
<form>
<input type=”button” name=”Button1” value=”push me” onclick=”pushbutton ()”>
</form>
</body>
</html>

If we want to test this one immediately and you are using a Java Script enabled
browser then please go ahead and push the button.
This script will create a button and when you press it a window will pop up saying
“hello!” In fact we have a lot of possibilities just by adding functions to our scripts.
The common browsers transmit the form information by either method: here’s the
complete tag including the GET transmission method attribute for the previous form
Example

<Form method =GET action=http://www.mycompany.com/cgi-bin/upfdate.pl>


………
</form>

Input elements.

Use the <input> tag to define any one of a number of common form elements
including text fields multiple choice lists click able images and submission buttons.
There are many attributers for this tag only that types and name attributes are
required for each element, each type of input element uses only a subset of the
followed attributes. Additional <input> attributes may be required based upon which
type of the form element you specify.

Submit button:

The submit button (<input type=submit>) does what its name implies, settings in
motion the form’s submission to the server from the browser. We many have more
than submit buttons will be added to the parameter list the browser sends along to the
server.

Example
< Input type =”submit”>
<Input type=”submit” value=”submit” name=”name”>

Reset button:

The reset button if firm <input> button is nearly self- explanatory; it lets the user
reset erase or set to some default value all elements in the form. By default the
browser displays a reset button worth the label “reset”. We can change that by
specifying a value attribute with tour own button label.

FEASIBILITY STUDY:

Feasibility study is conducted once the problem is clearly understood.


Feasibility study is a high level capsule version of the entire system analysis and
design process. The objective is to determine quickly at a minimum expense how to
solve a problem. The purpose of feasibility is not to solve the problem but to
determine if the problem is worth solving.

The system has been tested for feasibility in the following points.
1. Technical Feasibility
2. Economical Feasibility
3. Operational Feasibility.

Technical Feasibility
The project entitles "Courier Service System” is technically feasibility
because of the below mentioned feature. The project was developed in Java which
Graphical User Interface.

It provides the high level of reliability, availability and compatibility. All


these make Java an appropriate language for this project. Thus the existing software
Java is a powerful language.

Economical Feasibility
The computerized system will help in automate the selection
leading the profits and details of the organization. With this software, the machine
and manpower utilization are expected to go up by 80-90% approximately. The costs
incurred of not creating the system are set to be great, because precious time can be
wanted by manually.

Operational Feasibility

In this project, the management will know the details of each project where
he may be presented and the data will be maintained as decentralized and if any
inquires for that particular contract can be known as per their requirements and
necessaries.

Implementation:

Implementation is the stage where the theoretical design is turned into a working
system. The most crucial stage in achieving a new successful system and in giving
confidence on the new system for the users that it will work efficiently and
effectively.

The system can be implemented only after thorough testing is done and if it is found
to work according to the specification.

It involves careful planning, investigation of the current system and its constraints on
implementation, design of methods to achieve the change over and an evaluation of
change over methods a part from planning. Two major tasks of preparing the
implementation are education and training of the users and testing of the system.
The more complex the system being implemented, the more involved will be the
systems analysis and design effort required just for implementation.

The implementation phase comprises of several activities. The required hardware


and software acquisition is carried out. The system may require some software to be
developed. For this, programs are written and tested. The user then changes over to
his new fully tested system and the old system is discontinued.

TESTING:
The testing phase is an important part of software development. It is the
computerized system will help in automate process of finding errors and missing
operations and also a complete verification to determine whether the objectives are
met and the user requirements are satisfied.

Software testing is carried out in three steps:

1. The first includes unit testing, where in each module is tested to provide
its correctness, validity and also determine any missing operations and to verify
whether the objectives have been met. Errors are noted down and corrected
immediately. Unit testing is the important and major part of the project. So errors are
rectified easily in particular module and program clarity is increased. In this project
entire system is divided into several modules and is developed individually. So unit
testing is conducted to individual modules.

2. The second step includes Integration testing. It need not be the case,
the software whose modules when run individually and showing perfect results, will
also show perfect results when run as a whole. The individual modules are clipped
under this major module and tested again and verified the results. This is due to poor
interfacing, which may results in data being lost across an interface. A module can
have inadvertent, adverse effect on any other or on the global data structures, causing
serious problems.

3. The final step involves validation and testing which determines


which the software functions as the user expected. Here also some modifications
were. In the completion of the project it is satisfied fully by the end user.

Maintenance and environment:


AS the number of computer based systems, grieve libraries of computer software
began to expand. In house developed projects produced tones of thousand soft
program source statements. Software products purchased from the outside added
hundreds of thousands of new statements. A dark cloud appeared on the horizon. All
of these programs, all of those source statements-had to be corrected when false were
detected, modified as user requirements changed, or adapted to new hardware that
was purchased. These activities were collectively called software Maintenance.
The maintenance phase focuses on change that is associated with error correction,
adaptations required as the software's environment evolves, and changes due to
enhancements brought about by changing customer requirements. Four types of
changes are encountered during the maintenance phase.

Correction
Adaptation
Enhancement
Prevention

Correction:

Even with the best quality assurance activities is lightly that the customer will
uncover defects in the software. Corrective maintenance changes the software to
correct defects.
Maintenance is a set of software Engineering activities that occur after software
has been delivered to the customer and put into operation. Software configuration
management is a set of tracking and control activities that began when a software
project begins and terminates only when the software is taken out of the operation.

We may define maintenance by describing four activities that are undertaken after
a program is released for use:

Corrective Maintenance
Adaptive Maintenance
Perfective Maintenance or Enhancement
Preventive Maintenance or reengineering

Only about 20 percent of all maintenance work are spent "fixing mistakes". The
remaining 80 percent are spent adapting existing systems to changes in their external
environment, making enhancements requested by users, and reengineering an
application for use.

ADAPTATION:

Over time, the original environment (E>G., CPU, operating system,


business rules, external product characteristics) for which the software was developed
is likely to change. Adaptive maintenance results in modification to the software to
accommodate change to its external environment.

ENHANCEMENT:
As software is used, the customer/user will recognize additional functions that
will provide benefit. Perceptive maintenance extends the software beyond its original
function requirements.

PREVENTION:
Computer software deteriorates due to change, and because of this, preventive
maintenance, often called software re engineering, must be conducted to enable the
software to serve the needs of its end users. In essence, preventive maintenance
makes changes to computer programs so that they can be more easily corrected,
adapted, and enhanced. Software configuration management (SCM) is an umbrella
activity that is applied throughout the software process.

SOFTWARE METHODOLOGY

The software methodology followed in this project includes the object-oriented


methodology and the application system development methodologies. The
description of these methodologies is given below.

Application System Development – A Life cycle Approach

Although there are a growing number of applications (such as decision support


systems) that should be developed using an experimental process strategy such as
prototyping, a significant amount of new development work continue to involve
major operational applications of broad scope. The application systems are large
highly structured. User task comprehension and developer task proficiency is usually
high. These factors suggest a linear or iterative assurance strategy. The most common
method for this stage class of problems is a system development life cycle modal in
which each stage of development is well defined and has straightforward
requirements for deliverables, feedback and sign off. The system development life
cycle is described in detail since it continues to be an appropriate methodology for a
significant part of new development work.
The basic idea of the system development life cycle is that there is a well-
defined process by which an application is conceived and developed and
implemented. The life cycle gives structure to a creative process. In order to manage
and control the development effort, it is necessary to know what should have been
done, what has been done, and what has yet to be accomplished. The phrases in the
system development life cycle provide a basis for management and control because
they define segments of the flow of work, which can be identified for managerial
purposes and specifies the documents or other deliverables to be produced in each
phase.

The phases in the life cycle for information system development are described
differently by different writers, but the differences are primarily in the amount of
necessity and manner of categorization. There is a general agreement on the flow of
development steps and the necessity for control procedures at each stage.
The information system development cycle for an application consists of three major
stages.
Definition.
Development.
Installation and operation.

The first stage of the process, which defines the information requirements for a
feasible cost effective system. The requirements are then translated into a physical
system of forms, procedures, programs etc., by the system design, computer
programming and procedure development. The resulting system is test and put into
operation. No system is perfect so there is always a need for maintenance changes.
To complete the cycle, there should be a post audit of the system to evaluate how
well it performs and how well it meets the cost and performance specifications. The
stages of definition, development and installation and operation can therefore be
divided into smaller steps or phrases as follows.

Definition
Proposed definition : preparation of request for proposed applications.
Feasibility assessment: evaluation of feasibility and cost benefit of proposed system.
Information requirement analysis: determination of information needed.

Design

Conceptual design : User-oriented design of application development.


Physical system design: Detailed design of flows and processes in applications
processing system and preparation of program specification.

Development

Program development : coding and testing of computer programs.


Procedure development : design of procedures and preparation of user instructions.

Installation and operation


Conversion : final system test and conversion.
Operation and maintenance: Month to month operation and maintenance
Post audit : Evaluation of development process, application system
and results of use at the completion of the each phase, formal approval sign-off is
required from the users as well as from the manager of the project development.
Screen Shots

Home page

AboutPage
Services
Gallery

NewUser
AdminLogin
StaffLogin

UserLogin
Contact Page
DataBaseTables

AdminTable

Field Type
AdminNa varchar(
me 20)
Password varchar(
20)

NewCustomer

Field Type
CustomerID int(11)
FirstName varchar(2
0)
LastName varchar(2
0)
UserName varchar(2
0)
Password varchar(2
0)
PhoneNum varchar(2
ber 0)
EmailID varchar(2
0)

NewEvent

Field Type
EventID int(11)
EventNam varchar(2
e 0)
EventType varchar(2
0)
numofday int(11)
s
Amount double
extracharg double
es
comments varchar(1
00)

NewEventType

Field Type
EventTyp int(11)
eID
EventTyp varchar(2
e 0)

NewManager

Field Type
ManagerID int(11)
FirstName varchar(2
0)
LastName varchar(2
0)
UserName varchar(2
0)
Password varchar(2
0)
PhoneNum varchar(2
ber 0)
EmailID varchar(2
0)

SearchEvent

Field Type
SearchId int(11)
CustomerI int(11)
d
EventID int(11)
EventNam varchar(2
e 0)
EventType varchar(2
0)
numofday int(11)
s
Amount double
extracharg double
es
eventdate varchar(5
0)
comments varchar(1
00)
EventStat varchar(3
us 0)

ER Diagram

AdminName Password

AdminTable

NewCustomer

CustID FirstName

LastName
UserNam
e
NewCustomer
PhoneNumbe
r

Password
EventTypeID EventType

NewEventType

1 to
n

ManagerID FirstName
LastName
PhoneNumb
er NewManager
UserNam

EmailID
Data Flow Diagrams

ZERO LEVEL DFD

Request for
Request for
Registration
Login
ONLINE EVENT CUSTOMER
ADMIN MANAGEMENT
Response
Requ Response
est
Re
for
sp
Regist
on
ration
se

MANAGER
FIRST LEVEL DFD

Add

Admin Manage
Managers View

Manage
View
Customers

Add EventType
Events

Add Event

Manage
Managers View
Customers

Events View Event Type


Coding

Index.html

{% extends 'commonheader.html' %}
{% block content %}
<html lang="en">

<head>
<meta charset="utf-8">
<meta content="width=device-width, initial-scale=1.0"
name="viewport">
<meta content="" name="description">
<meta content="" name="keywords">
<title>Event Management System</title>
<!-- Favicons -->
<link href="/static/assets/img/favicon.png" rel="icon">
<link href="/static/assets/img/apple-touch-icon.png"
rel="apple-touch-icon">

<!-- Google Fonts -->


<link href="https://fonts.googleapis.com/css?
family=Open+Sans:300,300i,400,400i,600,600i,700,700i|
Raleway:300,300i,400,400i,500,500i,600,600i,700,700i|
Poppins:300,300i,400,400i,500,500i,600,600i,700,700i"
rel="stylesheet">

<!-- Vendor CSS Files -->


<link
href="/static/assets/vendor/animate.css/animate.min.css"
rel="stylesheet">
<link
href="/static/assets/vendor/bootstrap/css/bootstrap.min.c
ss" rel="stylesheet">
<link
href="/static/assets/vendor/bootstrap-icons/bootstrap-
icons.css" rel="stylesheet">
<link
href="/static/assets/vendor/boxicons/css/boxicons.min.css
" rel="stylesheet">
<link
href="/static/assets/vendor/glightbox/css/glightbox.min.c
ss" rel="stylesheet">
<link href="/static/assets/vendor/swiper/swiper-
bundle.min.css" rel="stylesheet">

<!-- Template Main CSS File -->


<link href="/static/assets/css/style.css"
rel="stylesheet">

</head>

<body>

<!-- ======= Hero Section ======= -->


<section id="hero">
<div id="heroCarousel" data-bs-interval="5000"
class="carousel slide carousel-fade" data-bs-
ride="carousel">

<ol class="carousel-indicators" id="hero-carousel-


indicators"></ol>

<div class="carousel-inner" role="listbox">


<!-- Slide 1 -->
<div class="carousel-item active"
style="background-image: url(assets/img/slide/slide-
1.jpg)">
<div class="carousel-container">
<div class="container">
<h2 class="animate__animated
animate__fadeInDown">Welcome to <span>Event
Management</span></h2>
<p class="animate__animated
animate__fadeInUp">Event management is the application of
project management to the creation and development of
large-scale events such as festivals, conferences,
ceremonies, weddings, formal parties, concerts, or
conventions.</p>
</div>
</div>
</div>

<!-- Slide 2 -->


<div class="carousel-item" style="background-
image: url(assets/img/slide/slide-2.jpg)">
<div class="carousel-container">
<div class="container">
<h2 class="animate__animated
animate__fadeInDown">Welcome to <span>Event
Management</span></h2>
<p class="animate__animated
animate__fadeInUp">So when it comes to booking the
perfect hotel, vacation rental, resort,
apartment, guest house, or
tree house, we’ve got you covered.</p>

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

<!-- Slide 3 -->


<div class="carousel-item" style="background-
image: url(assets/img/slide/slide-3.jpg)">
<div class="carousel-container">
<div class="container">
<h2 class="animate__animated
animate__fadeInDown">Welcome to <span>Event
Management</span></h2>
<p class="animate__animated
animate__fadeInUp">If you want to organize an event for
your personal work, it requires more time, effort and
dedication to complete. In the catering arrangements, you
have to choose different types of menus, venue booking,
guest lists, design the décor etc. Personal management
companies only deal with indoor events in the past but
nowadays they will manage outdoor events too.</p>

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

</div>

<a class="carousel-control-prev"
href="#heroCarousel" role="button" data-bs-slide="prev">
<span class="carousel-control-prev-icon bi bi-
chevron-left" aria-hidden="true"></span>
</a>

<a class="carousel-control-next"
href="#heroCarousel" role="button" data-bs-slide="next">
<span class="carousel-control-next-icon bi bi-
chevron-right" aria-hidden="true"></span>
</a>

</div>
</section><!-- End Hero -->

<main id="main">

<!-- ======= Featured Services Section ======= -->


<section id="featured-services" class="featured-
services section-bg">
<div class="container">

<div class="row no-gutters">


<div class="col-lg-4 col-md-6">
<div class="icon-box">
<div class="icon"><i class="bi bi-
laptop"></i></div>
<h4 class="title"><a href="">Personal
Plan</a></h4>
<p class="description">If you want to
organize an event for your personal work, it requires
more time, effort and dedication to complete. In the
catering arrangements, you have to choose different types
of menus, venue booking, guest lists, design the décor
etc. Personal management companies only deal with indoor
events in the past but nowadays they will manage outdoor
events too.</p>
</div>
</div>
<div class="col-lg-4 col-md-6">
<div class="icon-box">
<div class="icon"><i class="bi bi-
briefcase"></i></div>
<h4 class="title"><a href="">Leisure
Events</a></h4>
<p class="description">Leisure Event
management is one of the different and interesting
fields. The leisure event management company provides
services like managing facilities of sports grounds,
parks, recreation centers, entertainment venues, managing
a festival or celebration, sporting contest etc.</p>
</div>
</div>
<div class="col-lg-4 col-md-6">
<div class="icon-box">
<div class="icon"><i class="bi bi-
calendar4-week"></i></div>
<h4 class="title"><a href="">Organizational
Events</a></h4>
<p class="description">The organizational
event manager must have the knowledge of logistical,
technical and creative factors that will make the event
joyful and successful. They will provide you the event
design, visual production, logistics, scriptwriting,
budgeting, negotiation, customer services etc.</p>
</div>
</div>
</div>

</div>
</section><!-- End Featured Services Section -->

</main><!-- End #main -->

<a href="#" class="back-to-top d-flex align-items-


center justify-content-center"><i class="bi bi-arrow-up-
short"></i></a>

<!-- Vendor JS Files -->


<script
src="/static/assets/vendor/bootstrap/js/bootstrap.bundle.
min.js"></script>
<script
src="/static/assets/vendor/glightbox/js/glightbox.min.js"
></script>
<script
src="/static/assets/vendor/isotope-layout/isotope.pkgd.mi
n.js"></script>
<script src="/static/assets/vendor/swiper/swiper-
bundle.min.js"></script>
<script
src="/static/assets/vendor/php-email-form/validate.js"></
script>

<!-- Template Main JS File -->


<script src="/static/assets/js/main.js"></script>
</body>
</html>
{% endblock %}

Main.py
from datetime import datetime as dt
import os
import random
from datetime import datetime, timedelta
from flask import Flask, render_template, redirect,
request, session
from flask_session import Session
import datetime
import mysql.connector
TEMPLATE_DIR = os.path.abspath('templates')
STATIC_DIR = os.path.abspath('static')
app = Flask(__name__, template_folder=TEMPLATE_DIR,
static_folder=STATIC_DIR)
app.config["SESSION_PERMANENT"] = False
app.config["SESSION_TYPE"] = "filesystem"
Session(app)

ALLOWED_EXTENSIONS = set(['txt', 'pdf', 'png', 'jpg',


'jpeg', 'gif'])
app.config['UPLOAD_FOLDER'] = 'static/upload'

def getConnection():
mydb = mysql.connector.connect(
host="localhost",
user="root",
password="",
database="EventManagement")
return mydb;

@app.route('/')
def homepage():
try:
return render_template("index.html")
except Exception as e:
return str(e)

@app.route('/logout')
def logout():
try:
return render_template("index.html")
except Exception as e:
return str(e)
@app.route('/about')
def aboutpage():
return render_template("About.html")

@app.route('/services')
def services():
return render_template("services.html")

@app.route('/gallery')
def gallery():
return render_template("gallery.html")

@app.route('/adminlogin')
def adminlogin():
return render_template("adminlogin.html")

@app.route('/userlogin')
def userlogin():
return render_template("userlogin.html")

@app.route('/stafflogin')
def stafflogin():
return render_template("stafflogin.html")

@app.route('/newuser')
def newuser():
return render_template("newuser.html")

@app.route('/adminviewusers')
def adminviewusers():
mydb = getConnection();
cursor = mydb.cursor()
cursor.execute(
''' Select * from newcustomer''')
rows = cursor.fetchall()

cursor.execute(
''' Desc newcustomer''')
cols = cursor.fetchall()
size = len(cols)
length=[]
for x in range(0,size):
length.append(x)
return render_template("adminviewusers.html",
rows=rows, cols=cols,
length=length)

@app.route('/adminmainpage')
def adminmainpage():
return render_template("adminmainpage.html")

@app.route('/adminaddstaff')
def adminaddstaff():
return render_template("adminaddstaff.html")

@app.route('/adminaddevent')
def adminaddevent():
return render_template("adminaddevent.html")

@app.route('/adminviewevents')
def adminviewevents():
mydb = getConnection();
cursor = mydb.cursor()
cursor.execute(
''' Select * from newevent''')
rows = cursor.fetchall()

cursor.execute(
''' Desc newevent''')
cols = cursor.fetchall()
size = len(cols)
length = []
for x in range(0, size):
length.append(x)
return render_template("adminviewevents.html",
rows=rows, cols=cols,
length=length)

@app.route('/adminviewstaffs')
def adminviewstaffs():
mydb = getConnection();
cursor = mydb.cursor()
cursor.execute(
''' Select * from newstaff''')
rows = cursor.fetchall()

cursor.execute(
''' Desc newstaff''')
cols = cursor.fetchall()
size = len(cols)
length = []
for x in range(0, size):
length.append(x)
return render_template("adminviewstaffs.html",
rows=rows, cols=cols,
length=length)

@app.route('/adminviewreports')
def adminviewreports():
mydb = getConnection();
cursor = mydb.cursor()
cursor.execute(
''' Select * from searchevent''')
rows = cursor.fetchall()

cursor.execute(
''' Desc searchevent''')
cols = cursor.fetchall()
size = len(cols)
length = []
for x in range(0, size):
length.append(x)
return render_template("adminviewreports.html",
rows=rows, cols=cols,
length=length)

@app.route('/adminviewcontacts')
def adminviewcontacts():
mydb = getConnection();
cursor = mydb.cursor()
cursor.execute(
''' Select * from contacttable''')
rows = cursor.fetchall()

cursor.execute(
''' Desc contacttable''')
cols = cursor.fetchall()
size = len(cols)
length = []
for x in range(0, size):
length.append(x)
return render_template("adminviewcontacts.html",
rows=rows, cols=cols,
length=length)

@app.route('/adminlogincheck', methods=['POST'])
def adminlogincheck():
if request.method == 'POST':
uname = request.form['uname']
pwd = request.form['pwd']
##print("Uname : ", uname, " Pwd : ", pwd)
if uname == "admin" and pwd == "admin":
return render_template("adminmainpage.html")
else:
return render_template("adminlogin.html",
msg="UserName/Password is Invalid")

@app.route('/userlogincheck', methods=['POST'])
def facultylogincheck():
if request.method == 'POST':
uname = request.form['uname']
pwd = request.form['pwd']
#print("Uname : ", uname, " Pwd : ", pwd)
mydb = getConnection()
cursor = mydb.cursor()
cursor.execute(
''' Select * from newcustomer where UserName = %s
and Password =%s ''', (uname, pwd))
row = cursor.fetchone()
if row:
session["customerid"] = row[0]
session["customername"] = row[1] + row[2]
return render_template('usermainpage.html')
else:
return render_template("userlogin.html",
msg="UserName/Password is Invalid")
@app.route('/admindeletestaff', methods=['GET'])
def admindeletestaff():
args = request.args
id = args.get("id")
mydb = getConnection()
cursor = mydb.cursor()
query = "Delete from NewStaff where StaffId =
"+str(id);
cursor.execute(query)
mydb.commit();
cursor.execute(
''' Select * from newstaff''')
rows = cursor.fetchall()

cursor.execute(
''' Desc newstaff''')
cols = cursor.fetchall()
size = len(cols)
length = []
for x in range(0, size):
length.append(x)
return render_template("adminviewstaffs.html",
rows=rows, cols=cols,
length=length)

@app.route('/admindeleteevent', methods=['GET'])
def admindeleteevent():
args = request.args
id = args.get("id")
mydb = getConnection()
cursor = mydb.cursor()
query = "Delete from NewEvent where EventId =
"+str(id);
cursor.execute(query)
mydb.commit();
cursor.execute(
''' Select * from newevent''')
rows = cursor.fetchall()

cursor.execute(
''' Desc newevent''')
cols = cursor.fetchall()
size = len(cols)
length = []
for x in range(0, size):
length.append(x)
return render_template("adminviewevents.html",
rows=rows, cols=cols,
length=length)

@app.route('/contact')
def contactPage():
return render_template("contact.html")

@app.route('/addcontact', methods=['POST'])
def addcontact():
if request.method == 'POST':
cname = request.form['cname']
subject = request.form['subject']
message = request.form['message']
email = request.form['email']
mydb = getConnection()
cursor = mydb.cursor()
cursor.execute(
''' INSERT INTO ContactTable(ContactName,
EmailId, Subject, Message) VALUES(%s, %s, %s, %s, %s, %s)
''',
(cname, email, subject, message))
mydb.commit()
cursor.close()
return render_template("contact.html", msg="Contact
Added Success")

@app.route('/adduser', methods=['POST'])
def adduser():
if request.method == 'POST':
fname = request.form['fname']
lname = request.form['lname']
uname = request.form['uname']
pwd = request.form['pwd']
email = request.form['email']
phnum = request.form['phnum']
mydb = getConnection()
cursor = mydb.cursor()
cursor.execute(
''' INSERT INTO NewCustomer(FirstName,
LastName, UserName, Password, EmailId, PhoneNumber)
VALUES(%s, %s, %s, %s, %s, %s) ''',
(fname, lname, uname, pwd, email, phnum))
mydb.commit()
cursor.close()
return render_template("newuser.html", msg="User
Added Success")

@app.route('/usersearchevent')
def usersearchevent():
mydb = getConnection()
cursor = mydb.cursor()
cursor.execute(
''' Select * from newevent''')
rows = cursor.fetchall()
cursor.execute(
''' Desc newevent''')
cols = cursor.fetchall()
size = len(cols)
length = []
for x in range(0, size):
length.append(x)
return render_template("usersearchevents.html",
rows=rows, cols=cols,
length=length)

@app.route('/usersearchevent1', methods=['GET'])
def usersearchevent1():
args = request.args
eventid = args.get("id")
userid=session['customerid'];
mydb = getConnection()
cursor = mydb.cursor()
query = "Select * from NewEvent where EventId = " +
str(eventid);
cursor.execute(query)
eventdata = cursor.fetchone()
query = "Select * from NewCustomer where CustomerId =
" + str(userid);
cursor.execute(query)
userdata = cursor.fetchone()

return render_template("usersearchevents.html")

@app.route('/addstaff', methods=['POST'])
def addstaff():
if request.method == 'POST':
fname = request.form['fname']
lname = request.form['lname']
uname = request.form['uname']
pwd = request.form['pwd']
email = request.form['email']
phnum = request.form['phnum']
mydb = getConnection()
cursor = mydb.cursor()
cursor.execute(
''' INSERT INTO NewStaff(FirstName, LastName,
UserName, Password, EmailId, PhoneNumber) VALUES(%s, %s,
%s, %s, %s, %s) ''',
(fname, lname, uname, pwd, email, phnum))
mydb.commit()
cursor.close()
return render_template("adminaddstaff.html",
msg="Staff Added Success")

@app.route('/addevent', methods=['POST'])
def addevent():
#print("Add Exam Function")
if request.method == 'POST':
ename = request.form['ename']
etype = request.form['etype']
price = request.form['price']
comments = request.form['comments']
mydb = getConnection()
cursor = mydb.cursor()
now_utc = dt.now()
format = "%Y-%m-%d %H:%M:%S"
now = now_utc.strftime(format)
cursor.execute(
''' INSERT INTO NewEvent(EventName,
EventType, CreatedDate, Amount, Comments) VALUES(%s, %s,
%s, %s, %s) ''',
(ename, etype, now, price, comments))
mydb.commit()
cursor.close()
return render_template("adminaddevent.html",
msg="Event Added Success")

@app.route('/userviewprofile')
def userviewprofile():
args = request.args
id=session['customerid']
mydb = getConnection()
cursor = mydb.cursor()
query = "Select * from NewCustomer where CustomerId =
"+str(id);
cursor.execute(query)
rows = cursor.fetchone()
cursor.execute(
''' Desc newstaff''')
data = cursor.fetchall()
cols = []
for temp in data:
cols.append(temp[0])
size = len(cols)
length = []
for x in range(0, size):
length.append(x)
return render_template("userviewprofile.html",
rows=rows, cols=cols,
length=length)

if __name__ == "__main__":
app.run(debug=True)

You might also like