You are on page 1of 102

WEB BASED PETITION ACQUISITION IN PUBLIC SECTOR

Abstract

The project “Web Based Petition Acquisition in Public Sector” provides the proper
procedure for applying complaints and petition information to the users who have applied based
on their demands. The users are provided with proper response for the petitions applied by them
and the status of the petitions that has been processed by the administrator and the officials. The
status of the complaint details will be intimated to the users with which the concerned user can
gather the knowledge of the corresponding complaints and petition applied by them to the
administrator. Since it is an decentralized process the efficiency of the process has been
increased. By doing the so the user has been allotted with reduced latency work process and the
complaint information will be processed in an enormous way which increases performance
evaluation of the system. The users are provided with proper response for the petitions applied
by them and the status of the petitions that has been processed by the administrator and the
officials. The status of the complaint details will be intimated to the users with which the
concerned user can gather the knowledge of the corresponding complaints and petition applied
by them to the administrator. Since it is an decentralized process the efficiency of the process has
been increased. By doing the so the user has been allotted with reduced latency work process and
the complaint information will be processed in an enormous way which increases performance
evaluation of the system.
INTRODUCTION

This project title is “Web Based Petition Acquisition in Public Sector”. It describes the
process of applying various petitions through online. This system developed to manage the
various petitions processing through website. This system is any member can apply using Name,
Address details through website. And, also in this project used to help the public and given the
greater profitability through direct communication to government sector via online. This service
is used to enhance the system for public to optimize their requests. The petitions that have been
requested by the user or people will be provided efficiently using this system. The applicants can
track their application status by using their ID and password that has been provided by the
administrator. This process completely provides the status of the certificates and the petitions
that has been admitted by the user .So the admin can efficiently access the system that has been
initiated and their requests will be processed in an timely manner. It describes the process of
applying various petitions through online. This system developed to manage the various petitions
processing through website. This system is any member can apply using Name, Address, and
Aadhaar details through website. And, also in this project used to help the public and given the
greater profitability through direct communication to government sector via online. This service
is used to enhance the system for public to optimize their requests. The petitions that have been
requested by the user or people will be provided efficiently using this system. The applicants can
track their application status by using their ID and password that has been provided by the
administrator. This process completely provides the status of the certificates and the petitions
that has been admitted by the user .So the admin can efficiently access the system that has been
initiated and their requests will be processed in an timely manner.
Problem Description

The major problem in the current scenario is the user is unable to apply and receive
proper approval for the petitions that has been applied to the public sector management. Since it
is totally a manual process the report maintenance and the customer requests will not be
processed properly. At the same time in the admin side there exists vast user data which is a
complex process for the admin to gather and process the user request. The user was unable to
view or receive proper intimation of the status of the petitions that has been applied. It increases
the latency of the system and improper in maintaining the reports and data. At the same time the
entire procedure decreases the robustness and performance evaluation on the user side. Moreover
the administrator was unable satisfy the conditions and the requirements of the user in an
efficient manner. The major problem in the current scenario is the user is unable to apply and
receive proper approval for the petitions that has been applied to the public sector management.
Since it is totally a manual process the report maintenance and the customer requests will not be
processed properly. At the same time in the admin side there exists vast user data which is a
complex process for the admin to gather and process the user request. The user was unable to
view or receive proper intimation of the status of the petitions that has been applied. It increases
the latency of the system and improper in maintaining the reports and data. At the same time the
entire procedure decreases the robustness and performance evaluation on the user side. Moreover
the administrator was unable satisfy the conditions and the requirements of the user in an
efficient manner.

Objectives:

 Increases the working procedures


 Provides the user friendly environment
 Reduces the latency
 Mainly avoids corruption
 Generates a clear accessing status to the customer.
 Provides the user friendly environment
 Reduces the latency
 Generates a clear accessing status to the customer.
Existing System

In the existing procedure the records of the public are maintained are maintained in an
usual paper format, which is a more latent process and it ensures lack of data assurance. The
existing system does not provide better knowledge about the details and information about the
steps and assumption for attaining the certificates in various public sector. Each sector have
some separate rules and protocols to perform their operations for the public. More paper work is
needed and lots and lots of work load has been generated. There may be a chance of scam
occurrence in the payment process in the existing procedure, which is a more intolerable activity.
The main disadvantage is, the public has to present in the authorized administrator office for the
sake of his request. In the existing procedure the records of the public are maintained are
maintained in a usual paper format, which is a more latent process and it ensures lack of data
assurance. The existing system does not provide better knowledge about the details and
information about the steps and assumption for attaining the certificates in various public sector.
Each sector has some separate rules and protocols to perform their operations for the public.
More paper work is needed and lots and lots of work load has been generated. There may be a
chance of scam occurrence in the payment process in the existing procedure, which is a more
intolerable activity. The main disadvantage is, the public has to present in the authorized
administrator office for the sake of his request.

Disadvantages

 Consumes more paper work and timing to complete the process.


 Exceeds redundant latency.
 Access time is inefficient.
 Chance of loss or damage of files.
 Consumes more paper work and timing to complete the process.
 Exceeds redundant latency.
 Access time is inefficient.
 Chance of loss or damage of files.
Proposed System

The proposed system exceeds the entire process that has been maintained in the existing
system. The public can apply their needed certificates, property requirements, petition process
through online from which the latency has been reduced to its core. The payment for the
application, certificates, can be payed through online which reduces the financial scam. The user
can apply for the certificates from any location through online. The time redundancy has been
very much reduced in this process. The status of every use will be provided to them through
message or through mail which enhances the system. The proposed system exceeds the entire
process that has been maintained in the existing system. The public can apply their needed
certificates, property requirements, petition process through online from which the latency has
been reduced to its core. The payment for the application, certificates, can be payed through
online which reduces the financial scam. The user can apply for the certificates from any location
through online. The time redundancy has been very much reduced in this process. The status of
every use will be provided to them through message or through mail which enhances the system.

Advantages

 Consumers are provided with better performance evaluation.


 Reduces the unauthorized evaluation
 Increased efficiency.
 Consumers are provided with better performance evaluation.
 Reduces the unauthorized evaluation
 Increased efficiency.
Use Case Diagram
Register

Login

Road Records

Admin

Water Tank Records

Electricity Records Public

Road Complaints

Employee

Water Complaints

Electricity Complaints

Queries

Feedbacks

Apply Petition

View Status

Petition Status

Intimate Status

Class Diagram
Administrator Public Sector
Login Register
Road Records Login
Water Records Road Records
Electricity Records Electricity Records
Road Complainits Water Tank Records
Water Complaints Road Complaints
Electricity Complaints Electricity Complaints
Queries Water Complaints
Petitions Petitions
Feedbacks Feedbacks

Login() Register Details()


Add Road Records() Login()
Add Electricity Records() View Road Records()
Add Water Records() View Water Records()
Add Road Complaints() View Electricity Records()
Add Water Complaints() Add Road Complaints()
Add Electricity Complaints() View Water Complaints()
View Queries() View Electricity Complaints()
View Feedbacks() Apply Petitions()
View Peitions() Provide Feedbacks()

Employees
Login
Road Records
Water Records
Electricity Records
Road Complaints
Water Complaints
Electricity Complaints
Queries Database Server
Petitions Store
Feedbacks Retrieve

Login() Store Data()


Add Water Tank Records() Retrieve Data()
Add Road Records()
Add Electricty Records()
Add Road Complaints()
Add Water Complaints()
Add Electricity Complsintd()
View Queries()
View Petition()
View Feedback()

Use Case Description


Modules:

 Admin
 Petition Consultant Officer
 Applicant Registration
 Information Subsystem
 Applicant Subsystem
 User Subsystem
 Report
 Feedback

Admin

Admin is the head for the entire system that controls the whole process
under his guidance. The applicants, officials, workers who are all involved in the
entire system will com e under the guidance of the admin.

Petition Consultant Officer

The petitions that are applied by the applicants are passed on to the
consultant who has been the official for the concerned department and the related
documents are moved on to him for further procedures. The documents are moved
on to the concerned departments through online, which avoids corruption and
increases the efficiency and speed of the process.

