You are on page 1of 87

BCA506P

Apartment Visitors Management System

By
ANANYA DUTT G
University Enrolment No : R2015870
Bengaluru North University
Sri Devaraj Urs Extension
Tamaka, Kolar-563 103
Karnataka, India

HKBK DEGREE COLLEGE


Permanently Affiliated to Bangalore North University
#22/1, Opp Manyata Tech Park, Govindpura,
Nagawara, Bengaluru-560045

A Project Report
On
“Apartment Visitors Management System”
Submitted to the Bengaluru North University, Kolar
in partial fulfillment of the requirements
for the award of the degree
Bachelor of Computer Applications
year of Submission
2023

Submitted by

ANANYA DUTT G
Under the Guidance of

Mr. Nasrulla khan K


HOD, Department of Computer science
2022-2023

HKBK DEGREE COLLEGE


Permanently Affiliated to Bangalore North University
#22/1, Opp Manyata Tech Park, Govindpura,
Nagawara, Bengaluru-560045

Certificate of Completion
This is to certify that the project work entitled on Apartment Visitors
Management System is a bonafide work carried out by Mr./Miss./Mrs.
ANANYA DUTT G bearing Reg.No.R2015870 in partial fulfillment for the
award of Bachelor of Computer Applications of Bangalore North
University, during the year 2022-2023. The project report has been
approved as it satisfies the academic requirements in respect of Project
Work prescribed for the said Degree.

Signature of the Guide Signature of the HOD Signature of the Principal

Name of Examiners

1. Signature with Date

2.
DECLARATION

I ANANYA DUTT G , bearing University Register Number R2015870, student


of Vth semester BCA, HKBK Degree College Bangalore, hereby declare that
the project work entitled APARTMENT VISITORS MANAGEMENT SYSTEM
submitted to the Bangalore North University during the academic year 2022-
2023, in a record of an original work done by me under the guidance of Prof. Mr
Nasrulla khan Head of the Department of Computer Applications, HKBK
Degree College, Bangalore.
This project work is submitted in partial fulfillment of the requirements for the
award of the degree of Bachelor of Computer Applications. The matter embodied
in this project is genuine work done by me and has not been submitted whether to
this University or to any other University / Institute for the fulfillment of the
requirements of any course of study.

DATE: ANANYA DUTT G


Place: Bengaluru R2015870
ACKNOWLEDGEMENT
I take this opportunity to express my deep gratitude to our Founder chairman
Mr. C M Ibrahim Sahib

We take this opportunity to express our sincere thanks and wholehearted


gratitude to our beloved Principal Dr. Ashok MV

We also thank this opportunity to express our gratitude to our respected HOD,
Prof. Nasrulla khan k for his constant cooperation for developing this project.

The satisfaction and successful completion of any task would be incomplete


without the mention of people whose ceaseless cooperation made it possible,
whose constant guidance and encouragement crown all efforts with success.

I am grateful to my project guide Prof.Shaik Subhan for the guidance,


inspiration and constructive suggestions that helped me in the preparation of this
project.

We would also like to extend our thanks to all the concerned staff members of
department of Computer science for their kind cooperation.

We would like to thank our parents and our friends for their encouragement in
completing our project in a successful manner.
INDEX

SL.NO DESCRIPTION PAGE NO

01. INTRODUCTION 08

02. System Analysis 09

03. LITERATURE SURVEY 11

04. REQUIREMENT ANALYSIS 15

05. DATA FLOW DIAGRAM 22

06. ER-DIAGRAM 24

07. SYSTEM DESIGN 26

08. SYSTEM TESTING 30


09. SYSTEM IMPLEMENTATION 33

10. CODING 36

11. SNAPSHOTS 76

12. CONCLUSION 81

13. FUTURE ENHANCEMENT 83

14. BIBLIOGRAPHY 85
Introduction

.
INTRODUCTION
The apartment visitor's management system is a web-based technology that will revolutionize the way
society manages visitor's and provide visitor pass to them. The visitor's management system is more
important to security guards or security society. This web application provides a way to effectively control
records and track society visitor traffic. The main objective of the project is to enhance the safety for people
in their livings.

OBJECTIVE
The main objective of the project is to enhance safety for people in their livings. In todays generations the
information of every outside coming into the apartment complex is captured in the register.

The objective is to make high performance software, the software which is easy to work with the software is
also able to extract details from database and make report easily. Apartment management controls all back-
end functionalities like, owner details, contact number, address and other details related to that particular
apartment saved in a database, etc. Admin manages the report.

MODULE
AVMS has only one module i.e admin.

Admin module [owner]

The Admin Module allows administrators to manage members and services as well as edit or modify
the changes required. In AVMS we use PHP and Mysqli database.This is the project which keeps records of
visitors who visited in the company.

1. Dashboard: In this sections, admin can briefly view how many visitors visited in a particular period.

2. Visitors: In this section, admin adds new visitors by filling their information in add visitors sections and
also view and manage visitors records. Admin also put visitors out time in the manage records section.

3. Search: In this bar, admin can search a particular person by their name and phone number.

4. Reports: In this section admin can generate visitors reports between two dates.

5. Admin can also update his profile, change password and recover password.
System
Analysis
SYSTEM ANALYSIS
IDENTIFICATION OF NEEDS
Apartment Management System analysis refers to an orderly structured process for identifying and solving
problems using computer. It is the most essential part of the project development. It is the process of
gathering and interpreting facts, diagnosing problems and using the information to recommend
improvements to the system.

Training experience and common sense are required for the collection of information needed to do the
analysis. To analyse a system one has to study the system work in detail, before designing the appropriate
computer based system that will meet the requirements of the system. In other words, system analysis
specifics what the system analyst specifies what the system should
Literature Survey
LITERATURE SERVEY
EXISTING SYSTEM
The existing system is not so flexible as all the procedures are done manually. This increases the paperwork
of the office which includes the hill payments also there arises confusion among doing various
maintenances.

LIMITATIONS OF EXISTING SYSTEM


The existing system has various disadvantages compared to the proposed system. Some disadvantages are
listed below:

 Readability of records is constrained


 Paper records are easily damage with time
 Expenditure id high
 Security
 Need lot of manpower

Readability of records is constrained:

All the records may not be handled or written by the same person. So the format will be different resulting in
low

Paper records are easily damage with time:

The lifetime of paper records is very less that easily gets damaged. Hence it faces the risk of loss of data

Expenditure is high

Manual system need more power for its functioning than computer system Expenditure is high in terms of
salary and time

Security

The manual system loses the security. This is handled by many number of persons to enter the transaction.
No proper handling of manipulation of data

Need lot of manpower

The manual system in the existing system needs lot of manpower to maintain various details in each section

PROPOSED SYSTEM
Proposed system is fully computerized one. It does absolutely nothing on paper. An all the entire working is
done with the aid of computers, this will result in faster processing and improved performance. This
information can be quickly by the click of a button when compared to earlier retrieval from files and
registers. As all the details are stored in the computer's hard drive the physical storage space requirement can
be reduced to a great extent.
Processing of information manipulation was difficult with manual system, but as we are doing all the
processing with the aid of computers it can be done very easily and accurately. Creating reports timely needs
a quick search in the huge file cabinets, but with the proposed system reports can be generated in the sinks
of an eye lid.

The proposed system overcomes all the limitations of the existing system. It gives a clear view of the wok to
be done. It maintains the data safe and secure.

ADVANTAGES OF PROPOSED SYSTEM.


 Involves fast processing of data
 Flexible
 Very less paperwork
 Easy availability of data
 Cost effective
 Minimize number of staff

FEASIBILITY STUDY
All project are feasible when given unlimited resources and infinite time.it is both necessary and
prudent to evaluate the feasibility of a project at the earliest possible time. A feasibility study is not
warranted for system in which economic justification is obvious, technical risk is low, few legal problem
are expected and no reasonable alternative exits.an estimate is made of whether the identified user needs
may be satisfied using current software and hardware technologies.

Technical Feasibility:

This is related to the technical of the project feasibility if check the cost to conduct a full system
investigation, cost of hardware and software .The apartment management system support the economic
feasibility to a great extends, development of the system and the cost of hardware and software are not
high.

Economic Feasibility:

A system that can be developed technically and that well be used, if installed, must be still good. Always
the financial benefits must be equal or exceed the cost. Economic analysis is the most frequently used
method for evaluating the effectiveness of a candidate system or more commonly known as cost or
benefits analysis.

Operational Feasibility:

Proposed system are beneficial only if they can be turned into information systems. That is it will meet
the organization operating requirements and also check that whether the system will work when it is
developed and installed. Therefore it is understandable that the introduction of a candidate system
requires special efforts to educate, sell and train others.
Requirement Analysis
REQUIREMENT ANALYSIS

HARDWARE REQUIREMENTS
The selection of hardware configuration is a very important task related to the software development,
particularly inefficient RAM may affect adversely on the speed and corresponding on the efficiency of
the entire system. The processort.

should be powerful to handle all the operations. The hard disk should have
the sufficient capacity to solve the database and the application. The network should be efficient to
handle the communication fas

 Processor Intel Pentium IV/ AMD, Running at 1GHZ


 RAM (4GB)
 Hard Disk (160 GB)
 Standard keyboard
 Monitor - 15 Inch.
 Mouse - Two or Three Button Mouse

SOFTWARE REQUIREMENTS

USER REQUIREMENTS

Client-server Architecture
Typical client-server system are based on the 2-tiered architecture, whereby there is a clear separation
between the data and the presentation /business logic. These are generally data driven, with the application
existing entirely on the client machine while the database server is deployed somewhere in the organization.

2-Tier Architecture
In a traditional 2-Tiered application, the processing load is given to the client PC while the server simply
acts as traffic controller between the application and data. As a result, not only does the application
performance suffer due to the limited resources of the PC, but the network traffic tends increase as well.

3-Tier Architecture
In 3-Tier architecture an application is broken into three separate logical layers, each with a well-defined set
of interfaces. The first tier is referred to as the presentation layer and typically consists of application or
business layer and the third layer- the data layer contains the data that is needed for application. The middle
tier is basically the code that the user calls upon to 27.

Retrieve the desired data. The presentation layer then receives the data and formats it for display. This
separation of application logics from the user interface adds enormous flexibility to the design of
application. The third tier contains the data that is needed for the application.
N-Tier Architecture
In an n-tier architecture the application logic is divided by function rather than physically. N-Tier
architecture then breaks down like this:

A user interface that handle the user’s interaction with the application; this can be web browser running
through firewall, a heavier desktop application or even a wireless device.

Presentation logic that defines what user interface display and how a user’s requests are handled-depending
on what user interface are supported we need to have slightly different versions of the presentation logic to
handle the client appropriately.

Business logic that models the application’s business rules, often through the interaction with the
application’s data.

Interface services that provide additional functionality required by the application components, such as
messaging, transactional support etc.

The data layer where the enterprise’s data resides.

Software used are :

 VS Code
 Database Server - SQL server 2008
 Operating system - windows 7 and above
 Xampp

Client Side Languages


→HTML5

→CSS3

→JAVA Script

→Jquery

→Bootstrap

Server Side Languages


→PHP

→MySQL

Overview of languages used


Introduction of Notepad plus

