-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathqrfinder.php
142 lines (117 loc) · 3.85 KB
/
qrfinder.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
141
142
<html>
<head>
<title>QR finder</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<style>
.container_decor{
background-color:rgb(46,50,86);
background-image:url('tn.jpg');
background-repeat:no-repeat;
background-size:70px 77px;
background-position:10px 2px;
margin-bottom:3%;
}
.container:before {
box-shadow: inset 0 0 2000px rgba(255, 255, 255, .5);
}
.error {color: #FF0000;}
#log{
text-align:center;
color:#000000;
font:small-caps bolder 28px arial;
}
#log1{
text-align:center;
color:#ffffff;
font:small-caps bolder 28px arial;
}
form{
width: 100%;
margin-top: 0px;
margin-left:1%;
height:150 px;
padding:20px 0;
align-items:center;
justify-content: space-around;
display: flex;
float:none;
opacity:0.9;
}
body{
background-image:url("stay-home-stay-safe.jpg");
background-repeat:no-repeat;
background-size:35% 58%;
background-position:430px 160px;
opacity:0.9;
}
p {
position: absolute;
left: 120px;
top: 339px;
color: red;
}
</style>
</head>
<body >
<div class="container-fluid container_decor">
<h1 style="font-family: cambria;color: white;height: 6%;margin-left: 45%;margin-top: 1%;";>TN e-Pass</h1>
<h5 style="font-family: arial;color: white; height: 1.5%;text-align: center; "><b>Tamil Nadu e-Pass QR downloader Portal</b>
</h5>
</div>
<marquee style="font-family: cambria ;background-color:lightyellow;font: 40%;direction:right;font-style:italic;color:red;height: 3%;">Passes are issued to students, migrants labours and pilgrims under age of 60 and not to other cases as of now.</marquee>
<form method = "post" action="<?php
echo htmlspecialchars($_SERVER["PHP_SELF"]);?>" opacity:1>
<div class="col-xs-5">
<div class="panel panel-primary">
<div class="panel-heading text-center">
<h4 id="log1" style="font-family: cambria;" >E-PASS</h4>
</div>
<div class="panel-body">
<div class="form-group">
<label for="qr" style="font-family: cambria;">Enter the Login ID</label>
<input type="text" name="vno" style="font-family:cambria;" class="form-control input-lg" id="name" >
</div>
<input type="submit" value="Submit" name="submit">
<?php
session_start();
if ($_SERVER["REQUEST_METHOD"] == "POST") {
$vno= test_input($_POST["vno"]);
}
function test_input($data) {
$data = trim($data);
$data = stripslashes($data);
$data = htmlspecialchars($data);
return $data;
}
if(isset($_POST['submit']))
{
$con=mysqli_connect("localhost","Projectphp","php123!@#","tnepass");
$query="select pass_status from tn_login where Login_id='{$vno}'";
$res=mysqli_query($con,$query);
if(mysqli_num_rows($res)>0)
{
while($row=mysqli_fetch_assoc($res))
{
$qr=$row['pass_status'];
}
echo '<br>';
echo '<h4> Download The QR....</h4>';
echo " <img src=https://chart.googleapis.com/chart?chs=250x250&cht=qr&chl={$qr} download>";
}
else
{
echo '<br>';
echo "<div style='background-color:red;text-align:center;padding:10px;'>
<h4 style='color:white'>LOGIN ID NOT EXISTS...</h4>
</div>";
}
}
?>
</div>
</div>
</div>
</form>