Applicant Registration
The applicants have to register the required information that has been
denoted by the admin side. It helps to access their needs and requests for applying
certificates in many public sectors. It requires the name, address, mobile and mail
ID and so on.

Applicant Login

After the registration process the applicants are provided with unique ID and
password to access their separate account details and at the same time they can
apply for the certificates of different categories through online.

Information Subsystem

It holds the information of the user requests from which the officials of the
concerned department can access and get a clear view about the request that has
been done by the user which helps to provide necessary requirements. The info
mentioned above can be accessible by both the admin and as well as the official
sides.

Applicant Subsystem

Here the applicants can submit their requests according to the department
wise. Each department has an separate age so that the user can get a clear structure
about the process and submit their request to the concerned department without an
hesitation.
Report

The report provides the detailed description about the entire system like the
applicant details, their requests, the operation done to the request that has been
requested to the admin by the user. It helps the admin side for reference and at the
same time for future evaluations to improve the entire system. Based on this the
verification and cross checking can also be done by the admin for his clearance.

Feedback

The user can admit their queries and feedback to the admin through this
module, from which the admin can enhance the system with better efficiency. Here
the user can also submit their complaints on the officials as well as the demerits in
the system.

Non Functional Requirements


Hardware Requirements:

 Processor : Intel processor 3.0 GHz


 RAM : 2GB
 Hard disk : 500 GB
 Compact Disk : 650 Mb
 Keyboard : Standard keyboard
 Mouse : Logitech mouse
 Monitor : 15 inch color monitor

Software Requirements:
 Front End : PHP
 Back End : MYSQL
 Operating System : Windows OS
 System type : 32-bit or 64-bit Operating System
 IDE : Dreamweaver
 DLL : Depends upon the title
Logical Development
Data Flow Diagram:

A two-dimensional diagram that explains how data is processed and transferred in a


system. The graphical depiction identifies each source of data and how it interacts with other
data sources to reach a Cable Operator Management on output. Individuals seeking to draft a
data flow diagram must identify external inputs and outputs, determine how the inputs and
outputs relate to each other, and explain with graphics how these connections relate and what
they result in. This type of diagram helps business development and design teams visualize how
data is processed and identify or improve certain aspects.

Data flow Symbols:

Symbol Description

An entity. A source of data or a


destination for data.

A process or task that is


performed by the system.

A data store, a place where data


is held between processes.

A data flow.
Level 0

City Management

ADMIN Database

Level 1

Register

Database
User

Login

Level 2
Login

Applicant Details

Response to Applicants Database


ADMIN
Status Verification

Reports & Feedback

Message Intimation

Level 3
Register & Login

Request Demands

Acquire Petition/ Certificates Database


User

Message Intimation

Queries & Feedback

Architecture Diagram
WEB BASED PETITION ACQUISITION IN PUBLIC SECTOR

User Admin

Login
Register & Login
View & Response
Request Demands to Applicants

Status Verification
Acquire
Petition/Certificate
s
Reports & Feedback
Message Intimation

Queries & Feedback Send Message Intimation


Database

ER Diagram
An entity–relationship model is the result of using a systematic process to describe and
define a subject area of business data. It does not define business process; only visualize business
data. The data is represented as components (entities) that are linked with each other by
relationships that express the dependencies and requirements between them, such as: one
building may be divided into zero or more apartments, but one apartment can only be located in
one building. The three schema approach to software engineering uses three levels of ER models
that may be developed.

ER Diagram Symbol:
Di
agram
S.NO. Types

1. Entity types

2. Relationship Types

3. Atomic attribute types

4. Composite attribute types

5. Multi valued attribute types

6. Derived Attribute types


View Status View User Requests

Response to Queries
Response Verification
Password

Mobile number
Message Intimation Username
Status Verification

Password User List

ID Admin

View
Officials

Control

User

User Name
User ID

Password Message Intimation

Apply Petition
Status

Feedback
Mobile Number
Database Design

1.1 Table structure for table pet_admin

Field Type Null Default


username varchar(20 Yes NULL
)
password varchar(20 Yes NULL
)
mobile bigint(20) Yes NULL
utype varchar(20 Yes NULL
)
otp varchar(20 Yes NULL
)

1.2 Table structure for table pet_apply

Field Type Null Default


id int(11) Yes NULL
uname varchar(20) Yes NULL
name varchar(20) Yes NULL
gender varchar(10) Yes NULL
dob varchar(15) Yes NULL
address varchar(50) Yes NULL
area varchar(30) Yes NULL
taluk varchar(20) Yes NULL
state varchar(20) Yes NULL
district varchar(20) Yes NULL
pincode varchar(20) Yes NULL
contact bigint(20) Yes NULL
aadhar varchar(30) Yes NULL
email varchar(40) Yes NULL
dept varchar(20) Yes NULL
complaint text Yes NULL
ptype varchar(20) Yes NULL
process varchar(20) Yes NULL
status int(11) Yes NULL
rdate varchar(15) Yes NULL

1.3 Table structure for table pet_feedback

Field Type Null Default


id int(11) Yes NULL
uname varchar(20) Yes NULL
commen varchar(100) Yes NULL
t
rdate varchar(15) Yes NULL

1.4 Table structure for table pet_register

Field Type Null Default


id int(11) Yes NULL
name varchar(20 Yes NULL
)
gender varchar(10 Yes NULL
)
dob varchar(15 Yes NULL
)
address varchar(50 Yes NULL
)
area varchar(30 Yes NULL
)
taluk varchar(20 Yes NULL
)
state varchar(20 Yes NULL
)
district varchar(20 Yes NULL
)
pincode varchar(20 Yes NULL
)
contact bigint(20) Yes NULL
aadhar varchar(30 Yes NULL
)
email varchar(40 Yes NULL
)
otp varchar(20 Yes NULL
)
sms_st int(11) Yes NULL
uname varchar(20 Yes NULL
)
pass varchar(20 Yes NULL
)
7. TESTING

Testing is the major quality control measure employed during software


development. Its basic function is to detect errors. Testing is the process of executing a
program with the intention of finding errors. It is complete verification to detect whether
the objective is met and the user requirements are satisfied. After the coding phase,
testing is done to test the proper working of the new system. Testing represents the
ultimate review of specification, design and coding. Thus the goal of testing is to uncover
the requirements, design encoding errors in the program.
System testing is actually a series of different test whose primary purpose is to
fully exercise the computer-based program.
Different types of testing are:
• Unit Testing
• Integration Testing
• Validation Testing

7.1. UNIT TESTING

Unit testing involves the design of test cases that validate the internal program
logic is functioning properly, and that program input produces valid outputs. All decision
branches and internal code flow should be validated. It is the testing of individual unit
before integration. This is a structural testing, that relies on knowledge of its construction
and is invasive. Unit test perform basic tests at component level and test a specific
business process, application, and/or system configuration. Unit tests ensure that each
unique path of a business process performs accurately to the documented specifications
and contains clearly defined inputs and expected results. In the lines of this strategy all,
the individual functions and modules were put to the independently. By following this
strategy all, the errors in coding were identified and corrected.
Unit testing is a procedure used to validate the individual units of source code is
working properly. The goal of unit testing is to isolate each part of the program and show
that the individual parts are correct. A unit test provides a strict, written contract that the
piece of code must satisfy. As a result, it affords server benefits.
Unit testing is typically done by software developers to ensure that the code they
have written meets software requirements and behaves as the developer intended. Each
unit of the system implemented in the source code is checked for correctness. All error-
handling paths are tested. User authentication form and other each individual modules
form are taken as independently. Here login and organization form are taken as smallest
unit
.

S. Test Expected Result Actual Result Result


Condition
No
1. Check whether the It displays the message It displays the message Success
username and welcome to users. welcome user.
password provided
by the customer
matches each other.

S. Test Condition Expected Result Actual Result Result


No
1. Check whether the user It displays the message It displays the message Success
fills all the columns. Registered success. Registered success.
7.2. VALIDATION TESTING
Validation testing is done to validate the inputs given by the user. The user inputs
are checked for their correctness and range. If there are errors, the error message is given and the
user is prompted again to enter the new value. If the user types some characters in the numeric
and an error message and it is demonstrated in the following figure.