Notepad++ is a source code editor for windows. Notepad++ can be used with a variety of different
programming languages. Notepad++ has many advantages over the built-in text editor for windows
(Notepad) such as supporting tabbed editing and allows the user to work on multiple files at the same time.
The software is available free online at notepad-plus-plus.org where it has been downloaded over 27 million
times. The requirements for download and instructions on installation are listed below.

The features of Notepad++ is what sets it apart from the other source code editors out there. Notepad++ has
a vast variety of features that makes programming and debugging code extremely simple. Some useful
features and their usage are below.

Multi-editing

Column Mode Editing

Bookmarking

Macros

Document Map

Function List

File Comparison

Speech Synthesis

Find and Replace

The programming Process


Over time you’ll find your own way of writing programs that works best for you. Nevertheless, you will
generally follow these standard set of steps when creating your web application:

1 Decide what your application is to do by creating an overall design.

2 Create the visual portion of your application (the screens and menus that your users will interact with).

3 Add HTML programming language code to tie the visual elements together and to automate the program.

4 Test your application to locate and remove any bugs you find.

5 Compile your tested application and distribute the completed application to your users

Understanding Programming Maintenance


Bugs are not the only reason that will work on a program after you think you are completely done with it.
Program maintenance is necessary because requirements change, companies change, and laws changes. You
must also change the programs you write so that they remain viable program; you will need to update your
program periodically to reflect

changes that impact the program. In addition, users will think of new things that they want the program to
do.

Program maintenance is the term used for the updating of a program after the program is put into use. This
update may be a result of a user’s request or a change in the way the program need to operate.
It is said that a program is writing once and modified many times. The more program maintenance you
perform, the more likely that your program will be up-to-date and in use. You may want to release new
versions of your program so that users can, with a different version number on the operating screen that you
place there, keep track of the latest version installed on their system.

Introduction to XAMPP
XAMPP is a light-weight easy to install bundle that will allow you to do local development on websites in
case you don’t have a server hosted already. Also, I am being base here, because frankly I believe in open
source (ironical that I have a mac). Also, I like to scratch and build upwards so that in the long run it helps
me to learn better rather than just following manuals and documentation. Since this post is for absolute
beginners, it’s good to start out with XAMPP which does the basic task of setting out the environment for
you so you can start building stuff right away.

Anyway, XAMPP consists of the three main things that you need to know when starting web development.
They are:

 Apache Web Server


 PHP
 MySQL

Apache web server:


It is a web server that allows you to host your websites or any other content for that matter. Apache is
available for UNIX as well as Windows. Some of the most common server side languages supported by
Apache are – PHP, Python and Perl it is free of charge.

PHP: A server side programming language which is used to produce dynamic web pages. PHP code can be
embedded within HTML. It is also free and platform-independent which means that it can be installed on
any operating system.

MySQL: it is the world’s most popular open source database. It is a relational Database Management
System(RDBMS) - data and its relationships are stored in the form of tables that can be accessed by the use
of MySQL queries in almost any format that the user wants.

Web Programming Is Smart Language


HTML (Hypertext Markup Language)
HTML is written in the form of HTML elements consisting of tags enclosed in angle brackets (like <html>).
HTML tags most commonly come in pairs like <h1> and </h1>, although some tags represent empty
elements and so are unpaired, for example <img>. The first tag in a pair is the start tag, and the second tag is
the end tag (they are also called opening tags and closing tags).

The purpose of a web browser is to read HTML documents and compose them into visible or audible web
pages. The Browser does not display HTML tags, but it uses the tags to interpret the content of the page.
HTML describes the structure of a website semantically along with cues for presentation, mark-up language
rather than a programming language.
HTML elements form the building blocks of all websites. HTML allows images and object to be embedded
and can be used to create interactive forms. It provides a means to create structure document by denoting
structural semantics for text such as headings, paragraphs, lists, links, quotes and other items. It can embed
scripts written in languages such as JavaScript which affect the behavior of HTML web pages.

CSS (Cascading Style Sheet)


Cascading style sheets are create a uniform look across several pages of a web site. Instead of defining the
style of each table and each block of text within a HTML pages, commonly used style need to defined only
once in a CSS document. Once the style is defined in cascading style sheet, it can be used by any page that
references the CSS file. Plus, CSS makes it easy to change styles across several pages at once. For example,
a Web developer may want to increase the default text size from 10px to 12px for fifty pages of a web site.
If the all pages reference the same style sheet, the text size only needs to be changed on the style sheet and
all the pages will show the larger text.

While CSS is great for creating text styles, it is helpful for formatting other aspects of Web page layout as
well. For example, CSS can be used to define the cell padding of images or

other objects. CSS gives Web developers more exact control over how Web pages will look than HTML
does. This is why most Web pages today incorporate cascading style sheets.

JAVASCRIPT
JavaScript is a programming language that can be included on web pages to make them more interactive.
You can use it to check or modify the contents of forms, change images, open new windows and write
dynamic page content. You can even use it with CSS to make DHTML (Dynamic Hypertext Markup
Language). This allows you to make parts of your web pages appear or disappear or move around on the
page. JavaScript only execute on the page(s) that are on your browser window at any set time. When the
user stops viewing that page, any scripts that were running on it are immediately stopped. The only
exceptions are cookies or various client side storage APIs, which can be used by many pages to store and
pass information between them, even after the pages have been closed.

Before we go any further, let me say; JavaScript has nothing to do with Java. If we are honest, JavaScript,
originally nicknamed Livewire and then Live Script when it was created by Netscape, should in fact be
called ECMAScript as it was renamed when Netscape passed it to the ECMA for standardization.

JavaScript is a client side, interpreted, object oriented, high level scripting language, while Java is a client
side, compiled, object oriented high level language.

PHP (Hypertext Pre-processor)


