Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Binary file added Vote.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
251 changes: 117 additions & 134 deletions aadharlogin.html
Original file line number Diff line number Diff line change
@@ -1,134 +1,117 @@
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
body {font-family: Arial, Helvetica, sans-serif;}
form {border: 3px solid #f1f1f1;}

input[type=text], input[type=password] {
width: 40%;
padding: 12px 20px;
margin: 8px 0;
display: inline-block;
border: 1px solid #ccc;
box-sizing: border-box;
al
}

button {
background-color: #4CAF50;
color: white;
padding: 14px 20px;
margin: 8px 0;
border: none;
cursor: pointer;
width: 40%;
}

button:hover {
opacity: 0.8;
}

.cancelbtn {
width: auto;
padding: 10px 18px;
background-color: #f44336;
}

.imgcontainer {
text-align: center;
margin: 24px 0 12px 0;
}

img.avatar {
width: 20%;
border-radius: 40%;
}

.container {
padding: 10px;
}

span.psw {
float: right;
padding-top: 16px;
}

/* Change styles for span and cancel button on extra small screens */
@media screen and (max-width: 300px) {
span.psw {
display: block;
float: none;
}
.cancelbtn {
width: 100%;
}
}
</style>
</head>
<body>

<center><h2>Welcome to E-voting Portal</h2></center>
<center><h3>Login Below to Participate:</h3></center>
<form name="myform" action="" method="post" onsubmit="checkval()" >
<div class="imgcontainer">
<img src="img_avatar2.png" alt="Avatar" class="avatar">
</div>

<center><div class="container">
<label for="uname"><b>Enter Aadhar Card Number:</b></label><br>
<input type="text" id="uname" placeholder="Enter Aadhar number" name="uname" required><br>

<!-- <label for="psw"><b>Password</b></label>
<input type="password" placeholder="Enter Password" name="psw" required>
-->
<button type="submit" >Login</button><br>
<label>
<input type="checkbox" checked="checked" name="remember"> Remember me
</label>
</div><center>


</form>

</body>
<script type="text/javascript">
function checkval()
{
//document.write("hi");
var x=document.forms["myform"]["uname"].value;

var pattern=/[0-9]{12}/g;
if(pattern.test(x)==false){
alert("Invalid Aadhar Number.. Try Again")
}
else{
console.log("hello1");
var aadhar = x;
request(aadhar);


}


}
function request(val){
var sen = "aadhar="+ val;
var xmlhttp = new XMLHttpRequest();
xmlhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {

console.log("Chal Gaya");
document.write(this.responseText);

}
}
xmlhttp.open("POST","http://localhost/test/win.php",true);
xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xmlhttp.send(sen);


}
</script>
</html>
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">

<style>
body {font-family: Arial, Helvetica, sans-serif;}
form {border: 3px solid #f1f1f1;}

input[type=text], input[type=password] {
width: 40%;
padding: 12px 20px;
margin: 8px 0;
display: inline-block;
border: 1px solid #ccc;
box-sizing: border-box;
al
}

button {
background-color: #4CAF50;
color: white;
padding: 14px 20px;
margin: 8px 0;
border: none;
cursor: pointer;
width: 40%;
}

button:hover {
opacity: 0.8;
}

.cancelbtn {
width: auto;
padding: 10px 18px;
background-color: #f44336;
}

.imgcontainer {
text-align: center;
margin: 24px 0 12px 0;
}

img.avatar {
width: 20%;
border-radius: 40%;
}

.container {
padding: 10px;
}

span.psw {
float: right;
padding-top: 16px;
}

/* Change styles for span and cancel button on extra small screens */
@media screen and (max-width: 300px) {
span.psw {
display: block;
float: none;
}
.cancelbtn {
width: 100%;
}
}
</style>
</head>
<body>

<center><h2>Welcome to E-voting Portal</h2></center>
<center><h3>Login Below to Participate:</h3></center>
<form name="myform" action="otppage.php" method="post"onsubmit="return checkval();" >
<div class="imgcontainer">
<img src="img_avatar2.png" alt="Avatar" class="avatar">
</div>

<center><div class="container">
<label for="uname"><b>Enter Aadhar Card Number:</b></label><br>
<input type="text" id="uname" placeholder="Enter Aadhar number" name="uname" required><br>

<!-- <label for="psw"><b>Password</b></label>
<input type="password" placeholder="Enter Password" name="psw" required>
-->
<button type="submit" >Login</button><br>

</div><center>


</form>
<script type="text/javascript">
function checkval()
{

var x=document.forms["myform"]["uname"].value;

var pattern=/[0-9]{12}/g;
if(pattern.test(x)==false){

alert("Invalid Aadhar Number.. Try Again");
return false;
}
else{
return true;
}




}

</script>
</body>

</html>
16 changes: 0 additions & 16 deletions client.py

This file was deleted.

5 changes: 5 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"require": {
"twilio/sdk": "5.*"
}
}
64 changes: 64 additions & 0 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31 changes: 31 additions & 0 deletions first.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?php

$myString = $_POST['aadhar'];

include 'otppage.html';
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "Aadhar database";
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$sql = "SELECT Phone FROM Aadhar_Details where Aadhar_Number=$myString";
$result = $conn->query($sql);

if ($result->num_rows > 0) {
// output data of each row
while($row = $result->fetch_assoc()) {
echo "Phone Number" . $row["Phone"];
}
} else {
echo "No details";
}
$conn->close();



?>
Loading