TC.ID Test Condition Test Input Expected Result Actual Result Result

VT-1.1 Check whether Empty field It displays the error It displays the error Success
the username is message as please message as please
empty in the login enter username enter username
process

VT-1.2 Check whether Empty field It displays the error It displays the error Success
the password is message as please message as please
empty in the login enter password. enter password .
process

VT-1.3 Check whether Incorrect It displays the error It displays the error Success
the username and username and message as enter message as enter
password is password valid username and valid username and
incorrect password password

VT-1.4 Check whether Incorrect It displays the error It displays the error Success
username and username and message as Please message as Please
password is password register first. register first.
matched
7.3. INTEGRATION TESTING

Testing is done for each module. After testing all the modules, the modules are
integrated and testing of the final system is done with the test data, specially designed to show
that the system will operate successfully in all its aspects conditions. Thus the system testing is a
confirmation that all is correct and an opportunity to show the user that the system works.

7.4 DEBUGGING

 The program displays a string "We are debugging" to the user. Suppose when we run the
application, for some reason, the string is not displayed. To identify the problem we need to add
a breakpoint. We can add a breakpoint to the code line which displays the string. This breakpoint
will pause the execution of the program. At this point, the programmer can see what is possibly
going wrong.
8. ACCEPTANCE TESTING

Acceptance testing can be defined in many ways, but a simple definition is the succeeds
when the software functions in a manner that can be reasonable expected by the customer. After
the acceptance test has been conducted, one of the two possible conditions exists. This is to fine
whether the inputs are accepted by the database or other validations. For example accept only
numbers in the numeric field, date format data in the date field. Also the null check for the not
null fields. If any error occurs then show the error messages. The function of performance
characteristics to specification and is accepted. A deviation from specification is uncovered and a
deficiency list is created.

WHITE BOX TESTING

White box testing, sometimes called "Glass-box testing”. Using white box testing methods, the
following tests were made on the system,

 All independent paths with in a module have been exercised at least once.
 All logical decisions were checked for the true and false side of the values.
 All loops were executed to check their boundary values.
 Internal data-structure was tested for their validity.

BLACK BOX TESTING

Black box testing focuses on the functional requirements of the software. That is black
box testing enables the software engineer to drive a set of input conditions that will fully exercise
the requirements for a program. Black box testing is not an alternative for white box testing
techniques. Rather, it is a complementary approach that is likely to uncover different class of
errors. Black box testing attempts to find errors in the following categories:
 Interface errors.
 Performances in data structures or external database access.
 Performance errors.
 Initialization and termination errors.
 Incorrect or missing functions.
CONCLUSIONS AND FUTURE ENHACEMENT

Cloud Computing is gaining popularity and advancement day-by-day. But still the
security threat hinders the success of Cloud Computing. In this paper, some of the privacy threats
are addressed and the techniques to overcome them are surveyed. While some approaches
utilized traditional methods to achieve privacy, some other approaches kept them away and
focused on alternate methodologies in achieving privacy. Also, approaches to preserve privacy at
the time of public auditing are also discussed. Thus, to conclude it is necessary that every cloud
user must be guaranteed that his data is stored, processed, accessed and audited in a secured
manner at any time. Data freshness is essential to protect against misconfiguration errors or
rollbacks caused intentionally. We can develop an authenticated file system that supports the
migration of an enterprise-class distributed file system into the cloud efficiently, transparently
and in a scalable manner. It’s authenticated in the sense that enables an enterprise tenant to verify
the freshness of retrieved data while performing the file system operations. The user must be
given complete access control over the published data. Also, powerful security mechanisms must
always supplement every cloud application. Attaining all these would end up in achieving the
long dreamt vision of secured petition processing in the nearest future. In future, this proposed
model could be used to get the secure petition processing environment which would be a great
enhancement in the petition processing and certificate application through cloud..
SCREENSHOT

LOGIN

OFFICER
ADMIN

USER INFORMATION
STATUS

FEEDBACK
REGISTER

PETITION
\

VIEW FEEDBACK

SURVEY
CODING

ADMIN

<?php

include("include/protect.php");

include("include/dbconnect.php");

extract($_POST);

?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"


"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

<title><?php include("include/title.php"); ?></title>

<link href="style.css" rel="stylesheet" type="text/css">

<script language="javascript" src="include/menu.js"></script>

</head>

<body class="body2"><form action="" method="post" enctype="multipart/form-data"


name="form1" id="form1">

<table width="95%" border="0" align="center" cellpadding="0" cellspacing="0"


bgcolor="#FFFFFF">

<tr>

<td align="center"><?php include("include/header.php"); ?></td>

</tr>

<tr>

<td height="25" class="subhead"><?php include("include/link_admin.php"); ?></td>

</tr>

<tr>

<td align="center" valign="top"><p>&nbsp;</p>

<p>&nbsp;</p>

<p>&nbsp;</p>

<h2>Welcome Admin </h2>

<p>&nbsp;</p>

<h3>Petition Details </h3>

<p>&nbsp;</p>

<p>

<?php
$q1=mysql_query("select * from apply where status<2 order by id desc");

$n1=mysql_num_rows($q1);

if($n1>0)

?>

</p>

<table width="740" border="1">

<tr>

<th width="48" scope="col">Sno</th>

<th width="167" scope="col">Petition ID </th>

<th width="195" scope="col">Department</th>

<th width="148" scope="col">Date</th>

<th width="148" scope="col">View Status </th>

</tr>

<?php

$i=0;

while($r1=mysql_fetch_array($q1))

$i++;

?>

<tr>

<th scope="row"><?php echo $i; ?></th>

<td><?php echo $r1['id']; ?></td>

<td><?php echo $r1['dept']; ?></td>

<td><?php echo $r1['rdate']; ?></td>


<td><a href="view_det3.php?id=<?php echo $r1['id']; ?>">View</a></td>

</tr>

<?php

?>

</table>

<?php

?>

<p>&nbsp;</p>

<p>&nbsp;</p>

<p>&nbsp;</p></td>

</tr>

<tr>

<td height="25" align="center" class="subhead">&nbsp;</td>

</tr>

</table>

</form>

</body>

</html>

ADD FEEDBACK

<?php

include("include/protect.php");

include("include/dbconnect.php");
extract($_REQUEST);

$uname=$_SESSION['uname'];

$qry=mysql_query("select * from register where uname='$uname'");

$row=mysql_fetch_array($qry);

if(isset($btn))

$max_qry = mysql_query("select max(id) maxid from feedback");

$max_row = mysql_fetch_array($max_qry);

$id=$max_row['maxid']+1;

$rdate=date("d-m-Y");

$q1="insert into feedback(id,uname,comment,rdate)


values($id,'$uname','$comment','$rdate')";

$q2=mysql_query($q1);

if($q2)

?>

<script language="javascript">

alert("Feedback sent Successfully");

window.location.href="add_feed.php";

</script>

<?php
}

else

$msg="Could not Registered";

?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"


"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

<title><?php include("include/title.php"); ?></title>

<link href="style.css" rel="stylesheet" type="text/css" />

<script language="javascript" src="include/menu.js"></script>

<script language="javascript">

function adStatus(adid,uname)

