You are on page 1of 100

BACHELOR OF SCIENCE IN COMPUTER SCIENCE

& ENGINEERING

CRIMINAL RECORD MANAGEMENT SYSTEM IN THE


PERSPECTIVE OF SOMALIA

Submitted by: Fowzi Jamal Mohamed Barrow ID: 666-41-14(i)

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

Project Submitted by: Fowzi Jamal Mohamed Barrow ID: 666-41-14(i)

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

Professor Dr. Md. Nurul Mustafa Supervisor


Professor, Department of Computer Science & Engineering
Southern University Bangladesh

Mr. Mohammad Jahangir Alam Co-Supervisor


Assistant Professor
Department of Computer Science & Engineering
Southern University Bangladesh

Professor Dr. Md. Abul Mansur Chowdhury Advisor


Advisor, Department of Computer Science & Engineering
Southern University Bangladesh

Professor Dr. Md. Sharifuzzaman Dean


Dean, Faculty of Science & Engineering
Southern University Bangladesh

Professor Dr. Mohammad Osiur Rahman External


Professor, Department of Computer Science & Engineering
University of Chittagong

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

LIST OF TABLES xii

LIST OF ABBREVIATIONS Xiii

CHAPTER 1 INTRODUCTION 1

1.1 Introduction 1

1.2 Motivation 1

1.3 Aims and Objective 1

1.4 Overview of the Project 2

1.5 Summary 3

CHAPTER 2 LITERATURE REVIEW 4

2.1 Introduction 4

2.2 Background 4

2.3 Some Related Works 4

2.4 Summary 6

v|Page
CHAPTER 3 METHODOLOGY

3.1 Introduction 7

3.2 Methodology 7

3.3 Software Development Life Cycle (SDLC) 7

3.3.1 Feasibility Study 8

3.3.2 Requirement Study 8

3.3.3 System Analysis 9

3.3.4 System Design 9

3.3.5 Coding 9

3.3.6 Testing 9

3.3.7 Acceptance 10

3.4 Waterfall Software Development Methodology 10

3.5 Waterfall Model Application 11

3.6 Summary 12

CHAPTER 4 ANALYSIS 13

4.1 Introduction 13

4.2 Requirement Engineering 13

4.3 Requirement Engineering Process 13

4.3.1 Feasibility Study 14

4.3.2 Requirement Gathering 14

4.3.3 Software Requirement Specification 14

4.3.4 Software Requirement Validation 15

4.4 Software Requirement for Development 15

4.5 Hardware Requirement For Use 15

4.6 Software Requirement for Use 15

vi | P a g e
4.7 Use Case 16

4.7.1 Characteristic associated with use cases 16

4.7.2 The steps in designing use cases 16

4.8 Use case Diagram 16

4.9 Block Diagram 17

4.10 Flowchart 18

4.10.1 Definition 18

4.10.2 Necessity to Use a Flowchart 18

4.11 Summary 19

CHAPTER 5 SYSTEM DESIGN 20

5.1 Introduction 20

5.2 System Design 20

5.3 System Context Diagram (SCD 20

5.4 Data Flow Diagram 21

5.4.1 Data Flow Diagram 21

5.4.2 Types of DFD 21

5.4.3 DFD Components 21

5.5 Data Design 22

5.5.1 Entity Relationship 22

5.5.2 The used Elements of E-R diagram 22

5.5.3 E-R Diagram 23

5.6 Activity Diagram 24

5.7 Summary 26

vii | P a g e
CHAPTER 6 IMPLEMENTATION 27

6.1 Introduction 27

6.2 Software implementation 27

6.3 User Interface Design 27

6.4 Summary 31

CHAPTER 7 TESTING AND PERFORMANCE EVALUATION 32

7.1 Introduction 32

7.2 Software Testing 32

7.2.1 Verification 32

7.2.2 Validation 32

7.3 Basics of Software Testing 32

7.3.1 Black Box Testing 32

7.3.2 White Box Testing 33

7.4 Types of Testing 33

7.4.1 Beta Testing 33

7.5 Test Example 34

7.6 Summary 34

CHAPTER 8 APPLICATION 35

8.1 Introduction 35

8.2 About the Application 35

8.3 Features of the Software 35

8.4 Users of the Project 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

10.2 Limitation of the Project 40

10.3 Future Scope and Plan 40

REFERENCES 41

APPENDIX A 43

Screenshots

APPENDIX B 47

Source Code

ix | P a g e
LIST OF FIGURES

Fig. 3.1 Software Development Life Cycle (SDLC) 8

Fig. 3.2 Waterfall Software Development Methodology 11

Fig. 4.1 Requirement Engineering Process Model 13

Fig 4.2 Use case Diagram for CRMSS 17

Fig. 4.3 Block Diagram for CRMSS 18

Fig. 4.4 Flowchart for CRMSS 19

Fig. 5.1 System Context Diagram (SCD) of CRMSS 20

Fig. 5.2 Level 1 Data Flow Diagram 22

Fig. 5.6 E-R Diagram of CRMSS 23

Fig. 5.7 Activity Diagram of Admin 24

Fig. 5.8 Activity Diagram of Sub-admin 24

Fig. 5.9 Activity Diagram of Police 25

Fig. 5.10 Activity Diagram of Court 25

Fig. 6.1 Create An account 28

Fig 6.2 Admin Home Page 28

Fig 6.3 Crime Information Report 29

Fig. 6.4 Criminal List Report 29

Fig. 6.5 Sub-admin Home Page 30

Fig. 6.6 Police-user Home Page 30

Fig. 6.7 Court-user Home Page 31

Fig. 6.8 Police List Report 31

Fig. 9.1 Admin Page 36

Fig. 9.2 Login Page 36

Fig. 9.3 Police list 37

x|Page
Fig. 9.4 Police Details 37

Fig. 9.5 Criminal List 37

Fig. 9.6 Criminal Details 38

Fig. 9.7 Crime List 38

Fig. 9.8 Crime Details 39

xi | P a g e
LIST OF TABLES

Table 7.1 Different Types of Test Data………………………………………. 34

xii | P a g e
LIST OF ABBREVIATIONS

WSD -Waterfall Software Development

DFD - Data Flow Diagram

ERD -Entity Relationship Diagram

MSQL -Structured Query Language

PHP -PHP: Hypertext Preprocessor

OS -Operation System

RAM -Random Access Memory

SCD -System Context Diagram

HTML -Hypertext Markup Language

CSS -Cascading Style Sheets

BTs -Bootstrap

SDLC -Software Development Life Cycle

SRS -Software Requirement Specification

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.3 Aims and Objectives


The objective of this system can broadly be listed as follows:

 To keep record of the criminals

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

1.4 Project Organization


Chapter 2: In this chapter we have discussed the web based application and history of web based
criminal record application as well as some previous works using reference.
Chapter 3: In this chapter we have discussed the steps of system development life cycle (SDLC)
and methodology used to develop the system using various figure.
Chapter 4: In this chapter we have described the requirement engineering process, software
requirement for development, and how to analyze the system through Use Case, Block Diagram
and Flowchart
Chapter 5: In this chapter we have described the design process of the system using System
Context Diagram (SCD), Data flow diagram (DFD), Entity Relationship Diagram (ERD) and
Activity Diagram
Chapter 6: This chapter we have described how implemented the system and explained interface
designing steps with various screen shots.
Chapter 7: In this chapter we have illustrated the software testing types, validation and testing
methods used this system along with a table showing different test results.
Chapter 8: In this chapter we have explained the application area of the system and where the
system can be used
Chapter 9: In this chapter we have presented the result and discussion of the system by showing
all necessary screen shots of the application.
Chapter 10: In this chapter we have discussed the conclusion, limitation, and future working
Scope on the system.

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.

2.3 Some Related Works


Prakruthi Prakasha, et.al [1]. In this research work, the web-based criminal record system (CRS)
aims to use mobile devices in place of traditional GPS devices in order to facilitate the police to
record the location of the committed crime. Despite from the location-based service, the CRS
offers the police to describe the detail and simultaneously attach the images or multimedia files.
The online crime reporting system has been developed to override the problems prevailing in the
practicing manual system. This software is supported to eliminate in some cases reducing the
hardships faced by the existing system.

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..

Sahar Bayoumi, et.al [4]. Geographic or cartographic Visualization is a form of information


visualization includes principles of cartography, geographic information systems (GIS) and
Exploratory Data analysis (EDA). Throughout this work, we will introduce related works in the
field of crimes which we classified based on either spatial or spatial and temporal aspects. Crimes
remain a social problem of grave concern where police departments have to suppress and detect
crimes

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.

3.3 Software Development Life Cycle (SDLC)


The cycle of the software development gives us an overview and guidelines for the development
of quality software. For our project, we follow SDLC to make reliable for the user [6].

7|Page
Fig 3.1 Software Development Life Cycle

3.3.1 Feasibility Study


The feasibility study is an evaluation of the potential of a proposed project which is based on
extensive and research to support the process of decision making [6].
Objective of feasibility study:
 Technology and system feasibility
 Legal feasibility
 Operational feasibility
 Schedule feasibility
3.3.2 Requirement Definition
A requirement is a physical and functional need that a particular design, product or process must
be able to perform. It is commonly used in a formal sense in system engineering, software
engineering and enterprise engineering [6].

Requirement Definition involves three major frames are:

 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:

 What is being done?


 How is it being done?
 Who is doing it?
 When is he doing it? Why is it being done?
 How can it be improved?

3.3.4 System Design


The design phase is the architectural phase of system design. The flow of data processing is
developed into charts, and the project team determines the most logical design and structure for
data flow and storage. For user interface, the project team designs mock-up screen layouts that
developers use to write the code for the actual interface [6].

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].

 White box testing


 Black box testing

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:

 Production software – the software is installed in client machine with production


