Project Report CB
Project Report CB
CHAPTER 1
INTRODUCTION
Crime reporting system is a system used to report crimes. This project is mainly useful for police
Departments. This system will help to manage all the activities in a police Department using
computers. Currently all the works are done manually. By computerizing all the activities inside a
police Department can be managed easily and effectively.
The police Department in the Country are, today, virtually unconnected islands. Thanks to
telephones and wireless and especially thanks to mobile telephones, there is a voice connectivity
between the police Department and senior police officers, but that is about all Now there is a system
under which one police department can talk to another directly, there the crime records can be
accessed and share data by a Department House Officer, except the manual records relating to that
police Department.
The goal of the system are to facilitate collection, storage, retrieval, analysis and sharing of data and
information at the police department and between the police department and the Head Quarters ,and
to provide a online platform for the victims or the complainer to file complaint .
1.1 DBMS
A database management system (DBMS) is system software for creating and
managingdatabase. The DBMS provides user and programmers with a systematic way to
create,retrieve, update and manage data. A DBMS generally manipulates the data itself, the data
format, field names, record structure and file structure. It also defines rules to validate and
manipulate this data.
A DBMS relieves users of framing programs for data maintenance. Fourth-generation query
languages, such as SQL, are used along with the DBMS package to interact with a database.
A DBMS always provides data independence. Any change in storage mechanism and
formats are performed without modifying the entire application. There are four main types of
database organization:
1.2 MYSQL
MySQL is an Oracle-backed open source relational database management system
(RDBMS)based on Structured Query Language (SQL). MySQL runs on virtually all platforms,
including Linux, UNIX and Windows. Although it can be used in a wide range of applications,
MySQL is most often associated with web applications and online publishing.
MySQL has the relational database management system and PHP as the object-oriented scripting
language. (Sometimes Perl or Python is used instead of PHP.)
Originally conceived by the Swedish company MySQL AB, MySQL was acquired by Sun
Microsystems in 2008 and then by Oracle when it bought Sun in 2010. Developers can use
MySQL under the GNU General Public License (GPL), but enterprises must obtain a
commercial license from Oracle.
Today, MySQL is the RDBMS behind many of the top websites in the world and countless
corporate and consumer-facing web-based applications, including Facebook, Twitter and
YouTube.
HTML is the standard markup language for creating Web pages. Hypertext Markup
Language (HTML) is the standard markup language for documents designed to be displayed in
a web browser. It can be assisted by technologies such as Cascading Style Sheets (CSS)
and scripting languages such as JavaScript.
Web browsers receive HTML documents from a web server or from local storage and render the
documents into multimedia web pages. HTML describes the structure of a web
page semantically and originally included cues for the appearance of the document.
HTML stands for Hyper Text Markup Language
HTML describes the structure of a Web page
HTML consists of a series of elements
HTML elements tell the browser how to display the content
HTML elements are represented by tags
HTML tags label pieces of content such as "heading", "paragraph", "table", and so on
Browsers do not display the HTML tags, but use them to render the content of the page
PHP code may be executed with a command line interface (CLI), embedded into HTML code, or
used in combination with various web template systems, web content management systems,
and web frameworks. PHP code is usually processed by a PHP interpreter implemented as
a module in a web server or as a Common Gateway Interface (CGI) executable.
The web server outputs the results of the interpreted and executed PHP code, which may be any
type of data, such as generated HTML code or binary image data. PHP can be used for many
programming tasks outside of the web context, such as standalone graphical applications and
robotic drone control.
The standard PHP interpreter, powered by the Zend Engine, is free software released under
the PHP License. PHP has been widely ported and can be deployed on most web servers on almost
every operating system and platform, free of charge.
The PHP language evolved without a written formal specification or standard until 2014, with the
original implementation acting as the de facto standard which other implementations aimed to
follow. Since 2014, work has gone on to create a formal PHP specification.
PHP can generate dynamic page content
PHP can create, open, read, write, delete, and close files on the server
PHP can collect form data
PHP can send and receive cookies
PHP can add, delete, modify data in your database
PHP can be used to control user-access
PHP can encrypt data
PHP is a server side scripting language that is embedded in HTML. It is used to manage
dynamic content, databases, session tracking, even build entire e-commerce sites. It is integrated
with a number of popular databases, including MySQL, PostgreSQL, Oracle, Sybase, Informix,
and Microsoft SQL Server.
PHP supports a large number of major protocols such as POP3, IMAP, and LDAP. PHP4 added
support for Java and distributed object architectures (COM and CORBA), making n-tier
development a possibility for the first time.
PHP is forgiving: PHP language tries to be as forgiving as possible.
PHP Syntax is C-Like.
1.5 XAMPP
XAMPP is open source software developed by Apache friends. XAMPP software package
contains Apache distributions for Apache server, MariaDB, PHP, and Perl. And it is basically a
local host or a local server.
This local server works on your own desktop or laptop computer. The use of XAMPP is to
test the clients or your website before uploading it to the remote web server. This XAMPP server
software gives you the suitable environment for testing MYSQL, PHP, Apache and Perl projects
on the local computer.
The XAMPP installation process is very simple and fast. Once XAMPP is installed on your
local computer it acts as a local server or localhost. You can test the websites before uploading it
to the remote web server. This XAMPP server software gives you a suitable environment for
testing MYSQL, PHP, Apache and Perl applications on a local computer.
CHAPTER 2
REQUIREMENTS SPECIFICATION
All the types of software automatically configured inside operating system after installation it has
PHP, MYSQL, Apache and operating system base configuration file.
CHAPTER 3
DESIGN
ER DIAGRAM
USER-ID
RESULT
VALIDATE
PASSWORD
NAME
MAINTAI AUTHORIZE
ADMIN N D
U ID
U_name
U_NAM C_id
E
ADDRES
S description
DO
B GENDE
R
Admin
Name Password
Maintain
Name c_id
User
Validate
U_id Result
Complain
3.3 TABLES:
A table is a collection of related data held in a structured format within a database. It
consists of columns, and rows. In relational databases, and flat file databases, a table is a set of
data elements (values) using a model of vertical columns (identifiable by name) and
horizontal rows, the cell being the unit where a row and column intersect. A table has a specified
number of columns, but can have any number of rows.
Each row in a table is identified by one or more values appearing in a particular column
subset. The columns subset which uniquely identifies a row is called the primary key.
"Table" is another term for "relation"; although there is the difference in that a table is
usually a multistep (bag) of rows where a relation is a set and does not allow duplicates. Besides
the actual data rows, tables generally have associated with them some metadata, such
as constraints on the table or on the values within particular columns.
The data in a table does not have to be physically stored in the database. Views also function
as relational tables, but their data are calculated at query time.
A table can be considered as a convenient representation of a relation. A table is perceived
atwo-dimensional structure composed of rows and columns .The order of rows and columns is
immaterial to the DBMS.
The description of all the tables are given below
13
Table 1.5:User
MYSQL> desc update_case;
CHAPTER 4
14
IMPLEMENTATION
4.1 DESCRIPTION:
Implementation is the stage in the project where the theoretical design is turned into a
working system and giving confidence on the new system for the users that it will work efficiently
and effectively. It involves careful planning, investigation of the current system and its constraints
on implementation, design of methods to achieve the change over, an evaluation of change over
methods. Apart from planning major task of preparing the implementation are education and
training of users. The implementation process begins with preparing a plan for the implementation
of the system. According to this plan, the activities are to be carried out, discussions made
regarding the equipment and resources and the additional equipment has to be acquired to
implement the new system. In network backup system no additional resources are needed.
Implementation is the final and the most important phase. the most critical stage in
achieving a successful new system is giving the users confidence that the new system will work
and be effective. The system can be implemented only after thorough testing is done and if it is
found to be working according to the specification. This method also offers the greatest security
since the old system can take over if the errors are found or inability to handle certain type of
transactions while using the new system.
The system should have a login. A login box should appear when the system is invoked. The
system is also useful which also keeps track of Account details of buyers. The real of World Wide
Web have spread across millions of household, so naturally, Internet has become by far the best
platform for real estate marketing today.
15
1 1 1
Crime Report Management Implementation
run developed systems successfully in future. In order to put new application system into use, the
following activities were taken care of:
Preparation of user and system documentation
Conducting user training with demo and hands on
Test run for some period to ensure smooth switching over the system.
The users are trained to use the newly developed functions. User manuals describing the
procedure for using the functions listed on menu are circulated to all the users. It is confirmed that
the system is implemented up to users need and expectations.
Any system developed should be secured an 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 username and
password.
4.2 CODING:
LOGIN PAGE CODE:
<html>
<head>
<title>Official Login</title>
1
Crime Report Management Implementation
<div class="container">
<hr> <br><br> <br><br> <br><br> <br><br> <br><br>
<div class="row text-center"> 17
</p>
</div>
</div> 18
</div>
</div>
</div>
<script type="text/javascript" src="https://code.jquery.com/jquery-2.1.4.js"></script>
<script type="text/javascript"
src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
</body>
</html>
19
Crime Report Management Implementation
<div class="container">
<hr> <br><br> <br><br> <br><br> <br><br> <br><br>
<div class="row text-center">
</div>
</div>
<script type="text/javascript" src="https://code.jquery.com/jquery-2.1.4.js"></script>
<script type="text/javascript"
src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
</body>
</html>
COMPLAIN PAGE
<!DOCTYPE html>
<html>
<head>
<?php
session_start();
if(!isset($_SESSION['x']))
header("location:headlogin.php");
$conn=mysqli_connect("localhost","root","","crime_portal");
if(!$conn)
{
die("could not connect".mysqli_error());
}
mysqli_select_db("crime_portal",$conn);
$c_id=$_SESSION['cid'];
</head>
<body >
<nav class="navbar navbar-default navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar"
aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="home.php"><b>Crime Portal</b></a>
</div>
<div id="navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav navbar-right">
<li ><a href="headHome.php">View Complaints</a></li>
<li class="active" ><a href="head_case_details.php">Complaints Details</a></li>
<li><a href="h_logout.php">Logout   <i class="fa fa-sign-out" aria-
hidden="true"></i></a></li>
</ul>
</div>
</div>
</nav>
<div style="padding:50px; margin-top:10px;">
<table class="table table-bordered">
<thead class="thead-dark" style="background-color: black; color: white;">
<tr>
<th scope="col">Complain Id</th>
<th scope="col">Description</th>
<th scope="col">Police Status</th>
<th scope="col">Case Status</th>
<th scope="col">Location of Crime</th>
</tr>
</thead>
<?php
while($rows=mysqli_fetch_assoc($result)){
?>
<tbody style="background-color: white; color: black;">
<tr>
<td><?php echo $rows['c_id']; ?></td>
<td><?php echo $rows['description']; ?></td>
<td><?php echo $rows['inc_status']; ?></td>
<td><?php echo $rows['pol_status']; ?></td>
<td><?php echo $rows['location']; ?></td>
</tr>
</tbody>
<?php
}
?>
</table>
</div>
<div style="padding:50px;">
<table class="table table-bordered">
<thead class="thead-dark" style="background-color: black; color: white;">
<tr>
<th scope="col">Date Of Update</th>
<th scope="col">Case Update</th>
</tr>
</thead>
<?php
while($rows1=mysqli_fetch_assoc($res2)){
?>
<tbody style="background-color: white; color: black;">
<tr>
<td><?php echo $rows1['d_o_u']; ?></td>
<td><?php echo $rows1['case_update']; ?></td>
</tr>
</tbody>
<?php
}
?>
</table>
</div>
<script type="text/javascript" src="https://code.jquery.com/jquery-2.1.4.js"></script>
<script type="text/javascript"
src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
</body>
</html>
4.3 TRIGGERS
A trigger is a stored procedure in database which automatically invokes whenever a special event
in the database occurs. For example, a trigger can be invoked when a row is inserted into a specified
table or when certain table columns are being updated.
Stored procedures can access or modify data in a database, but it is not tied to a specific
database or object, which offers a number of advantages.
SQL) or a reference to Microsoft. Temporary procedures are stored in tempdb, and there are two
types of temporary procedures: local and global. Local procedures are only visible to the current
user connection, while global procedures are visible to any user after they are created. They appear
in the SYS schema of each system, as well as in a user-
defined database.
CHAPTER 5
SNAPSHOTS OF OUTPUT
Login page
Complaint page
Incharge login
HQ Login
CHAPTER 6
CONCLUSION
To conclude the description about the project: The project developed using PHP and
MYSQL and the analysis of the existing system, with flexibility for future enhancement. This
application makes works easy and faster than current application, all the data will be saved in the
database. So the administrator can view all the data on time. This will stores all the records
permanently and also gives the raises and deviations in the status of the restaurant in the markets.
Any cancellation of orders are also updated, all the expenses per day will updated in the
database daily. Also keeps the record of food items prepared and the sales of food and also the
record of balance food. The tasks that now are carried out manually will be able to do with the
system in more easy way. That will reduce the damages that can happen to the data unexpectedly.
The calculations that are done manually will able to be done through the system to get more
accurate results.
We had improved the efficiency of the whole management system, thus overcome the
drawbacks of the existing offline system by applying online record keeping system with the
support of this designated web application
BIBLIOGRAPHY
Web sites:
www.google.co.in
www.wikipedia.com.
www.project- management -basics.com
en.wikipedia.org/wiki/PHP
www.apache.org/
en.wikipedia.org/wiki/XAMPP