window.open("ad_status.php?
adid="+adid+"&uname="+uname+"","Send","width=400,height=500,menubar=0,status=0,toolb
ar=0,scrollbars=1,resizable");

</script>

</head>
<body class="body2">

<form id="form1" name="form1" method="post" action="">

<table width="95%" border="0" align="center" cellpadding="0" cellspacing="0"


bgcolor="#FFFFFF">

<tr>

<td align="center"><?php include("include/header.php"); ?></td>

</tr>

<tr>

<td height="25" class="subhead"><?php include("include/link_user.php"); ?></td>

</tr>

<tr>

<td height="407" align="center" valign="top"><p>&nbsp;</p>

<p>&nbsp;</p>

<p class="txt3">Feedback</p>

<p class="txt3">&nbsp;</p>

<p align="center">&nbsp;</p>

<table width="481" height="232" border="0" cellpadding="5" class="border">

<tr class="border">

<th width="161" align="left" scope="row">Type your queries </th>

<td width="288"><label>

<textarea name="comment" cols="40" rows="4"></textarea>

</label></td>

</tr>

<tr>

<th align="left" scope="row">&nbsp;</th>


<td align="left"><input type="submit" name="btn" value="Submit" onClick="return
validate()" /></td>

</tr>

</table></td>

</tr>

<tr>

<td height="25" align="center" class="subhead">&nbsp;</td>

</tr>

</table>

</form>

</body>

</html>

INDEX-ADMIN

<?php

session_start();

include("include/dbconnect.php");

extract($_POST);

$msg="";

if(isset($login))

$qry = "select * from admin where username='$uname' &&


password='$pwd' && utype='Admin'";

$exe=mysql_query($qry);

$num=mysql_num_rows($exe);

if($num==1)
{

$_SESSION['uname']=$uname;

header("location:admin.php");

else

$msg="Login Incorrect!";

?>

<html>

<head>

<title><?php include("include/title.php"); ?></title>

<link href="style.css" rel="stylesheet" type="text/css">

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<style type="text/css">

<!--

.style3 {color: #FFFFFF}

-->

</style>

</head>

<body class="body2">

<form id="form1" name="form1" method="post" action="">


<table width="95%" border="0" align="center" cellpadding="0" cellspacing="0"
bgcolor="#FFFFFF">

<tr>

<td align="center"><?php include("include/header.php"); ?></td>

</tr>

<tr>

<td height="25" align="center" class="subhead"><?php include("include/link_home.php"); ?


></td>

</tr>

<tr>

<td align="center" valign="top"><p>&nbsp;</p>

<p>&nbsp;</p>

<p align="center">&nbsp;</p>

<table width="236" height="257" border="0" cellpadding="5" cellspacing="0"


class="bg2">

<tr>

<td align="center"><span class="txt3">Administrator</span></td>

</tr>

<tr>

<td align="center" class="msg"><?php echo $msg; ?></td>

</tr>

<tr>

<td class="txt1">Username</td>

</tr>

<tr>

<td class="txt1"><input name="uname" type="text" /></td>


</tr>

<tr>

<td class="txt1">Password</td>

</tr>

<tr>

<td class="txt1"><input name="pwd" type="password" /></td>

</tr>

<tr>

<td align="left"><input name="login" type="submit" value="Login" /></td>

</tr>

<tr>

<td align="center"><span class="style3"><a href="register.php"></a></span></td>

</tr>

</table>

<p>&nbsp;</p></td>

</tr>

<tr>

<td align="center" class="subhead">&nbsp;</td>

</tr>

</table>

</form>

</body>

</html>

INDEX-EMPLOYEE

<?php
session_start();

include("include/dbconnect.php");

extract($_POST);

$msg="";

if(isset($btn1))

$q4=mysql_query("select * from admin where mobile='$mobile' && utype='Officer'");

$n4=mysql_num_rows($q4);

if($n4>0)

$otp=rand(1000,9999);

mysql_query("update admin set otp='$otp' where mobile='$mobile' && utype='Officer'");

$message="OTP: $otp";

echo '<iframe src="http://pay4sms.in/sendsms/?token=


b81edee36bcef4ddbaa6ef535f8db03e&credit=2&sender=RnDTRY&message='.
$message.'&number=91'.$mobile.'" style="display:block"></iframe>';

else

$msg="Wrong Mobile Number!";

if(isset($login))

{
$qq1="select * from admin where mobile='$mobile' && otp='$pwd'";

$qq2=mysql_query($qq1);

$num=mysql_num_rows($qq2);

if($num==1)

$rr2=mysql_fetch_array($qq2);

$uname=$rr2['uname'];

$_SESSION['uname']=$uname;

header("location:off_home.php");

else

$msg="Login Incorrect";

?>

<html>

<head>

<title><?php include("include/title.php"); ?></title>

<link href="style.css" rel="stylesheet" type="text/css">

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<style type="text/css">

<!--
.style3 {color: #FFFFFF}

-->

</style>

<script language="javascript">

function validate()

if(document.form1.mobile.value=="")

alert("Enter the Mobile Number");

document.form1.mobile.focus();

return false;

if(isNaN(document.form1.mobile.value))

alert("Invaalid Mobile Number!");

document.form1.mobile.select();

return false;

if(document.form1.mobile.value.length!=10)

alert("Mobile Number must be 10 digits");

document.form1.mobile.select();

return false;

return true;
}

</script>

</head>

<body class="body2">

<form id="form1" name="form1" method="post" action="">

<table width="95%" border="0" align="center" cellpadding="0" cellspacing="0"


bgcolor="#FFFFFF">

<tr>

<td align="center"><?php include("include/header.php"); ?></td>

</tr>

<tr>

<td height="25" align="center" class="subhead"><?php include("include/link_home.php"); ?


></td>

</tr>

<tr>

<td align="center" valign="top"><p>&nbsp;</p>

<p>&nbsp;</p>

<p align="center">&nbsp;</p>

<table width="236" height="257" border="0" cellpadding="5" cellspacing="0"


class="bg2">

<tr>

<td align="center"><span class="txt3">Officer Login</span></td>

</tr>

<tr>

<td align="center" class="msg"><?php echo $msg; ?></td>


</tr>

<tr>

<td class="txt1">Mobile No. </td>

</tr>

<tr>

<td class="txt1"><input name="mobile" type="text" value="<?php echo $mobile; ?>"


/></td>

</tr>

<tr>

<td class="txt1"><input type="submit" name="btn1" value="Generate OTP"


onClick="return validate"></td>

</tr>

<?php

if($mobile)

?>

<tr>

<td class="txt1">OTP</td>

</tr>

<tr>

<td class="txt1"><input name="pwd" type="password" /></td>

</tr>

<tr>

<td align="left"><input name="login" type="submit" value="Login" onClick="return


validate()" /></td>

</tr>
<?php

?>

<tr>

<td align="center"><span class="style3"></span></td>

</tr>

</table>

<p>&nbsp;</p></td>

</tr>

<tr>

<td align="center" class="subhead">&nbsp;</td>

</tr>

</table>

</form>

</body>

</html>

CHART

<!DOCTYPE HTML>

<html>

<head>

<meta charset="UTF-8">

<script>

window.onload = function() {
var chart = new CanvasJS.Chart("chartContainer", {

animationEnabled: true,

title: {

text: "Desktop Search Engine Market Share - 2016"

},

data: [{

type: "pie",

startAngle: 240,

yValueFormatString: "##0.00'%'",

indexLabel: "{label} {y}",

dataPoints: [

{y: 79.45, label: "Google"},

{y: 7.31, label: "Bing"},

{y: 7.06, label: "Baidu"},

{y: 4.91, label: "Yahoo"},

{y: 1.26, label: "Others"}

}]

});

chart.render();

</script>

</head>

<body>
<div id="chartContainer" style="height: 370px; max-width: 920px; margin: 0px auto;"></div>

<script src="js/canvasjs.min.js"></script>

</body>

</html>

LOGOUT

<?php

session_start();

?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"


"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

<title><?php include("include/title.php"); ?></title>

<link href="chat.css" rel="stylesheet" type="text/css" />

</head>

<body>

<?php

include("include/dbconnect.php");

$uname=$_GET['uname'];

$chatid=$_GET['chatid'];

$un=$_SESSION['uname'];

$u1=mysql_query("update register set status='0' where username='$uname'");

$c1=mysql_query("update mes set status='0' where chatid='$chatid' && uname='$uname'");


//$d2=mysql_query("delete from mes where uname='$uname' && chatid='$chatid'");

session_destroy();

//unset($_SESSION['uname']);

header("Location:index.php");

?>

</body>

</html>

CHECK-OTP

<?php

include("include/protect.php");

include("include/dbconnect.php");

extract($_REQUEST);

$uname=$_SESSION['uname'];

$qry=mysql_query("select * from register where uname='$uname'");

$row=mysql_fetch_array($qry);

$otp=$row['otp'];

if(isset($btn))

if($otp==$key)

?>

<script language="javascript">
window.location.href="view_det.php?id=<?php echo $id; ?>";

</script>

<?php

else

?>

<script language="javascript">

alert("OTP is wrong!");

</script>

<?php

?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"


"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

<title><?php include("include/title.php"); ?></title>

<link href="style.css" rel="stylesheet" type="text/css" />

<script language="javascript" src="include/menu.js"></script>

<script language="javascript">
function adStatus(adid,uname)

window.open("ad_status.php?
adid="+adid+"&uname="+uname+"","Send","width=400,height=500,menubar=0,status=0,toolb
ar=0,scrollbars=1,resizable");

</script>

</head>

<body class="body2">

<form id="form1" name="form1" method="post" action="">

<table width="95%" border="0" align="center" cellpadding="0" cellspacing="0"


bgcolor="#FFFFFF">

<tr>

<td align="center"><?php include("include/header.php"); ?></td>

</tr>

<tr>

<td height="25" class="subhead"><?php include("include/link_user.php"); ?></td>

</tr>

<tr>

<td height="407" align="center" valign="top"><p>&nbsp;</p>

<p>&nbsp;</p>

<p class="txt3">OTP Verification</p>

<p>&nbsp;</p>

<table width="422" height="133" border="0" class="border">

<tr>
<th width="202" align="left" scope="col">Enter the OTP </th>

<th width="204" align="left" scope="col"><input type="text" name="key" /></th>

</tr>

<tr>

<th align="left" scope="row">&nbsp;</th>

<td align="left"><input type="submit" name="btn" value="Submit" /></td>

</tr>

</table>

<p>&nbsp;</p> </td>

</tr>

<tr>

<td height="25" align="center" class="subhead">&nbsp;</td>

</tr>

</table>

</form>

</body>

</html>

STATUS

<?php

include("include/protect.php");

include("include/dbconnect.php");

extract($_REQUEST);

$uname=$_SESSION['uname'];

$qry=mysql_query("select * from register where uname='$uname'");


$row=mysql_fetch_array($qry);

if($act=="ok")

$mobile=$row['contact'];

$otp=rand(1000,9999);

mysql_query("update register set otp='$otp' where uname='$uname'");

$message="OTP: $otp";

echo '<iframe src="http://pay4sms.in/sendsms/?token=


b81edee36bcef4ddbaa6ef535f8db03e&credit=2&sender= RandDC&message='.
$message.'&number=91'.$mobile.'" style="display:none"></iframe>';

?>

<script>

//Using setTimeout to execute a function after 5 seconds.

setTimeout(function () {

// //Redirect with JavaScript

window.location.href= 'check_otp.php?id=<?php echo $id; ?>';

}, 2000);

</script>

<?php

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

<title><?php include("include/title.php"); ?></title>

<link href="style.css" rel="stylesheet" type="text/css" />

<script language="javascript" src="include/menu.js"></script>

<script language="javascript">

function adStatus(adid,uname)

window.open("ad_status.php?
adid="+adid+"&uname="+uname+"","Send","width=400,height=500,menubar=0,status=0,toolb
ar=0,scrollbars=1,resizable");

</script>

</head>

<body class="body2">

<form id="form1" name="form1" method="post" action="">

<table width="95%" border="0" align="center" cellpadding="0" cellspacing="0"


bgcolor="#FFFFFF">

<tr>

<td align="center"><?php include("include/header.php"); ?></td>

</tr>

<tr>

<td height="25" class="subhead"><?php include("include/link_user.php"); ?></td>


</tr>

<tr>

<td height="407" align="center" valign="top"><p>&nbsp;</p>

<p>&nbsp;</p>

<p class="txt3">Status</p>

<p align="center">&nbsp;</p>

<?php

$q1=mysql_query("select * from apply where uname='$uname' order by id


desc");

$n1=mysql_num_rows($q1);

if($n1>0)

?>

<table width="899" border="1">

<tr>

<th width="48" scope="col">Sno</th>

<th width="167" scope="col">Petition ID </th>

<th width="195" scope="col">Department</th>

<th width="148" scope="col">State</th>

<th width="148" scope="col">District</th>

<th width="148" scope="col">Taluk</th>

<th width="148" scope="col">Panchayat</th>

<th width="148" scope="col">Pincode</th>

<th width="148" scope="col">Complaint</th>

<th width="148" scope="col">Date</th>


<th width="148" scope="col">View Status </th>

</tr>

<?php

$i=0;

while($r1=mysql_fetch_array($q1))

$i++;

?>

<tr>

<th scope="row"><?php echo $i; ?></th>

<td><?php echo $r1['id']; ?></td>

<td><?php echo $r1['dept']; ?></td>

<td><?php echo $r1['state']; ?></td>

<td><?php echo $r1['district']; ?></td>

<td><?php echo $r1['taluk']; ?></td>

<td><?php echo $r1['area']; ?></td>

<td><?php echo $r1['pincode']; ?></td>

<td><?php echo $r1['complaint']; ?></td>

<td><?php echo $r1['rdate']; ?></td>

<td>

<?php

if($r1['status']=="2")

echo "Process Completed";

}
else if($r1['status']=="1")

echo "Process ".$r1['process'];

else

echo "Petition Sent..";

?>

<br /><a href="status.php?act=ok&id=<?php echo $r1['id'];


?>">View</a></td>

</tr>

<?php

?>

</table>

<?php

?>

<p>&nbsp;</p></td>

</tr>

<tr>

<td height="25" align="center" class="subhead">&nbsp;</td>

</tr>
</table>

</form>

</body>

</html>

INDEX

<?php

session_start();

include("include/dbconnect.php");

extract($_POST);

$msg="";

if(isset($btn1))

$q4=mysql_query("select * from register where contact='$mobile'");

$n4=mysql_num_rows($q4);

if($n4>0)

$otp=rand(1000,9999);

mysql_query("update register set otp='$otp' where contact='$mobile'");

$message="OTP: $otp";

echo '<iframe src="http://pay4sms.in/sendsms/?token=


b81edee36bcef4ddbaa6ef535f8db03e&credit=2&sender=RnDTRY&message='.
$message.'&number=91'.$mobile.'" style="display:block"></iframe>';

}
else

$msg="Wrong Mobile Number!";

if(isset($login))

$qq1="select * from register where contact='$mobile' && otp='$pwd'";

$qq2=mysql_query($qq1);

$num=mysql_num_rows($qq2);

if($num==1)

$rr2=mysql_fetch_array($qq2);

$uname=$rr2['uname'];

$_SESSION['uname']=$uname;

header("location:user_page.php");

else

$msg="Login Incorrect";

}
?>

<html>

<head>

<title><?php include("include/title.php"); ?></title>

<link href="style.css" rel="stylesheet" type="text/css">

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<style type="text/css">

<!--

.style3 {color: #FFFFFF}

-->

</style>

<script language="javascript">

function validate()

if(document.form1.mobile.value=="")

alert("Enter the Mobile Number");

document.form1.mobile.focus();

return false;

if(isNaN(document.form1.mobile.value))

alert("Invaalid Mobile Number!");

document.form1.mobile.select();

return false;
}

if(document.form1.mobile.value.length!=10)

alert("Mobile Number must be 10 digits");

document.form1.mobile.select();

return false;

return true;

</script>

</head>

<body class="body2">

<form id="form1" name="form1" method="post" action="">

<table width="95%" border="0" align="center" cellpadding="0" cellspacing="0"


bgcolor="#FFFFFF">

<tr>

<td colspan="2" align="center"><?php include("include/header.php"); ?></td>

</tr>

<tr>

<td height="25" colspan="2" align="center" class="subhead"><?php


include("include/link_home.php"); ?></td>

</tr>

<tr>

<td width="75%" align="center" valign="top"><p>&nbsp;</p>

<p>&nbsp;</p>
<table width="435" height="160" border="0" cellpadding="5" cellspacing="0">

<tr>

<td align="center"><img src="images/hand-signing-petition-lg.jpg" width="300"


height="300"></td>

<td align="center"><img src="images/image-2015.jpg" width="300"


height="300"></td>

</tr>

<tr>

<td align="center">&nbsp;</td>

<td align="center">&nbsp;</td>

</tr>

</table>

<p align="center">&nbsp;</p>

<p>&nbsp;</p>

<p>&nbsp;</p>

<p>&nbsp;</p>

<p>&nbsp;</p>

<p>&nbsp;</p></td>

<td width="25%" align="center" valign="top" bgcolor="#99CCFF"><table width="236"


height="257" border="0" cellpadding="5" cellspacing="0" class="border2">

<tr>

<td align="center"><span class="txt3">Login</span></td>

</tr>

<tr>

<td align="center" class="msg"><?php echo $msg; ?></td>

</tr>
<tr>

<td class="txt1">Mobile No. </td>

</tr>

<tr>

<td class="txt1"><input name="mobile" type="text" value="<?php echo $mobile; ?>"


/></td>

</tr>

<tr>

<td class="txt1"><input type="submit" name="btn1" value="Generate OTP"


onClick="return validate"></td>

</tr>

<?php

if($mobile)

?>

<tr>

<td class="txt1">OTP</td>

</tr>

<tr>

<td class="txt1"><input name="pwd" type="password" /></td>

</tr>

<tr>

<td align="left"><input name="login" type="submit" value="Login" onClick="return


validate()" /></td>

</tr>

<?php
}

?>

<tr>

<td align="center"><span class="style3"><a href="register.php">Sign


Up</a></span></td>

</tr>

</table></td>

</tr>

<tr>

<td colspan="2" align="center" class="subhead">&nbsp;</td>

</tr>

</table>

</form>

</body>

</html>

APPLY

<?php

include("include/protect.php");

include("include/dbconnect.php");

extract($_REQUEST);

$uname=$_SESSION['uname'];

if($dept=="")

$dept="Road";
}

$qry=mysql_query("select * from register where uname='$uname'");

$row=mysql_fetch_array($qry);

if(isset($btn))

$max_qry = mysql_query("select max(id) maxid from apply");

$max_row = mysql_fetch_array($max_qry);

$id=$max_row['maxid']+1;

$rdate=date("d-m-Y");

$aadhar=$aa1." ".$aa2." ".$aa3;

$email1=$email."@gmail.com";

$q1="insert into
apply(id,gender,dob,address,uname,name,area,taluk,state,district,pincode,contact,aadhar,email,d
ept,complaint,ptype,status,rdate)
values($id,'$gender','$dob','$address','$uname','$name','$area','$taluk','$state','$district','$pincode'
,'$contact','$aadhar','$email1','$dept','$complaint','$ptype','0','$rdate')";

$q2=mysql_query($q1);

if($q2)

?>

<script language="javascript">
alert("Applied Successfully");

window.location.href="status.php";

</script>

<?php

else

$msg="Could not Registered";

?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"


"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

<title><?php include("include/title.php"); ?></title>

<link href="style.css" rel="stylesheet" type="text/css" />

<script language="javascript" src="include/menu.js"></script>

<link rel="stylesheet" href="date_picker/jquery-ui.css">

<script src="date_picker/jquery-1.12.4.js"></script>

<script src="date_picker/jquery-ui.js"></script>
<script>

$( function() {

$( "#dob" ).datepicker();

} );

</script>

<script language="javascript">

function validate()

if(document.form1.name.value=="")

alert("Enter the Name");

document.form1.name.focus();

return false;

if(document.form1.gender[0].checked==false &&
document.form1.gender[1].checked==false)

alert("Select the Gender");

return false;

if(document.form1.dob.value=="")

alert("Enter the Date of Birth");


document.form1.dob.focus();

return false;

if(document.form1.address.value=="")

alert("Enter the Address");

document.form1.address.focus();

return false;

if(document.form1.area.selectedIndex==0)

alert("Enter the Panchayat");

document.form1.area.focus();

return false;

if(document.form1.taluk.value=="")

alert("Enter the Taluk");

document.form1.taluk.focus();

return false;

if(document.form1.district.selectedIndex==0)

alert("Select the District");

document.form1.district.focus();
return false;

if(document.form1.state.selectedIndex==0)

alert("Select the State");

document.form1.state.focus();

return false;

if(document.form1.pincode.value=="")

alert("Enter the Pincode");

document.form1.pincode.focus();

return false;

if(document.form1.contact.value=="")

alert("Enter the Mobile Number");

document.form1.contact.focus();

return false;

if(isNaN(document.form1.contact.value))

alert("Invaalid Mobile Number!");

document.form1.contact.select();

return false;
}

if(document.form1.contact.value.length!=10)

alert("Mobile Number must be 10 digits");

document.form1.contact.select();

return false;

if(document.form1.aa1.value.length!=4 || document.form1.aa2.value.length!=4 ||
document.form1.aa3.value.length!=4)

alert("Aadhar No. is Incorrect!");

document.form1.aa1.focus();

return false;

if(document.form1.email.value=="")

alert("Enter the E-mail");

document.form1.email.focus();

return false;

if(document.form1.complaint.value=="")

alert("Enter the Complaint");

document.form1.complaint.focus();

return false;
}

return true;

function checkPin()

if(isNaN(document.form1.pincode.value))

document.form1.pincode.value="";

function checkPin2()

if(isNaN(document.form1.pincode.value))

document.form1.pincode.value="";

function checkCon()

if(isNaN(document.form1.contact.value))

document.form1.contact.value="";

}
}