data loaded into it.
 Completed acceptance test – the software is tested by the users in the client side
and the acceptance test is completed.
 Customer acceptance memorandum – customer signs off the acceptance
memorandum which means the project completion is smooth and client has
accepted it.
 Archived software artifacts – the source code of the entire software and other
software artifacts are archived for future use. Archived project plan the latest
project plan is archived for future use [7].

3.4 Waterfall Model Application


The waterfall model was first process model to be introduced, it also referred to as a linear
Sequential life cycle model. It is very simple to understand and use. In waterfall model, each phase
must be completed before the next phase can begin and there is no overlapping in the phases

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:

 Requirement are very well documented, clear and fixed.


 Product definition is stable
 Technology is understood and is not dynamic
 There are no ambiguous requirements.
 Ample resources with required expertise are available to support the product.
 The project is short.

Fig 3.2 Waterfall Software Development Methodology

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.

4.2 Requirement Engineering


The process to gather the software requirement form client, analyze and document them is known
as requirement engineering. The goal of requirement engineering is to develop and maintain
sophisticated and descriptive system requirement specification document.

4.3 Requirement Engineering Process


The main objective of the process are to describe the principle requirement engineering activities
and the relationship, it depends on the application domain the people involved and the organization
developing the requirements [9].
It is four steps process, which includes –
 Feasibility Study
 Requirement Gathering
 Software Requirement Specification
 Software Requirement Validation

Figure 4.1 Requirement Engineering Process Model

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].

4.3.2 Requirement Gathering


If the feasibility report is positive towards undertaking the project, next phase starts with gathering
requirement from the user, analysis and engineering communicate with the client and end-uses to
know their ideas on that the software should provide and which features they want the software to
include [9].

4.3.3 Software Requirement Specification


SRS is a document created by system analyst after the requirement are collected various
stakeholders. SRS defines how the intended software will interact with hardware, external
interface, speed of operation, response time of system, portability of software across various
platforms, maintainability, speed of recovery after crashing, security, quality, limitations etc. the
requirements received from client are written in natural language, it is the responsibility of system
analyst to document the requirement in technical language. It is the responsibility of system analyst
to document the requirements in technical language so that they can be comprehended and useful
by the software development team [9].

SRS should come up with the following features:


 User requirement are expressed in natural language.
 Technical requirement are expressed in structured language, which is used inside the
organization.
 Design description should be written in Pseudo code.
 Format of forms and GUI screen prints.
 Conditional and mathematical notations for DFDs etc.

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].

Requirements can be checked against following conditions –

 If they can be practically implemented


 If they are valid and as per functionality and domain of software
 If there are any ambiguous
 If they are complete
 If they can be demonstrated

4.4 Software Requirement for Development


o Requirement for software
 PHP
 HTML
 CSS
 BOOTSRAP

4.5 Hardware Requirements for Use


 Keyboard
 Mouse
 Screen solution of at least 1024*768 required for proper and complete viewing of
screen
 RAM 1GB
 Hard Disk 250 GB

4.6 Software Requirement for use


 Operating system- Desktop and laptop based OS
 Server XAMPP Control v3.3.2
 Application software PHP, MYSQL, Java script, Web browser like chrome.

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].

4.7.1 Characteristics associated with use case are


1. Organizing functional requirements
2. Modeling the goals of system user interaction
3. Recording scenarios from tiger events to ultimate goals
4. Describing the basic course of actions and exceptional flow of events
5. Permitting a user to access the functionality of another event

4.7.2 The steps in designing use case are


 Identify the user of the system.
 For each category of users, create a user profile. This includes all roles played by the users
relevant to the system.
 Identify significant goals associated with each role to support the system. The system’s
value proposition identifies the significant role.
 Create use case for every goal associated with case template and maintain the same
abstraction level throughout the use case. Higher level use case steps are treated as goals
for the lower level.
 Structure the use cases
 Reviewed and validate the users [10].

4.8 Use Case Diagram


Use case diagram are valuable for visualizing the functional requirements of system that will
translate into design choices and development priorities.
Use case diagrams are valuable UML diagram type and frequently used to analyze various system.
They enable you to visualize the different types of roles in a system and how those roles interact
with the system [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.

4.9 Block Diagram


A block diagram is a diagram of system in which the principle parts of functions are represented
by block connected by lines that show the relationships of the blocks. They are heavily used in
engineering in hardware design, electronic design, software design, and process flow diagrams.

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].