PHP is a programming language that can do all sorts of things: evaluate form data sent from a browser, build
custom web content to serve the browser, talk to a database, and even send and receive cookies (little
packets of data that your browser uses to remember things, like if you're logged in to your Web application.

Check out the code in the editor. Looks familiar, doesn't it? That's because a lot of it is regular old HTML!
The PHP code is written in the <?php and ?> .

Things you can do with PHP:

 Talk to databases
 Send cookies

 Evaluate form data

 Build dynamic webpages

MySQL
MySQL (pronounced My S-Q-L) is an open source relational database. It's free, and most web hosting
providers include it in their most basic packages. Both of these facts have helped to cement its popularity
among amateur and professional web designers alike.

If you only have time to learn about one database, MySQL is a safe bet. It's designed to be easy to use, and
its scalability and flexibility make it suitable for practically any application. Its massive user base is partly
thanks to its use in many popular web applications, including WordPress, Drupal and many other open
source CMS tools.

Bootstrap
Bootstrap is a powerful toolkit - a collection of HTML, CSS, and JavaScript tools for creating and building
web pages and web applications. It is a free and open source project, hosted

After its open source release in 2011, Bootstrap became popular very quickly, and not without reason. Web
designers and web developers like Bootstrap because it is flexible and easy to work with. Its main
advantages are that it is responsive by design, it maintains wide browser compatibility, it offers consistent
design by using re-usable components, and it is very easy to use and quick to learn. It offers rich
extensibility using JavaScript, coming with built-in support for jQuery plugins and a programmatic
JavaScript API. Bootstrap can be used with any IDE or editor, and any server side technology and language,
from ASP.NET to PHP to Ruby on Rails.

With Bootstrap, web developers can concentrate on the development work, without worrying about design,
and get a good looking website up and running quickly. Conversely, it gives web designers a solid
foundation for creating interesting Bootstrap themes.
Data Flow
Diagram
DATA FLOW DIAGRAM
LEVEL 0

VISITORS ADMIN

LEVEL 1

ADMIN

ADMIN PROFILE MANAGE VISITORS

UPDATE

VISITORS
VISITORS
INFORMATION

CHANGE
PASSWD

LOGIN / DASH BOARD

LOGOUT
ER - Diagram
ER DIAGRAM

VISITOR

DATA

ADMIN

(SECURITY
GUARD/SECRETORY/

OWNER)

ADMIN PROFILE DASHBOARD

LOGIN/

LOGOUT TODAY’S TOTAL


VISITORS VISITORS
CHANGE
UPDATE
PASSWD

YESTERDA LAST 7
Y’S DAYS
VISITORS VISITORS

MANAGE
RECORD
VISITORS NEW VISITOR
OF ALL VISITORS
VISITIRS INFORMATION

VISITORS B/W
DATES
SEARCH BAR
System Design
SOFTWARE DESIGN
System design is the creative act of invention developing new inputs, a database offline files, method,
procedures and output for processing business data to meet organization objectives. The design phase
focuses on the detailed implementation of the system recommended in the feasibility study. The design
phase is a transition from user oriented document to a document oriented to the programmers or database
personnel. Characteristics of a well-designed system are

 Accessibility
 Decision making ability
 Economy Flexibility
 Reliability
 Simplicity

INPUT DESIGN
Input design is the link that ties the information system into the world of its users. Errors entered by data
entry operators can be controlled by input design. Input design is the process of converting user-originated
inputs to a computer-based format. Input data are collected and Organized into groups of similar data. Once
identified, appropriate input media are selected for processing.

DATABASE DESIGN
A database is a collection of data. Database design refers to the design of the tables used to store data. The
database involves name of records, data item with its name ,type and size.

In the design of the database program first we have to thoroughly look into the requirements of the program
for the design of database. Then we have to design how much tables are required in the database. Thereafter
as per requirement of the end users we can decide which fields that must be in this table. As per a general
rule a provision must be taken in the design for the future enhancement of the program. Some of the
important tables are :
LOGIN TABLE
FIELD NAME DATA TYPE SIZE CONSTRAINTS

Username varchar 50 Primary key

Password varchar 50 null

ADMIN TABLE

Field Name Data Type Size Constraints

AdminName varchar 50 null


UserName varchar 50 null
MobileNo varchar 20 null
Email varchar 100 null
AdminReDate varchar 60 null

VISITORS TABLE

Field Name Data Type Size Constraints


Sl.No int 100 null
VisitorsName Varchar 50 Primary key
PH.NO Int 20 Null
Address Varchar 100 Null
ApartmentNo Int 50 Null
Floor Varchar 50 Null
WhomToMeet Varchar 90 Null
Reason Varchar 90 Null
Date Varchar 30 Null
Remark varchar 20 Null
DATABASE DESIGN AND TABLE CREATION
System Testing
SYSTEM TESTING
System testing is the stage of implementation, which is aimed at ensuring that the system works accurately
and efficiently before live operation commences. Testing is vital to the success of the system. An elaborate
testing of the data is prepared and the system is testing using this test data. While testing errors are detected
and corrected. The users are trained to operate the developed system. Both hardware and software securities
are made to run the developed system successfully in future. The testing steps are,

 unit testing
 Integration testing
 validation testing
 Alpha Testing
 Beta Testing

Integration Testing
Integration testing is an systematic technique for constructing tests to uncover errors associated with the
interface. In this project, all the modules are combined and then entire program is tested as a while, thus in
the integration testing step, all the errors uncovered for the next testing steps.

Validation Testing
validation testing is where requirements stabled as a part of software requirement analysis is validated
against the software that has been constructed. This test provides the final assurance that the software meet
all functional, behavioral and performance requirements.

Alpha Testing
If the tested and real customers combining test the software in development site then it is called alpha
testing. Alpha testing is done at the developer’s site by the testers. If the software is product then beta testing
will be done.
System
Implementation
SYSTEM IMPLEMENTATION
The term implementation has different meanings, ranging from the conversion of basic application to a
complete replacement of a computer system. The procedure, however, is virtually the same. Implementation
is used here to mean the process of converting a new or a revised system, System design into an operational
one. There are three types of implementations :

• Implementation of a computer system to replace a manual system

• Implementation of a new computer system to replace an existing one

• Implementation of a modified application to replace an existing one

Here a manual department system is replaced by a computer system. Effective testing early in the process
translated directly in to long-term cost is saving from a reduced number of errors. Backup files are needed
when the system is failure or down .The usability test verified the user friendly nature of the system.
Accurate and complete documentation is necessary for the user friendly nature of the system. System testing
is designed to uncover weakness that is not found in the earlier tests. This includes forced system failure and
validation of the total system, as its user in the operational environment will implement it.

SECURITY TECHNIQUES AND POLICIES


Maintenance involves the software industry captive, typing up system resources. It means
restoring something to its original condition. Maintenance follows conversion to the extend.
That change is necessary to maintain satisfactory operations relative to changes in the user’s
environment. Maintenance often includes minor enhancements or corrections to problems
that surface in the system’s operation. Maintenance is also done based on fixing the
problems reported, changing the interface with other software or hardware enhancing the
software. Any system developed should be secured and protected against possible hazards.
Security measures are provided to prevent unauthorized access of the database at various
levels. An uninterrupted power supply should be so that the power failure or voltage
fluctuations will not erase the data in the files. Password protection and simple procedures to
prevent the unauthorized access are provided to the users. The system allows the user to
enter the system only through proper user name and password.

MAINTENANCE
Structured design partitions a program into small, independent modules. They are arranged
in a hierarchy that approximates a model of the business area and is organized in a top-down
manner. Structured design is an attempt to minimize complexity and make a problem
manageable by subdividing it into smaller segments, which is called modularization or decomposition. The
primary advantage of this design is as follows:
•Critical interfaces are tested first.

•Early versions of the design, though incomplete, are useful enough to resemble the real system.

•Structuring the design provides control and improves morale.

•The procedural characteristics define the order that determines processing.

Modules that perform only one task are said to be less error-prone than modules that perform multiple tasks.
This part has the details regarding the project. It explains how this system works and what all procedures are
taken to maintain the proper functioning of the new system .As the application is a web application, this
start-stop-start nature of interaction of the web applications makes things a lot difficult. As our application is
simpler any future enhancements can be fitted in this software. So it can run on any system.
Coding
CODING
ADMIN PROFILE
<?php
session_start();
error_reporting(0);
include('includes/dbconnection.php');
if (strlen($_SESSION['avmsaid']==0)) {
header('location:logout.php');
} else{
if(isset($_POST['submit']))
{
$adminid=$_SESSION['avmsaid'];
$AName=$_POST['adminname'];
$mobno=$_POST['mobilenumber'];
$email=$_POST['email'];
$query=mysqli_query($con, "update tbladmin set AdminName='$AName', MobileNumber ='$mobno',
Email= '$email' where ID='$adminid'");
if ($query) {
$msg="Admin profile has been updated.";
}
else
{
$msg="Something Went Wrong. Please try again.";
}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Required meta tags-->
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="au theme template">
<meta name="author" content="Hau Nguyen">
<meta name="keywords" content="au theme template">
<!-- Title Page-->
<title>AVSM Admin Profile</title>
<!-- Fontfaces CSS-->
<link href="css/font-face.css" rel="stylesheet" media="all">
<link href="vendor/font-awesome-5/css/fontawesome-all.min.css" rel="stylesheet" media="all">
<link href="vendor/font-awesome-4.7/css/font-awesome.min.css" rel="stylesheet" media="all">
<link href="vendor/mdi-font/css/material-design-iconic-font.min.css" rel="stylesheet" media="all">
<!-- Bootstrap CSS-->
<link href="vendor/bootstrap-4.1/bootstrap.min.css" rel="stylesheet" media="all">
<!-- Vendor CSS-->
<link href="vendor/animsition/animsition.min.css" rel="stylesheet" media="all">
<link href="vendor/bootstrap-progressbar/bootstrap-progressbar-3.3.4.min.css" rel="stylesheet"
media="all">
<link href="vendor/wow/animate.css" rel="stylesheet" media="all">
<link href="vendor/css-hamburgers/hamburgers.min.css" rel="stylesheet" media="all">
<link href="vendor/slick/slick.css" rel="stylesheet" media="all">
<link href="vendor/select2/select2.min.css" rel="stylesheet" media="all">
<link href="vendor/perfect-scrollbar/perfect-scrollbar.css" rel="stylesheet" media="all">
<!-- Main CSS-->

</head>
<body class="animsition">
<div class="page-wrapper">
<!-- HEADER MOBILE-->
<?php include_once('includes/sidebar.php');?>
<!-- END HEADER MOBILE-->
<!-- MENU SIDEBAR-->
<!-- END MENU SIDEBAR-->
<!-- PAGE CONTAINER-->
<div class="page-container">
<!-- HEADER DESKTOP-->
<?php include_once('includes/header.php');?>
<!-- HEADER DESKTOP-->
<!-- MAIN CONTENT-->
<div class="main-content">
<div class="section_content section_content--p30">
<div class="container-fluid">
<div class="row">
<div class="col-lg-12">
<div class="card">
<div class="card-header">
<strong>Update</strong> Admin Profile
</div>
<div class="card-body card-block">
<form action="" method="post" enctype="multipart/form-data" class="form-
horizontal">
<p style="font-size:16px; color:red" align="center"> <?php if($msg){
echo $msg;
} ?> </p>
<?php
$adminid=$_SESSION['avmsaid'];
$ret=mysqli_query($con,"select * from tbladmin where ID='$adminid'");
$cnt=1;
while ($row=mysqli_fetch_array($ret)) {
?>
<div class="row form-group">
<div class="col col-md-3">

<label for="text-input" class=" form-control-label">Admin Name</label>


</div>
<div class="col-12 col-md-9">
<input type="text" id="adminname" name="adminname" value="<?php
echo $row['AdminName'];?>" class="form-control" required="">
</div>
</div>
<div class="row form-group">
<div class="col col-md-3">
<label for="email-input" class=" form-control-label">Email Input</label>
</div>
<div class="col-12 col-md-9">
<input type="email" id="email" name="email" value="<?php echo
$row['Email'];?>" class="form-control" required="">
</div>
</div>
17
<div class="row form-group">
<div class="col col-md-3">
<label for="password-input" class=" form-control-label">Phone
Number</label>
</div>
<div class="col-12 col-md-9">
<input type="text" id="mobilenumber" name="mobilenumber"
class="form-control" maxlength="10" value="<?php echo $row['MobileNumber'];?>" required="">
</div>
</div>

<div class="row form-group">


<div class="col col-md-3">
<label for="textarea-input" class=" form-control-label">User Name</label>
</div>
<div class="col-12 col-md-9">
<input name="username" id="username" rows="9"

class="form-control" required="" readonly="" value="<?php echo $row['UserName'];?>">


</div>
</div>
<div class="row form-group">
<div class="col col-md-3">
<label for="password-input" class=" form-control-label">Admin
Registration date</label>
</div>
<div class="col-12 col-md-9">
<input type="text" id="adminregdate" name="adminregdate" value="<?
php echo $row['AdminRegdate'];?>" class="form-control" required="" readonly="">
</div>
</div>
<?php } ?>
<div class="card-footer">
<p style="text-align: center;"><button type="submit" name="submit" id="submit"
class="btn btn-primary btn-sm">Update
</button></p>
</div>
</form>
</div>
</Div>
<?php include_once('includes/footer.php');?>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Jquery JS-->
<script src="vendor/jquery-3.2.1.min.js"></script>
<!-- Bootstrap JS-->
<script src="vendor/bootstrap-4.1/popper.min.js"></script>
18
<script src="vendor/bootstrap-4.1/bootstrap.min.js"></script>
<!-- Vendor JS -->
<script src="vendor/slick/slick.min.js">

</script>
<script src="vendor/wow/wow.min.js"></script>
<script src="vendor/animsition/animsition.min.js"></script>
<script src="vendor/bootstrap-progressbar/bootstrap-progressbar.min.js">
</script>
<script src="vendor/counter-up/jquery.waypoints.min.js"></script>
<script src="vendor/counter-up/jquery.counterup.min.js">
</script>
<script src="vendor/circle-progress/circle-progress.min.js"></script>

<script src="vendor/perfect-scrollbar/perfect-scrollbar.js"></script>

<script src="vendor/chartjs/Chart.bundle.min.js"></script>
<script src="vendor/select2/select2.min.js">
</script>
<!-- Main JS-->
<script src="js/main.js"></script>
</body>
</html>
<!-- end document-->
<?php } ?>

BETWEEN DATES REPORT

<?php
session_start();
error_reporting(0);
include('includes/dbconnection.php');
if (strlen($_SESSION['avmsaid']==0)) {
header('location:logout.php');
} else{
?>
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Required meta tags-->
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="au theme template">
<meta name="author" content="Hau Nguyen">
<meta name="keywords" content="au theme template">

<!-- Title Page-->


<title>AVMS</title>
<!-- Fontfaces CSS-->
<link href="css/font-face.css" rel="stylesheet" media="all">
<link href="vendor/font-awesome-4.7/css/font-awesome.min.css" rel="stylesheet" media="all">
<link href="vendor/font-awesome-5/css/fontawesome-all.min.css" rel="stylesheet" media="all">
<link href="vendor/mdi-font/css/material-design-iconic-font.min.css" rel="stylesheet" media="all">
<!-- Bootstrap CSS-->
<link href="vendor/bootstrap-4.1/bootstrap.min.css" rel="stylesheet" media="all">
<!-- Vendor CSS-->
<link href="vendor/animsition/animsition.min.css" rel="stylesheet" media="all">
<link href="vendor/bootstrap-progressbar/bootstrap-progressbar-3.3.4.min.css" rel="stylesheet"
media="all">
<link href="vendor/wow/animate.css" rel="stylesheet" media="all">
<link href="vendor/css-hamburgers/hamburgers.min.css" rel="stylesheet" media="all">
<link href="vendor/slick/slick.css" rel="stylesheet" media="all">
<link href="vendor/select2/select2.min.css" rel="stylesheet" media="all">
<link href="vendor/perfect-scrollbar/perfect-scrollbar.css" rel="stylesheet" media="all">

<!-- Main CSS-->


<link href="css/theme.css" rel="stylesheet" media="all">
</head>
<body class="animsition">
<div class="page-wrapper">
<!-- HEADER MOBILE-->
<?php include_once('includes/sidebar.php');?>
<!-- END HEADER MOBILE-->
<!-- MENU SIDEBAR-->
<!-- END MENU SIDEBAR-->
<!-- PAGE CONTAINER-->
<div class="page-container">
<!-- HEADER DESKTOP-->
<?php include_once('includes/header.php');?>
<!-- END HEADER DESKTOP-->
<!-- MAIN CONTENT-->
<div class="main-content">

<div class="section_content section_content--p30">


<div class="container-fluid">
<div class="row">
<div class="col-lg-12">
<div class="table-responsive table--no-card m-b-30">
<h4 class="m-t-0 header-title">Between Dates Reports</h4>
<?php
$fdate=$_POST['fromdate'];
$tdate=$_POST['todate'];
?>
<h5 align="center" style="color:blue">Report from <?php echo $fdate?> to <?php echo $tdate?></h5>
<hr />
<table class="table table-borderless table-striped table-earning">
<thead>
<tr>
<tr>
<th>S.NO</th>
<th>Visistor Name</th>
<th>Contact Number</th>
<th>Whom to Meet</th>
<th>Action</th>
</tr>
</tr>
</thead>
<?php
$ret=mysqli_query($con,"select *from tblvisitor where date(EnterDate) between '$fdate' and '$tdate'");
$cnt=1;
while ($row=mysqli_fetch_array($ret)) {
?>
<tr>

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


<td><?php echo $row['VisitorName'];?></td>
<td><?php echo $row['MobileNumber'];?></td>
<td><?php echo $row['WhomtoMeet'];?></td>
<td><a href="visitor-detail.php?editid=<?php echo $row['ID'];?>" title="View Full Details"><i
class="fa fa-edit fa-1x"></i></a></td>

</tr>
<?php
$cnt=$cnt+1;
}?>
</table>
</div>
</div>
</div>
<?php include_once('includes/footer.php');?>
</div>
</div>
</div>
</div>
</div>
<!-- Jquery JS-->
<script src="vendor/jquery-3.2.1.min.js"></script>
<!-- Bootstrap JS-->
<script src="vendor/bootstrap-4.1/popper.min.js"></script>
<script src="vendor/bootstrap-4.1/bootstrap.min.js"></script>
<!-- Vendor JS -->
<script src="vendor/slick/slick.min.js">
</script>
<script src="vendor/wow/wow.min.js"></script>
<script src="vendor/animsition/animsition.min.js"></script>
<script src="vendor/bootstrap-progressbar/bootstrap-progressbar.min.js">
</script>
<script src="vendor/counter-up/jquery.waypoints.min.js"></script>
<script src="vendor/counter-up/jquery.counterup.min.js">
</script>
<script src="vendor/circle-progress/circle-progress.min.js"></script>
<script src="vendor/perfect-scrollbar/perfect-scrollbar.js"></script>
<script src="vendor/chartjs/Chart.bundle.min.js"></script>
<script src="vendor/select2/select2.min.js">
</script>
<!-- Main JS-->
<script src="js/main.js"></script>
</body>
</html>

<?php } ?>
<?php
session_start();
error_reporting(0);
include('includes/dbconnection.php');
if (strlen($_SESSION['avmsaid']==0)) {
header('location:logout.php');
} else{
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Required meta tags-->
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="au theme template">
<meta name="author" content="Hau Nguyen">
<meta name="keywords" content="au theme template">
<!-- Title Page-->
<title>AVSM Reports</title>
<!-- Fontfaces CSS-->
<link href="css/font-face.css" rel="stylesheet" media="all">
<link href="vendor/font-awesome-5/css/fontawesome-all.min.css" rel="stylesheet" media="all">
<link href="vendor/font-awesome-4.7/css/font-awesome.min.css" rel="stylesheet" media="all">
<link href="vendor/mdi-font/css/material-design-iconic-font.min.css" rel="stylesheet" media="all">
<!-- Bootstrap CSS-->
<link href="vendor/bootstrap-4.1/bootstrap.min.css" rel="stylesheet" media="all">
<!-- Vendor CSS-->
<link href="vendor/animsition/animsition.min.css" rel="stylesheet" media="all">
<link href="vendor/bootstrap-progressbar/bootstrap-progressbar-3.3.4.min.css" rel="stylesheet"
media="all">
<link href="vendor/wow/animate.css" rel="stylesheet" media="all">
<link href="vendor/css-hamburgers/hamburgers.min.css" rel="stylesheet" media="all">
<link href="vendor/slick/slick.css" rel="stylesheet" media="all">

<link href="vendor/select2/select2.min.css" rel="stylesheet" media="all">


<link href="vendor/perfect-scrollbar/perfect-scrollbar.css" rel="stylesheet" media="all">
<!-- Main CSS-->
<link href="css/theme.css" rel="stylesheet" media="all">
</head>
<body class="animsition">
<div class="page-wrapper">
<!-- HEADER MOBILE-->
<?php include_once('includes/sidebar.php');?>
<!-- END HEADER MOBILE-->

<!-- MENU SIDEBAR-->


<!-- END MENU SIDEBAR-->
<!-- PAGE CONTAINER-->
<div class="page-container">
<!-- HEADER DESKTOP-->
<?php include_once('includes/header.php');?>
<!-- HEADER DESKTOP-->
<!-- MAIN CONTENT-->
<div class="main-content">
<div class="section_content section_content--p30">
<div class="container-fluid">
<div class="row">
<div class="col-lg-12">
<div class="card">
<div class="card-header">
<strong>Between</strong> Dates Reports
</div>
<div class="card-body card-block">
<form method="post" enctype="multipart/form-data" class="form-horizontal"
name="bwdatesreport" action="bwdates-reports-details.php">
<p style="font-size:16px; color:red" align="center"> <?php if($msg){
echo $msg;
} ?> </p>
<div class="row form-group">
<div class="col col-md-3">
<label for="text-input" class=" form-control-label">From

Date</label>
</div>
<div class="col-12 col-md-9">
<input type="date" id="fromdate" name="fromdate" value="" class="form-
control" required="">

</div>
</div>
<div class="row form-group">
<div class="col col-md-3">
<label for="email-input" class=" form-control-label">To Date</label>
</div>
<div class="col-12 col-md-9">
<input type="date" id="todate" name="todate" value="" class="form-
control" required="">
</div>
</div>
<div class="card-footer">

<p style="text-align: center;"><button type="submit" name="submit"


id="submit" class="btn btn-primary btn-sm">Submit
</button></p>
</div>
</form>
</div>
</div>
<?php include_once('includes/footer.php');?>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Jquery JS-->
<script src="vendor/jquery-3.2.1.min.js"></script>
<!-- Bootstrap JS-->
<script src="vendor/bootstrap-4.1/popper.min.js"></script>
<script src="vendor/bootstrap-4.1/bootstrap.min.js"></script>

<!-- Vendor JS -->


<script src="vendor/slick/slick.min.js">
</script>
<script src="vendor/wow/wow.min.js"></script>
<script src="vendor/animsition/animsition.min.js"></script>
<script src="vendor/bootstrap-progressbar/bootstrap-progressbar.min.js">
</script>
<script src="vendor/counter-up/jquery.waypoints.min.js"></script>
<script src="vendor/counter-up/jquery.counterup.min.js">
</script>
<script src="vendor/circle-progress/circle-progress.min.js"></script>
<script src="vendor/perfect-scrollbar/perfect-scrollbar.js"></script>
<script src="vendor/chartjs/Chart.bundle.min.js"></script>
<script src="vendor/select2/select2.min.js">
</script>
<!-- Main JS-->
<script src="js/main.js"></script>
</body>
</html>
<!-- end document-->

CHANGE PASSWORD

<?php
session_start();
error_reporting(0);
include('includes/dbconnection.php');
error_reporting(0);

if (strlen($_SESSION['avmsaid']==0)) {
header('location:logout.php');
} else{
if(isset($_POST['submit']))
{
$adminid=$_SESSION['avmsaid'];
$cpassword=md5($_POST['currentpassword']);
$newpassword=md5($_POST['newpassword']);
$query=mysqli_query($con,"select ID from tbladmin where ID='$adminid' and
Password='$cpassword'");

$row=mysqli_fetch_array($query);
if($row>0){
$ret=mysqli_query($con,"update tbladmin set Password='$newpassword' where ID='$adminid'");
$msg= "Your password successully changed";
} else {
$msg="Your current password is wrong";
}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Required meta tags-->
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="au theme template">
<meta name="author" content="Hau Nguyen">
<meta name="keywords" content="au theme template">
<!-- Title Page-->
<title>AVSM Change Password</title>
<!-- Fontfaces CSS-->
<link href="css/font-face.css" rel="stylesheet" media="all">
<link href="vendor/font-awesome-5/css/fontawesome-all.min.css" rel="stylesheet" media="all">
<link href="vendor/font-awesome-4.7/css/font-awesome.min.css" rel="stylesheet" media="all">
<link href="vendor/mdi-font/css/material-design-iconic-font.min.css" rel="stylesheet"
media="all">
<!-- Bootstrap CSS-->
<link href="vendor/bootstrap-4.1/bootstrap.min.css" rel="stylesheet" media="all">
<!-- Vendor CSS-->
<link href="vendor/animsition/animsition.min.css" rel="stylesheet" media="all">
<link href="vendor/bootstrap-progressbar/bootstrap-progressbar-3.3.4.min.css" rel="stylesheet"
media="all">
<link href="vendor/wow/animate.css" rel="stylesheet" media="all">
<link href="vendor/css-hamburgers/hamburgers.min.css" rel="stylesheet"

media="all">
<link href="vendor/slick/slick.css" rel="stylesheet" media="all">
<link href="vendor/select2/select2.min.css" rel="stylesheet" media="all">
<link href="vendor/perfect-scrollbar/perfect-scrollbar.css" rel="stylesheet" media="all">
<!-- Main CSS-->
<link href="css/theme.css" rel="stylesheet" media="all">
<script type="text/javascript">
function checkpass()
{
if(document.changepassword.newpassword.value!
=document.changepassword.confirmpassword.value)
{
alert('New Password and Confirm Password field does not match');
document.changepassword.confirmpassword.focus();
return false;
}
return true;
}
</script>
</head>
<body class="animsition">
<div class="page-wrapper">
<!-- HEADER MOBILE-->
<?php include_once('includes/sidebar.php');?>
<!-- END HEADER MOBILE-->
<!-- MENU SIDEBAR-->
<!-- END MENU SIDEBAR-->
<!-- PAGE CONTAINER-->
<div class="page-container">
<!-- HEADER DESKTOP-->
<?php include_once('includes/header.php');?>
<!-- HEADER DESKTOP-->

<!-- MAIN CONTENT-->


<div class="main-content">
<div class="section_content section_content--p30">
<div class="container-fluid">

<div class="row">
<div class="col-lg-12">
<div class="card">
<div class="card-header">
<strong>Change</strong> Admin Password
</div>
<div class="card-body card-block">
<form action="" method="post" enctype="multipart/form-data"
class="form-horizontal" name="changepassword" onsubmit="return checkpass();">

<p style="font-size:16px; color:red" align="center"> <?php if($msg)


{
echo $msg;
} ?> </p>
<?php
$adminid=$_SESSION['avmsaid'];
$ret=mysqli_query($con,"select * from tbladmin where ID='$adminid'");
$cnt=1;
while ($row=mysqli_fetch_array($ret)) {
?>
<div class="row form-group">
<div class="col col-md-3">
<label for="text-input" class=" form-control-label">Current
Password</label>
</div>
<div class="col-12 col-md-9">
<input type="password" id="currentpassword"
name="currentpassword" value="" class="form-control" required="">
</div>
</div>
<div class="row form-group">
<div class="col col-md-3">
<label for="email-input" class=" form-control-label">New
Password</label>
</div>
<div class="col-12 col-md-9">
<input type="password" id="newpassword" name="newpassword"
value="" class="form-control" required="">
</div>
</div>
<div class="row form-group">
<div class="col col-md-3">
<label for="password-input" class=" form-control-label">Confirm
Password</label>
</div>
<div class="col-12 col-md-9">
<input type="password" id="confirmpassword"
name="confirmpassword" class="form-control" maxlength="10" value="" required="">
</div>
</div>
<?php } ?>
<div class="card-footer">
<p style="text-align: center;"><button type="submit" name="submit"
id="submit" class="btn btn-primary btn-sm">Change
</button></p>
</div>
</form>
</div>

</div>
<?php include_once('includes/footer.php');?>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Jquery JS-->
<script src="vendor/jquery-3.2.1.min.js"></script>
<!-- Bootstrap JS-->
<script src="vendor/bootstrap-4.1/popper.min.js"></script>
<script src="vendor/bootstrap-4.1/bootstrap.min.js"></script>
<!-- Vendor JS -->
<script src="vendor/slick/slick.min.js">
</script>
<script src="vendor/wow/wow.min.js"></script>
<script src="vendor/animsition/animsition.min.js"></script>

<script src="vendor/bootstrap-progressbar/bootstrap-progressbar.min.js">
</script>
<script src="vendor/counter-up/jquery.waypoints.min.js"></script>
<script src="vendor/counter-up/jquery.counterup.min.js">
</script>
<script src="vendor/circle-progress/circle-progress.min.js"></script>

<script src="vendor/perfect-scrollbar/perfect-scrollbar.js"></script>
<script src="vendor/chartjs/Chart.bundle.min.js"></script>
<script src="vendor/select2/select2.min.js">
</script>
<!-- Main JS-->
<script src="js/main.js"></script>
</body>
</html>
<!-- end document-->
<?php } ?>

DASH BOARD

<?php
session_start();
error_reporting(0);
include('includes/dbconnection.php');
error_reporting(0);
if (strlen($_SESSION['avmsaid']==0)) {
header('location:logout.php');
} else{ ?>
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Required meta tags-->
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="au theme template">
<meta name="author" content="Hau Nguyen">
<meta name="keywords" content="au theme template">
<!-- Title Page-->

<title>Dashboard</title>
<!-- Fontfaces CSS-->
<link href="css/font-face.css" rel="stylesheet" media="all">
<link href="vendor/font-awesome-4.7/css/font-awesome.min.css" rel="stylesheet" media="all">
<link href="vendor/font-awesome-5/css/fontawesome-all.min.css" rel="stylesheet" media="all">
<link href="vendor/mdi-font/css/material-design-iconic-font.min.css" rel="stylesheet" media="all">
<!-- Bootstrap CSS-->
<link href="vendor/bootstrap-4.1/bootstrap.min.css" rel="stylesheet" media="all">
<!-- Vendor CSS-->
<link href="vendor/animsition/animsition.min.css" rel="stylesheet" media="all">
<link href="vendor/bootstrap-progressbar/bootstrap-progressbar-3.3.4.min.css" rel="stylesheet"
media="all">
<link href="vendor/wow/animate.css" rel="stylesheet" media="all">
<link href="vendor/css-hamburgers/hamburgers.min.css" rel="stylesheet" media="all">
<link href="vendor/slick/slick.css" rel="stylesheet" media="all">
<link href="vendor/select2/select2.min.css" rel="stylesheet" media="all">
<link href="vendor/perfect-scrollbar/perfect-scrollbar.css" rel="stylesheet" media="all">
<!-- Main CSS-->

<link href="css/theme.css" rel="stylesheet" media="all">


</head>
<body class="animsition">
<div class="page-wrapper">
<!-- HEADER MOBILE-->
<!-- MENU SIDEBAR-->
<?php include_once('includes/sidebar.php');?>
<!-- END MENU SIDEBAR-->
<!-- PAGE CONTAINER-->
<div class="page-container">
<!-- HEADER DESKTOP-->
<?php include_once('includes/header.php');?>
<!-- HEADER DESKTOP-->
<!-- MAIN CONTENT-->
<div class="main-content">
<div class="section_content section_content--p30">

<div class="container-fluid">
<?php
//todays visitors
$query=mysqli_query($con,"select ID from tblvisitor where date(EnterDate)=CURDATE();");
$count_today_visitors=mysqli_num_rows($query);
?>
<div class="row m-t-25">
<div class="col-sm-6 col-lg-3">
<div class="overview-item overview-item--c1">
<div class="overview__inner">
<div class="overview-box clearfix">
<div class="icon">
<i class="zmdi zmdi-account-o"></i>
</div>
<div class="text">
<h2><?php echo $count_today_visitors?></h2>
<span> Today's Visitors</span>
</div>
</div>
</div>
</div>
</div>
<?php
//Yesterdays visitors
$query1=mysqli_query($con,"select ID from tblvisitor where date(EnterDate)=CURDATE()-1;");
$count_yesterday_visitors=mysqli_num_rows($query1);
?>
<div class="col-sm-6 col-lg-3">
<div class="overview-item overview-item--c2">
<div class="overview__inner">
<div class="overview-box clearfix">
<div class="icon">
<i class="zmdi zmdi-account-o"></i>
</div>
<div class="text">
<h2><?php echo $count_yesterday_visitors?></h2>
<span>Yesterday Visitors</span>

</div>
</div>
</div>
</div>
</div>
<?php
//Last Sevendays visitors
$query2=mysqli_query($con,"select ID from tblvisitor where date(EnterDate)>=(DATE(NOW()) -
INTERVAL 7 DAY);");
$count_lastsevendays_visitors=mysqli_num_rows($query2);

?>
<div class="col-sm-6 col-lg-3">
<div class="overview-item overview-item--c3">
<div class="overview__inner">
<div class="overview-box clearfix">
<div class="icon">
<i class="zmdi zmdi-account-o"></i>
</div>
<div class="text">
<h2><?php echo $count_lastsevendays_visitors?></h2>
<span>Last 7 Days Visitors</span>
</div>
</div>
</div>
</div>
</div>
<?php
//Total Visitors visitors
$query3=mysqli_query($con,"select ID from tblvisitor");
$count_total_visitors=mysqli_num_rows($query3);
?>
<div class="col-sm-6 col-lg-3">
<div class="overview-item overview-item--c4">
<div class="overview__inner">
<div class="overview-box clearfix">
<div class="icon">
<i class="zmdi zmdi-account-o"></i>
</div>
<div class="text">
<h2><?php echo $count_total_visitors?></h2>
<span>Total Visitors Till Date</span>
</div>
</div>
</div>
</div>
</div>
</div>
<?php include_once('includes/footer.php');?>
</div>
</div>
</div>
</div>
</div>
<!-- Jquery JS-->
<script src="vendor/jquery-3.2.1.min.js"></script>
<!-- Bootstrap JS-->
<script src="vendor/bootstrap-4.1/popper.min.js"></script>
<script src="vendor/bootstrap-4.1/bootstrap.min.js"></script>

<!-- Vendor JS -->


<script src="vendor/slick/slick.min.js">
</script>
<script src="vendor/wow/wow.min.js"></script>
<script src="vendor/animsition/animsition.min.js"></script>
<script src="vendor/bootstrap-progressbar/bootstrap-progressbar.min.js">
</script>
<script src="vendor/counter-up/jquery.waypoints.min.js"></script>
<script src="vendor/counter-up/jquery.counterup.min.js">
</script>
<script src="vendor/circle-progress/circle-progress.min.js"></script>
<script src="vendor/perfect-scrollbar/perfect-scrollbar.js"></script>
<script src="vendor/chartjs/Chart.bundle.min.js"></script>
<script src="vendor/select2/select2.min.js">
</script>
<!-- Main JS-->
<script src="js/main.js"></script>
</body>
</html>
<!-- end document-->
<?php } ?>

FORGOT PASSWORD
<?php
session_start();
error_reporting(0);
include('includes/dbconnection.php');
if(isset($_POST['submit']))
{
$contactno=$_POST['contactno'];
$email=$_POST['email'];
$query=mysqli_query($con,"select ID from tbladmin where Email='$email' and
MobileNumber='$contactno' ");
$ret=mysqli_fetch_array($query);
if($ret>0){
$_SESSION['contactno']=$contactno;
$_SESSION['email']=$email;
header('location:resetpassword.php');
}
else{
$msg="Invalid Details. Please try again.";
}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Required meta tags-->

<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="au theme template">
<meta name="author" content="Hau Nguyen">
<meta name="keywords" content="au theme template">
<!-- Title Page-->
<title>AVMS Forgot Password</title>
<!-- Fontfaces CSS-->
<link href="css/font-face.css" rel="stylesheet" media="all">
<link href="vendor/font-awesome-4.7/css/font-awesome.min.css" rel="stylesheet" media="all">
<link href="vendor/font-awesome-5/css/fontawesome-all.min.css" rel="stylesheet" media="all">
<link href="vendor/mdi-font/css/material-design-iconic-font.min.css" rel="stylesheet" media="all">
<!-- Bootstrap CSS-->
<link href="vendor/bootstrap-4.1/bootstrap.min.css" rel="stylesheet" media="all">
<!-- Vendor CSS-->
<link href="vendor/animsition/animsition.min.css" rel="stylesheet" media="all">
<link href="vendor/bootstrap-progressbar/bootstrap-progressbar-3.3.4.min.css" rel="stylesheet"
media="all">
<link href="vendor/wow/animate.css" rel="stylesheet" media="all">
<link href="vendor/css-hamburgers/hamburgers.min.css" rel="stylesheet" media="all">
<link href="vendor/slick/slick.css" rel="stylesheet" media="all">
<link href="vendor/select2/select2.min.css" rel="stylesheet" media="all">
<link href="vendor/perfect-scrollbar/perfect-scrollbar.css" rel="stylesheet" media="all">
<!-- Main CSS-->
<link href="css/theme.css" rel="stylesheet" media="all">
</head>
<body class="animsition">
<div class="page-wrapper">
<div class="page-content--bge5">
<div class="container">
<div class="login-wrap">
<div class="login-content">
<div class="login-logo">
<a href="index.php" style="font-size:24px;">
Apartment Visitor Management System (AVMS)
</a>
</div>
<p style="font-size:16px; color:red" align="center"> <?php if($msg){
echo $msg;
} ?> </p>
<h5 align="center"> Password Recovery</h5>
<hr>
<div class="login-form">

<form action="" method="post" name="submit">


<div class="form-group">
<label>Email Address</label>

<input class="au-input au-input--full" type="email" name="email"


placeholder="Email Address" required="true">
</div>
<div class="form-group">
<label>Mobile Number</label>
<input class="au-input au-input--full" type="text" name="contactno"
placeholder="Mobile Number">
</div>
<button class="au-btn au-btn--block au-btn--green m-b-20" type="submit"
name="submit">Reset</button>
<div class="social-login-content">
<div class="login-checkbox">
<label>
<a href="index.php">Sign in</a>
</label>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>

</div>
<!-- Jquery JS-->
<script src="vendor/jquery-3.2.1.min.js"></script>
<!-- Bootstrap JS-->
<script src="vendor/bootstrap-4.1/popper.min.js"></script>
<script src="vendor/bootstrap-4.1/bootstrap.min.js"></script>
<!-- Vendor JS -->
<script src="vendor/slick/slick.min.js">
</script>
<script src="vendor/wow/wow.min.js"></script>
<script src="vendor/animsition/animsition.min.js"></script>

<script src="vendor/bootstrap-progressbar/bootstrap-progressbar.min.js">
</script>
<script src="vendor/counter-up/jquery.waypoints.min.js"></script>
<script src="vendor/counter-up/jquery.counterup.min.js">
</script>
<script src="vendor/circle-progress/circle-progress.min.js"></script>
<script src="vendor/perfect-scrollbar/perfect-scrollbar.js"></script>
<script src="vendor/chartjs/Chart.bundle.min.js"></script>
<script src="vendor/select2/select2.min.js">
</script>
<!-- Main JS-->
<script src="js/main.js"></script>

</body>
</html>
<!-- end document-->

INDEX
<?php
session_start();
error_reporting(0);
include('includes/dbconnection.php');
if(isset($_POST['login']))
{
$adminuser=$_POST['username'];
$password=md5($_POST['password']);
$query=mysqli_query($con,"select ID from tbladmin where UserName='$adminuser' &&
Password='$password' ");
$ret=mysqli_fetch_array($query);
if($ret>0){
$_SESSION['avmsaid']=$ret['ID'];
header('location:dashboard.php');
}
else{
$msg="Invalid Details.";
}
}
?>
<!DOCTYPE html>

<html lang="en">
<head>
<!-- Required meta tags-->
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="au theme template">
<meta name="author" content="Hau Nguyen">
<meta name="keywords" content="au theme template">
<!-- Title Page-->
<title>AVMS Login</title>
<!-- Fontfaces CSS-->
<link href="css/font-face.css" rel="stylesheet" media="all">
<link href="vendor/font-awesome-4.7/css/font-awesome.min.css" rel="stylesheet" media="all">
<link href="vendor/font-awesome-5/css/fontawesome-all.min.css" rel="stylesheet" media="all">
<link href="vendor/mdi-font/css/material-design-iconic-font.min.css" rel="stylesheet" media="all">
<!-- Bootstrap CSS-->
<link href="vendor/bootstrap-4.1/bootstrap.min.css" rel="stylesheet" media="all">
<!-- Vendor CSS-->
<link href="vendor/animsition/animsition.min.css" rel="stylesheet" media="all">
<link href="vendor/bootstrap-progressbar/bootstrap-progressbar-3.3.4.min.css" rel="stylesheet"
media="all">

<link href="vendor/wow/animate.css" rel="stylesheet" media="all">


<link href="vendor/css-hamburgers/hamburgers.min.css" rel="stylesheet" media="all">
<link href="vendor/slick/slick.css" rel="stylesheet" media="all">
<link href="vendor/select2/select2.min.css" rel="stylesheet" media="all">
<link href="vendor/perfect-scrollbar/perfect-scrollbar.css" rel="stylesheet" media="all">
<!-- Main CSS-->
<link href="css/theme.css" rel="stylesheet" media="all">
</head>
<body class="animsition">
<div class="page-wrapper">
<div class="page-content--bge5">
<div class="container">
<div class="login-wrap">
<div class="login-content">

<div class="login-logo">
<a href="index.php" style="font-size:24px;">
Apartment Visitor Management System (AVMS)
</a>
</div>
<p style="font-size:16px; color:red" align="center"> <?php if($msg){
echo $msg;
} ?> </p>
<div class="login-form">
<form action="" method="post" name="login">
<div class="form-group">
<label>User Name</label>
<input class="au-input au-input--full" type="text" name="username"
placeholder="User Name" required="true">
</div>
<div class="form-group">
<label>Password</label>
<input class="au-input au-input--full" type="password" name="password"
placeholder="Password">
</div>
<div class="login-checkbox">
<label>
<a href="forgot-password.php">Forgotten Password?</a>
</label>
</div>
<button class="au-btn au-btn--block au-btn--green m-b-20" type="submit"
name="login">sign in</button>
<div class="social-login-content">
</div>
</form>
</div>
</div>
</div>

</div>
</div>
</div>
<!-- Jquery JS-->
<script src="vendor/jquery-3.2.1.min.js"></script>

<!-- Bootstrap JS-->


<script src="vendor/bootstrap-4.1/popper.min.js"></script>
<script src="vendor/bootstrap-4.1/bootstrap.min.js"></script>
<!-- Vendor JS -->
<script src="vendor/slick/slick.min.js">
</script>
<script src="vendor/wow/wow.min.js"></script>
<script src="vendor/animsition/animsition.min.js"></script>
<script src="vendor/bootstrap-progressbar/bootstrap-progressbar.min.js">
</script>
<script src="vendor/counter-up/jquery.waypoints.min.js"></script>
<script src="vendor/counter-up/jquery.counterup.min.js">
</script>
<script src="vendor/circle-progress/circle-progress.min.js"></script>
<script src="vendor/perfect-scrollbar/perfect-scrollbar.js"></script>
<script src="vendor/chartjs/Chart.bundle.min.js"></script>
<script src="vendor/select2/select2.min.js">
</script>
<!-- Main JS-->
<script src="js/main.js"></script>
</body>
</html>
<!-- end document-->

LOGOUT
<?php
session_start();
session_unset();
session_destroy();
header('location:index.php');
?>

MANAGE NEW VISITOR


<?php
session_start();
error_reporting(0);
include('includes/dbconnection.php');
if (strlen($_SESSION['avmsaid']==0)) {

header('location:logout.php');
} else{
?>
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Required meta tags-->
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="au theme template">
<meta name="author" content="Hau Nguyen">
<meta name="keywords" content="au theme template">
<!-- Title Page-->
<title>AVMS Visitors</title>
<!-- Fontfaces CSS-->
<link href="css/font-face.css" rel="stylesheet" media="all">
<link href="vendor/font-awesome-4.7/css/font-awesome.min.css" rel="stylesheet" media="all">
<link href="vendor/font-awesome-5/css/fontawesome-all.min.css" rel="stylesheet" media="all">
<link href="vendor/mdi-font/css/material-design-iconic-font.min.css" rel="stylesheet" media="all">
<!-- Bootstrap CSS-->
<link href="vendor/bootstrap-4.1/bootstrap.min.css" rel="stylesheet" media="all">
<!-- Vendor CSS-->
<link href="vendor/animsition/animsition.min.css" rel="stylesheet" media="all">
<link href="vendor/bootstrap-progressbar/bootstrap-progressbar-3.3.4.min.css" rel="stylesheet"
media="all">
<link href="vendor/wow/animate.css" rel="stylesheet" media="all">
<link href="vendor/css-hamburgers/hamburgers.min.css" rel="stylesheet" media="all">
<link href="vendor/slick/slick.css" rel="stylesheet" media="all">
<link href="vendor/select2/select2.min.css" rel="stylesheet" media="all">
<link href="vendor/perfect-scrollbar/perfect-scrollbar.css" rel="stylesheet" media="all">
<!-- Main CSS-->
<link href="css/theme.css" rel="stylesheet" media="all">
</head>
<body class="animsition">
<div class="page-wrapper">
<!-- HEADER MOBILE-->
<?php include_once('includes/sidebar.php');?>
<!-- END HEADER MOBILE-->
<!-- MENU SIDEBAR-->
<!-- END MENU SIDEBAR-->
<!-- PAGE CONTAINER-->
<div class="page-container">
<!-- HEADER DESKTOP-->
<?php include_once('includes/header.php');?>
<!-- END HEADER DESKTOP-->
<!-- MAIN CONTENT-->
<div class="main-content">
<div class="section_content section_content--p30">

<div class="container-fluid">
<div class="row">
<div class="col-lg-12">
<div class="table-responsive table--no-card m-b-30">
<table class="table table-borderless table-striped table-earning">
<thead>
<tr>
<tr>
<th>S.NO</th>
<th>Visitor Name</th>
<th>Contact Number</th>
<th>Whom To Visit</th>
<th>Action</th>
</tr>
</tr>
</thead>
<?php
$ret=mysqli_query($con,"select *from tblvisitor");
$cnt=1;
while ($row=mysqli_fetch_array($ret)) {
?>
<tr>
<td><?php echo $cnt;?></td>

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

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


<td><?php echo $row['WhomtoMeet'];?></td>
<td><a href="visitor-detail.php?editid=<?php echo $row['ID'];?>" title="View Full Details"><i
class="fa fa-edit fa-1x"></i></a></td>
</tr>
<?php
$cnt=$cnt+1;
}?>
</table>
</div>
</div>

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

<!-- Jquery JS-->


<script src="vendor/jquery-3.2.1.min.js"></script>
<!-- Bootstrap JS-->
<script src="vendor/bootstrap-4.1/popper.min.js"></script>
<script src="vendor/bootstrap-4.1/bootstrap.min.js"></script>
<!-- Vendor JS -->
<script src="vendor/slick/slick.min.js">
</script>
<script src="vendor/wow/wow.min.js"></script>
<script src="vendor/animsition/animsition.min.js"></script>
<script src="vendor/bootstrap-progressbar/bootstrap-progressbar.min.js">
</script>
<script src="vendor/counter-up/jquery.waypoints.min.js"></script>
<script src="vendor/counter-up/jquery.counterup.min.js">
</script>
<script src="vendor/circle-progress/circle-progress.min.js"></script>
<script src="vendor/perfect-scrollbar/perfect-scrollbar.js"></script>
<script src="vendor/chartjs/Chart.bundle.min.js"></script>
<script src="vendor/select2/select2.min.js">

</script>
<!-- Main JS-->
<script src="js/main.js"></script>
</body>
</html>
<?php } ?>

RESET PASSWORD
<?php
session_start();
error_reporting(0);
include('includes/dbconnection.php');
error_reporting(0);
if(isset($_POST['submit']))
{
$contactno=$_SESSION['contactno'];
$email=$_SESSION['email'];
$password=md5($_POST['newpassword']);
$query=mysqli_query($con,"update tbladmin set Password='$password' where Email='$email' &&
MobileNumber='$contactno' ");
if($query)
{
echo "<script>alert('Password successfully changed');</script>";
session_destroy();
}
}
?>
<!DOCTYPE html>

<html lang="en">
<head>
<!-- Required meta tags-->
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="au theme template">
<meta name="author" content="Hau Nguyen">
<meta name="keywords" content="au theme template">
<!-- Title Page-->
<title>AVMS Reset Password</title>

<!-- Fontfaces CSS-->


<link href="css/font-face.css" rel="stylesheet" media="all">
<link href="vendor/font-awesome-4.7/css/font-awesome.min.css" rel="stylesheet" media="all">
<link href="vendor/font-awesome-5/css/fontawesome-all.min.css" rel="stylesheet" media="all">
<link href="vendor/mdi-font/css/material-design-iconic-font.min.css" rel="stylesheet" media="all">
<!-- Bootstrap CSS-->
<link href="vendor/bootstrap-4.1/bootstrap.min.css" rel="stylesheet" media="all">
<!-- Vendor CSS-->
<link href="vendor/animsition/animsition.min.css" rel="stylesheet" media="all">
<link href="vendor/bootstrap-progressbar/bootstrap-progressbar-3.3.4.min.css" rel="stylesheet"
media="all">
<link href="vendor/wow/animate.css" rel="stylesheet" media="all">
<link href="vendor/css-hamburgers/hamburgers.min.css" rel="stylesheet" media="all">
<link href="vendor/slick/slick.css" rel="stylesheet" media="all">
<link href="vendor/select2/select2.min.css" rel="stylesheet" media="all">
<link href="vendor/perfect-scrollbar/perfect-scrollbar.css" rel="stylesheet" media="all">
<!-- Main CSS-->
<link href="css/theme.css" rel="stylesheet" media="all">
<script type="text/javascript">
function checkpass()
{
if(document.changepassword.newpassword.value!=document.changepassword.confirmpassword.value)
{
alert('New Password and Confirm Password field does not match');
document.changepassword.confirmpassword.focus();
return false;
}
return true;
}
</script>
</head>
<body class="animsition">
<div class="page-wrapper">
<div class="page-content--bge5">

<div class="container">
<div class="login-wrap">
<div class="login-content">
<div class="login-logo">
<a href="index.php" style="font-size:24px;">
Apartment Visitor Management System (AVMS)
</a>
</div>
<p style="font-size:16px; color:red" align="center"> <?php if($msg){
echo $msg;
} ?> </p>
<h5 align="center">Reset your Password</h5>
<hr>
<div class="login-form">
<form action="" method="post" name="changepassword" onsubmit="return
checkpass();">
<div class="form-group">
<label>New Password</label>
<input class="au-input au-input--full" type="password" required=""
name="newpassword" placeholder="New Password">
</div>
<div class="form-group">
<label>Confirm Your Password</label>
38
<input class="au-input au-input--full" type="password" name="confirmpassword"
required="" placeholder="Confirm Your Password">
</div>
<button class="au-btn au-btn--block au-btn--green m-b-20" type="submit"
name="submit">Reset</button>
<div class="social-login-content">
<div class="login-checkbox">
<label>
<a href="index.php">Sign in</a>
</label>
</div>
</div>
</form>
</div>

</div>
</div>
</div>
</div>
</div>
<!-- Jquery JS-->
<script src="vendor/jquery-3.2.1.min.js"></script>
<!-- Bootstrap JS-->

<script src="vendor/bootstrap-4.1/popper.min.js"></script>
<script src="vendor/bootstrap-4.1/bootstrap.min.js"></script>
<!-- Vendor JS -->
<script src="vendor/slick/slick.min.js">
</script>
<script src="vendor/wow/wow.min.js"></script>
<script src="vendor/animsition/animsition.min.js"></script>
<script src="vendor/bootstrap-progressbar/bootstrap-progressbar.min.js">
</script>
<script src="vendor/counter-up/jquery.waypoints.min.js"></script>
<script src="vendor/counter-up/jquery.counterup.min.js">
</script>
<script src="vendor/circle-progress/circle-progress.min.js"></script>
<script src="vendor/perfect-scrollbar/perfect-scrollbar.js"></script>
<script src="vendor/chartjs/Chart.bundle.min.js"></script>
<script src="vendor/select2/select2.min.js">
</script>
<!-- Main JS-->
<script src="js/main.js"></script>
</body>
</html>
<!-- end document-->

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

} else{
?>
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Required meta tags-->
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="au theme template">
<meta name="author" content="Hau Nguyen">
<meta name="keywords" content="au theme template">
<!-- Title Page-->
<title>AVMS Visitors Search</title>
<!-- Fontfaces CSS-->
<link href="css/font-face.css" rel="stylesheet" media="all">
<link href="vendor/font-awesome-4.7/css/font-awesome.min.css" rel="stylesheet" media="all">

<link href="vendor/font-awesome-5/css/fontawesome-all.min.css" rel="stylesheet" media="all">


<link href="vendor/mdi-font/css/material-design-iconic-font.min.css" rel="stylesheet" media="all">
<!-- Bootstrap CSS-->
<link href="vendor/bootstrap-4.1/bootstrap.min.css" rel="stylesheet" media="all">
<!-- Vendor CSS-->
<link href="vendor/animsition/animsition.min.css" rel="stylesheet" media="all">
<link href="vendor/bootstrap-progressbar/bootstrap-progressbar-3.3.4.min.css" rel="stylesheet"
media="all">
<link href="vendor/wow/animate.css" rel="stylesheet" media="all">
<link href="vendor/css-hamburgers/hamburgers.min.css" rel="stylesheet" media="all">
<link href="vendor/slick/slick.css" rel="stylesheet" media="all">
<link href="vendor/select2/select2.min.css" rel="stylesheet" media="all">
<link href="vendor/perfect-scrollbar/perfect-scrollbar.css" rel="stylesheet" media="all">
<!-- Main CSS-->
<link href="css/theme.css" rel="stylesheet" media="all">
</head>
<body class="animsition">
<div class="page-wrapper">
<!-- HEADER MOBILE-->
<?php include_once('includes/sidebar.php');?>
<!-- END HEADER MOBILE-->
<!-- MENU SIDEBAR-->
<!-- END MENU SIDEBAR-->
<!-- PAGE CONTAINER-->
<div class="page-container">
<!-- HEADER DESKTOP-->
<?php include_once('includes/header.php');?>
<!-- END HEADER DESKTOP-->
<!-- MAIN CONTENT-->
<div class="main-content">
<div class="section_content section_content--p30">
<div class="container-fluid">
<div class="row">
<div class="col-lg-12">
<div class="table-responsive table--no-card m-b-30">
<?php
if(isset($_POST['search']))
{
$sdata=$_POST['searchdata'];
?>
<h4 align="center">Result against "<?php echo $sdata;?>" keyword </h4>
<hr />
<table class="table table-borderless table-striped table-earning">
<thead>
<tr>
<tr>
<th>S.NO</th>
<th>Visistor Name</th>
<th>Contact Number</th>
<th>Whom to Meet</th>
<th>Action</th>
</tr>
</tr>
</thead>
<?php
$ret=mysqli_query($con,"select *from tblvisitor where VisitorName like '$sdata%'||MobileNumber like
'$sdata%'");

$num=mysqli_num_rows($ret);
if($num>0){
$cnt=1;
while ($row=mysqli_fetch_array($ret)) {

?> <tr>
<td><?php echo $cnt;?></td>
<td><?php echo $row['VisitorName'];?></td>
<td><?php echo $row['MobileNumber'];?></td>
<td><?php echo $row['WhomtoMeet'];?></td>
<td><a href="visitor-detail.php?editid=<?php echo $row['ID'];?>"><i class="fa fa-edit fa-
1x"></i></a></a></td>
</tr>
<?php
$cnt=$cnt+1;
} } else { ?>
<tr>
<td colspan="8"> No record found against this search</td>
</tr>
<?php } }?>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<?php include_once('includes/footer.php');?>
<!-- Jquery JS-->
<script src="vendor/jquery-3.2.1.min.js"></script>
<!-- Bootstrap JS-->
<script src="vendor/bootstrap-4.1/popper.min.js"></script>
<script src="vendor/bootstrap-4.1/bootstrap.min.js"></script>
<!-- Vendor JS -->
<script src="vendor/slick/slick.min.js">
</script>

<script src="vendor/wow/wow.min.js"></script>
<script src="vendor/animsition/animsition.min.js"></script>
<script src="vendor/bootstrap-progressbar/bootstrap-progressbar.min.js">
</script>
<script src="vendor/counter-up/jquery.waypoints.min.js"></script>
<script src="vendor/counter-up/jquery.counterup.min.js">
</script>
<script src="vendor/circle-progress/circle-progress.min.js"></script>
<script src="vendor/perfect-scrollbar/perfect-scrollbar.js"></script>
<script src="vendor/chartjs/Chart.bundle.min.js"></script>
<script src="vendor/select2/select2.min.js">
</script>
<!-- Main JS-->
<script src="js/main.js"></script>
</body>
</html>
<?php } ?>

VISITORS DETAILS
<?php
session_start();
error_reporting(0);
include('includes/dbconnection.php');
if (strlen($_SESSION['avmsaid']==0)) {
header('location:logout.php');
} else{
if(isset($_POST['submit']))
{
$eid=$_GET['editid'];

$remark=$_POST['remark'];
$query=mysqli_query($con,"update tblvisitor set remark='$remark' where ID='$eid'");
if ($query) {
$msg="Visitors Remark has been Updated.";
}
else
{
$msg="Something Went Wrong. Please try again";
}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Required meta tags-->
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="au theme template">
<meta name="author" content="Hau Nguyen">
<meta name="keywords" content="au theme template">
<!-- Title Page-->
<title>AVSM Visitors Details</title>
<!-- Fontfaces CSS-->
<link href="css/font-bold.css" rel="stylesheet" media="all">
<link href="vendor/font-bold/css/fontawesome-all.min.css" rel="stylesheet" media="all">
<link href="vendor/font-bold/css/font-awesome.min.css" rel="stylesheet" media="all">
<link href="vendor/mdi-font/css/material-design-iconic-font.min.css" rel="stylesheet" media="all">
<!-- Bootstrap CSS-->
<link href="vendor/bootstrap-4.1/bootstrap.min.css" rel="stylesheet" media="all">
<!-- Vendor CSS-->
<link href="vendor/animsition/animsition.min.css" rel="stylesheet" media="all">
<link href="vendor/bootstrap-progressbar/bootstrap-progressbar-3.3.4.min.css" rel="stylesheet"
media="all">
<link href="vendor/wow/animate.css" rel="stylesheet" media="all">
<link href="vendor/css-hamburgers/hamburgers.min.css" rel="stylesheet" media="all">
<link href="vendor/slick/slick.css" rel="stylesheet" media="all">
<link href="vendor/select2/select2.min.css" rel="stylesheet" media="all">
<link href="vendor/perfect-scrollbar/perfect-scrollbar.css" rel="stylesheet" media="all">
<!-- Main CSS-->
<link href="css/theme.css" rel="stylesheet" media="all">
</head>
<body class="animsition">
<div class="page-wrapper">
<!-- HEADER MOBILE-->
<?php include_once('includes/sidebar.php');?>
<!-- END HEADER MOBILE-->
<!-- MENU SIDEBAR-->
<!-- END MENU SIDEBAR-->
<!-- PAGE CONTAINER-->
<div class="page-container">
<!-- HEADER DESKTOP-->
<?php include_once('includes/header.php');?>
<!-- HEADER DESKTOP-->
<!-- MAIN CONTENT-->
<div class="main-content">
<div class="section_content section_content--p30">
<div class="container-fluid">
<div class="row">
<div class="col-lg-12">
<div class="card">
<div class="card-header">
<strong>Visitor</strong> Details
</div>
<div class="card-body card-block">
<p style="font-size:16px; color:red" align="center"> <?php if($msg){
echo $msg;
} ?> </p>
<?php
$eid=$_GET['editid'];
$ret=mysqli_query($con,"select * from tblvisitor where ID='$eid'");
$cnt=1;
while ($row=mysqli_fetch_array($ret)) {
?><table border="1" class="table table-bordered mg-b-0">
<tr>
<th>Visitor Name</th>
<td><?php echo $row['VisitorName'];?></td>
</tr>
<tr>
<th>Mobile Number</th>
<td><?php echo $row['MobileNumber'];?></td>
</tr>

<tr>
<th>Address</th>
<td><?php echo $row['Address'];?></td>
</tr>
<tr>
<th>Apartment no</th>
<td><?php echo $row['Apartment'];?></td>
</tr>
<tr>
<tr>
<th>Floor</th>
<td><?php echo $row['Floor'];?></td>
</tr>
<tr>
<th>Whom to Meet</th>
<td><?php echo $row['WhomtoMeet'];?></td>
</tr>
<tr>
<th>Reason to Meet</th>
<td><?php echo $row['ReasontoMeet'];?></td>
</tr>
<tr>
<th>Vistor Entring Time</th>
<td><?php echo $row['EnterDate'];?></td>
</tr>
<?php if($row['remark']==""){ ?>
<form method="post">
<tr>
<th>Outing Remark :</th>
<td>
<textarea name="remark" placeholder="" rows="12" cols="14" class="form-control wd-450"
required="true"></textarea></td>
</tr>
<tr align="center">
<td colspan="2"><button type="submit" name="submit" class="btn btn-primary
btn-sm">Update</button></td>
</tr>
</form>
<?php } else { ?>
<tr>
<th>Outing Remark </th>
<td><?php echo $row['remark']; ?></td>
</tr>
<tr>
<th>Out Time</th>
<td><?php echo $row['outtime']; ?> </td>
<?php } ?>
</tr>
</table>
</div>
</div>
</div>
</div>
<?php include_once('includes/footer.php');?>
</div>
</div>
</div>
</div>
<!-- Jquery JS-->
<script src="vendor/jquery-3.2.1.min.js"></script>
<!-- Bootstrap JS-->
<script src="vendor/bootstrap-4.1/popper.min.js"></script>
<script src="vendor/bootstrap-4.1/bootstrap.min.js"></script>
<!-- Vendor JS -->
<script src="vendor/slick/slick.min.js">
</script>
<script src="vendor/wow/wow.min.js"></script>
<script src="vendor/animsition/animsition.min.js"></script>
<script src="vendor/bootstrap-progressbar/bootstrap-progressbar.min.js">
</script>
<script src="vendor/counter-up/jquery.waypoints.min.js"></script>
<script src="vendor/counter-up/jquery.counterup.min.js">
</script>
<script src="vendor/circle-progress/circle-progress.min.js"></script>
<script src="vendor/perfect-scrollbar/perfect-scrollbar.js"></script>
<script src="vendor/chartjs/Chart.bundle.min.js"></script>
<script src="vendor/select2/select2.min.js">
</script>
<!-- Main JS-->
<script src="js/main.js"></script>
</body>
</html>
<!-- end document-->
<?php } ?>
<?php } ?>

VISITORS FORM
<?php
session_start();
error_reporting(0);
include('includes/dbconnection.php');
if (strlen($_SESSION['avmsaid']==0)) {
header('location:logout.php');
} else{
if(isset($_POST['submit']))
{
$eid=$_GET['editid'];
$remark=$_POST['remark'];
$query=mysqli_query($con,"update tblvisitor set remark='$remark' where ID='$eid'");
if ($query) {
$msg="Visitors Remark has been Updated.";
}
else
{
$msg="Something Went Wrong. Please try again";
}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Required meta tags-->
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="au theme template">
<meta name="author" content="Hau Nguyen">
<meta name="keywords" content="au theme template">
<!-- Title Page-->
<title>AVSM Visitors Details</title>
<!-- Fontfaces CSS-->
<link href="css/font-bold.css" rel="stylesheet" media="all">
<link href="vendor/font-bold/css/fontawesome-all.min.css" rel="stylesheet" media="all">
<link href="vendor/font-bold/css/font-awesome.min.css" rel="stylesheet" media="all">
<link href="vendor/mdi-font/css/material-design-iconic-font.min.css" rel="stylesheet" media="all">
<!-- Bootstrap CSS-->
<link href="vendor/bootstrap-4.1/bootstrap.min.css" rel="stylesheet" media="all">
<!-- Vendor CSS-->
<link href="vendor/animsition/animsition.min.css" rel="stylesheet" media="all">
<link href="vendor/bootstrap-progressbar/bootstrap-progressbar-3.3.4.min.css" rel="stylesheet"
media="all">
<link href="vendor/wow/animate.css" rel="stylesheet" media="all">
<link href="vendor/css-hamburgers/hamburgers.min.css" rel="stylesheet" media="all">
<link href="vendor/slick/slick.css" rel="stylesheet" media="all">
<link href="vendor/select2/select2.min.css" rel="stylesheet" media="all">
<link href="vendor/perfect-scrollbar/perfect-scrollbar.css" rel="stylesheet" media="all">
<!-- Main CSS-->
<link href="css/theme.css" rel="stylesheet" media="all">
</head>
<body class="animsition">
<div class="page-wrapper">
<!-- HEADER MOBILE-->
<?php include_once('includes/sidebar.php');?>
<!-- END HEADER MOBILE-->
<!-- MENU SIDEBAR-->
<!-- END MENU SIDEBAR-->
<!-- PAGE CONTAINER-->
<div class="page-container">
<!-- HEADER DESKTOP-->
<?php include_once('includes/header.php');?>
<!-- HEADER DESKTOP-->

<!-- MAIN CONTENT-->


<div class="main-content">
<div class="section_content section_content--p30">
<div class="container-fluid">
<div class="row">
<div class="col-lg-12">
<div class="card">
<div class="card-header">
<strong>Visitor</strong> Details
</div>
<div class="card-body card-block">
<p style="font-size:16px; color:red" align="center"> <?php if($msg){
echo $msg;
} ?> </p>
<?php
$eid=$_GET['editid'];
$ret=mysqli_query($con,"select * from tblvisitor where ID='$eid'");
$cnt=1;
while ($row=mysqli_fetch_array($ret)) {
?><table border="1" class="table table-bordered mg-b-0">
<tr>
<th>Visitor Name</th>
<td><?php echo $row['VisitorName'];?></td>
</tr>
<tr>
<th>Mobile Number</th>
<td><?php echo $row['MobileNumber'];?></td>
</tr>
<tr>
<th>Address</th>
<td><?php echo $row['Address'];?></td>
</tr>
<tr>
<th>Apartment no</th>
<td><?php echo $row['Apartment'];?></td>
</tr>
<tr>

<tr>
<th>Floor</th>
<td><?php echo $row['Floor'];?></td>
</tr>

<tr>
<th>Whom to Meet</th>
<td><?php echo $row['WhomtoMeet'];?></td>
</tr>
<tr>
<th>Reason to Meet</th>
<td><?php echo $row['ReasontoMeet'];?></td>
</tr>
<tr>
<th>Vistor Entring Time</th>
<td><?php echo $row['EnterDate'];?></td>
</tr>
<?php if($row['remark']==""){ ?>
<form method="post">
<tr>
<th>Outing Remark :</th>
<td>
<textarea name="remark" placeholder="" rows="12" cols="14" class="form-control wd-450"
required="true"></textarea></td>
</tr>
<tr align="center">
<td colspan="2"><button type="submit" name="submit" class="btn btn-primary
btn-sm">Update</button></td>
</tr>
</form>
<?php } else { ?>
<tr>
<th>Outing Remark </th>
<td><?php echo $row['remark']; ?></td>
</tr>
<tr>
<th>Out Time</th>
<td><?php echo $row['outtime']; ?> </td>
<?php } ?>

</tr>
</table>
</div>
</div>
</div>
</div>
<?php include_once('includes/footer.php');?>
</div>
</div>
</div>
</div>
<!-- Jquery JS-->
<script src="vendor/jquery-3.2.1.min.js"></script>
<!-- Bootstrap JS-->
<script src="vendor/bootstrap-4.1/popper.min.js"></script>
<script src="vendor/bootstrap-4.1/bootstrap.min.js"></script>
<!-- Vendor JS -->
<script src="vendor/slick/slick.min.js">
</script>
<script src="vendor/wow/wow.min.js"></script>
<script src="vendor/animsition/animsition.min.js"></script>
<script src="vendor/bootstrap-progressbar/bootstrap-progressbar.min.js">
</script>
<script src="vendor/counter-up/jquery.waypoints.min.js"></script>
<script src="vendor/counter-up/jquery.counterup.min.js">
</script>
<script src="vendor/circle-progress/circle-progress.min.js"></script>
<script src="vendor/perfect-scrollbar/perfect-scrollbar.js"></script>
<script src="vendor/chartjs/Chart.bundle.min.js"></script>
<script src="vendor/select2/select2.min.js">
</script>
<!-- Main JS-->
<script src="js/main.js"></script>
</body>
</html>
<!-- end document-->
<?php } ?>
<?php } ?>
SnapShot
SCREEN SHOTES OF PROJECT
LOGIN FORM

DASH BOARD

NEW VISITOR INFORMATION


MANAGE VISITORS

VISITORS FROM to TO DATE


ADMIN INFO
CERTIFICATION
Certification is to certify that the program or software package is correct and conforms to the
standards. With growing trend towards purchasing ready to use software, certification has
become very important.
Conclusion
CONCLUSION
The system objectives specified in the requirement documents are believed to have been
satisfactory met. The system gives good result in the testing. The processing of the proposed
system is simple and is in regular order. The various plans employed in the project are user
friendly and easy to understand. The system has been designed in manner so as to provide
valuable, timely and accurate information. The system was effective and efficient in the
estimate generation process. Visual Basic 6.0 and MS and MySQL Server were the best
selection for the system to be developed. Any native user can understand the problem, solve
it and generate reports through the system.
Future
Enhancement
FUTURE ENHANCEMENT
The current application developed is in accordance with the need that has been studied. On
regarding the future enhancement, the application can further expanded in accordance with
changing scenario. Since the change in testing and user needs arises frequently in certain
short intervals of time, the application can be further upgraded to meet the requirements that
may arise in the far or near future. With regarding to the needs that arises, more and more
features can be included by adding it as separate modules and integrate it with the existing
system.

One of PHP's strengths is its richness in terms of functionality. Indeed, it has at the origin of
more than 3,000 native features ready-guaranteeing developers to overcome additional
development time and sometimes tedious. These functions among others to treat strings, to
operate mathematically on numbers, convert dates to connect to a database system,
manipulate files present on the server...

So the scope of future enhancement is absolutely clear with the concept that is incorporated
in the today that was made used to build the application.
Bibliography
BIBLIOGRAPHY
BOOKS AUTHORS
1) System Analysis and Design Elias
Mawad
2) An integrated Approach of Software Engineering Pankaj Jalote
3) Guide to Visual Basic 6.0 Peter Norton
4) Introduction to Database Management Naveen Prakash
5) Analysis and Design of Information System V. Rajkumar
6) PHP Objects, Patterns, and Practice
7) PHP and MySQL Web Development

WEBSITES:-

https://phpgurukul.com/apartment-visitors-management-system-using-php-and-
mysql/ DATE : 17/feb/2023
http://www.php.net/ DATE : 23/feb/2023
https://www.guru99.com/php-tutorials.html DATE : 2/march/2023
http://www.java2s.com DATE :6/march/2023
http://www.tutorialtpoint.com DATE : 9/march/2023

You might also like