function checkCon2()

if(isNaN(document.form1.contact.value))

document.form1.contact.value="";

</script>

</head>

<body class="body2">

<form id="form1" name="form1" method="post" action="">

<table width="95%" border="0" align="center" cellpadding="0" cellspacing="0"


bgcolor="#FFFFFF">

<tr>

<td align="center"><?php include("include/header.php"); ?></td>

</tr>

<tr>

<td height="25" class="subhead"><?php include("include/link_user.php"); ?></td>

</tr>

<tr>

<td height="407" align="center" valign="top"><p>&nbsp;</p>

<p>&nbsp;</p>
<p class="txt3"> Apply Petition </p>

<p class="txt3">&nbsp;</p>

<p><a href="apply.php?dept=Road">Road</a>&nbsp;&nbsp;&nbsp;

<a href="apply.php?dept=Water">Water</a>&nbsp;&nbsp;&nbsp;&nbsp;

<a href="apply.php?dept=Electricity">Electricity</a>&nbsp;&nbsp;&nbsp;

<a href="apply.php?dept=Health-Care">Health-Care</a></p>

<p>&nbsp; </p>

<p align="center">Department: <?php echo $dept; ?></p>

<p align="center">&nbsp;</p>

<table width="481" height="232" border="0" cellpadding="5" class="border">