4.10.2 Necessity to use a Flowchart


 To develop understanding of how a process is done
 To study a process for improvement
 To communicate to others how a process is done
 When better communication is needed between people involved with the same process
 To document a process
 When planning a project [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.

5.2 System Design


The phase of design process is given below:
 Architectural design: the design of system architecture which describes the structure
behavior.
 Logical design: it’s an abstract representation of the data flows, inputs and outputs of the
system, the requirements about the system are described.
 Input requirements
 Output requirements
 Storage requirements
 Processing requirements
 System control and backup or recovery
Another way the physical portion of system design can generally be broken down into three sub
tasks:
 User interface design.
 Data design.
 Process design [6].
5.3 System Context Diagram (SCD)
A system context diagram (SCD) in software engineering and systems engineering is a diagram
that defines the boundary between the system, or part of a system, and its environment, showing
the entities that interact with it, this diagram is a high level view of a system. It is similar to a block
diagram [10].
Add punishment
Criminal Record
Court Admin
Management
View crime report create account and add criminal
System
Or crime, add police, add court, Add prison

Add criminal/ crime report

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.

5.4 Data Flow Diagram


5.4.1 Data Flow Diagram
Data flow diagram is graphical representation of flow data in an information system. It is capable
of depicting incoming data flow, outgoing data flow and stored data. The DFD does not mention
anything about how data flows through the system.
There is a prominent difference between DFD and flowchart, the flowchart depicts flow of control
in program modules. DFD’s depict flow of data in the system at various levels. DFD does not
contain any control or branch elements [6].

5.4.2 Types of DFD


Data flow Diagram are either logical or physical.
 Logical DFD – this type of DFD concentrates on the system process and flow of
data in the system.
 Physical DFD – this type of DFD shows how data flow is actually implemented in
the system. It is more specific and close to the implementation.

5.4.3 DFD Components


DFD can represent source, destination, storage and flow of data using the following set of
components-
E Entities Process Data Flow
Data store

 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.

5.5 Data Design


5.5.1 Entity Relationship
Entity – relationship (ER) diagram is a graphical representation of entities and their relationships
to each other typically used in computing in regard to the organization of data within database or
information systems. An entity is a piece of data – an – object or concept about which data is
stored.

5.5.2 The used element of E-R diagram is


 Entity: an entity can be object, place, person, or class. Entity is about which we seek
information. It is represented by using rectangular.
 Attributes: an attributes describe a property of an entity, for example, name, number, email
address etc. can be attributes of sub-admin. It represented using eclipse.
 Key attributes: key attributes represent the main characteristics of an entity. It is
used to represented primary key. Eclipse with underline represent key attribute.
 Action: which are represented by diamond shapes, show how two entities share information
in the database.
 Connecting lines: solid lines that connect attributes to show the relationships of entities in
the diagram [6].

22 | P a g e
5.5.3 E-R Diagram
Manages
Password

Username C User-Roll Police station


Address
NID
Email

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

Fig 5.6 E-R diagram of CRMSS


The above figure shows the details entity relationship of application with action and relation type.

23 | P a g e
5.6 Activity Diagram
An activity diagram visually present a series of action or flow of control in system.

Fig 5.7 Activity Diagram of Admin

Fig 5.8 Activity Diagram of Sub-Admin

24 | P a g e
Fig 5.9 Activity Diagram of Police-User

Fig 5.10 Activity Diagram of Court-User


The above figures shows the details activity of admin, sub-admin, police-user, and court-user’s
activity details sequentially.

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.

6.2 Software Implementation


There are some challenges faced by the development team while implementing the software.
Some of them are mentioned below:
 Code-reuse – program interface of present – day language are very sophisticated and are
equipped huge library function still, to bring the cost down of end product the organization
management prefers to re-use the code. Which was created earlier for some other software.
There are huge issues faced by programmers for compatibility checks and deciding how
much code to re-use.
 Version-Management – every time new software is issued to the customer, developers
have to maintain version and configuration related documents. This project needs to be
highly accurate and available on time [9].
We have implemented our software using some tools that are given below,
Hardware for use:
 Any Web browser like chrome.
 Pc with internet
Software for use:
 Operating system- Desktop and laptop based OS
 Server XAMPP Control v3.3.2
 Application software PHP, MYSQL, Java script, Web browser like chrome.

6.3 User interface


User interface is the front-end application view to which user interface in order to use the software.
User interface is part of software and is designed such a way that it is expected to provide the user
insight of the software. UI provides fundamental platform for human – computer interaction. UI
can be graphical, text-based audio-video based, depending upon the underlying hardware and
software combination. UI can be hardware or software or a combination of both [9].

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

Fig 6.1 Create an account


The above figure shows Create account of the Users.

Fig 6.2 Admin Home Page

28 | P a g e
Fig 6.3 Crime Information Report

Fig 6.4 Criminal List Report


The figures above shows the home page for admin after login. View the list of criminal and also
crime information report.

29 | P a g e
Fig 6.5 Sub-admin Home Page

Fig 6.6 Police-User 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.

Fig 6.8 Police List Report


The above figure shows list of police officers and their information.

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

TESTING AND PERFORMANCE EVALUTION


7.1 Introduction
Software testing is an investigation conduct to provide stakeholder with information about the
quality of the software product or service under test. Software testing can be also provide an
objective, independent view of the software to allow the business to appreciate and understand the
risks of the software implementation. Test technique includes the process of executing a program
or application with intent of finding software bugs (error or other defects), and verifying that the
software is fit for use.

7.2 Software Testing


Software testing is the process of evaluation of the item to detect differences between given input
and expected output, also to assess the features of the software item. Testing assess the quality of
the product. Software testing is the process that should be done during the development process.
In other words software testing is a verification and validation process [11].

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.

7.3 Basics of Software Testing


There are two basics of software testing: black box testing and white box testing.

7.3.1 Black Box Testing


Black box testing is a testing technique that ignores mechanism of the system and focuses on the
output generated against any input and execution of the system. It also called functional testing.

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.

7.4 Types of Testing


There are many types of testing like.
 Unit testing
 Integration testing
 Functional testing
 System testing
 Stress testing
 Performance testing
 Usability testing
 Acceptance testing
 Regression testing
 Beta testing

7.4.1 Beta Testing


Beta testing is the testing which is done by end – users, a team outside the development, or publicly
releasing full per-version of the product which know as beta version. The aim testing is to cover
unexpected errors. It falls under the class of black box testing [11].

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

3 Register police Insert Name, Save Save successfully Test is White


on software mobile, job id, successfully confirmed box
police station,
email, address.
4 Register court Insert Name, Save Save successfully Test is White
on software location, successfully confirmed box
description or
address.
Table 7.1 Different Types of Test Data

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.2 About the Software


This software has been developed for Criminal record management system using computer. If
someone wants to track and store criminals data he or she can use the system with computers.
Registration has to be completed both admin and sub-admin with required data.

8.3 Features of the Software.


 It is easy to use
 It is easy to create account for users
 It is user friendly
 It works different version of web browsers
 It is faster
 It have search option
 This system can be used any police chamber or station to automate criminal record
management system using software solution.
 This system can be used for any police chamber or station where they want to store
Criminals data and their crime history for future use.

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

RESULT AND DISCUSSION


9.1 Result
Better output of software increase user acceptance and implementation success rate higher. This
chapter explains the results along with discussion of system which is organized as follows

Fig 9.1 Login page

Fig 9.2 Admin Page


There are separate administration for each police station. Those who can add police to their police
station and look back criminal records of every day, they can also create accounts for software
users.
The above figure shows the page of the system where admins and other users can login their
accounts by entering username and password. After that they will go direct to their account home
page.

36 | P a g e
Fig 9.3 Police List

Fig 9.4 Police Details


The above figures shows that police list and their details.

Fig 9.5 Criminal 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.

Fig 9.7 Crime List

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.

10.2 Limitations of the Project


 No uploading of videos.
 There is no face detection method.
 Criminal information is stored in file format with outdate images and low quality
images.
 Using this information it is not possible for eye witness to guess the criminal, so
there is need to develop a better method for identifying the criminals like
fingerprint, DNA etc.

10.3 Future Scope and Plan


There are various scope of improvement of our project CRMSS which we could not implement
due to lack of time. Following points can be improved to optimize this system and several features
can be added to improve this application.
 Face detection or face recognition technology can be added.
 Fingerprint recognition system can be added.
 Searching technique can be more optimized.
 More validation checking can be added.

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

[15] Rashmi K T, Amrutha K B, Manu Prakash “Computerized Crime Tracking System”

International Journal of Innovative Research in Science, Engineering and Technology, Volume 7,


Special Issue 6, May 2018.

[16] “Criminal Records Ohio Information System” Internet:


http://ww.society.ezinemark.com/criminal-records-ohio-information-system-171e851d4ae.html [accessed
18 April 2019]

