-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathreg_status_check.php
135 lines (121 loc) · 4.98 KB
/
reg_status_check.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
<!DOCTYPE html>
<html>
<head>
<title>RTO Karnataka</title>
<!--css-->
<link href="css/bootstrap.css" rel="stylesheet" type="text/css" media="all" />
<link href="css/style.css" rel="stylesheet" type="text/css" media="all" />
<link rel="stylesheet" href="css/ken-burns.css" type="text/css" media="all" />
<link rel="stylesheet" href="css/animate.min.css" type="text/css" media="all" />
<!--css-->
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="RTO WEB TEMPLATE" />
<script type="application/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } </script>
<!--js-->
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<!--js-->
<!--webfonts-->
<link href='//fonts.googleapis.com/css?family=Cagliostro' rel='stylesheet' type='text/css'>
<link href='//fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600,600italic,700,700italic,800,800italic' rel='stylesheet' type='text/css'>
<!--webfonts-->
</head>
<body>
<!--header-->
<div class="header">
<div class="container">
<nav class="navbar navbar-default">
<div class="container-fluid">
<!---Brand and toggle get grouped for better mobile display--->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<div class="navbar-brand">
<h1><a href="index.html">RTO <span>Karnataka</span></a></h1>
</div>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<nav class="link-effect-2" id="link-effect-2">
<ul class="nav navbar-nav">
<li><a href="home.html"><span data-hover="Home">Home</span></a></li>
<li><a href="click_llr.php"><span data-hover="LLR">LLR</span></a></li>
<li><a href="click_registration.php"><span data-hover="Registration">Registration</span></a></li>
<li><a href="click_dl.php"><span data-hover="DL">DL</span></a></li>
<li><a href="complaint.php"><span data-hover="Complaint">Complaint</span></a></li>
<li><a href="gallery.html"><span data-hover="Gallery">Gallery</span></a></li>
</ul>
</nav>
</div>
</div>
</nav>
</div>
</div>
<!--header-->
<div class="content">
<!--banner-bottom-->
<!--student-->
<div class="student-w3ls">
<div class="container">
<h3 class="tittle">Vehicle Registration</h3>
<div class="student-grids">
<div class="col-md-8 student-grid">
<?php
$conn = mysqli_connect("localhost","root","");
mysqli_select_db($conn,"dbms_p1");
$results1=0;
$aad=$_GET["aad"];
$passwd = $_GET["passwd"];
$sql = "SELECT first_name,middle_name,last_name,dob FROM citizen where aadhar=$aad";
$sql1 = "SELECT aadhar,reg_status,passwd FROM reg where aadhar=$aad";
$result1 = $conn->query($sql1);
$row1=mysqli_fetch_row($result1);
$result = $conn->query($sql);
if (mysqli_num_rows($result) > 0) {
while($row = mysqli_fetch_assoc($result)) {
echo "<p><br><br><br>";
echo "<p><b>    Aadhar number: " . $aad . "<br>";
echo "<p>    Name: " . $row["first_name"] ." ".$row["middle_name"]." ".$row["last_name"] . "<br>";
echo "<p>    Date of birth: " . $row["dob"] . "<br>";
$dob=$row["dob"]; }
}
else {
echo "0 results";
}
if (mysqli_num_rows($result1) > 0 && $passwd!=$row1[2]){
echo ("<SCRIPT LANGUAGE='JavaScript'>
window.alert('Password incorrect')
window.location.href='reg_status.php'
</SCRIPT>");
}
if (mysqli_num_rows($result1) > 0 && $passwd==$row1[2]){
$row1=mysqli_fetch_row($result1);
if($row1[1]==1){
echo "<br><br><br>   Your Vehicle Registration Status: Approved";
}
else{
echo "<br><br><br>   Your Vehicle Registration Status: Not Approved";
}
}
else{
echo "<br><br>    You have not applied for Vehicle Registration";
}
$age = floor((time() - strtotime($dob)) / 31556926);
if($age<18)
{echo ("<SCRIPT LANGUAGE='JavaScript'>
window.alert('Not eligible')
window.location.href='home.html'
</SCRIPT>");
}
?>
</div>
</div>
</div></div></div>
<p align="center"><a href="home.html"><h2 align="center">Exit</h2></a></p>
</body>
</html>