<tr class="border">

<th width="161" align="left" scope="row">Name</th>

<td width="288"><label>

<input type="text" name="name" value="<?php echo $row['name']; ?>" />

</label></td>

</tr>

<tr class="border">

<th align="left" scope="row">Gender</th>

<td><input name="gender" type="radio" value="Male" <?php if($row['gender']=="Male")


echo "checked"; ?> />

Male

<input name="gender" type="radio" value="Female" <?php


if($row['gender']=="Female") echo "checked"; ?> />

Female</td>

</tr>

<tr class="border">
<th align="left" scope="row">Date of Birth </th>

<td><input type="text" name="dob" id="dob" value="<?php echo $row['dob']; ?>"


/></td>

</tr>

<tr class="border">

<th align="left" scope="row">Address</th>

<td><textarea name="address"><?php echo $row['address']; ?></textarea></td>

</tr>

<tr class="border">

<th align="left" scope="row">Panchayat</th>

<td><label>

<select name="area">

<option value="">-Panchayat-</option>

<option <?php if($row['area']=="Tiruverumbur") echo "selected";


?>>Tiruverumbur</option>

</select>

</label></td>

</tr>

<tr class="border">

<th align="left" scope="row">Taluk</th>

<td><select name="taluk">

<option value="">-Taluk-</option>