[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

4) Police- User page

43 | P a g e
5) Court- User Page

6) Sub-admin Page

7) Add Criminal Form

44 | P a g e
8) Add Crime Form

9) Add Police Form

10) Add Prison

45 | P a g e
11) Add Court

12) Create Account Page

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

<!-- Bootstrap core JavaScript-->


<script src="vendor/jquery/jquery.min.js"></script>
<script src="vendor/jquery/jquery-ui.min.js"></script>
<script src="vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
<!-- Core plugin JavaScript-->
<script src="vendor/jquery-easing/jquery.easing.min.js"></script>
<!-- Custom scripts for all pages-->
<script src="js/sb-admin-2.min.js"></script>
<!-- Page level plugins -->
<script src="vendor/datatables/jquery.dataTables.min.js"></script>
<script src="vendor/datatables/dataTables.bootstrap4.min.js"></script>
<!-- Page level custom scripts -->
<script src="js/demo/datatables-demo.js"></script>
<script>
$( function() {
$( "#datepicker" ).datepicker({ dateFormat: 'yy-mm-dd' });
} );
</script>
</body>
</html>

48 | P a g e
Home.php

<?php include("layout-top.php") ?>


<?php include("report/criminal.php") ?>
<?php include("layout-footer.php") ?>

Report-criminal.php

<?php include("layout-top.php") ?>


<?php include("report/criminal.php") ?>
<?php include("layout-footer.php") ?>

Criminal.php

<!-- Begin Page Content -->


