FIR Management
FIR Management
COMPUTER PROJECT
[FIR MANAGEMENT]
This software is designed for Cops. It stores the details regarding
criminals & there Judgement progress.
FIR MANAGEMENT
2012
ASSESSMENT
NAME: - Shiv Pratap Singh
CLASS: - XII
ROLL NO: SUBJECT: - Computer Project
TOPIC: - Project on FIR Management.
SESSION: - 2011-2012
SCHOOL: - Rani Laxmi Bai Group of Memorial Colleges
COMPUTER PROJECT
REMARKS: -
FIR MANAGEMENT
2012
Acknowledgement
I want to express my sincere gratitude to our Principal Mrs.
Preeti Kudesia and my Computer Teacher Mrs. Meetu
Nishad for her guidance, encouragement and kind
cooperation without which my first ever Computer project
wont have been possible.
I am also grateful to my brother for his valuable help for the
preparation of this project.
COMPUTER PROJECT
Roll No.
FIR MANAGEMENT
2012
BONAFIDE CERTIFICATE
TEACHER SIGNATURE..
COMPUTER PROJECT
PRINCIPAL SIGNATURE
FIR MANAGEMENT
2012
CONTENTS
Header files
Class Definition
Input function
Display function
Search function
Modify function
Update function
Delete function
Help
About
Password
COMPUTER PROJECT
Main function
FIR MANAGEMENT
2012
/*************************HEADER FILES*************************/
#include<iostream.h>
#include<dos.h>
#include<process.h>
#include<fstream.h>
#include<conio.h>
#include<string.h>
#include<stdio.h>
#include<ctype.h>
/***********************CLASS DEFINITION***********************/
class FIR
{
char fname[20];
char firno[10];
char det[80];
char crime_no[80];
char police_stationcode[80];
char convict_name[80];
char s_o[80];
char add[80];
char crime[80];
char crime_date[80];
char crime_time[80];
char undersection[80];
char state_versus[80];
char court_decision[80];
char sentence[80];
char region[80];
char investigation[80];
public:
}cc;
COMPUTER PROJECT
void create();
void display();
void search();
void modify();
void update();
void remov();
void input();
void help();
void about();
int password();
FIR MANAGEMENT
2012
void FIR::input()
{
clrscr();
gotoxy(25,7);
delay(500);
cout<<".....CREATE FIR MENU.....\n";
gotoxy(25,9);
cout<<"=========================\n\n";
delay(500);
cout<<"\n\tCrime No.:\t";
cin>>cc.crime_no;
cout<<"\n\tPolice Station Code:\t";
cin>>cc.police_stationcode;
cout<<"\n\tRegion:\t";
gets(cc.region);
cout<<"\n\tConvict Name:\t";
gets(cc.convict_name);
cout<<"\n\tSon Of (s/o):\t";
gets(cc.s_o);
cout<<"\n\tAddress:\t";
gets(cc.add);
cout<<"\n\tCrime:\t";
gets(cc.crime);
cout<<"\n\tDate Of Crime:\t";
gets(cc.crime_date);
cout<<"\n\tTime Of Crime:\t";
gets(cc.crime_time);
cout<<"\n\tUndersection (u/s):\t";
gets(cc.undersection);
cout<<"\n\tState Versus (s/v):\t";
gets(cc.state_versus);
cout<<"\n\tInvestigation Progress:-\t";
gets(cc.investigation);
cout<<"\n\tCourt Decision:\t";
gets(cc.court_decision);
cout<<"\n\tSentence:\t";
gets(cc.sentence);
gotoxy(20,50);
cout<<"======================================";
}
COMPUTER PROJECT
/************************INPUT FUNCTION*************************/
FIR MANAGEMENT
2012
void FIR::display()
{
clrscr();
gotoxy(25,7);
delay(500);
cout<<".....DISPLAY MENU.....\n";
gotoxy(25,9);
cout<<"======================\n";
gotoxy(20,12);
delay(500);
cout<<"Enter FIR Name To Be Displayed\n\n\t\t";
cin>>cc.fname;
strcat(cc.fname,".dat");
COMPUTER PROJECT
2012
ifstream i;
i.open(cc.fname,ios::in|ios::out|ios::binary|ios::nocreate);
if(!i)
{
delay(500);
cout<<"\n\n\t\tCan't Open FIR.....\a";
goto l;
}
while(i.read((char*)&cc,sizeof(cc)))
{
clrscr();
gotoxy(25,7);
delay(500);
cout<<".....DISPLAY MENU.....\n";
gotoxy(25,9);
cout<<"======================\n";
gotoxy(25,12);
delay(500);
cout<<"\n\tCrime No.:\t";
cout<<cc.crime_no;
delay(500);
cout<<"\n\n\tPolice Station Code:\t";
cout<<cc.police_stationcode;
delay(500);
cout<<"\n\n\tRegion:\t";
cout<<cc.region;
delay(500);
cout<<"\n\n\tConvict Name:\t";
cout<<cc.convict_name;
delay(500);
cout<<"\n\n\tSon Of (s/o):\t";
cout<<cc.s_o;
delay(500);
cout<<"\n\n\tAddress:\t";
cout<<cc.add;
delay(500);
cout<<"\n\n\tCrime:\t";
cout<<cc.crime;
delay(500);
cout<<"\n\n\tDate Of Crime:\t";
cout<<cc.crime_date;
delay(500);
cout<<"\n\n\tTime Of Crime:\t";
cout<<cc.crime_time;
delay(500);
cout<<"\n\n\tUndersection (u/s):\t";
cout<<cc.undersection;
delay(500);
cout<<"\n\n\tTState Versus (s/v):\t";
cout<<cc.state_versus;
COMPUTER PROJECT
FIR MANAGEMENT
FIR MANAGEMENT
2012
delay(500);
cout<<"\n\n\tInvestigation Progress:-\t";
cout<<cc.investigation;
delay(500);
cout<<"\n\n\tCourt Decision:\t";
cout<<cc.court_decision;
delay(500);
cout<<"\n\n\tSentence:\t";
cout<<cc.sentence;
gotoxy(20,50);
cout<<"=====================================";
getch();
}
l:
i.close();
}
/************************SEARCH FIR FUNCTION**********************/
COMPUTER PROJECT
void FIR::search()
{
clrscr();
gotoxy(25,7);
delay(500);
cout<<".....SEARCH MENU......\n";
gotoxy(25,9);
cout<<"======================\n";
gotoxy(20,12);
delay(500);
cout<<"Enter FIR Name To Be Searched\n\n\t\t";
cin>>cc.fname;
strcat(cc.fname,".dat");
ifstream i;
i.open(cc.fname,ios::in|ios::out|ios::binary|ios::nocreate);
if(!i)
{
delay(500);
cout<<"\n\n\t\tFIR Not Found!\a";
}
else
{
delay(500);
cout<<"\n\n\t\tFIR Found....";
}
i.close();
10
FIR MANAGEMENT
2012
void FIR::modify()
{
clrscr();
int m;
gotoxy(25,7);
delay(500);
cout<<".....MODIFICATION MENU.....\n";
gotoxy(25,9);
cout<<"===========================\n";
gotoxy(20,12);
delay(500);
cout<<"Enter FIR Name To Be Modified\n\n\t\t";
cin>>cc.fname;
strcat(cc.fname,".dat");
ofstream oo;
oo.open(cc.fname,ios::in|ios::out|ios::binary|ios::nocreate);
if(!oo)
{
delay(500);
cout<<"\n\n\t\tCan't Open FIR.....\a";
goto z;
}
else
{
clrscr();
gotoxy(25,7);
delay(500);
cout<<".....MODIFICATION MENU.....";
gotoxy(25,9);
cout<<"===========================\n";
gotoxy(25,12);
delay(500);
cout<<"\nFIR Opened\n";
gotoxy(25,15);
delay(500);
cout<<"Detail To Be Modified\n";
do
{
clrscr();
gotoxy(25,7);
delay(500);
cout<<".....MODIFICATION MENU.....";
gotoxy(25,9);
cout<<"===========================\n";
oo.open(cc.fname,ios::in|ios::out|ios::binary|ios::nocreate);
COMPUTER PROJECT
11
delay(500);
gotoxy(30,12);
cout<<"1.Crime_No\n";
delay(500);
gotoxy(30,14);
cout<<"2.Police_Stationcode\n";
delay(500);
gotoxy(30,16);
cout<<"3.Region\n";
delay(500);
gotoxy(30,18);
cout<<"4.Convict Name\n";
delay(500);
gotoxy(30,20);
cout<<"5.S/O\n";
delay(500);
gotoxy(30,22);
cout<<"6.Address\n";
delay(500);
gotoxy(30,24);
cout<<"7.Crime\n";
delay(500);
gotoxy(30,26);
cout<<"8.Crime_Date\n";
delay(500);
gotoxy(30,28);
cout<<"9.Crime_Time\n";
delay(500);
gotoxy(30,30);
cout<<"10.Undersection\n";
delay(500);
gotoxy(30,32);
cout<<"11.State_Versus\n";
delay(500);
gotoxy(30,34);
cout<<"12.Investigation\n";
delay(500);
gotoxy(30,36);
cout<<"13.Court Decision\n";
delay(500);
gotoxy(30,38);
cout<<"14.Sentence\n";
delay(500);
gotoxy(30,40);
cout<<"15.Exit\n";
delay(500);
gotoxy(30,42);
cout<<"Enter Your Choice";
delay(500);
gotoxy(20,44);
cout<<"======================================";
gotoxy(30,46);
cin>>m;
switch(m)
{
case 1: delay(500);
cout<<"\n\tCrime No.:-\t";
cin>>cc.crime_no;
break;
case 2: delay(500);
cout<<"\n\tPolice Station Code:-\t";
cin>>cc.police_stationcode;
break;
case 3: delay(500);
cout<<"\n\tRegion:-\t";
gets(cc.region);
break;
2012
COMPUTER PROJECT
FIR MANAGEMENT
12
case 4: delay(500);
cout<<"\n\tConvict Name:-\t";
gets(cc.convict_name);
break;
case 5: delay(500);
cout<<"\n\tSon Of (s/o):-\t";
gets(cc.s_o);
break;
case 6: delay(500);
cout<<"\n\tAddress:-\t";
gets(cc.add);
break;
case 7: delay(500);
cout<<"\n\tCrime:-\t";
gets(cc.crime);
break;
case 8: delay(500);
cout<<"\n\tDate Of Crime:-\t";
gets(cc.crime_date);
break;
case 9: delay(500);
cout<<"\n\tTime Of Crime:-\t";
gets(cc.crime_time);
break;
case 10:delay(500);
cout<<"\n\tUndersection (u/s):-\t";
gets(cc.undersection);
break;
case 11:delay(500);
cout<<"\n\tTState Versus (s/v):-\t";
gets(cc.state_versus);
break;
case 12:delay(500);
cout<<"\n\tInvesigaion Progress:-\t";
gets(cc.investigation);
break;
case 13:delay(500);
cout<<"\n\tCourt Decision:-\t";
gets(cc.court_decision);
break;
case 14:delay(500);
cout<<"\n\tSentence:-\t";
gets(cc.sentence);
break;
case 15:break;
default:delay(500);
cout<<"Wrong Choice";
break;
}
oo.write((char*)&cc,sizeof(cc));
2012
COMPUTER PROJECT
FIR MANAGEMENT
13
FIR MANAGEMENT
2012
oo.close();
}
while(m<15);
}
z:
oo.close();
}
/************************UPDATE FIR FUNCTION**********************/
void FIR::update()
{
clrscr();
int m;
gotoxy(25,7);
delay(500);
cout<<".....UPDATE MENU.....\n";
gotoxy(25,9);
cout<<"=====================\n";
gotoxy(20,12);
delay(500);
cout<<"Enter FIR Name To Be Updated\n\n\t\t";
cin>>cc.fname;
strcat(cc.fname,".dat");
fstream u;
u.open(cc.fname,ios::in|ios::out|ios::binary|ios::app|ios::nocreate
);
if(!u)
{
delay(500);
cout<<"\n\n\t\tCan't Open FIR......\a";
goto z;
}
else
{
cc.input();
u.write((char*)&cc,sizeof(cc));
}
z:
u.close();
COMPUTER PROJECT
14
FIR MANAGEMENT
2012
void FIR::remov()
{
clrscr();
gotoxy(25,7);
delay(500);
cout<<".....DELETE MENU.....\n";
gotoxy(25,9);
cout<<"======================\n";
gotoxy(20,12);
delay(500);
cout<<"Enter FIR To Be Deleted\n\n\t\t";
cin>>cc.fname;
strcat(cc.fname,".dat");
if(remove(cc.fname)==0)
{
delay(500);
cout<<"\n\n\t\tFIR Deleted..";
}
else
{
delay(500);
cout<<"\n\n\t\tFIR Not Found!\a";
}
}
COMPUTER PROJECT
/************************HELP FUNCTION****************************/
15
FIR MANAGEMENT
2012
{
delay(300);
cout<<"\t";
h.getline(he,80);
cout<<he<<"\n";
}
e:
h.close();
getch();
}
void FIR::about()
{
clrscr();
char ab[80];
ifstream a;
gotoxy(30,30);
delay(500);
cout<<"
INFORMATION";
gotoxy(30,32);
cout<<"
=============";
a.open("about.txt");
if(!a)
{
delay(300);
gotoxy(20,0);
cout<<"Can't Open About\a";
gotoxy(20,2);
cout<<"File Not Found!";
goto e;
}
while(!a.eof())
{
delay(500);
cout<<"\t\t";
a.getline(ab,80);
cout<<ab<<"\n";
}
e:
a.close();
getch();
}
/************************PASSWORD FUNCTION**********************/
int FIR::password()
COMPUTER PROJECT
/************************ABOUT FUNCTION**************************/
16
FIR MANAGEMENT
2012
clrscr();
char neww[100] = {0},user[100]="shiv";
char user1[100], pass[] = "password", c;
int p = 0,f=0;
gotoxy(30,10);
delay(100);
cout<<"..LOG IN..\n";
for(int i=0;i<3;i++)
{
clrscr();
gotoxy(30,10);
delay(100);
cout<<"..LOG IN..\n";
gotoxy(25,15);
delay(100);
cout<<"ENTER USERNAME:\t";
gets(user1);
delay(100);
gotoxy(25,20);
cout<<"ENTER PASSWORD:\t";
do
{
c = getch();
if( isprint(c) )
{
neww[ p++ ] = c;
cout<<'*';
}
else if( c == 8 && p )
{
neww[ p-- ] = '\0';
}
}while( c != 13 );
if( !strcmp(neww, pass) &&!strcmp(user,user1))
{
gotoxy(30,25);
delay(100);
cout<<"Logged on succesfully!";
getch();
f=1;
break;
}
else
{
gotoxy(30,25);
delay(100);
cout<<"Incorrect Username or Password!\a";
getch();
}
COMPUTER PROJECT
17
FIR MANAGEMENT
2012
}
if(f==1)
return 1;
else
return 0;
}
/************************MAIN FUNCTION***************************/
getch();
a=cc.password();
if(a==1)
{
clrscr();
gotoxy(25,7);
delay(500);
cout<<"...CRIME MANAGEMENT...";
gotoxy(25,9);
cout<<"=======================";
gotoxy(30,15);
@@@@@\n";
@
@\n";
@@@@@\n";
@ @@ \n";
@
@@\n";
E
T\n";
COMPUTER PROJECT
void main()
{
clrscr();
int ch,v,a=0,i;
clrscr();
gotoxy(10,10);
delay(1000);
gotoxy(10,11);cout<<"@@@@@
@@@@@
delay(1000);
gotoxy(10,12);cout<<"@@
@
delay(1000);
gotoxy(10,13);cout<<"@@@@
@
delay(1000);
gotoxy(10,14);cout<<"@@
@
delay(1000);
gotoxy(10,15);cout<<"@@ .....@@@@@ .....
delay(1000);
gotoxy(20,18);cout<<"M A N A G E M
delay(1000);
gotoxy(10,40);
cout<<"LOADING...\n\n";
for(i=0;i<80;i++)
{
cout<<'>';
delay(100);
}
cout<<"\nPress any key...";
18
2012
delay(500);
cout<<"1.MAIN MENU\n";
gotoxy(30,17);
delay(500);
cout<<"2.EXIT\n\n";
gotoxy(20,30);
cout<<"=================================";
gotoxy(10,40);
delay(500);
cin>>v;
switch(v)
{
case 1:do
{
clrscr();
delay(500);
gotoxy(25,6);
cout<<"...CRIME MANAGEMENT...";
gotoxy(25,8);
cout<<"======================";
delay(500);
gotoxy(30,10); cout<<" MAIN MENU";
delay(500);
gotoxy(30,12); cout<<"1.Open FIR";
delay(500);
gotoxy(30,14); cout<<"2.Display FIR";
delay(500);
gotoxy(30,16); cout<<"3.Search FIR";
delay(500);
gotoxy(30,18); cout<<"4.Modify FIR";
delay(500);
gotoxy(30,20); cout<<"5.Update FIR";
delay(500);
gotoxy(30,22); cout<<"6.Close FIR";
delay(500);
gotoxy(30,24); cout<<"7.Help";
delay(500);
gotoxy(30,26); cout<<"8.About";
delay(500);
gotoxy(30,28); cout<<"9.Exit";
delay(500);
gotoxy(20,30); cout<<"================================";
gotoxy(10,40);
cin>>ch;
switch(ch)
{
case 1:cc.create();
getch();
break;
case 2:cc.display();
getch();
break;
COMPUTER PROJECT
FIR MANAGEMENT
19
FIR MANAGEMENT
2012
case 3:cc.search();
getch();
break;
case 4:cc.modify();
getch();
break;
case 5:cc.update();
getch();
break;
case 6:cc.remov();
getch();
break;
case 7:cc.help();
getch();
break;
case 8:cc.about();
getch();
break;
case 9: clrscr();
gotoxy(35,25);
delay(500);
cout<<"THANK YOU";
gotoxy(35,27);
cout<<"=========";
getch();exit(0);
default:cout<<"\n\n\tWrong Choice!\a";
getch();
break;
}
}while(ch<9);
break;
case 2:clrscr();
gotoxy(35,25);
delay(500);
cout<<"THANK YOU";
gotoxy(35,27);
cout<<"=========";
getch();
exit(0);
default:cout<<"\n\n\tWrong Choice!\a";
break;
}
}
/************************END OF PROGRAM***************************/
COMPUTER PROJECT
}
getch();
20
FIR MANAGEMENT
2012
/**************************OUTPUT 1*******************************/
@@@@@
@@@@@
@@
@
@@@@
@
@@
@
@@ .....@@@@@ .....
M
@@@@@
@
@
@@@@@
@ @@
@
@@
A
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Press any key...
COMPUTER PROJECT
LOADING...
21
FIR MANAGEMENT
2012
/*************************OUTPUT 2********************************/
..LOG IN..
COMPUTER PROJECT
Logged on succesfully!
22
FIR MANAGEMENT
2012
/**************************OUTPUT 3*******************************/
...CRIME MANAGEMENT...
=======================
1.MAIN MENU
2.EXIT
=================================
COMPUTER PROJECT
23
FIR MANAGEMENT
2012
/***************************OUTPUT 4******************************/
...CRIME MANAGEMENT...
======================
MAIN MENU
1.Open FIR
2.Display FIR
3.Search FIR
4.Modify FIR
5.Update FIR
6.Close FIR
7.Help
8.About
9.Exit
================================
COMPUTER PROJECT
24
FIR MANAGEMENT
2012
/**************************OUTPUT 5*******************************/
COMPUTER PROJECT
fir1
25
FIR MANAGEMENT
2012
/**************************OUTPUT 6*******************************/
220
Region:-
Lucknow
Convict Name:-
Ram Prashad
Son Of (s/o):-
Samar Prashad
Address:-
554k\453\221
Crime:-
Murder
Date Of Crime:-
1/01/2012
Time Of Crime:-
03:56 pm
Undersection (u/s):-
307
Akash Singh
Investigation Progress:-
Pending
Court Decision:-
None
Sentence:-
None
COMPUTER PROJECT
Crime No.:-
26
FIR MANAGEMENT
2012
======================================
/**************************OUTPUT 7*******************************/
.....DISPLAY MENU.....
======================
Enter FIR Name To Be Displayed
COMPUTER PROJECT
fir1
27
FIR MANAGEMENT
2012
/**************************OUTPUT 8*******************************/
.....DISPLAY MENU.....
======================
220
Region:-
Lucknow
Convict Name:-
Ram Prashad
Son Of (s/o):-
Samar Prashad
Address:-
554k\453\221
Crime:-
Murder
Date Of Crime:-
1/01/2012
Time Of Crime:-
03:56 pm
Undersection (u/s):-
307
Akash Singh
Investigation Progress:-
Pending
Court Decision:-
None
Sentence:-
None
COMPUTER PROJECT
Crime No.:-
28
FIR MANAGEMENT
2012
=====================================
/**************************OUTPUT 9*******************************/
.....SEARCH MENU......
======================
Enter FIR Name To Be Searched
fir1
COMPUTER PROJECT
FIR Found....
29
FIR MANAGEMENT
2012
/*************************OUTPUT 10*******************************/
.....SEARCH MENU......
======================
Enter FIR Name To Be Searched
fir4
COMPUTER PROJECT
30
FIR MANAGEMENT
2012
/*************************OUTPUT 11*******************************/
.....MODIFICATION MENU.....
===========================
Enter FIR Name To Be Modified
COMPUTER PROJECT
fir1
31
FIR MANAGEMENT
2012
/*************************OUTPUT 12*******************************/
.....MODIFICATION MENU.....
===========================
1.Crime_No
2.Police_Stationcode
3.Region
4.Convict Name
5.S/O
6.Address
7.Crime
8.Crime_Date
9.Crime_Time
10.Undersection
11.State_Versus
12.Investigation
13.Court Decision
14.Sentence
15.Exit
======================================
1
Sentence:-
Death
COMPUTER PROJECT
32
FIR MANAGEMENT
2012
/*************************OUTPUT 13*******************************/
.....UPDATE MENU.....
=====================
Enter FIR Name To Be Updated
COMPUTER PROJECT
fir1
33
FIR MANAGEMENT
2012
/*************************OUTPUT 14*******************************/
Crime No.:-
220
Region:-
Lakhimpur
Convict Name:-
Ram Prashad
Son Of (s/o):-
Samar Prashad
Address:-
768L\849\625T
Crime:-
Theft
Date Of Crime:-
22/01/2012
Time Of Crime:-
23:06 pm
Undersection (u/s):-
213
Government
Investigation Progress:-
Pending
Court Decision:-
None
Sentence:-
None
======================================
COMPUTER PROJECT
=========================
34
FIR MANAGEMENT
2012
/*************************OUTPUT 15*******************************/
.....DELETE MENU.....
======================
Enter FIR To Be Deleted
fir1
COMPUTER PROJECT
FIR Deleted..
35
FIR MANAGEMENT
2012
/*************************OUTPUT 16*******************************/
..HELP..
========
============
This option is used to create FIR of Criminals.
These details are to be filled by the officer
COMPUTER PROJECT
1.Open FIR
36
FIR MANAGEMENT
2012
/*************************OUTPUT 17*******************************/
INFORMATION
=============
Developer
===========
SHIV PRATAP SINGH
=================================
Designation
STUDENT
XII
=================================
COMPUTER PROJECT
=============
37
FIR MANAGEMENT
2012
/*************************OUTPUT 18*******************************/
THANK YOU
COMPUTER PROJECT
=========
38
FIR MANAGEMENT
2012
BIBLIOGRAPHY
www.uppolice.com
www.highcourt.nic.in
www.stategovn.nic.in
COMPUTER PROJECT
www.wikipedia.com
39
FIR MANAGEMENT
2012
COMPUTER PROJECT
TEACHERS REMARK
40