Professional Documents
Culture Documents
& ENGINEERING
Supervisor
Professor Dr. Md. Nurul Mustafa
Department of Computer Science & Engineering
Southern University Bangladesh
Co-Supervisor
Mr. Mohammad Jahangir Alam
Assistant Professor
Department of Computer Science & Engineering
Southern University Bangladesh
Submitted To:
Department of Computer Science & Engineering
Southern University Bangladesh
Mehedibag, Chittagong
Spring-2019
i|Page
CRIMINAL RECORD MANAGEMENT SYSTEM IN THE
PERSPECTIVE OF SOMALIA
This project submitted to the Department of Computer Science & Engineering, Southern
University Bangladesh in partial fulfillment of the requirement of the degree of Bachelor of
Science in Computer Science & Engineering.
Board of Examiners
ii | P a g e
ACKNOWLEDGEMENT
Thanks to Allah, the almighty for giving his blessings and mercy to work hard for completing this
project. I would like to thank our honorable teachers at the Department of Computer Science &
Engineering, Southern University Bangladesh for their cordial help and support throughout
honoree course here. I would like to express our sense of gratitude and indebtedness to our
respected project supervisor, Professor Dr. Md. Nurul Mustafa the honorable professor,
Department of Computer Science & Engineering, Southern University Bangladesh, and co-
supervisor, Mr. Mohammad Jahangir Alam, Assistant Professor, Department of Computer
Science & Engineering, Southern University Bangladesh for their valuable guidance, generous
advice, endless encouragement and unfilled enthusiasm giving throughout the research and
preparation of the entire project. I would also thankful to my classmates for their helpful
suggestions throughout the project.
I would like to convey my deepest gratitude to my father, Jamal Mohamed Barrow and my
mother, Fadumo Sharif Munye for their unconditional love and indulgence at the moment of
triumph turmoil.
I express deep and sincere gratitude to Nuurto Omar, Niama Omar, Mustafa Jamal, Mohamed
Jamal, Rukia Mohamed, Zeynab Ali, Jahid Hassan, Shaiful Alam, Fadumo Ramadan, whose
guidance, encouragement, suggestion and very constructive criticism have contributed immensely
to the evolution of my ideas on the project.
iii | P a g e
ABSTRACT
The project Criminal Record Management System in the perspective of Somalia is a Criminal
record management system that uses to record crime activities of criminals. It can be used to report
crime activities. This project is mainly useful for law and enforcement agencies in Somalia. The
law and enforcement authority can preserve records of the criminals and search any criminal using
the system. This is an online web application with database system in which police will keep the
record of criminals who have been arrested. We have used HTML, JavaScript, CSS, PHP, MySql
and Bootstrap to develop this project. We also used binary search algorithm to find a criminal
from database. The project’s interface is very user friendly and helpful for authority.
iv | P a g e
INDEX
TITLE PAGE i
DECLARATION ii
ACKNOWLEDGEMENT iii
ABSTRACT iv
TABLE OF CONTEENTS v
LIST OF FIGURES ix
CHAPTER 1 INTRODUCTION 1
1.1 Introduction 1
1.2 Motivation 1
1.5 Summary 3
2.1 Introduction 4
2.2 Background 4
2.4 Summary 6
v|Page
CHAPTER 3 METHODOLOGY
3.1 Introduction 7
3.2 Methodology 7
3.3.5 Coding 9
3.3.6 Testing 9
3.3.7 Acceptance 10
3.6 Summary 12
CHAPTER 4 ANALYSIS 13
4.1 Introduction 13
vi | P a g e
4.7 Use Case 16
4.10 Flowchart 18
4.10.1 Definition 18
4.11 Summary 19
5.1 Introduction 20
5.7 Summary 26
vii | P a g e
CHAPTER 6 IMPLEMENTATION 27
6.1 Introduction 27
6.4 Summary 31
7.1 Introduction 32
7.2.1 Verification 32
7.2.2 Validation 32
7.6 Summary 34
CHAPTER 8 APPLICATION 35
8.1 Introduction 35
8.5 Summary 35
viii | P a g e
CHAPTER 9 RESULT AND DISCUSSION 36
9.1 Result 36
9.2 Discussion 39
9.3 Summary 39
CHAPTER 10 CONCLUSION 40
10.1 Conclusion 40
REFERENCES 41
APPENDIX A 43
Screenshots
APPENDIX B 47
Source Code
ix | P a g e
LIST OF FIGURES
x|Page
Fig. 9.4 Police Details 37
xi | P a g e
LIST OF TABLES
xii | P a g e
LIST OF ABBREVIATIONS
OS -Operation System
BTs -Bootstrap
UI -User Interface
xiii | P a g e
CHAPTER 1
INTRODUCTION
1.1 Introduction
We see that when a group or society is formed the some rules and laws are made by the people,
for the people and to the people. The purpose of these rules and laws are to give a peaceful life to
all who are living in that society. Whenever any law is violated by any one we say that crime is
committed and who break that law is called criminal. To have peaceful life we need a well-
organized law enforcement system. In our Somalia, we have very good facilities in law
enforcement sector. But, due to less of facilities some works cannot be done in a very good way.
1.2 Motivation
In modern days crime is increasing day by day. To combat such crimes and to provide safety to
citizens, police department plays a vital role. It always is a vital responsibility arresting criminal
who is threat for the safety of society. After registering the FIR from any citizen, police starts
investigation from them, after getting all the proofs against the criminal, It is the duty of the police
to present all the proofs honestly to the court so that the right man can get right punishment. The
true and right information provided by the people to police helps a lot in arresting the criminals
who try to spoil the peaceful environment of society. Along with low salary scale, facilities of
modern technology such as computerized system of keeping records are not provided to police
department which cause low efficiency. As it is the age of computers, all the organization today
use computers to maintain their records, so this facility should be given to police department. In
order to increase their efficiency and to save their time, in our project we are going to implement
a CRMS (criminal record management system). This is an online web application with database
system in which police will keep the record of criminals who have been arrested. This will help
the police department to manage their records easily.
1|Page
To record improvement and decline the rules and regulation activities of the
Country.
To keep record of criminals details for future investigation
To keep record of criminal’s crime activities
Reduce manual and redundant records keeping
Facilitate interaction and sharing of information among police departments,
districts, state/headquarters and other police agencies
Building security and monitoring control to ensure only authorized personal have
access to the criminal information
2|Page
1.5 Summary
In this chapter, we have discussed the aims and objectives of the project, situation of the current
system, necessity and brief overview of the proposed system.
3|Page
CHAPTER 2
LITERATURE REVIEW
2.1 Introduction
We see that when a group or society is formed, some rules and laws are made by to follow. The
purpose of these rules and laws are to give a peaceful life to all who are living in that society.
Whenever any law is violated by anyone we say that crime is committed and who break that law
is called criminal. To have peaceful life we need a well-organized law enforcement system. In our
Somalia, we have very good facilities in law enforcement sector. But, due to less of facilities some
works cannot be done in a very good way.
2.2 Background
The project is aimed to develop a crime file for maintain a computerized records of all the fir
against crime. The system is desktop application that can be access throughout the police
department. This system can be used as application for the crime file of the police department to
manage the records of different activity related to first information report. In suck desktop crime
file system we will manage all such activities (like registration of the criminal, updating
information, search of particular viewing of the respective reports of crimes) that will save time,
manpower. This system will provide better prospective for the enhancement of organization
regarding to quality and transparency.
4|Page
Murat Dağlar, et.al [2]. As essential apparatus in crime analysis, crime
mapping and Geographical Information Systems (GIS) are being progressively more accepted by
police agencies. Development in technology and the accessibility of geographic data sources make
it feasible for police departments to use GIS and crime mapping. GIS and crime mapping can be
utilized as devices to discover reasons contributing to crime, and hence let law enforcement
agencies proactively take action against the crime problems before they become challenging. The
purpose of this study is to conduct a literature review of Geographical Information System and
Crime Mapping in Crime Analysis and to propose policy recommendations regarding to
implementation of crime mapping and GIS.
Prof. V. V. Bhujade, et.al [3]. This feature is made available to public for interaction with police
indirectly. This system registers the complaints from people throughonline and is helpful to the
police department in identifying criminals. In this system any person can register their complaint
online.The aim ofthis project is to develop an E-cops reporting and management system which is
easily accessible to the public, police department and theadministrative department.Generally
many crimes seen by the public will not reach to the police due to many reasons like fear, lack of
time, ignorance. Due to thisreason many cases are not even reported to the police station. Though
some cases are registered they are not investigated properly due to lack ofevidences and
cooperation of the public..
R. Subhashini et.al [5]. Geographical Information System (GIS) is one of the aiding domains of
technology where a number of applications are being deployed to assist people in understanding
and visualizing data rather than having it in other complex forms. Implementing one of such kinds
of technology for crime analysis will help people in knowing the crime rate of their place in
comparison to other places and will also provide hand-in-hand support to the police for providing
additional focus on those regions. Crimes are the concerning factors of every country for its
5|Page
political, economical and social development. Yet, the number of technologies available in
detecting and reporting crimes are limited. A Geographical Information System (GIS) based
application can be implemented that can be used and accessed by everyone to file the crimes
happening in their locality and to know about other crimes.
2.4 Summary
In this chapter, we have discussed some topic related with desktop application and the preview
related works of development.
6|Page
CHAPTER 3
METHODOLOGY
3.1 Introduction
Methodology is the theoretical and systematic analysis of strategies related to a field of study. It
includes the theoretical analysis of the collection of strategies and guidelines related to apart of the
knowledge
A methodology does not set out to provide solutions—it is therefore, not the same as a method.
Instead, a methodology offers the theoretical underpinning for understanding which method, set
of methods, or best practices can be applied to a specific case, for example, to calculate a specific
result.
3.2 Methodology
A software development methodology or system development methodology in software
engineering is a framework that is used to structure, plan and control the process of development
information system.
There are many of methodology in my project it does not strictly follow a single methodology. It
has been development by considering waterfall methodology.
7|Page
Fig 3.1 Software Development Life Cycle
Requirement Analysis
Requirement Specification
Requirement Validation
8|Page
3.3.3 System Analysis
System analysis is the process of collecting a factual data, understand the process involved,
identifying problem and recommending feasible suggestion for improving the system functioning,
this involving studying the business process, gathering operational data, understand the
information flow, finding out bottlenecks and evolving solution for overcoming the weakness of
the system so as to achieve the organization goals. System analysis also includes subdividing of
complex process involving the entire system, identification of data store and manual process [6].
This major objectives of system analysis are to find answers for each business process:
3.3.5 Coding
In the SDLC model, the design and coding of the program involves only 10% of the project’s
commitment, here we compose the coding using a well-understood programming language like
PHP, HTML, CSS3, BOOTSRAP, JAVASCRIPT, JQUERY, and MYSQL [6].
3.3.6 Testing
Testing involves executing and implementation of the software with test data and examining the
outputs of the software and its operational behavior to check that is performing as required testing
can be implementation in two ways [6].
9|Page
3.3.7 Implementation
The installation and acceptance stage is the final stage of SDLC. In this stage, the software is
installed in the client place and the users are trained in using the new software.
Inputs for installation and acceptance stage: the inputs of installation and acceptance
stages are:
Outputs of installation and acceptance stage: the outputs of installation and acceptance
stages are:
Waterfall model is the earliest SDLC approach that was used for software development.
The waterfall model illustrates the software development process in a linear sequential flow, Hence
it is also referred to as a linear-sequential life cycle model [8].
10 | P a g e
3.5 Waterfall Model Application
Every software development is different and required a suitable SDLC approach to be followed
based on the internal and external factors. Some situations where the use of waterfall model is
most appropriate are:
The above figure shows step by step of my application development process in different time
period using waterfall methodology [8].
11 | P a g e
3.6 Summary
In this chapter, we have discussed about the background, methodology, and development process
and project plan of the project.
12 | P a g e
CHAPTER 4
ANALYSIS
4.1 Introduction
The software requirement are description of features and functionalities of the target system.
Requirement convey the exception of users from the software product. The requirement can be
obvious or hidden, know or unknown, expected or unexpected from client’s point of view.
13 | P a g e
4.3.1 Feasibility Study
A feasibility Study aims to reveal in an objective and rational way the strength and weaknesses of
a current or proposed company, the opportunities and threats present in the environment, the
necessary assets to be implemented and, ultimately, the prospective for success. A feasibility study
is a study that incorporates software analysis in case it is economically advantageous, In case it
can satisfy the technical requirement and if it is adoptable in the required environment. It also
condition the basic work and decides whether to accept the project. Finally, the final result will be
a hard plan to continue with the project.
A feasibility study assesses the potential for progress of the project, therefore, objectively
perceived is an imperative factor in the validity of the study for potential investors and lenders [9].
14 | P a g e
4.3.4 Software Requirement Validation
After requirement specification are developed, the requirement mentioned in this document are
validated. User might ask for illegal, impractical solution or expected may interpret the
requirements correctly. This results in huge increase in cost if not nipped in the bud [9].
15 | P a g e
4.7 Use Case
A use case is a software and system engineering term that describes how a user system to
accomplish a particular goal. A use case acts a software modeling technique that defines the
features to be implemented and the resolution of any errors that may be encountered.
The three main elements of use case are:
Actors: actors are the type of users that interact with the system.
System: Use case capture functional requirement that specify the intended behavior of the system.
Goals: Use case is typically initiated by a user a fulfill goals describing the activities and variants
involved in attaining the goal [10].
16 | P a g e
Fig 4.2 Use Case Diagram for CRMSS
The above figure shows the use case diagram for Criminal record management system where the
admin and sub-admin can use the software for adding criminal, viewing criminal list, adding crime
report, viewing crime report and creating accounts, on the other part police can also add criminals
and crime reports, viewing criminals lists and crime reports, where the court can use the software
for giving punishments to the criminals.
17 | P a g e
Fig 4.3 Block Diagram of CRMSS
The figure above shows different function of admin, sub-admin, police, and court in block of
Criminal record management system.
4.10 Flowchart
4.10.1 Definition
A flowchart is formalized graphic representation of logic sequence, work or manufacturing
process, organization chart or similar formalized structure. The purpose of a flowchart is to provide
with a common language or reference point when dealing with a project or process [11].
18 | P a g e
Fig 4.4 flowchart for CRMSS
The above figures shows the application process flow using symbol, where any user can login
into System if he has no account then the admin or sub-admin can create an account to him/her.
After creation of account user this system based on user type for their respective functionalities
show in flow diagram.
4.11 Summary
In this chapter, we have discussed about the requirement analysis, requirement validation software
and hardware requirement, use case diagram, block diagram and flowchart diagram.
19 | P a g e
CHAPTER 5
SYSTEM DESIGN
5.1 Introduction
System design is the process of defining the architecture, components, modules, interface, and data
for a system to satisfy specified requirement. System design could be seen as the application of
system theory to product development.
Police
Fig 5.1 System context Diagram (SDC) of CRMSS
20 | P a g e
The above figure shows the high level view and interaction of Criminal record management
system.
Entities – entities are source and destination of information data. Entities are represented
by rectangular with their respective names.
Process – activities and action taken on the data are represented by circle or round edged
rectangles.
Data storage – there are two variants of data storage- it can either be represented as a
rectangle with absence of both smaller sides or as an open-sided rectangle with only one
side missing.
Data flow – movement of data is shown by pointed arrows. Data movement is shown the
base of arrow as its source towards head of the arrow as destination [6].
21 | P a g e
Fig 5.2 level 1 DFD
Figures above shows the level 1 data flow of Criminal Record management system in the
perspective of Somalia, where entity wise process has been shown using related symbol.
22 | P a g e
5.5.3 E-R Diagram
Manages
Password
Users Police
F-name
JobID
Id
F-name
L-name
L-name
User-Id
Address
Name
Manages Address Name
Prison Court
Prison-Id Court-Id
Has
Symbol
Criminal-id
Has Criminal Mother-n
Police-id
Father-n
Contact-no DOB
Place
Crime
Court-Id Address
Case-no NID
Id
F-name L-name
punishm
Prison-ID Crime-C
23 | P a g e
5.6 Activity Diagram
An activity diagram visually present a series of action or flow of control in system.
24 | P a g e
Fig 5.9 Activity Diagram of Police-User
25 | P a g e
5.7 Summary
In this chapter, we have described whole system with various design tools like E-R diagram,
system context diagram, activity diagram and block diagram.
26 | P a g e
CHAPTER 6
IMPLEMENTATION
6.1 Introduction
A product software implementation method is systematically structured approach to effectively
integrate a software based service or components into the workflow of an organizational structure
or an individual end-user.
27 | P a g e
The software becomes more popular if its user interface is:
1. Attractive
2. Simple to use
3. Responsive in short time
4. Clear to understand
5. Consistent on all interfacing screens
UI is broadly divided into two categories:
Command Line Interface
Graphical User Interface
28 | P a g e
Fig 6.3 Crime Information Report
29 | P a g e
Fig 6.5 Sub-admin Home Page
30 | P a g e
Fig 6.7 Court-User Home Page
The figures above shows the home page of sub-admin, police-user, and court-user after login the
software.
6.4 Summary
In this chapter, we have tried to describe the implementation technology and tools with step by
step interface designing for the software.
31 | P a g e
CHAPTER 7
7.2.1 Verification
Verification is the process to make sure the product satisfies the condition imposed at the start of
the development phase. In other words to make sure the product is behaves the way we want it to.
7.2.2 Validation
Validation is the process to make sure the product satisfies the specified requirements at the end
of the development phase. In other words to make sure the product is built as per customer
requirements.
32 | P a g e
7.3.2 White Box Testing
White box testing is a testing technique that takes into account the internal mechanism of a system.
It is also called structural testing and glass box testing. Black box testing is often used for validation
and white box testing is often used for verification.
33 | P a g e
7.5 Test Example
Test Test Name Test Data Expected Result Actual result Comments Test
type
1 Login check on Correct ID Should be login Login Test is Black
software confirmed box
2 Login check on Incorrect ID Should not be ID, Pass does not Test is Black
software login exist confirmed box
The above table shows the details testing result of criminal record management system using
different test case with different test types.
7.6 Summary
This chapter, we have discussed about software testing and types of software test and some test
which we have tested.
34 | P a g e
CHAPTER 8
APPLICATION
8.1 Introduction
In the current world, it’s almost impossible to imagine that someone can live without computers.
Computers are used in almost every sector of everyday life, including shops, ticketing counters,
educational institutions, laboratories, business agencies and even homes. They have gained
significance as they have improved the efficiency and productivity of work done.
The computer system is not a simple machine. It is like a very modern and highly complex
calculator. It can do all the functions at a speedy rate and also helps us to search and progress in
our homes and businesses. A computer can therefore be called a calculator with a twist for not
only does it perform fast calculations, but it also has other special characteristics.
8.5 Summary
In this chapter, we have described about the project, software uses area and its features in a brief.
35 | P a g e
CHAPTER 9
36 | P a g e
Fig 9.3 Police List
37 | P a g e
Fig 9.6 Criminal Details
The above figures shows that the criminal list and details of the crime report that he/she did it
personally.
38 | P a g e
Fig 9.8 Crime Details
The above figure sshows that the crime list and crime details, aslo the criminal who did it that
crime.
9.2 Discussion
We have tried to set up a web based application for police departments, this application has
different features like a police can record criminals in data base, also can view the details of the
criminals. Admin can add criminal and crime also add Police, Court, and Sub-admin as authorizers.
9.3 Summary
In this chapter, we have discussed all pages of the apps which shows the expected result in brief.
39 | P a g e
CHAPTER 10
CONCLUSION
10.1 Conclusion
The “Criminal Record Management System in the prespective of Somalia” will be very useful for
the police department. It designed, implemented and tested successfully. This application is found
to be working effectively and efficiently.The simplicity and friendly are the advantages of this
Software.The application is made user friendly to the maximum so that anyone can run the
application provided he could access to the system via the login and password. The software is
built with all options such as searching option for criminal for future investigation, criminal and
crime registrartion, etc. all the requirements during the analysis and design phase are fully met,
thus resulting in the formation of good software. This project manages all the details without any
risk.
40 | P a g e
References
[1] Prakruthi Prakasha, Veekshitha, Rashmitha R, Shetty Diksha Dinesh, Shilpa, developed “A
Web-based Criminal Record System Using Mobile Device for recording criminals”, International
Journal of Research and Scientific Innovation (IJRSI), Volume V, Issue V, May 2018
[2] Murat Dağlar, Uğur Argun “Crime Mapping and Geographical Information Systems in Crime
Analysis”, International journal of Human Sciences, Vol. 13, Issue. 1, Year: 2016
[3] Prof. V. V. Bhujade, Teena N. Tadas, Sweta P. Lende, Rohini R.Hiwarkar “eCOPS -
Electronics Police Record Management System” International Journal on Recent and Inovation
trends in computing and communication, Vol: 2 Issue: 3, 2014.
[4] Sahar Bayoumi, Sarah AlDakhil, Eman AlNakhilan, Ebtehal Al Taleb, Hana AlShabib
“A Review of Crime Analysis and Visualization. Case Study: Maryland State, USA”, in Proc
10.1109/NCG, pp.56-57, 2018.
[5] R. Subhashini and V. Milani. "Implementing Geographical Information System to Provide
Evident Support for Crime Analysis." International conference on intelligent computing,
communication and convergence, vol. 48, pp. 537–540, 2015
[6] Rebert half blog. 6 basic SDLC methodologies [online]. Available from:
https://www.roberthalf.com/blog/salaries-and-skills/6-basic-sdlc-methodologies-which-one-is-
best [Accessed 10 March 2019]
[7] Rapid programming. “What is Installation and Acceptance Stage in SDLC?” internet:
https://www.rapidprogramming.com/question-answers/what-is-installation-and-acceptance-
stage-in-sdlc-813 [Accessed 21 March 2019]
[8] Tutorials Point. “SDLC Waterfall Model.” Internet:
https://www.tutorailspoint.com/sdlc/sdlc_waterfall_model.htm [Accessed 1 April 2019]
[9] Tutorial Point. “Software Requirements” Internet:
https://www.tutorailspoint.com/software_engineering/software_requirements/htm [Accessed 21
April 2019]
[10] Creately. “Use Case Diagram Tutorial (Guide with example).” Internet:
https://www.creately.com/blog/diagram/use-case-diagram-tutorial [Accessed 29 April 2019].
[11] American Society for Quality. “What is a process Flowchart?” Internet:
https://www.asq.org/learn-about-quality-process-analysis-tools/overview/flowchart.html
[Accessed 1 May 2019]
41 | P a g e
[12] Anu Sharma, Mohd. Shahnawaz “Crime Records Management System” presented at the
3rd International Conference on System Modeling & Advancement in Research Trends (SMART),
Moradabad, India 2014.
[13] Anil Jaiswal, Neeta Gunjal, PoojaLondhe, Shikha Singh, Ramesh Solanki, “Crime
Automation & Reporting System” ,International Journal of Science and Modern Engineering
(IJISME),Volume-1, Issue-11, October 2013
[14] Mr. Sandeep D. Nawale, Ms. Poonam C. Songra & Rashmi Karnik “Online Criminal Record”
, International Research Journal, Volume 12 , Issue 8 , April 2012
[17] “The European Union will have a Criminal Record Information System” Internet:
http://www.ibls.com/internet_law_news_portal_view.aspx?s=latestnews&id=2152 [accessed 20
April 2019]
42 | P a g e
Appendix A
Screenshots
1) Front Face
2) Login Page
3) Admin Page
43 | P a g e
5) Court- User Page
6) Sub-admin Page
44 | P a g e
8) Add Crime Form
45 | P a g e
11) Add Court
46 | P a g e
Appendix B
Source Code
Index.php
<?php
include_once("header.php");
include("login.php");
include_once("footer.php");
?>
Header.php
<?php
include("server.php");
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">
<title>Crime Record Management System</title>
<!-- Custom fonts for this template-->
<link href="vendor/fontawesome-free/css/all.min.css" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i"
rel="stylesheet">
<!-- Custom styles for this template-->
<link href="css/sb-admin-2.min.css" rel="stylesheet">
<link href="vendor/jquery/jquery-ui.min.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">
</head>
Login.php
<?php
include_once("header.php");
?>
<li class="nav-item">
<li class="nav-item">
<a class="nav-link js-scroll-trigger" href="main/index.php"><h6><strong>BACK TO HOME</h6></strong></a>
</li>
<body class="bg-gradient-danger">
<div class="container">
<!-- Outer Row -->
<div class="row justify-content-center">
<div class="col-xl-10 col-lg-12 col-md-9">
<div class="card o-hidden border-0 shadow-lg my-5">
<div class="card-body p-0">
<!-- Nested Row within Card Body -->
<div class="row d-flex justify-content-center">
<div class="col-lg-6">
<div class="p-5">
<div class="text-center">
<h1 class="h9 text-gray-900 mb-4">Welcome!</h1>
</div>
<form class="user"method="post" action="login.php">
<?php include('errors.php'); ?>
47 | P a g e
<div class="form-group">
<input type="text" class="form-control form-control-user" id="exampleInputEmail" aria-describedby="emailHelp"
placeholder="User Name" name="username">
</div>
<div class="form-group">
<input type="password" class="form-control form-control-user" id="exampleInputPassword"
placeholder="Password" name="password">
</div>
<div class="form-group">
<div class="custom-control custom-checkbox small">
<input type="checkbox" class="custom-control-input" id="customCheck">
<label class="custom-control-label" for="customCheck">Remember Me</label>
</div>
</div>
<button type="submit" class="btn btn-danger btn-user btn-block" name="login_user">
Login
</button>
</form>
<hr>
<div class="text-center">
<a class="small" href="forgot-password.php">Forgot Password?</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<?php
include("footer.php");
?>
Footer.php
48 | P a g e
Home.php
Report-criminal.php
Criminal.php
?>
<?php
49 | P a g e
if($_SESSION['userRoll'] != "court"){
?>
<?php
};
?
<?php echo"
</td>
</tr> ";
}
?>
</tbody>
</table>
</div>
</div>
</div>
</div>
<!-- /.container-fluid -->
Report-crime.php
Crime.php
50 | P a g e
</tfoot>
<tbody>
<?php
$result = mysqli_query($db, "SELECT * FROM `crime` ORDER BY `crime`.`id` DESC");
while ($row = mysqli_fetch_array($result)) {
$data = $row['criminal_ID'];
$criminal = mysqli_fetch_array(mysqli_query($db, "SELECT * FROM `criminal` where id = $data"));
$data = $row['police_Id'];
$police = mysqli_fetch_array(mysqli_query($db, "SELECT * FROM `police` where id = $data"));
echo "<tr>
<td>".$row['caseno']."</td>
<td><img src='".$row['image']."'class='"."rounded-circle"."'width='"."50"."'height='"."50"."'> </td>
<td>".$criminal['fName']." ".$criminal['lName']."</td>
<td>".$row['crimeType']."</td>
<td>".$row['prision']."</td>
<td>".$row['place']."</td>
<td>".$row['court']."</td>
<td>".$police['fName']." ".$police['lName']."</td>
<td>".$row['punishment']."</td>
<td>".$row['date']."</td>
<td>
<a href='read-crime.php?id=". $row['id'] ."' title='View Record' data-toggle='tooltip'><span class='fa fa-
eye'></span></a>
<a href='update-
crime.php?id=". $row['id'] ."' title='View Record' data-toggle='tooltip'><span class='fa fa-pen'></span></a>
</td>
</tr> ";
}
?>
</tbody>
</table>
</div>
</div>
</div>
</div>
<!-- /.container-fluid -->
Report-police.php
Police.php
51 | P a g e
</tr>
</thead>
<tfoot>
<tr>
<th></th>
<th>Name</th>
<th>Height</th>
<th>Weight</th>
<th>Eye Clore</th>
<th>NID</th>
<th>Date Of Birth</th>
<th></th>
</tr>
</tfoot>
<tbody>
<?php
$result = mysqli_query($db, "SELECT * FROM `police` ORDER BY `police`.`id` DESC");
while ($row = mysqli_fetch_array($result)) {
echo "<tr>
<td><img src='".$row['image']."'class='"."rounded-circle"."'width='"."50"."'height='"."50"."'> </td>
<td>".$row['fName']." ".$row['lName']."</td>
<td>".$row['height']."</td>
<td>".$row['weight']."</td>
<td>".$row['eayColor']."</td>
<td>".$row['poneNumber']."</td>
<td>".$row['dateOFbirth']."</td>
<td>
<a href='read-police.php?id=". $row['id'] ."' title='View Record' data-toggle='tooltip'><span class='fa fa-
eye'></span></a>
<a href='update-police.php?id=". $row['id'] ."' title='Update Record' data-toggle='tooltip'><span class='fa
fa-pen'></span></a>
</td>
</tr> ";
}
?>
</tbody>
</table>
</div>
</div>
</div>
</div>
<!-- /.container-fluid -->
Page-court.php
Court.php
52 | P a g e
echo "<option value='". $row['id'] ."'>" .$row['caseno'] ."</option>" ;
}
}else echo "<option value=''> No Data found</option>";
?>
</select>
</div>
<div class="form-group">
<label for="exampleFormControlInput2">Punishment</label>
<input type="text" class="form-control" id="exampleFormControlInput2" name="punishment">
</div>
<button type="submit" class="btn btn-primary" name="addcrime">Submit</button>
</form>
</div>
<div class="right-body">
<!-- Sidebar -->
<ul class="navbar-nav bg-gradient-info sidebar sidebar-dark ">
if (isset($_POST['addcrime'])) {
53 | P a g e
Page-Crime.php
Content-crime.php
54 | P a g e
</select>
</div>
<div class="form-group">
<label for="exampleFormControlSelect1">Select Prision</label>
<select class="form-control" id="exampleFormControlSelect1" name="prision">
<?php
$sql = mysqli_query($db, "SELECT name From prision");
$row = mysqli_num_rows($sql);
while ($row = mysqli_fetch_array($sql)){
echo "<option value='". $row['name'] ."'>" .$row['name'] ."</option>" ;
}
?>
</select>
</div>
<div class="form-group">
<label for="exampleFormControlSelect1">Select Court</label>
<select class="form-control" id="exampleFormControlSelect1" name="court">
<?php
$sql = mysqli_query($db, "SELECT name From court");
$row = mysqli_num_rows($sql);
while ($row = mysqli_fetch_array($sql)){
echo "<option value='". $row['name'] ."'>" .$row['name'] ."</option>" ;
}
?>
</select>
</div>
<div class="form-group">
<label for="exampleFormControlInput1">Date</label>
<input type="text" class="form-control" id="datepicker"
placeholder="yyyy/mm/dd" name="date" required>
</div>
<div class="form-group">
<label for="exampleFormControlInput2">Place</label>
<input type="text" class="form-control" id="exampleFormControlInput2" name="place">
</div>
<div class="form-group">
<label for="exampleFormControlTextarea1">Description</label>
<textarea class="form-control" id="exampleFormControlTextarea1" rows="3"
name="description"></textarea>
</div>
<div class="form-group">
<label for="exampleFormControlInput2">Image</label><br>
<input type="file" name="image">
</div>
<button type="submit" class="btn btn-primary" name="addcrime">Submit</button>
</form>
</div>
<div class="right-body">
<!-- Sidebar -->
<ul class="navbar-nav bg-gradient-info sidebar sidebar-dark ">
55 | P a g e
<span>Link</span></a>
<a class="nav-link" href="">
<i class="fas fa-fw fa-tachometer-alt"></i>
<span>Link</span></a>
</li>
</ul>
<!-- End of Sidebar -->
</div>
</div>
<!-- /.container-fluid -->
<?php
if(! $db ) {
die('Could not connect: ' . mysql_error());
}
if (isset($_POST['addcrime'])) {
$allowTypes = array('jpg','png','jpeg','gif','pdf');
VALUES('$police','$criminal','$crimetype','$crimecat','$prision','$court','$date','$place','$targetFilePath','$description',NOW(),'$c
aseNo')");
if($insert){
echo "<script> alert('Data stored successfully'); </script>";
}else{
$statusMsg = "File upload failed, please try again.";
}
}else{
$statusMsg = "Sorry, there was an error uploading your file.";
}
}else{
$statusMsg = 'Sorry, only JPG, JPEG, PNG, GIF, & PDF files are allowed to upload.';
}
} else{
$statusMsg = 'Please select a file to upload.';
}
// Display status message
// echo $statusMsg;
?>
56 | P a g e
Page-criminal.php
Content-criminal.php
57 | P a g e
</div> -->
<div class="form-group">
<label>Address</label>
<textarea placeholder="Enter Address Here.." rows="3"
class="form-control" name="address"></textarea required>
</div>
<div class="row">
<div class="col-sm-4 form-group">
<label>City</label>
<input type="text" placeholder="Enter City Name Here.."
class="form-control" name="city">
</div>
<div class="col-sm-4 form-group">
<label>State</label>
<input type="text" placeholder="Enter State Name Here.."
class="form-control" name="state">
</div>
<div class="col-sm-4 form-group">
<label>Zip</label>
<input type="text" placeholder="Enter Zip Code Here.." class="form-control" name="zip">
</div>
</div>
<div class="row">
<div class="form-group col-sm-6 ">
<label>NID</label>
<input type="text" placeholder="Enter NID Here.."
class="form-control" name="pNumber" >
</div>
<div class="form-group col-sm-6 ">
<label>Date</label>
<input type="text" placeholder="dd/mm/yyyy" id="datepicker" class="form-control" name="date"
required>
</div>
</div>
<div class="form-group">
<label>Email Address</label>
<input type="text" placeholder="Enter Email Address Here.."
class="form-control" name="email">
</div>
<div class="form-group">
<label for="exampleFormControlInput2">Image</label><br>
<input type="file" name="image">
</div>
<button type="submit" class="btn btn-lg btn-info mb-5" name="addcriminal">Submit</button>
</div>
</form>
</div>
</div>
<div class="right-body">
<!-- Sidebar -->
<ul class="navbar-nav bg-gradient-info sidebar sidebar-dark ">
58 | P a g e
<i class="fas fa-fw fa-tachometer-alt"></i>
<span>Link</span></a>
<a class="nav-link" href="">
<i class="fas fa-fw fa-tachometer-alt"></i>
<span>Link</span></a>
</li>
</ul>
<!-- End of Sidebar -->
</div>
</div>
<!-- /.container-fluid -->
<?php
if(! $db ) {
die('Could not connect: ' . mysql_error());
}
if (isset($_POST['addcriminal'])) {
$allowTypes = array('jpg','png','jpeg','gif','pdf');
VALUES('$fname','$lname','$height','$weight','$ecolor','$address','$city','$state','$zip','$phone','$date','$email','$targetFilePath',N
OW(),'$fathersName','$mothersName','$contactno','$symbol' )");
if($insert){
echo "<script> alert('Data stored successfully'); </script>";
}else{
$statusMsg = "File upload failed, please try again.";
}
}else{
$statusMsg = "Sorry, there was an error uploading your file.";
}
59 | P a g e
}else{
$statusMsg = 'Sorry, only JPG, JPEG, PNG, GIF, & PDF files are allowed to upload.';
}
} else{
$statusMsg = 'Please select a file to upload.';
}
?>
Admin-addcourt.php
<div class="form-group">
<label for="exampleFormControlTextarea1">Description</label>
<textarea name="desription" class="form-control" id="exampleFormControlTextarea1" rows="3"
></textarea>
</div>
<button type="submit" name="add_court" class="btn btn-primary">Submit</button>
</form>
</div>
<div class="right-body">
<!-- Sidebar -->
<ul class="navbar-nav bg-gradient-info sidebar sidebar-dark ">
if(! $db ) {
die('Could not connect: ' . mysql_error());
}
60 | P a g e
if (isset($_POST['add_court'])) {
$name = ucfirst(mysqli_real_escape_string($db, $_POST['Name']));
$des = ucfirst(mysqli_real_escape_string($db, $_POST['desription']));
$query = "INSERT INTO court(Name,description)
VALUES('$name','$des')";
mysqli_query($db, $query);
echo "<script> alert('Data stored successfully'); </script>";
}
?>
Admin-addprison.php
<div class="form-group">
<label for="exampleFormControlTextarea1">Description</label>
<textarea name="desription" class="form-control" id="exampleFormControlTextarea1" rows="3"
></textarea>
</div>
<button type="submit" name="add_prision" class="btn btn-primary">Submit</button>
</form>
</div>
<div class="right-body">
<!-- Sidebar -->
<ul class="navbar-nav bg-gradient-info sidebar sidebar-dark ">
if(! $db ) {
die('Could not connect: ' . mysql_error());
}
61 | P a g e
if (isset($_POST['add_prision'])) {
$name = ucfirst(mysqli_real_escape_string($db, $_POST['Name']));
$des = ucfirst(mysqli_real_escape_string($db, $_POST['desription']));
$query = "INSERT INTO prision(Name,description)
VALUES('$name','$des')";
mysqli_query($db, $query);
echo "<script> alert('Data stored successfully'); </script>";
}
?>
Admin-addcourtype.php
<div class="form-group">
<label for="exampleFormControlTextarea1">Description</label>
<textarea name="desription" class="form-control" id="exampleFormControlTextarea1" rows="3"
required></textarea>
</div>
<button type="submit" name="add_court_type" class="btn btn-primary">Submit</button>
</form>
</div>
<div class="right-body">
<!-- Sidebar -->
<ul class="navbar-nav bg-gradient-info sidebar sidebar-dark ">
if(! $db ) {
die('Could not connect: ' . mysql_error());
}
62 | P a g e
if (isset($_POST['add_court_type'])) {
$name = ucfirst(mysqli_real_escape_string($db, $_POST['Name']));
$des = ucfirst(mysqli_real_escape_string($db, $_POST['desription']));
$query = "INSERT INTO courttype(Name,description)
VALUES('$name','$des')";
mysqli_query($db, $query);
echo "<script> alert('Data stored successfully'); </script>";
}
?>
Admin-addpolice.php
63 | P a g e
<input type="text" placeholder="Enter Height Here.." class="form-control" name="height" >
</div>
<div class="col-sm-4 form-group">
<label>Weight</label>
<input type="text" placeholder="Enter Weight Here.." class="form-control" name="weight" >
</div>
<div class="col-sm-4 form-group">
<label>Eye Color</label>
<input type="text" placeholder="Enter Eye Color Here.."
class="form-control" name="eColor" >
</div>
</div>
<div class="form-group">
<label>Address</label>
<textarea placeholder="Enter Address Here.." rows="3"
class="form-control" name="address"></textarea required>
</div>
<div class="row">
<div class="col-sm-4 form-group">
<label>City</label>
<input type="text" placeholder="Enter City Name Here.."
class="form-control" name="city">
</div>
<div class="col-sm-4 form-group">
<label>State</label>
<input type="text" placeholder="Enter State Name Here.."
class="form-control" name="state">
</div>
<div class="col-sm-4 form-group">
<label>Zip</label>
<input type="text" placeholder="Enter Zip Code Here.." class="form-control" name="zip">
</div>
</div>
<div class="row">
<div class="form-group col-sm-6 ">
<label>NID</label>
<input type="text" placeholder="Enter NID Here.."
class="form-control" name="pNumber" required>
</div>
<div class="form-group col-sm-6 ">
<label>Date</label>
<input type="text" placeholder="dd/mm/yyyy" id="datepicker" class="form-control" name="date"
required>
</div>
</div>
<div class="form-group">
<label>Email Address</label>
<input type="text" placeholder="Enter Email Address Here.."
class="form-control" name="email">
</div>
<div class="form-group">
<label>Website link</label>
<input type="text" placeholder="Enter Website Link Here.." class="form-control" name="website">
</div>
<div class="form-group">
<label for="exampleFormControlInput2">Image</label><br>
<input type="file" name="image">
</div>
<button type="submit" class="btn btn-lg btn-info mb-5" name="addpolice">Submit</button>
</div>
</form>
</div>
</div>
<div class="right-body">
<!-- Sidebar -->
<ul class="navbar-nav bg-gradient-info sidebar sidebar-dark ">
64 | P a g e
<!-- Sidebar - Brand -->
<a class="sidebar-brand d-flex align-items-center justify-content-center" href="index.html">
<div class="sidebar-brand-icon rotate-n-15">
<i class="fas fa-gavel"></i>
</div>
<div class="sidebar-brand-text mx-3">Quick Link</div>
</a>
</div>
<!-- /.container-fluid -->
<?php
if(! $db ) {
die('Could not connect: ' . mysql_error());
}
if (isset($_POST['addpolice'])) {
$allowTypes = array('jpg','png','jpeg','gif','pdf');
65 | P a g e
// Insert image file name into database
$insert = $db->query("INSERT INTO
police(fName,lName,height,weight,eayColor,address,city,state,zipCode,poneNumber,dateOFbirth,email,website,jobid,polisestati
on,image,uploads_on)
VALUES('$fname','$lname','$height','$weight','$ecolor','$address','$city','$state','$zip','$phone','$date','$email','$web','$jobId','$Po
liceStation','$targetFilePath',NOW())");
if($insert){
echo "<script> alert('Data stored successfully'); </script>";
}else{
$statusMsg = "File upload failed, please try again.";
}
}else{
$statusMsg = "Sorry, there was an error uploading your file.";
}
}else{
$statusMsg = 'Sorry, only JPG, JPEG, PNG, GIF, & PDF files are allowed to upload.';
}
} else{
$statusMsg = 'Please select a file to upload.';
}
?>
Admin-addcrimetype.php
<div class="form-group">
<label for="exampleFormControlTextarea1">Description</label>
<textarea name="desription" class="form-control" id="exampleFormControlTextarea1" rows="3"
required></textarea>
</div>
<button type="submit" name="add_crime_type" class="btn btn-primary">Submit</button>
</form>
</div>
<div class="right-body">
<!-- Sidebar -->
<ul class="navbar-nav bg-gradient-info sidebar sidebar-dark ">
66 | P a g e
<span>Link</span></a>
<a class="nav-link" href="">
<i class="fas fa-fw fa-tachometer-alt"></i>
<span>Link</span></a>
</li>
</ul>
<!-- End of Sidebar -->
</div>
</div>
<!-- /.container-fluid -->
<?php
if(! $db ) {
die('Could not connect: ' . mysql_error());
}
if (isset($_POST['add_crime_type'])) {
$name = ucfirst(mysqli_real_escape_string($db, $_POST['Name']));
$des = ucfirst(mysqli_real_escape_string($db, $_POST['desription']));
$query = "INSERT INTO crimetype(name,description)
VALUES('$name','$des')";
mysqli_query($db, $query);
echo "<script> alert('Data stored successfully'); </script>";
}
?>
Server.php
<?php
if(!isset($_SESSION)){
session_start();
}
// variable declaration
$username = "";
$email = "";
$userroll = "";
$errors = array();
$_SESSION['success'] = "";
// connect to database
$db = mysqli_connect('localhost', 'crime', '', 'criminalsystem');
// REGISTER USER
if (isset($_POST['reg_user'])) {
// receive all input values from the form
$fName = mysqli_real_escape_string($db, $_POST['fName']);
$lName = mysqli_real_escape_string($db, $_POST['LName']);
$username = mysqli_real_escape_string($db, $_POST['username']);
$email = mysqli_real_escape_string($db, $_POST['email']);
$password_1 = mysqli_real_escape_string($db, $_POST['password_1']);
$password_2 = mysqli_real_escape_string($db, $_POST['password_2']);
$user_roll=mysqli_real_escape_string($db, $_POST['role']);
if ($password_1 != $password_2) {
array_push($errors, "The two passwords do not match");
}
67 | P a g e
// register user if there are no errors in the form
if (count($errors) == 0) {
$password = md5($password_1);//encrypt the password before saving in the
database
$query = "INSERT INTO users (fName,lName,username, email,
password,userRoll)
VALUES('$fName','$lName','$username', '$email',
'$password','$user_roll')";
mysqli_query($db, $query);
$_SESSION['username'] = $username;
//$_SESSION['userRoll'] = $userroll;
$_SESSION['success'] = "You are now logged in";
header('location: home.php');
}
// ...
// LOGIN USER
if (isset($_POST['login_user'])) {
$username = mysqli_real_escape_string($db, $_POST['username']);
$password = mysqli_real_escape_string($db, $_POST['password']);
if (empty($username)) {
array_push($errors, "Username is required");
}
if (empty($password)) {
array_push($errors, "Password is required");
}
if (count($errors) == 0) {
$password = md5($password);
$query = "SELECT * FROM users WHERE username='$username' AND
password='$password'";
//SELECT * FROM `users` ORDER BY `users`.`userRoll` ASC
$results = mysqli_query($db, $query);
$userroll = mysqli_fetch_array(mysqli_query($db, "SELECT * FROM `users`
where username='$username'"));
if (mysqli_num_rows($results) == 1) {
$_SESSION['username'] = $username;
$_SESSION['userRoll'] = $userroll['userRoll'];
//$_SESSION['userRoll'] = "hi";
$_SESSION['success'] = "You are now logged in";
header('location: home.php');
}else {
array_push($errors, "Wrong username/password combination");
}
}
}
?>
Sidenav.php
68 | P a g e
<div class="sidebar-brand-text mx-3">CRIME</div>
</a>
<?php
if($_SESSION['userRoll'] == "court"){
?>
<!-- Nav Item - Utilities Collapse Menu -->
<li class="nav-item">
<a class="nav-link collapsed" href="#" data-toggle="collapse" data-target="#collapseUtilities"
aria-expanded="true" aria-controls="collapseUtilities">
<i class="fas fa-fw fa-cog"></i>
<span>Crime</span>
</a>
69 | P a g e
<div id="collapseUtilities" class="collapse" aria-labelledby="headingUtilities" data-parent="#accordionSidebar">
<div class="bg-white py-2 collapse-inner rounded">
<a class="collapse-item" href="page-court.php">Add Crime</a>
</div>
</div>
</li>
<!-- Divider -->
<?php
};
?>
70 | P a g e
<?php
if($_SESSION['userRoll'] == "subuser"){
?>
<!-- Nav Item - Pages Collapse Menu -->
<li class="nav-item">
<a class="nav-link" href="#" data-toggle="collapse" data-target="#collapseadminPages" aria-expanded="true"
aria-controls="collapseadminPages">
<i class="fas fa-fw fa-folder"></i>
<span>Admin section</span>
</a>
<div id="collapseadminPages" class="collapse" aria-labelledby="headingPages" data-parent="#accordionSidebar">
<div class="bg-white py-2 collapse-inner rounded">
<a class="collapse-item" href="subuser.php">Create an Account!</a>
</div>
</div>
</li>
<!-- Divider -->
<hr class="sidebar-divider d-none d-md-block">
<?php
}
?>
<?php
if($_SESSION['userRoll'] == "police"){
?>
<!-- Nav Item - Pages Collapse Menu -->
<li class="nav-item">
</ul>
<!-- End of Sidebar -->
Sub-admin.php
<?php
include_once("header.php");
?>
<?php
if($_SESSION['userRoll'] == "subuser"){
?>
<body class="bg-gradient-danger">
<div class="container">
71 | P a g e
</div>
<form class="user" method="post" action="register.php">
<?php include('errors.php'); ?>
<div class="form-group row">
<div class="col-sm-6 mb-3 mb-sm-0">
<input type="text" class="form-control form-control-user" id="exampleFirstName" placeholder="First Name"
name="fName" value="">
</div>
<div class="col-sm-6">
<input type="text" class="form-control form-control-user" id="exampleLastName" placeholder="Last Name"
name="LName" value="">
</div>
</div>
<div class="form-group">
<input type="text" class="form-control form-control-user" id="exampleLastName" placeholder="User
Name"name="username" value="">
</div>
<div class="form-group">
<input type="email" class="form-control form-control-user" id="exampleInputEmail" placeholder="Email Address"
name="email" value="">
</div>
<div class="form-group">
<label for="exampleFormControlSelect1">Select Role Type</label>
<select class="form-control" id="exampleFormControlSelect1" name="role" required>
<option value='police'>Police User</option>
<option value='court'>Court User</option>
</select>
</div>
<div class="form-group row">
<div class="col-sm-6 mb-3 mb-sm-0">
<input type="password" class="form-control form-control-user" id="exampleInputPassword"
placeholder="Password" name="password_1">
</div>
<div class="col-sm-6">
<input type="password" class="form-control form-control-user" id="exampleRepeatPassword" placeholder="Repeat
Password" name="password_2">
</div>
</div>
<button type="submit" class="btn btn-danger btn-user btn-block" name="reg_user">
Register Account
</button>
</form>
<hr>
<div class="text-center">
<a class="small" href="forgot-password.php">Forgot Password?</a>
</div>
<div class="text-center">
<a class="small" href="login.php">Already have an account? Login!</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<?php
}else{
header('location: home.php');
}
?>
<?php
include("footer.php");
?>
Register.php
72 | P a g e
<?php
include_once("header.php");
?>
<?php
if($_SESSION['userRoll'] == "admin"){
?>
<body class="bg-gradient-danger">
<div class="container">
</select>
</div>
<div class="form-group row">
<div class="col-sm-6 mb-3 mb-sm-0">
<input type="password" class="form-control form-control-user" id="exampleInputPassword"
placeholder="Password" name="password_1">
</div>
<div class="col-sm-6">
<input type="password" class="form-control form-control-user" id="exampleRepeatPassword" placeholder="Repeat
Password" name="password_2">
</div>
</div>
<button type="submit" class="btn btn-danger btn-user btn-block" name="reg_user">
Register Account
</button>
</form>
<hr>
73 | P a g e
<div class="text-center">
<a class="small" href="forgot-password.php">Forgot Password?</a>
</div>
<div class="text-center">
<a class="small" href="login.php">Already have an account? Login!</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<?php
}else{
header('location: home.php');
}
?>
<?php
include("footer.php");
?>
<script>
$(document).ready(function(){
$('#username').blur(function(){
var username = $(this).val();
$.ajax({
url:'check/user-check.php',
method:"POST",
data:{user_name:username},
dataType:"text",
success:function(html)
{
$('#availability').html(html);
}
})
});
});
</script>
Topvar.php
74 | P a g e
function binarySearch($array, $value) {
$left = 0;
$right = count($array) - 1;
?>
</form>
</div>
</li>
<!-- Nav Item - User Information -->
<li class="nav-item dropdown no-arrow">
<a class="nav-link dropdown-toggle" href="#" id="userDropdown" role="button" data-toggle="dropdown"
aria-haspopup="true" aria-expanded="false">
<span class="mr-2 d-none d-lg-inline text-gray-600 small"><?php echo $_SESSION['username'];?></span>
<img class="img-profile rounded-circle" src="img/images.png">
</a>
<!-- Dropdown - User Information -->
<div class="dropdown-menu dropdown-menu-right shadow animated--grow-in" aria-labelledby="userDropdown">
<a class="dropdown-item" href="profile.html">
<i class="fas fa-user fa-sm fa-fw mr-2 text-gray-400"></i>
Profile
</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="logout.php">
<i class="fas fa-sign-out-alt fa-sm fa-fw mr-2 text-gray-400"></i>
Logout
</a>
</div>
</li>
75 | P a g e
</ul>
</nav>
<!-- End of Topbar -->
Error.php
Layout-top.php
<?php
session_start();
if (!isset($_SESSION['username'])) {
$_SESSION['msg'] = "You must log in first";
header('location: login.php');
}
if (isset($_GET['logout'])) {
session_destroy();
unset($_SESSION['username']);
header("location: login.php");
}
include("header.php");
?>
<body id="page-top">
<?php
if($_SESSION['userRoll'] != "user"){
include("sidenav.php");
}
?>
Layout-footer.php
</div>
<!-- End of Main Content -->
76 | P a g e
</div>
</footer>
<!-- End of Footer -->
</div>
<!-- End of Content Wrapper -->
</div>
<!-- End of Page Wrapper -->
Image.php
<!DOCTYPE html>
<html>
<head>
<title>Image Upload</title>
</head>
<body>
<div id="content">
<?php/*
while ($row = mysqli_fetch_array($result)) {
echo "<div id='img_div'>";
echo "<img src='images/".$row['image']."' >";
echo "<p>".$row['image_text']."</p>";
echo "</div>";
}*/
?>
<form method="post" enctype="multipart/form-data">
<?php $statusMsg = ''; ?>
Select Image File to Upload:
<input type="file" name="image">
<input type="submit" name="submit" value="Upload">
</form>
</div>
</body>
</html>
<?php
// Create database connection
$db = mysqli_connect('localhost', 'crime', '', 'criminalsystem');
77 | P a g e
}else{
$statusMsg = "File upload failed, please try again.";
}
}else{
$statusMsg = "Sorry, there was an error uploading your file.";
}
}else{
$statusMsg = 'Sorry, only JPG, JPEG, PNG, GIF, & PDF files are allowed to upload.';
}
}else{
$statusMsg = 'Please select a file to upload.';
}
Logout.php
<?php
session_start();
session_destroy();
header('location: login.php');
Criminalsystem.sql
--
-- Database: `criminalsystem`
--
-- --------------------------------------------------------
--
-- Table structure for table `court`
--
--
-- Dumping data for table `court`
78 | P a g e
--
-- --------------------------------------------------------
--
-- Table structure for table `courttype`
--
-- --------------------------------------------------------
--
-- Table structure for table `crime`
--
--
-- Dumping data for table `crime`
79 | P a g e
--
INSERT INTO `crime` (`id`, `caseno`, `punishment`, `criminal_ID`, `crimeType`, `crimeCategory`, `prision`, `court`, `date`,
`place`, `description`, `police_Id`, `image`, `uploads_on`) VALUES
(37, '122/122/01', '1years 5 month', 26, ' murder', 'Organized Crime', 'Hamar weyne pirson', 'Ifka Halan Court', '2010-02-12',
'hamar, wadada wadnaha', 'he killed someone in wadada wadnaha street.', 14, 'uploads/crime/9551176-4x3-940x705.jpg', '2019-
03-27 17:34:43'),
(38, '122/122/02', NULL, 27, 'Aggravated ', 'Personal Crime ', 'Hamar bile prison', 'Medina Court', '2014-05-05', 'taleh, hodan ,
mugadisho, somalia', 'he aggravated someone.', 15, 'uploads/crime/army-cctv-.jpg', '2019-03-27 17:35:54'),
(39, '122/122/03', '1years 5 month', 28, ' Robbery', 'Personal Crime ', 'Warta nabada prison', 'Dabaqayn Court ', '2012-02-18',
'hamar, wadada wadnaha', 'he robbed shop in super market.', 16, 'uploads/crime/images.jpg', '2019-03-27 17:37:23'),
(40, '122/122/04', NULL, 29, 'Theft', 'Personal Crime ', 'Waaberi prison', 'Medina Court', '2019-02-20', 'taleh, hodan , mugadisho,
somalia', '', 17, 'uploads/crime/tialatham1801.jpg', '2019-03-27 17:38:20'),
(41, '122/122/05', '1years 5 month', 37, ' murder', 'Organized Crime', 'Hamar bile prison', 'Karan Court', '2014-05-05', 'taleh,
hodan , mugadisho, somalia', '', 18, 'uploads/crime/armed_robber.jpg', '2019-03-27 17:40:46'),
(42, '122/122/06', NULL, 36, ' murder', 'Personal Crime ', 'Garowe prison', 'Yaqshid Court ', '2012-02-02', 'hamar bile', 'he killed
someone in hamar bile street.', 22, 'uploads/crime/article-2373754-020D92BE000004B0-52_306x423.jpg', '2019-03-27
17:42:07'),
(43, '122/122/07', '2 years ( start 2019-01-01 end-date 2021-12-31)', 37, 'Burglary', 'Organized Crime', 'Hamar bile prison',
'Towfiq Court ', '2012-02-18', 'hamar bile', '', 18, 'uploads/crime/globalcitizenfestivalcrime.jpg', '2019-03-27 20:24:51'),
(44, '122/122/010', '1 year (start 2019-3-20 End 2020-3-19)', 35, 'Sexual orientation', 'Personal Crime ', 'Boosaaso prison ',
'Polytechnic Court ', '2019-02-01', 'hamar, km4', '', 22, 'uploads/crime/maxresdefault.jpg', '2019-03-27 20:26:35'),
(45, '122/122/012', NULL, 37, 'Gender identity', 'Personal Crime ', 'Dhuusamareb prison', 'SiiSii Court ', '2014-05-05', 'hamar
bile', '', 23, 'uploads/crime/maxresdefault.jpg', '2019-03-27 20:27:55'),
(47, '122/122/020', '2 years ( start 2019-01-01 end-date 2021-12-31)', 28, ' murder', 'Personal Crime ', '', 'Al-Hudaa Court ', '2012-
02-18', 'hamar, wadada wadnaha', '', 14, 'uploads/crime/maxresdefault.jpg', '2019-03-27 20:59:56'),
(48, '122/122/022', NULL, 36, 'Burglary', 'Personal Crime ', '', 'Al Bayaan Court ', '2019-02-21', 'taleh, hodan , mugadisho,
somalia', '', 17, 'uploads/crime/globalcitizenfestivalcrime.jpg', '2019-03-27 21:05:12'),
(49, '122/122/021', NULL, 32, ' Robbery', 'Personal Crime ', 'Dhuusamareb prison', 'Gubta', '2019-03-19', 'taleh, hodan ,
mugadisho, somalia', '', 14, 'uploads/crime/download.jpg', '2019-03-27 21:25:09');
-- --------------------------------------------------------
--
-- Table structure for table `crimecategory`
--
--
-- Dumping data for table `crimecategory`
--
-- --------------------------------------------------------
--
-- Table structure for table `crimetype`
--
--
-- Dumping data for table `crimetype`
--
80 | P a g e
INSERT INTO `crimetype` (`id`, `name`, `description`) VALUES
(7, ' murder', 'Dil'),
(8, 'Aggravated ', 'Xumeeyay '),
(9, 'Assault', 'Takooray '),
(10, ' Robbery', 'Dhac'),
(11, 'Burglary', 'Jabsi'),
(12, 'Theft', 'Xatooyo'),
(13, 'Arson', 'Gubid'),
(14, 'Sexual orientation', 'Kufsi'),
(15, 'Gender identity', 'Qaniisnimo'),
(16, 'Religion', 'Diin');
-- --------------------------------------------------------
--
-- Table structure for table `criminal`
--
--
-- Dumping data for table `criminal`
--
INSERT INTO `criminal` (`id`, `fName`, `lName`, `height`, `weight`, `eayColor`, `address`, `city`, `state`, `zipCode`,
`poneNumber`, `dateOFbirth`, `email`, `website`, `image`, `uploads_on`, `fathersName`, `mothersName`, `contactno`, `symbol`)
VALUES
(26, 'Yahye ', 'Hassan ', '6.6\"', '99', 'Black', 'Mogadishu, buul hube', 'Mogadisho', 'Buulhube', '73827', '099672617', '2014-05-05',
'biike@gmail.com', NULL, 'uploads/criminal/0_epo3DUJGKyB7CXZw.jpeg', '2019-03-25 20:39:34', 'jamac ahmed ', 'Nuurto',
'2342563', 'laceration on face'),
(27, 'Abdullahi', 'Noor', '', '', '', 'Shabelle, hose, afgoye', 'Shabelle hoose', 'Afgoye', '4200', '099273616', '1994-05-05',
'noor@gmail.com', NULL, 'uploads/criminal/20110607_farah-mohamed-beledi_33.jpg', '2019-03-27 16:52:20', 'Jim\'ale', 'Aasho',
'1234567', 'No'),
(28, 'Biike', 'Yallahow', '', '', '', 'Mogadishu, buul hube', 'Mogadisho', 'Buulhube', '73827', '099271632', '1992-02-20',
'biike@gmail.com', NULL, 'uploads/criminal/abdirizak-mohamed-warsame.jpg', '2019-03-27 16:53:29', 'Hussien', 'Nuurto',
'2342563', 'laceration on chine'),
(29, 'Aamir', 'Deylaaf', '6.6\"', '', '', 'Dhuusomareeb, galmudug', 'Dhuusomareeb', 'Galmudug', '3425', '099768546', '1980-07-21',
'aamir@hotmail.com', NULL, 'uploads/criminal/abdirizak-mohamed-warsame-ip.gif', '2019-03-27 16:55:07', 'ibarahim', 'haajiro',
'24535245', 'No'),
(30, 'Osma Nuur', 'Mohamed', '6.6\"', '', '', 'Cadaado, galmudug', 'Cadaado', 'Galmudug', '3425', '099637261', '1989-02-18',
'aamir@hotmail.com', NULL, 'uploads/criminal/abdullahi-yusuf_1479144043441_2275730_ver1.0_640_360.jpg', '2019-03-27
16:57:51', 'ilmi', 'meymun ', '09675473', 'staples on head'),
(32, 'Nuur osma', 'Mohamed', '', '', '', 'Dhuusomareeb, galmudug', 'Dhuusomareeb', 'Galmudug', '3425', '099675436', '1996-05-05',
'aamir@hotmail.com', NULL, 'uploads/criminal/articleInline.jpg', '2019-03-27 17:01:00', 'Muhadiin', 'Nadiifo', '0997384734', ''),
81 | P a g e
(33, 'Abdullahi', 'Haji', '', '', '', 'Mogadishu, hamar bile', 'Mogadisho', 'Hamar bile', '2342', '', '1992-02-12', 'noor@gmail.com',
NULL, 'uploads/criminal/guled-ali-omar.jpg', '2019-03-27 17:01:35', 'Muhidin', 'Kadijo', '2342563', 'No'),
(34, 'Yahye mohamed', 'Daadir', '', '', '', 'Mogadishu, hamar bile', 'Mogadisho', 'Hamar bile', '2342', '099737287', '1990-02-18',
'noor@gmail.com', NULL, 'uploads/criminal/image5174347x.jpg', '2019-03-27 17:09:43', 'Muhadiin', 'Kadijoo', '89283920',
'No'),
(35, 'Abdullahi', 'Mursal ', '', '', '', 'Mogadishu, hamar bile', 'Mogadisho', 'Hamar bile', '2342', '099718271', '1985-02-18',
'noor@gmail.com', NULL, 'uploads/criminal/images.jpg', '2019-03-27 17:11:02', 'Hussien', 'Qaali', '2342563', 'staples on head'),
(36, 'Rasher', 'Mohamed', '', '', '', 'Hamar,bile, house 27, road 19', 'Mugdishu ', 'Banadir ', '4200', '099893827', '1994-12-21',
'fowzoo18@gmail.com', NULL, 'uploads/criminal/mahamed-said1.jpg', '2019-03-27 17:12:32', 'Muhadiin', 'Muumino', '6372634',
'laceration on face'),
(37, 'Daadir', 'Hassan', '', '', '', 'Dhuusomareeb, galmudug', 'Dhuusomareeb', 'Galmudug', '3425', '09983728999', '1980-03-25',
'aamir@hotmail.com', NULL, 'uploads/criminal/SOMALIA-articleInline-v2.jpg', '2019-03-27 17:13:23', 'ibarahim', 'zahra',
'24535234', 'no');
-- --------------------------------------------------------
--
-- Table structure for table `images`
--
-- --------------------------------------------------------
--
-- Table structure for table `police`
--
--
-- Dumping data for table `police`
--
INSERT INTO `police` (`id`, `fName`, `lName`, `height`, `weight`, `eayColor`, `address`, `city`, `state`, `zipCode`,
`poneNumber`, `dateOFbirth`, `email`, `website`, `image`, `uploads_on`, `jobid`, `polisestation`) VALUES
(14, 'Yasin Jamal ', 'Mohamed', '7.6\"', '64', 'Black', 'Mogadishu, hamar bile', 'Mogadisho', 'Hamar bile', '2342', '099356256',
'1990-03-05', 'yassin@gmail.com', '', 'uploads/police/igp-orders-probe-into-ankaful-shooting.jpg', '2019-03-27 16:13:52',
'7774325', 'Hamar jabjab police-station'),
(15, 'Dadir ahmed', 'Nuur', '5.6\"', '70', 'Black', 'Mogadishu, buul hube', 'Mogadisho', 'Buulhube', '73827', '099783473', '1980-03-
11', 'biike@gmail.com', '', 'uploads/police/images (1).jpg', '2019-03-27 16:15:43', '7774343', 'Yakshid Police-Station'),
82 | P a g e
(16, 'Nuur Kalid', 'Hassan ', '5.6\"', '70', 'Grey', 'Dhuusomareeb, galmudug', 'Dhuusomareeb', 'Galmudug', '3425', '099347623',
'1992-02-20', 'aamir@hotmail.com', '', 'uploads/police/BXPCSDK4ZVFS7NWPTR7ETKJGRU.jpg', '2019-03-27 16:17:18',
'7774473', 'Abdi-aziz Police-Station '),
(17, 'Osma Nuur ', 'Mohamed', '7.6\"', '64', 'Grey', 'Dhuusomareeb, galmudug', 'Dhuusomareeb', 'Galmudug', '3425', '0997384723',
'1994-02-12', 'aamir@hotmail.com', '', 'uploads/police/DNCQ4RAAVKBOBO5EBJXRBIPBZU.jpg', '2019-03-27 16:19:16',
'7774335', 'Wadajir Police-Station'),
(18, 'ZamZam Hassan ', 'Hussien', '7.6\"', '64', '', 'Mogadishu, buul hube', 'Mogadisho', 'Buulhube', '73827', '099367216', '1960-03-
20', 'biike@gmail.com', '', 'uploads/police/download.jpg', '2019-03-27 16:25:52', '7774326', 'Waaber Police-station'),
(22, 'Nuur osma', 'Mohamed', '7.6\"', '70', 'Grey', 'Dhuusomareeb, galmudug', 'Dhuusomareeb', 'Galmudug', '3425', '0997384734',
'1999-03-12', 'aamir@hotmail.com', '', 'uploads/police/fake-cop.jpg', '2019-03-27 16:37:41', '7774323', 'Hodan Police-Station'),
(23, 'Osma Noor', 'Mohamed', '5.6\"', '70', 'Grey', 'Dhuusomareeb, galmudug', 'Dhuusomareeb', 'Galmudug', '3425', '099782714',
'1992-02-12', 'aamir@hotmail.com', '', 'uploads/police/images.jpg', '2019-03-27 16:39:02', '7774336', 'Hamar weyne Police-
Station ');
-- --------------------------------------------------------
--
-- Table structure for table `prision`
--
--
-- Dumping data for table `prision`
--
-- --------------------------------------------------------
--
-- Table structure for table `roletype`
--
83 | P a g e
`name` varchar(250) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `roletype`
--
-- --------------------------------------------------------
--
-- Table structure for table `users`
--
--
-- Dumping data for table `users`
--
INSERT INTO `users` (`id`, `fName`, `lName`, `username`, `email`, `password`, `userRoll`) VALUES
(1, 'Rashedul', '', 'dev', 'shawon.my@gmail.com', '37d1703157da260a648d24613032bc8f', 'admin'),
(6, 'fowzi', 'jamal', 'admin', 'ozil2m@hotmail.com', '5730bb1ef815d9007df14d136e107614', 'admin'),
(20, 'Yassin', 'jamal', 'Subadmin', 'fowzoo18@gmail.com', '5730bb1ef815d9007df14d136e107614', 'subuser'),
(23, 'jamal ', 'barrow', 'Courtuser', 'fowzoo18@gmail.com', '5730bb1ef815d9007df14d136e107614', 'court'),
(24, 'Kaazi', 'hommie', 'POLICEUSER', 'kaazi@hotmail.com', '5730bb1ef815d9007df14d136e107614', 'police'),
(28, 'jaabir', 'jamal', 'NORMAL-USER', 'kaazi@yahoo.com', '5730bb1ef815d9007df14d136e107614', 'user');
--
-- Indexes for dumped tables
--
--
-- Indexes for table `court`
--
ALTER TABLE `court`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `courttype`
--
ALTER TABLE `courttype`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `crime`
--
ALTER TABLE `crime`
ADD PRIMARY KEY (`id`),
ADD KEY `police_Id` (`police_Id`),
ADD KEY `criminal_ID` (`criminal_ID`);
--
-- Indexes for table `crimecategory`
84 | P a g e
--
ALTER TABLE `crimecategory`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `crimetype`
--
ALTER TABLE `crimetype`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `criminal`
--
ALTER TABLE `criminal`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `images`
--
ALTER TABLE `images`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `police`
--
ALTER TABLE `police`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `prision`
--
ALTER TABLE `prision`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `roletype`
--
ALTER TABLE `roletype`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `users`
--
ALTER TABLE `users`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `court`
--
ALTER TABLE `court`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=43;
--
-- AUTO_INCREMENT for table `courttype`
--
ALTER TABLE `courttype`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `crime`
--
ALTER TABLE `crime`
85 | P a g e
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=50;
--
-- AUTO_INCREMENT for table `crimecategory`
--
ALTER TABLE `crimecategory`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;
--
-- AUTO_INCREMENT for table `crimetype`
--
ALTER TABLE `crimetype`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=17;
--
-- AUTO_INCREMENT for table `criminal`
--
ALTER TABLE `criminal`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=38;
--
-- AUTO_INCREMENT for table `images`
--
ALTER TABLE `images`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `police`
--
ALTER TABLE `police`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=24;
--
-- AUTO_INCREMENT for table `prision`
--
ALTER TABLE `prision`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=38;
--
-- AUTO_INCREMENT for table `roletype`
--
ALTER TABLE `roletype`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=29;
--
-- Constraints for dumped tables
--
--
-- Constraints for table `crime`
--
ALTER TABLE `crime`
ADD CONSTRAINT `crime_ibfk_1` FOREIGN KEY (`police_Id`) REFERENCES `police` (`id`) ON DELETE CASCADE,
ADD CONSTRAINT `crime_ibfk_2` FOREIGN KEY (`criminal_ID`) REFERENCES `criminal` (`id`) ON DELETE
CASCADE;
COMMIT;
86 | P a g e
87 | P a g e