<div class="container-fluid">
<!-- DataTales Example -->
<div class="card shadow mb-4">
<div class="card-header py-3">
<h6 class="m-0 font-weight-bold text-primary">Criminal Information</h6>
</div>
<div class="card-body">
<div class="table-responsive">
<table class="table table-bordered" id="dataTable" width="100%" cellspacing="0">
<thead>
<tr>
<th></th>
<th>Information</th>
<th>Identity</th>
<th>Date Of Birth</th>
<th></th>
</tr>
</thead>
<tfoot>
<tr>
<th></th>
<th>Information</th>
<th>Identity</th>
<th>Date Of Birth</th>
<th></th>
</tr>
</tfoot>
<tbody>
<?php
$result = mysqli_query($db, "SELECT * FROM `criminal` ORDER BY `criminal`.`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']."<br>
Father's Name: " .$row['fathersName']."<br>
Mothers's Name: " .$row['mothersName']."<br>
Mark Symbol: " .$row['symbol']."<br>
<a href='read-criminal.php?id=". $row['id'] ."' title='View Record' data-toggle='tooltip'><span class='fa fa-eye'></span></a>
</td>
<td> NID: ".$row['poneNumber']."<br>
Contact No: ".$row['contactno']."
</td>
<td>".$row['dateOFbirth']."
</td>
<td>
<a href='read-criminal.php?id=". $row['id'] ."' title='View Record' data-toggle='tooltip'><span class='fa fa-
eye'></span></a>"

?>
<?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

<?php include("layout-top.php") ?>


<?php include("report/crime.php") ?>
<?php include("layout-footer.php") ?>

Crime.php

<!-- Begin Page Content -->


<div class="container-fluid">
<!-- DataTales Example -->
<div class="card shadow mb-4">
<div class="card-header py-3">
<h6 class="m-0 font-weight-bold text-primary">Crime Information</h6>
</div>
<div class="card-body">
<div class="table-responsive">
<table class="table table-bordered" id="dataTable" width="100%" cellspacing="0">
<thead>
<tr>
<th>Case No</th>
<th>Image</th>
<th>Criminal</th>
<th>Type</th>
<th>prison</th>
<th>Crime location</th>
<th>Court</th>
<th>Duty Police</th>
<th>Punishment</th>
<th>Date</th>
<th></th>
</tr>
</thead>
<tfoot>
<tr>
<th>Case No</th>
<th>Image</th>
<th>Criminal</th>
<th>Type</th>
<th>Prision</th>
<th>Crime location</th>
<th>Court</th>
<th>Duty Police</th>
<th>Punishment</th>
<th>Date</th>
<th></th>
</tr>

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

<?php include("layout-top.php") ?>


<?php include("report/police.php") ?>
<?php include("layout-footer.php") ?>

Police.php

<!-- Begin Page Content -->


<div class="container-fluid">
<!-- DataTales Example -->
<div class="card shadow mb-4">
<div class="card-header py-3">
<h6 class="m-0 font-weight-bold text-primary">Police Information</h6>
</div>
<div class="card-body">
<div class="table-responsive">
<table class="table table-bordered" id="dataTable" width="100%" cellspacing="0">
<thead>
<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>

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

<?php include("layout-top.php") ?>


<?php include("court.php") ?>
<?php include("layout-footer.php") ?>

Court.php

<!-- Begin Page Content -->


<div class="container-fluid d-flex justify-content-between">
<div class="body-area w-100 pr-5">
<h1 class="text-center">Add Crime Punishment</h1>
<hr>
<form method="POST" enctype="multipart/form-data">
<div class="form-group">
<label for="exampleFormControlSelect1">Case No</label>
<select class="form-control" id="exampleFormControlSelect1" name="ids">
<?php
$sql = mysqli_query($db, "SELECT id,caseno From crime");
$row = mysqli_num_rows($sql);
if($row > 0){
while ($row = mysqli_fetch_array($sql)){

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 ">

<!-- 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>
<!-- Divider -->
<hr class="sidebar-divider my-0">

<!-- Nav Item - Dashboard -->


<li class="nav-item">
<a class="nav-link" href="">
<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['addcrime'])) {

$id = mysqli_real_escape_string($db, $_POST['ids']);


$punish = mysqli_real_escape_string($db, $_POST['punishment']);
$insert = $db->query("UPDATE crime SET punishment = '$punish' WHERE id = $id");
header('location: home.php');
echo "<script> alert('Data stored successfully'); </script>";
} else{
$statusMsg = 'Please select ';
}

// Display status message


// echo $statusMsg;
?>

53 | P a g e
Page-Crime.php

<?php include("layout-top.php") ?>


<?php include("content/criminal-content.php") ?>
<?php include("layout-footer.php") ?>

Content-crime.php

<!-- Begin Page Content -->


<div class="container-fluid d-flex justify-content-between">
<div class="body-area w-100 pr-5">
<h1 class="text-center">Add Crime</h1>
<hr>
<form method="POST" enctype="multipart/form-data">
<div class="form-group">
<label for="exampleFormControlInput2">Case No</label>
<input type="text" class="form-control" id="exampleFormControlInput2" name="caseNo">
</div>
<div class="form-group">
<label for="exampleFormControlSelect1">Select Duty Officer</label>
<select class="form-control" id="exampleFormControlSelect1" name="police">
<?php
$sql = mysqli_query($db, "SELECT id,fName,lName From police");
$row = mysqli_num_rows($sql);
while ($row = mysqli_fetch_array($sql)){
echo "<option value='". $row['id'] ."'>" .$row['fName'] ." ".$row['lName'] ."</option>" ;
}
?>
</select>
</div>
<div class="form-group">
<label for="exampleFormControlSelect1">Select Criminal </label>
<select class="form-control" id="exampleFormControlSelect1" name="criminal">
<?php
$sql = mysqli_query($db, "SELECT id,fName,lName,poneNumber From criminal");
$row = mysqli_num_rows($sql);
while ($row = mysqli_fetch_array($sql)){
echo "<option value='". $row['id'] ."'>" .$row['fName'] ." ".$row['lName'] ." ".$row['poneNumber']
."</option>" ;
}
?>
</select>
</div>
<div class="form-group">
<label for="exampleFormControlSelect1">Select Crime Type</label>
<select class="form-control" id="exampleFormControlSelect1" name="crimetype">
<?php
$sql = mysqli_query($db, "SELECT name From crimetype");
$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 Category</label>
<select class="form-control" id="exampleFormControlSelect1" name="crimecat">
<?php
$sql = mysqli_query($db, "SELECT name From crimecategory");
$row = mysqli_num_rows($sql);
while ($row = mysqli_fetch_array($sql)){
echo "<option value='". $row['name'] ."'>" .$row['name'] ."</option>" ;
}
?>

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 ">

<!-- 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>
<!-- Divider -->
<hr class="sidebar-divider my-0">

<!-- Nav Item - Dashboard -->


<li class="nav-item">
<a class="nav-link" href="">
<i class="fas fa-fw fa-tachometer-alt"></i>

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'])) {

// File upload path


$targetDir = "uploads/crime/";
$fileName = basename($_FILES["image"]["name"]);
$targetFilePath = $targetDir . $fileName;
$fileType = pathinfo($targetFilePath,PATHINFO_EXTENSION);

$allowTypes = array('jpg','png','jpeg','gif','pdf');

$police = mysqli_real_escape_string($db, $_POST['police']);


$criminal = mysqli_real_escape_string($db, $_POST['criminal']);
$crimetype = mysqli_real_escape_string($db, $_POST['crimetype']);
$crimecat = mysqli_real_escape_string($db, $_POST['crimecat']);
$prision = mysqli_real_escape_string($db, $_POST['prision']);
$court = mysqli_real_escape_string($db, $_POST['court']);
$date = mysqli_real_escape_string($db, $_POST['date']);
$place = mysqli_real_escape_string($db, $_POST['place']);
$caseNo = mysqli_real_escape_string($db, $_POST['caseNo']);
$description = mysqli_real_escape_string($db, $_POST['description']);

// Allow certain file formats


$allowTypes = array('jpg','png','jpeg','gif','pdf');
if(in_array($fileType, $allowTypes)){
// Upload file to server
if(move_uploaded_file($_FILES["image"]["tmp_name"], $targetFilePath)){
// Insert image file name into database
$insert = $db->query("INSERT INTO
crime(police_Id,criminal_ID,crimeType,crimeCategory,prision,court,date,place,image,description,uploads_on,caseno)

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

<?php include("layout-top.php") ?>


<?php include("content/criminal-content.php") ?>
<?php include("layout-footer.php") ?>

Content-criminal.php

<!-- Begin Page Content -->


<div class="container-fluid d-flex justify-content-between">
<div class="body-area">
<h1 class="text-center">Add Criminal</h1>
<hr>
<div class="row">
<form method="POST" enctype="multipart/form-data">
<div class="col-sm-12">
<div class="row">
<div class="col-sm-6 form-group">
<label>First Name</label>
<input type="text" placeholder="Enter First Name Here.."
class="form-control" name="fName" required>
</div>
<div class="col-sm-6 form-group">
<label>Last Name</label>
<input type="text" placeholder="Enter Last Name Here.."
class="form-control" name="lName" required>
</div>
</div>
<div class="row">
<div class="col-sm-6 form-group">
<label>Father's Name</label>
<input type="text" placeholder="Enter Father's Name Here.."
class="form-control" name="fathersName" required>
</div>
<div class="col-sm-6 form-group">
<label>Mother's Name</label>
<input type="text" placeholder="Enter Mother's Name Here.."
class="form-control" name="mothersName" required>
</div>
</div>
<div class="row">
<div class="col-sm-6 form-group">
<label>Contact No</label>
<input type="text" placeholder="Enter Here.."
class="form-control" name="contactno" >
</div>
<div class="col-sm-6 form-group">
<label>Mark Symbol</label>
<input type="text" placeholder="Enter Here.."
class="form-control" name="symbol" >
</div>
</div>
<!-- <div class="row">
<div class="col-sm-4 form-group">
<label>Height</label>
<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>

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 ">

<!-- 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>

<!-- Divider -->


<hr class="sidebar-divider my-0">

<!-- Nav Item - Dashboard -->


<li class="nav-item">
<a class="nav-link" href="">

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'])) {

// File upload path


$targetDir = "uploads/criminal/";
$fileName = basename($_FILES["image"]["name"]);
$targetFilePath = $targetDir . $fileName;
$fileType = pathinfo($targetFilePath,PATHINFO_EXTENSION);

$allowTypes = array('jpg','png','jpeg','gif','pdf');

$fname = ucfirst(mysqli_real_escape_string($db, $_POST['fName']));


$lname = ucfirst(mysqli_real_escape_string($db, $_POST['lName']));
$height = mysqli_real_escape_string($db, $_POST['height']);
$weight = mysqli_real_escape_string($db, $_POST['weight']);
$ecolor = ucfirst(mysqli_real_escape_string($db, $_POST['eColor']));
$address = ucfirst(mysqli_real_escape_string($db, $_POST['address']));
$city = ucfirst(mysqli_real_escape_string($db, $_POST['city']));
$state = ucfirst(mysqli_real_escape_string($db, $_POST['state']));
$zip = mysqli_real_escape_string($db, $_POST['zip']);
$phone = mysqli_real_escape_string($db, $_POST['pNumber']);
$date = mysqli_real_escape_string($db, $_POST['date']);
$email = mysqli_real_escape_string($db, $_POST['email']);
$fathersName = mysqli_real_escape_string($db, $_POST['fathersName']);
$mothersName = mysqli_real_escape_string($db, $_POST['mothersName']);
$contactno = mysqli_real_escape_string($db, $_POST['contactno']);
$symbol = mysqli_real_escape_string($db, $_POST['symbol']);

// Allow certain file formats


$allowTypes = array('jpg','png','jpeg','gif','pdf');
if(in_array($fileType, $allowTypes)){
// Upload file to server
if(move_uploaded_file($_FILES["image"]["tmp_name"], $targetFilePath)){
// Insert image file name into database
$insert = $db->query("INSERT INTO
criminal(fName,lName,height,weight,eayColor,address,city,state,zipCode,poneNumber,dateOFbirth,email,image,uploads_on,fath
ersName,mothersName,contactno,symbol)

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

<!-- Begin Page Content -->


<div class="container-fluid d-flex justify-content-between">
<div class="body-area w-100 pr-5">
<h1 class="text-center">Add Court</h1>
<hr>
<form method="post">
<div class="form-group">
<label for="exampleFormControlInput2"> Court Name</label>
<input name="Name" type="text" class="form-control" id="exampleFormControlInput2" required>
</div>

<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 ">

<!-- 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>

<!-- Divider -->


<hr class="sidebar-divider my-0">

<!-- Nav Item - Dashboard -->


<li class="nav-item">
<a class="nav-link" href="">
<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());
}

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

<!-- Begin Page Content -->


<div class="container-fluid d-flex justify-content-between">
<div class="body-area w-100 pr-5">
<h1 class="text-center">Add Prison </h1>
<hr>
<form method="post">
<div class="form-group">
<label for="exampleFormControlInput2"> Prison Name</label>
<input name="Name" type="text" class="form-control" id="exampleFormControlInput2" required>
</div>

<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 ">

<!-- 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>

<!-- Divider -->


<hr class="sidebar-divider my-0">

<!-- Nav Item - Dashboard -->


<li class="nav-item">
<a class="nav-link" href="">
<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());
}

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

<!-- Begin Page Content -->


<div class="container-fluid d-flex justify-content-between">
<div class="body-area w-100 pr-5">
<h1 class="text-center">Add Court Type</h1>
<hr>
<form method="post">
<div class="form-group">
<label for="exampleFormControlInput2"> Court Name</label>
<input name="Name" type="text" class="form-control" id="exampleFormControlInput2" required>
</div>

<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 ">

<!-- 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>

<!-- Divider -->


<hr class="sidebar-divider my-0">

<!-- Nav Item - Dashboard -->


<li class="nav-item">
<a class="nav-link" href="">
<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());
}

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

<!-- Begin Page Content -->


<div class="container-fluid d-flex justify-content-between">
<div class="body-area">
<h1 class="text-center">Add Police</h1>
<hr>
<div class="row">
<form method="POST" enctype="multipart/form-data">
<div class="col-sm-12">
<div class="row">
<div class="col-sm-6 form-group">
<label>Job ID</label>
<input type="text" placeholder="Enter Job Id Here.."
class="form-control" name="jobid" required>
</div>
<div class="col-sm-6 form-group">
<label>Police Station</label>
<input type="text" placeholder="Enter Police Station Here.."
class="form-control" name="polisestation" required>
</div>
</div>
<div class="row">
<div class="col-sm-6 form-group">
<label>First Name</label>
<input type="text" placeholder="Enter First Name Here.."
class="form-control" name="fName" required>
</div>
<div class="col-sm-6 form-group">
<label>Last Name</label>
<input type="text" placeholder="Enter Last Name Here.."
class="form-control" name="lName" required>
</div>
</div>
<div class="row">
<div class="col-sm-4 form-group">
<label>Height</label>

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>

<!-- Divider -->


<hr class="sidebar-divider my-0">

<!-- Nav Item - Dashboard -->


<li class="nav-item">
<a class="nav-link" href="">
<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['addpolice'])) {

// File upload path


$targetDir = "uploads/police/";
$fileName = basename($_FILES["image"]["name"]);
$targetFilePath = $targetDir . $fileName;
$fileType = pathinfo($targetFilePath,PATHINFO_EXTENSION);

$allowTypes = array('jpg','png','jpeg','gif','pdf');

$jobId = ucfirst(mysqli_real_escape_string($db, $_POST['jobid']));


$PoliceStation = ucfirst(mysqli_real_escape_string($db, $_POST['polisestation']));
$fname = ucfirst(mysqli_real_escape_string($db, $_POST['fName']));
$lname = ucfirst(mysqli_real_escape_string($db, $_POST['lName']));
$height = mysqli_real_escape_string($db, $_POST['height']);
$weight = mysqli_real_escape_string($db, $_POST['weight']);
$ecolor = ucfirst(mysqli_real_escape_string($db, $_POST['eColor']));
$address = ucfirst(mysqli_real_escape_string($db, $_POST['address']));
$city = ucfirst(mysqli_real_escape_string($db, $_POST['city']));
$state = ucfirst(mysqli_real_escape_string($db, $_POST['state']));
$zip = mysqli_real_escape_string($db, $_POST['zip']);
$phone = mysqli_real_escape_string($db, $_POST['pNumber']);
$date = mysqli_real_escape_string($db, $_POST['date']);
$email = mysqli_real_escape_string($db, $_POST['email']);
$web = mysqli_real_escape_string($db, $_POST['website']);

// Allow certain file formats


$allowTypes = array('jpg','png','jpeg','gif','pdf');
if(in_array($fileType, $allowTypes)){
// Upload file to server
if(move_uploaded_file($_FILES["image"]["tmp_name"], $targetFilePath)){

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

<!-- Begin Page Content -->


<div class="container-fluid d-flex justify-content-between">
<div class="body-area w-100 pr-5">
<h1 class="text-center">Add Crime Type</h1>
<hr>
<form method="post">
<div class="form-group">
<label for="exampleFormControlInput2"> Crime Type</label>
<input name="Name" type="text" class="form-control" id="exampleFormControlInput2" required>
</div>

<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 ">

<!-- 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>

<!-- Divider -->


<hr class="sidebar-divider my-0">

<!-- Nav Item - Dashboard -->


<li class="nav-item">
<a class="nav-link" href="">
<i class="fas fa-fw fa-tachometer-alt"></i>

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']);

// form validation: ensure that the form is correctly filled


if (empty($fName)) { array_push($errors, "First Name is required"); }
if (empty($lName)) { array_push($errors, "Last Name is required"); }
if (empty($username)) { array_push($errors, "Username is required"); }
if (empty($email)) { array_push($errors, "Email is required"); }
if (empty($password_1)) { array_push($errors, "Password is required"); }

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

<!-- Sidebar -->


<ul class="navbar-nav bg-gradient-danger sidebar sidebar-dark accordion" id="accordionSidebar">

<!-- Sidebar - Brand -->


<a class="sidebar-brand d-flex align-items-center justify-content-center" href="home.php">
<div class="sidebar-brand-icon rotate-n-15">
<i class="fas fa-gavel"></i>
</div>

68 | P a g e
<div class="sidebar-brand-text mx-3">CRIME</div>
</a>

<!-- Divider -->


<hr class="sidebar-divider my-0">

<!-- Nav Item - Dashboard -->


<li class="nav-item active">
<a class="nav-link" href="home.php">
<i class="fas fa-fw fa-tachometer-alt"></i>
<span>Dashboard</span></a>
</li>

<!-- Divider -->


<hr class="sidebar-divider">

<!-- Heading -->


<div class="sidebar-heading">
Crime Information
</div>
<?php
if($_SESSION['userRoll'] != "court"){
?>
<!-- Nav Item - Pages Collapse Menu -->
<li class="nav-item">
<a class="nav-link collapsed" href="#" data-toggle="collapse" data-target="#collapseTwo" aria-expanded="true"
aria-controls="collapseTwo">
<i class="fas fa-fw fa-cog"></i>
<span>Criminal</span>
</a>
<div id="collapseTwo" class="collapse" aria-labelledby="headingTwo" data-parent="#accordionSidebar">
<div class="bg-white py-2 collapse-inner rounded">
<a class="collapse-item" href="report-criminal.php">Criminal List</a>
<a class="collapse-item" href="page-criminal.php">Add Criminal</a>
</div>
</div>
</li>

<!-- 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>
<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-crime.php">Add Crime</a>
</div>
</div>
</li>
<?php
};
?>

<?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
};
?>

<!-- Heading -->


<div class="sidebar-heading">
Addons
</div>

<!-- Nav Item - Pages Collapse Menu -->


<li class="nav-item">
<a class="nav-link" href="#" data-toggle="collapse" data-target="#collapsePages" aria-expanded="true"
aria-controls="collapsePages">
<i class="fas fa-fw fa-folder"></i>
<span>Report</span>
</a>
<div id="collapsePages" class="collapse" aria-labelledby="headingPages" data-parent="#accordionSidebar">
<div class="bg-white py-2 collapse-inner rounded">
<a class="collapse-item" href="report-crime.php">Crime Report</a>
<a class="collapse-item" href="report-criminal.php">Criminal Report</a>
<?php
if($_SESSION['userRoll'] == "admin"){
?>
<a class="collapse-item" href="report-police.php">Police List</a>
<?php
}else{}
?>
</div>
</div>
</li>
<hr class="sidebar-divider">
<?php
if($_SESSION['userRoll'] == "admin"){
?>
<!-- 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="admin-addpolice.php">Add Police</a>
<a class="collapse-item" href="admin-crimetype.php">Add Crime Type</a>
<a class="collapse-item" href="admin-crimecategory.php">Criminal Category</a>
<a class="collapse-item" href="admin-addprision.php">Add Prison</a>
<a class="collapse-item" href="admin-addcourt.php">Add Court</a>
<!-- <a class="collapse-item" href="admin-addcourttype.php">Add Court Type</a>-->
<a class="collapse-item" href="register.php">Create an Account!</a>
</div>
</div>
</li>
<!-- Divider -->
<hr class="sidebar-divider d-none d-md-block">
<?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">

<div id="collapseadminPages" class="collapse" aria-labelledby="headingPages" data-parent="#accordionSidebar">


</div>
</li>
<!-- Divider -->
<hr class="sidebar-divider d-none d-md-block">
<?php
}
?>

<!-- Sidebar Toggler (Sidebar) -->


<div class="text-center d-none d-md-inline">
<button class="rounded-circle border-0" id="sidebarToggle"></button>
</div>

</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">

<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-7">
<div class="p-5">
<div class="text-center">
<h1 class="h4 text-gray-900 mb-4">Create an Account!</h1>

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">

<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-7">
<div class="p-5">
<div class="text-center">
<h1 class="h4 text-gray-900 mb-4">Create an Account!</h1>
</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" placeholder="User Name"name="username"
id="username" value="">
<span id="availability"></span>
</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" >
<option value="subuser">Sub Admin</option>
<option value="user">Normal User</option>
<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>

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

<!-- Topbar -->


<nav class="navbar navbar-expand navbar-light bg-white topbar mb-4 static-top shadow">

<!-- Sidebar Toggle (Topbar) -->


<button id="sidebarToggleTop" class="btn btn-link d-md-none rounded-circle mr-3">
<i class="fa fa-bars"></i>
</button>

<!-- Topbar Search


<form class="d-none d-sm-inline-block form-inline mr-auto ml-md-3 my-2 my-md-0 mw-100 navbar-search">
<div class="input-group">
<input type="text" class="form-control bg-light border-0 small" placeholder="Search for..."
aria-label="Search" aria-describedby="basic-addon2">
<div class="input-group-append">
<button class="btn btn-danger" type="button">
<i class="fas fa-search fa-sm"></i>
</button>
</div>
</div>
</form> -->
<?php

74 | P a g e
function binarySearch($array, $value) {
$left = 0;
$right = count($array) - 1;

while ($left <= $right) {


$midpoint = (int) floor(($left + $right) / 2);

if ($array[$midpoint] < $value) {


$left = $midpoint + 1;
} elseif ($array[$midpoint] > $value) {
$right = $midpoint - 1;
} else {
return $midpoint;
}
}
return NULL;
}

?>

<!-- Topbar Navbar -->


<ul class="navbar-nav ml-auto">

<!-- Nav Item - Search Dropdown (Visible Only XS) -->


<li class="nav-item dropdown no-arrow d-sm-none">
<a class="nav-link dropdown-toggle" href="#" id="searchDropdown" role="button" data-toggle="dropdown"
aria-haspopup="true" aria-expanded="false">
<i class="fas fa-search fa-fw"></i>
</a>
<!-- Dropdown - Messages -->
<div class="dropdown-menu dropdown-menu-right p-3 shadow animated--grow-in"
aria-labelledby="searchDropdown">
<form class="form-inline mr-auto w-100 navbar-search">
<div class="input-group">
<input type="text" class="form-control bg-light border-0 small" placeholder="Search for..."
aria-label="Search" aria-describedby="basic-addon2">
<div class="input-group-append">
<button class="btn btn-primary" type="button">
<i class="fas fa-search fa-sm"></i>
</button>
</div>
</div>

</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

<?php if (count($errors) > 0) : ?>


<div class="error">
<?php foreach ($errors as $error) : ?>
<p><?php echo $error ?></p>
<?php endforeach ?>
</div>
<?php endif ?>

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">

<!-- Page Wrapper -->


<div id="wrapper">

<?php
if($_SESSION['userRoll'] != "user"){
include("sidenav.php");
}

?>

<!-- Content Wrapper -->


<div id="content-wrapper" class="d-flex flex-column">

<!-- Main Content -->


<div id="content">
<?php include("topvar.php")?>

Layout-footer.php

</div>
<!-- End of Main Content -->

<!-- Footer -->


<footer class="sticky-footer bg-white">
<div class="container my-auto">
<div class="copyright text-center my-auto">
<span>Copyright &copy; Your Website 2019</span>
</div>

76 | P a g e
</div>
</footer>
<!-- End of Footer -->

</div>
<!-- End of Content Wrapper -->

</div>
<!-- End of Page Wrapper -->

<!-- Scroll to Top Button-->


<a class="scroll-to-top rounded" href="#page-top">
<i class="fas fa-angle-up"></i>
</a>
<?php
include("footer.php");
?>

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');

// File upload path


$targetDir = "uploads/";
$fileName = basename($_FILES["image"]["name"]);
$targetFilePath = $targetDir . $fileName;
$fileType = pathinfo($targetFilePath,PATHINFO_EXTENSION);

if(isset($_POST["submit"]) && !empty($_FILES["image"]["name"])){


// Allow certain file formats
$allowTypes = array('jpg','png','jpeg','gif','pdf');
if(in_array($fileType, $allowTypes)){
// Upload file to server
if(move_uploaded_file($_FILES["image"]["tmp_name"], $targetFilePath)){
// Insert image file name into database
$insert = $db->query("INSERT into images (image, uploaded_on) VALUES ('".$fileName."', NOW())");
if($insert){
$statusMsg = "The file ".$fileName. " has been uploaded successfully.";

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.';
}

// Display status message


echo $statusMsg;
?>

Logout.php

<?php
session_start();
session_destroy();
header('location: login.php');

Criminalsystem.sql

-- phpMyAdmin SQL Dump


-- version 4.8.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 20, 2019 at 09:49 PM
-- Server version: 10.1.37-MariaDB
-- PHP Version: 7.3.0

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";


SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;


/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;

--
-- Database: `criminalsystem`
--

-- --------------------------------------------------------

--
-- Table structure for table `court`
--

CREATE TABLE `court` (


`id` int(11) NOT NULL,
`name` varchar(250) NOT NULL,
`description` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `court`

78 | P a g e
--

INSERT INTO `court` (`id`, `name`, `description`) VALUES


(18, 'Supreme Court ( mida ugu sareysa )', 'Tan sare '),
(19, 'High Court ( Banaadir )', 'Tan sare'),
(20, 'State Court ( wadajir )', 'Tan gobolka'),
(21, 'Court of Appeal ( Racfaanka )', 'Racfaanka'),
(22, 'Court for Verdict in Banadir', ''),
(23, 'Ifka Halan Court', ''),
(24, 'Huruwa Court', ''),
(25, 'Suuq Xoolaha Court', ''),
(26, 'Karan Court', ''),
(27, 'Medina Court', ''),
(28, 'Towfiq Court ', ''),
(29, 'SiiSii Court ', ''),
(30, 'Harariyale Court', ''),
(31, 'Dabaqayn Court ', ''),
(32, 'Polytechnic Court ', ''),
(33, 'Gubta', ''),
(34, 'Yaqshid Court ', ''),
(35, 'Tabuuk Court ', ''),
(36, 'Al-Hudaa Court ', ''),
(37, 'Al Bayaan Court ', ''),
(38, 'Al-Furqan Court ', ''),
(39, 'Daynile Court ', ''),
(40, 'Shiirkoole (Circolo) Court ', ''),
(41, 'Al-Cadaala Court ', ''),
(42, 'Alfaruq Court ', '');

-- --------------------------------------------------------

--
-- Table structure for table `courttype`
--

CREATE TABLE `courttype` (


`id` int(11) NOT NULL,
`name` varchar(250) NOT NULL,
`description` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `crime`
--

CREATE TABLE `crime` (


`id` int(11) NOT NULL,
`caseno` varchar(250) NOT NULL,
`punishment` varchar(250) DEFAULT NULL,
`criminal_ID` int(11) DEFAULT NULL,
`crimeType` varchar(250) DEFAULT NULL,
`crimeCategory` varchar(250) DEFAULT NULL,
`prision` varchar(250) DEFAULT NULL,
`court` varchar(250) DEFAULT NULL,
`date` date DEFAULT NULL,
`place` varchar(250) DEFAULT NULL,
`description` longtext,
`police_Id` int(11) DEFAULT NULL,
`image` varchar(250) DEFAULT NULL,
`uploads_on` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- 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`
--

CREATE TABLE `crimecategory` (


`id` int(11) NOT NULL,
`name` varchar(250) NOT NULL,
`description` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `crimecategory`
--

INSERT INTO `crimecategory` (`id`, `name`, `description`) VALUES


(5, 'Organized Crime', 'Mid abaabulan'),
(6, 'Personal Crime ', 'Mid kali ah');

-- --------------------------------------------------------

--
-- Table structure for table `crimetype`
--

CREATE TABLE `crimetype` (


`id` int(11) NOT NULL,
`name` varchar(250) NOT NULL,
`description` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- 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`
--

CREATE TABLE `criminal` (


`id` int(11) NOT NULL,
`fName` varchar(250) NOT NULL,
`lName` varchar(250) NOT NULL,
`height` varchar(50) DEFAULT NULL,
`weight` varchar(50) DEFAULT NULL,
`eayColor` varchar(100) DEFAULT NULL,
`address` varchar(250) DEFAULT NULL,
`city` varchar(250) DEFAULT NULL,
`state` varchar(250) DEFAULT NULL,
`zipCode` varchar(200) DEFAULT NULL,
`poneNumber` varchar(50) DEFAULT NULL,
`dateOFbirth` date DEFAULT NULL,
`email` varchar(200) DEFAULT NULL,
`website` varchar(200) DEFAULT NULL,
`image` varchar(250) DEFAULT NULL,
`uploads_on` datetime NOT NULL,
`fathersName` varchar(250) NOT NULL,
`mothersName` varchar(250) NOT NULL,
`contactno` varchar(20) NOT NULL,
`symbol` varchar(250) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- 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`
--

CREATE TABLE `images` (


`id` int(11) NOT NULL,
`image` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`uploaded_on` datetime NOT NULL,
`status` enum('1','0') COLLATE utf8_unicode_ci NOT NULL DEFAULT '1'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `police`
--

CREATE TABLE `police` (


`id` int(11) NOT NULL,
`fName` varchar(250) DEFAULT NULL,
`lName` varchar(250) DEFAULT NULL,
`height` varchar(50) DEFAULT NULL,
`weight` varchar(50) DEFAULT NULL,
`eayColor` varchar(100) DEFAULT NULL,
`address` varchar(250) DEFAULT NULL,
`city` varchar(250) DEFAULT NULL,
`state` varchar(250) DEFAULT NULL,
`zipCode` varchar(200) DEFAULT NULL,
`poneNumber` varchar(50) DEFAULT NULL,
`dateOFbirth` date DEFAULT NULL,
`email` varchar(200) DEFAULT NULL,
`website` varchar(200) DEFAULT NULL,
`image` varchar(250) DEFAULT NULL,
`uploads_on` datetime NOT NULL,
`jobid` varchar(200) NOT NULL,
`polisestation` varchar(250) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- 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`
--

CREATE TABLE `prision` (


`id` int(11) NOT NULL,
`name` varchar(250) NOT NULL,
`description` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `prision`
--

INSERT INTO `prision` (`id`, `name`, `description`) VALUES


(12, 'Juvenile', 'Tan caruurta'),
(13, 'Military ', 'Xabsiga ciidanka'),
(14, 'State prison', 'Xabsiga gobolka'),
(15, 'District Jail', 'Xabsiga degmada '),
(16, 'Hamar weyne pirson', ''),
(17, 'Hodan prison ', ''),
(18, 'Wadajir prison ', ''),
(19, 'Abdi-aziz prison ', ''),
(20, 'Warta nabada prison', ''),
(21, 'Afgoye prison', ''),
(22, 'Waaberi prison', ''),
(23, 'Hamar jab jab prison ', ''),
(24, 'Dayniile prison', ''),
(25, 'Hamar bile prison', ''),
(26, 'Boosaaso prison ', ''),
(27, 'Garowe prison', ''),
(28, 'Cadaado prison', ''),
(29, 'Dhuusamareb prison', ''),
(30, 'Yaaqshid prison', ''),
(31, 'Baladweyn prison', ''),
(32, 'Beydhaba prison', ''),
(33, 'Marka prison', ''),
(34, 'Shalanbood prison', ''),
(35, 'Deynuunay prison', ''),
(36, 'Kismayo prison', ''),
(37, 'Baraawe prison', '');

-- --------------------------------------------------------

--
-- Table structure for table `roletype`
--

CREATE TABLE `roletype` (


`id` int(11) NOT NULL,

83 | P a g e
`name` varchar(250) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `roletype`
--

INSERT INTO `roletype` (`id`, `name`) VALUES


(1, 'admin'),
(2, 'police'),
(4, 'court');

-- --------------------------------------------------------

--
-- Table structure for table `users`
--

CREATE TABLE `users` (


`id` int(11) NOT NULL,
`fName` varchar(250) DEFAULT NULL,
`lName` varchar(250) DEFAULT NULL,
`username` varchar(100) NOT NULL,
`email` varchar(100) NOT NULL,
`password` varchar(100) NOT NULL,
`userRoll` varchar(250) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- 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;

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;


/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

86 | P a g e
87 | P a g e

You might also like