<option <?php if($row['taluk']=="Ariyamangalam") echo "selected"; ?


>>Ariyamangalam</option>

</select></td>

</tr>
<tr class="border">

<th align="left" scope="row">District</th>

<td><select name="district">

<option value="">-District-</option>

<option <?php if($row['district']=="Trichy") echo "selected"; ?>>Trichy</option>

<option <?php if($row['district']=="Tanjore") echo "selected"; ?>>Tanjore</option>

<option <?php if($row['district']=="Chennai") echo "selected"; ?>>Chennai</option>

<option <?php if($row['district']=="Coimbatore") echo "selected";


?>>Coimbatore</option>

<option <?php if($row['district']=="Madurai") echo "selected"; ?>>Madurai</option>

<option <?php if($row['district']=="Salem") echo "selected"; ?>>Salem</option>

<option <?php if($row['district']=="Namakkal") echo "selected";


?>>Namakkal</option>

<option <?php if($row['district']=="Karur") echo "selected"; ?>>Karur</option>

<option <?php if($row['district']=="Erode") echo "selected"; ?>>Erode</option>

</select></td>

</tr>

<tr class="border">

<th align="left" scope="row">State</th>

<td><select name="state">

<option value="">-State-</option>

<option <?php if($row['state']=="Tamilnadu") echo "selected"; ?>>Tamilnadu</option>

</select> </td>

</tr>

<tr class="border">

<th align="left" scope="row">Pincode</th>


<td><input name="pincode" type="text" value="<?php echo $row['pincode']; ?>"
maxlength="6" onKeyDown="checkPin()" onKeyUp="checkPin2()" /></td>

</tr>

<tr class="border">

<th align="left" scope="row">Mobile No. </th>

<td><label>

<input name="contact" type="text" value="<?php echo $row['contact']; ?>"


maxlength="10" onkeydown="checkCon()" onKeyUp="checkCon2()" />

</label></td>

</tr>

<tr class="border">

<th align="left" scope="row">Aadhar card no. </th>

<?php $adh=explode(" ",$row['aadhar']); ?>

<td><input name="aa1" type="text" size="4" value="<?php echo $adh[0]; ?>" />

<input name="aa2" type="text" size="4" value="<?php echo $adh[1]; ?>" />

<input name="aa3" type="text" size="4" value="<?php echo $adh[2]; ?>" /></td>

</tr>

<tr class="border">

<th align="left" scope="row">E-mail ID </th>

<td><label>

<?php $ema=explode("@",$row['email']); ?>

<input name="email" type="text" size="10" value="<?php echo $ema[0]; ?>" />

@gmail.com</label></td>

</tr>

<tr class="border">

<th align="left" scope="row">Petition Type </th>


<td><select name="ptype">

<option>New Petition</option>

<option>Repeated Petition</option>

</select>

</td>

</tr>

<tr class="border">

<th align="left" scope="row">Complaint</th>

<td><textarea name="complaint" cols="40" rows="4"><?php echo $row['complaint']; ?


></textarea></td>

</tr>

<tr>

<th align="left" scope="row">&nbsp;</th>

<td align="left"><input type="submit" name="btn" value="Submit" onClick="return


validate()" /></td>

</tr>

</table>

<p>&nbsp;</p></td>

</tr>

<tr>

<td height="25" align="center" class="subhead">&nbsp;</td>

</tr>

</table>

</form>

</body>

</html>
APPROVED

<?php

include("include/protect.php");

include("include/dbconnect.php");

extract($_POST);

?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"


"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

<title><?php include("include/title.php"); ?></title>

<link href="style.css" rel="stylesheet" type="text/css">

<script language="javascript" src="include/menu.js"></script>

</head>

<body class="body2"><form action="" method="post" enctype="multipart/form-data"


name="form1" id="form1">

<table width="95%" border="0" align="center" cellpadding="0" cellspacing="0"


bgcolor="#FFFFFF">

<tr>

<td align="center"><?php include("include/header.php"); ?></td>

</tr>

<tr>
<td height="25" class="subhead"><?php include("include/link_admin.php"); ?></td>

</tr>

<tr>

<td align="center" valign="top"><p>&nbsp;</p>

<p>&nbsp;</p>

<p>&nbsp;</p>

<h2>Welcome Admin </h2>

<p>&nbsp;</p>

<h3>Petition</h3>

<p>&nbsp;</p>

<p>

<?php

$q1=mysql_query("select * from apply where status=2 order by id desc");

$n1=mysql_num_rows($q1);

if($n1>0)

?>

</p>

<table width="930" border="1">

<tr>

<th width="167" scope="col">User ID </th>

<th width="167" scope="col">Petition ID </th>

<th width="195" scope="col">Name</th>

<th width="195" scope="col">Department</th>

<th width="148" scope="col">State</th>


<th width="148" scope="col">District</th>

<th width="148" scope="col">Taluk</th>

<th width="148" scope="col">Panchayat</th>

<th width="148" scope="col">Pincode</th>

<th width="148" scope="col">Date</th>

<th width="148" scope="col">Complaint</th>

<th width="148" scope="col">Status</th>

</tr>

<?php

$i=0;

while($r1=mysql_fetch_array($q1))

$i++;

?>

<tr>

<td><?php echo $r1['uname']; ?></td>

<td><?php echo $r1['id']; ?></td>

<td><?php echo $r1['name']; ?></td>

<td><?php echo $r1['dept']; ?></td>

<td><?php echo $r1['state']; ?></td>

<td><?php echo $r1['district']; ?></td>

<td><?php echo $r1['taluk']; ?></td>

<td><?php echo $r1['area']; ?></td>

<td><?php echo $r1['pincode']; ?></td>

<td><?php echo $r1['rdate']; ?></td>


<td><?php echo $r1['complaint']; ?></td>

<td><?php

if($r1['status']=="2")

echo "Process Completed";

else if($r1['status']=="1")

echo "Process ".$r1['process'];

else

echo "Petition Sent..";

?></td>

</tr>

<?php

?>

</table>

<?php

?>

<p>&nbsp;</p>

<p>&nbsp;</p>
<p>&nbsp;</p></td>

</tr>

<tr>

<td height="25" align="center" class="subhead">&nbsp;</td>

</tr>

</table>

</form>

</body>

</html>

OFF-HOME

<?php

session_start();

include("include/dbconnect.php");

extract($_POST);

$msg="";

?>

<html>

<head>

<title><?php include("include/title.php"); ?></title>

<link href="style.css" rel="stylesheet" type="text/css">

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<style type="text/css">
<!--

