-
Notifications
You must be signed in to change notification settings - Fork 11
/
headHome.php
140 lines (109 loc) · 4.29 KB
/
headHome.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
<!DOCTYPE html>
<html>
<head>
<?php
session_start();
if(!isset($_SESSION['x']))
header("location:headlogin.php");
$conn=mysql_connect("localhost","root","");
if(!$conn)
{
die("could not connect".mysql_error());
}
mysql_select_db("crime_portal",$conn);
if(isset($_POST['s1']))
{
if($_SERVER["REQUEST_METHOD"]=="POST")
{
$cid=$_POST['cid'];
$_SESSION['cid']=$cid;
header("location:head_case_details.php");
}
}
if(isset($_POST['s2']))
{
if($_SERVER["REQUEST_METHOD"]=="POST")
{
$loc=$_POST['loc'];
$_SESSION['loc']=$loc;
header("location:headHome1.php");
}
}
?>
<title>HQ Homepage</title>
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
<link href="http://fonts.googleapis.com/css?family=Lato:300,400,700,300italic,400italic,700italic" rel="stylesheet" type="text/css">
<script>
function f1()
{
var sta2=document.getElementById("ciid").value;
var x2=sta2.indexOf(' ');
if(sta2!="" && x2>=0){
document.getElementById("ciid").value="";
alert("Blank Field Not Allowed");
}
}
</script>
</head>
<body style="background-image: url(search1.jpeg); ">
<nav class="navbar navbar-default navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="home.php"><b>Crime Portal</b></a>
</div>
<div id="navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li ><a href="official_login.php">Official Login</a></li>
<li ><a href="headlogin.php">HQ Login</a></li>
<li class="active"><a href="headHome.php">HQ Home</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li class="active" ><a href="headHome.php">View Complaints</a></li>
<li ><a href="head_view_police_station.php">Police Station</a></li>
<li><a href="h_logout.php">Logout   <i class="fa fa-sign-out" aria-hidden="true"></i></a></li>
</ul>
</div>
</div>
</nav>
<div>
<form style="margin-top: 10%; margin-left: 40%;" method="post">
<input type="text" name="cid" style="width: 250px; height: 30px;" placeholder="  Complaint Id" id="ciid" onfocusout="f1()" required>
<div>
<input class="btn btn-primary" type="submit" value="Search" name="s1" style="margin-top: 10px; margin-left: 11%;">
</div>
</form>
<form style="margin-top: 3%; margin-left: 40%;" method="post">
<select name="loc" class="form-control" style="width: 250px;">
<?php
$loc=mysql_query("select location from police_station");
while($row=mysql_fetch_array($loc))
{
?>
<option> <?php echo $row[0]; ?> </option>
<?php
}
?>
</select>
<input class="btn btn-primary" type="submit" value="Search" name="s2" style="margin-top: 10px; margin-left: 11%;">
</form>
</div>
<div style="position: fixed;
left: 0;
bottom: 0;
width: 100%;
background-color: rgba(0,0,0,0.5);
color: white;
text-align: center;">
<h4 style="color: white;">© <b>Crime Portal 2018</b></h4>
</div>
<script type="text/javascript" src="https://code.jquery.com/jquery-2.1.4.js"></script>
<script type="text/javascript" src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
</body>
</html>