.style3 {color: #FFFFFF}

-->

</style>

</head>

<body class="body2">

<form id="form1" name="form1" method="post" action="">

<table width="95%" border="0" align="center" cellpadding="0" cellspacing="0"


bgcolor="#FFFFFF">

<tr>

<td align="center"><?php include("include/header.php"); ?></td>

</tr>

<tr>

<td height="25" align="center" class="subhead"><?php include("include/link_off.php"); ?


></td>

</tr>

<tr>

<td align="center" valign="top"><p>&nbsp;</p>

<p>&nbsp;</p>

<p align="center">&nbsp;</p>

<h2>Welcome Officer</h2>

<p>&nbsp;</p>

<h3>Petition Details </h3>

<p>&nbsp;</p>

<p>
<?php

$q1=mysql_query("select * from apply where status=1 order by id desc");

$n1=mysql_num_rows($q1);

if($n1>0)

?>

</p>

<table width="883" border="1">

<tr>

<th width="48" scope="col">Sno</th>

<th width="167" scope="col">Petition ID </th>

<th width="195" scope="col">Department</th>

<th width="148" scope="col">State</th>

<th width="148" scope="col">District</th>

<th width="148" scope="col">Taluk</th>

<th width="148" scope="col">Panchayat</th>

<th width="148" scope="col">Pincode</th>

<th width="148" scope="col">Complaint</th>

<th width="148" scope="col">Date</th>

<th width="148" scope="col">View Status </th>

</tr>

<?php

$i=0;

while($r1=mysql_fetch_array($q1))

{
$i++;

?>

<tr>

<th scope="row"><?php echo $i; ?></th>

<td><?php echo $r1['id']; ?></td>

<td><?php echo $r1['dept']; ?></td>

<td><?php echo $r1['state']; ?></td>

<td><?php echo $r1['district']; ?></td>

<td><?php echo $r1['taluk']; ?></td>

<td><?php echo $r1['area']; ?></td>

<td><?php echo $r1['pincode']; ?></td>

<td><?php echo $r1['complaint']; ?></td>

<td><?php echo $r1['rdate']; ?></td>

<td><a href="view_det2.php?id=<?php echo $r1['id']; ?>">View</a></td>

</tr>

<p>&nbsp;</p>

<p>&nbsp;</p></td>

</tr>

<tr>

<td align="center" class="subhead">&nbsp;</td>

</tr>

</table>

</form>

</body>

</html>
REGISTER

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"


"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

<title><?php include("include/title.php"); ?></title>

<link href="style.css" rel="stylesheet" type="text/css" />

<link rel="stylesheet" href="date_picker/jquery-ui.css">

<script src="date_picker/jquery-1.12.4.js"></script>

<script src="date_picker/jquery-ui.js"></script>

<script>

$( function() {

$( "#dob" ).datepicker();

} );

</script>

<script language="javascript">

function validate()

if(document.form1.name.value=="")
{

alert("Enter the Name");

document.form1.name.focus();

return false;

if(document.form1.gender[0].checked==false &&
document.form1.gender[1].checked==false)

alert("Select the Gender");

return false;

if(document.form1.dob.value=="")

alert("Enter the Date of Birth");

document.form1.dob.focus();

return false;

if(document.form1.address.value=="")

alert("Enter the Address");

document.form1.address.focus();

return false;

if(document.form1.area.selectedIndex==0)

{
alert("Enter the Panchayat");

document.form1.area.focus();

return false;

if(document.form1.taluk.value=="")

alert("Enter the Taluk");

document.form1.taluk.focus();

return false;

if(document.form1.district.selectedIndex==0)

alert("Select the District");

document.form1.district.focus();

return false;

if(document.form1.state.selectedIndex==0)

alert("Select the State");

document.form1.state.focus();

return false;

if(document.form1.pincode.value=="")

alert("Enter the Pincode");


document.form1.pincode.focus();

return false;

if(document.form1.contact.value=="")

alert("Enter the Mobile Number");

document.form1.contact.focus();

return false;

if(isNaN(document.form1.contact.value))

alert("Invaalid Mobile Number!");

document.form1.contact.select();

return false;

if(document.form1.contact.value.length!=10)

alert("Mobile Number must be 10 digits");

document.form1.contact.select();

return false;

if(document.form1.aa1.value.length!=4 || document.form1.aa2.value.length!=4 ||
document.form1.aa3.value.length!=4)

alert("Aadhar No. is Incorrect!");


document.form1.aa1.focus();

return false;

if(document.form1.email.value=="")

alert("Enter the E-mail");

document.form1.email.focus();

return false;

return true;

function checkPin()

if(isNaN(document.form1.pincode.value))

document.form1.pincode.value="";

function checkPin2()

if(isNaN(document.form1.pincode.value))

{
document.form1.pincode.value="";

function checkCon()

if(isNaN(document.form1.contact.value))

document.form1.contact.value="";

function checkCon2()

if(isNaN(document.form1.contact.value))

document.form1.contact.value="";

</script>

<style type="text/css">

<!--

.style3 {color: #FF0000}

-->

</style>

</head>
<body onload="datePic()" class="body2">

<?php

include ("include/dbconnect.php");

extract($_POST);

$max_qry = mysql_query("select max(id) maxid from register");

$max_row = mysql_fetch_array($max_qry);

$id=$max_row['maxid']+1;

$uname="U".$id;

if(isset($reg))

$rdate=date("d-m-Y");

$aadhar=$aa1." ".$aa2." ".$aa3;

$email1=$email."@gmail.com";

$q1="insert into
register(id,name,gender,dob,address,area,taluk,state,district,pincode,contact,aadhar,email,uname)
values($id,'$name','$gender','$dob','$address','$area','$taluk','$state','$district','$pincode','$contact'
,'$aadhar','$email1','$uname')";

$q2=mysql_query($q1);

if($q2)
{

//header("location:message.php");

?>

<script language="javascript">

alert("Registered Successfully");

window.location.href="index.php";

</script>

<?php

else

$msg="Mobile No. already exist!";

?>

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

<table width="95%" border="0" align="center" cellpadding="0" cellspacing="0"


bgcolor="#FFFFFF">

<tr>

<td align="center"><?php include("include/header.php"); ?></td>

</tr>

<tr>

<td height="25" align="center" class="subhead"><?php include("include/link_home.php"); ?


></td>

</tr>
<tr>

<td><p>&nbsp;</p>

<p>&nbsp;</p>

<table width="506" height="425" border="0" align="center" cellpadding="10"


cellspacing="0" class="border">

<tr>

<th height="33" colspan="2" bordercolor="#FF0033" bgcolor="#FFFFFF"


scope="col"><strong>REGISTRATION</strong></th>

</tr>

<tr>

<th colspan="2" scope="row"><?php echo $msg; ?></th>

</tr>

<tr>

<th align="left" scope="row">User ID </th>

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

</tr>

<tr>

<th width="203" align="left" scope="row">Name</th>

<td width="261"><label>

<input type="text" name="name" />

</label></td>

</tr>

<tr>

<th align="left" scope="row">Gender</th>

<td><input name="gender" type="radio" value="Male" />

Male
<input name="gender" type="radio" value="Female" />

Female</td>

</tr>

<tr>

<th align="left" scope="row">Date of Birth </th>

<td><input type="text" name="dob" id="dob" /></td>

</tr>

<tr>

<th align="left" scope="row">Address</th>

<td><textarea name="address"></textarea></td>

</tr>

<tr>

<th align="left" scope="row">Panchayat</th>

<td><label>

<select name="area">

<option value="">-Panchayat-</option>

<option>Tiruverumbur</option>

</select>

</label></td>

</tr>

<tr>

<th align="left" scope="row">Taluk</th>

<td><select name="taluk">

<option value="">-Taluk-</option>

<option>Ariyamangalam</option>
</select></td>

</tr>

<tr>

<th align="left" scope="row">District</th>

<td><select name="district">

<option value="">-District-</option>

<option>Trichy</option>

<option>Tanjore</option>

<option>Chennai</option>

<option>Coimbatore</option>

<option>Madurai</option>

<option>Salem</option>

<option>Namakkal</option>

<option>Karur</option>

<option>Erode</option>

</select></td>

</tr>

<tr>

<th align="left" scope="row">State</th>

<td><select name="state">

<option value="">-State-</option>

<option>Tamilnadu</option>

</select> </td>

</tr>

<tr>
<th align="left" scope="row">Pincode</th>

<td><input name="pincode" type="text" maxlength="6" onkeydown="checkPin()"


onkeyup="checkPin2()" /></td>

</tr>

<tr>

<th align="left" scope="row">Mobile No. </th>

<td><label>

<input name="contact" type="text" maxlength="10" onkeydown="checkCon()"


onkeyup="checkCon2()" />

</label></td>

</tr>

<tr>

<th align="left" scope="row">Aadhar card no. </th>

<td><input name="aa1" type="text" size="4" maxlength="4" />

<input name="aa2" type="text" size="4" maxlength="4" />

<input name="aa3" type="text" size="4" maxlength="4" /></td>

</tr>

<tr>

<th align="left" scope="row">E-mail ID </th>

<td><label>

<input name="email" type="text" size="10" />

@gmail.com</label></td>

</tr>

<tr>

<th colspan="2" scope="row"><label>


<input name="reg" type="submit" class="butt1" value="Register" onclick="return
validate()" />

</label></th>

</tr>

</table>

<p>&nbsp;</p>

<p>&nbsp;</p></td>

</tr>

</table>

<p>&nbsp;</p>

</form>

</body>

</html>

You might also like