diff --git a/README.md b/README.md index 0287eab..38574c2 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,17 @@ # Electhon - 2023 -#### Team Name - -#### Problem Statement - -#### Team Leader Email - +#### Team Name - IGNITE07 +#### Problem Statement - How can we ensure the registration of new voters in the electoral roll? +#### Team Leader Email - jagatankit177@gmail.com ## A Brief of the Prototype: - What is your solution? and how it works. +Basically, We built a website that offers the following features: + +1. Simplified registration forms that make the registration process more accessible and user-friendly for potential voters. +2. Online registration options allow voters to register from the comfort of their own homes, reducing the barriers posed by physical registration centers. +3. When Online registration is done, a pop-up generates with a scratch card(we may be tied up with many companies). +4. In the above discussion we take money from that companies for promoting their platforms with a scratch card method. We use promo code on some product which is only on their platform. As a result, users will also get benefits for registering online and the government and the company make money from this solution. +5. Same-day voter registration policies allow eligible voters to register to vote on the day of the election itself, reducing the barriers posed by strict registration deadlines. ## Code Execution Instruction: - *[If your solution is **not** application based, you can ignore this para] - - *The Repository must contain your **Execution Plan PDF**. + Pdf Link- https://drive.google.com/file/d/184VrstmZ2Ds0rPrZTvGXQica9K4P6O5q/view?usp=sharing diff --git a/connection.php b/connection.php new file mode 100644 index 0000000..540cb06 --- /dev/null +++ b/connection.php @@ -0,0 +1,12 @@ + + + + + + + + + IGNITE07 + + +
+
+
+
+ + +
+

+
+
+ +
+
+
Online Voter Registration Portal
+
+ + +
+
+ + +
+
+ + +
+ +
+ + +
+ + + +
+ + +
+ +
+ + +
+ + +
+ + + +
+ +
+
+
+
+
+ + \ No newline at end of file diff --git a/functions.php b/functions.php new file mode 100644 index 0000000..6215486 --- /dev/null +++ b/functions.php @@ -0,0 +1,45 @@ + 0) + { + + $user_data = mysqli_fetch_assoc($result); + return $user_data; + } + } + + //redirect to login + header("Location: login.php"); + die; + +} + +function random_num($length) +{ + + $text = ""; + if($length < 5) + { + $length = 5; + } + + $len = rand(4,$length); + + for ($i=0; $i < $len; $i++) { + # code... + + $text .= rand(0,9); + } + + return $text; +} diff --git a/homepage.html b/homepage.html new file mode 100644 index 0000000..8fae05f --- /dev/null +++ b/homepage.html @@ -0,0 +1,167 @@ + + + + + + + + IGNITE07 + + +
+
+ + + + + IGNITE07 + + + +
+
+ + +
+
+
+
+
+

+

Online Registration Form

+

Election commission of India offers online voter registration for Indian citizens who have attained the age of 18 on the qualifying date (1st of January of the year of revision of electoral roll). Citizen, can enroll himself/herself as General Voter and fill Form 6 online at National Voters' Service Portal.

+ Register Now + + + + + +
+ + + + + + + + + + + +
+
+
+
+
+

+

Instructions

+

Requirements for registering to vote + + You can enroll as a Voter if you: + + are an Indian citizen. + have attained the age of 18 years on the qualifying date i.e. 1st of January of the year of revision of electoral roll. + are ordinarily resident of the part/polling area of the constituency where you want to be enrolled. + are not disqualified to be enrolled as an elector. +

+ Learn More + + + + + +
+ + + + + + + + + + + +
+
+
+
+
+

+

Download/Print Voter Id Card

+

Click Here to Download

+ + + + + + +
+ + + + + + + + + + + +
+
+
+
+
+
+ + + + + + \ No newline at end of file diff --git a/index.html b/index.html new file mode 100644 index 0000000..4613c24 --- /dev/null +++ b/index.html @@ -0,0 +1,53 @@ + + + + + + + + + IGNITE07 + + +
+
+
+
+ + +
+

+
+
+ +
+
+
Create account
+
+ + +
+
+ + +
+
+ + +
+ +
+ + + +
+ +
+
+
+
+
+ + \ No newline at end of file diff --git a/index.php b/index.php new file mode 100644 index 0000000..91d05b2 --- /dev/null +++ b/index.php @@ -0,0 +1,26 @@ + + + + + + My website + + + + Logout +

Click Here to See Your Reward

+ + + +
+ Hello, + + \ No newline at end of file diff --git a/login.html b/login.html new file mode 100644 index 0000000..3af8bcc --- /dev/null +++ b/login.html @@ -0,0 +1,52 @@ + + + + + + + + + IGNITE07 + + +
+
+
+
+ + +
+

+
+
+
+
+
Login to Your Account
+
+ + +
+ +
+ + +
+ Forgot Password? +
+ + + +
+ +
+
+
+
+
+ + \ No newline at end of file diff --git a/login.php b/login.php new file mode 100644 index 0000000..7ab3d7a --- /dev/null +++ b/login.php @@ -0,0 +1,100 @@ + 0) + { + + $user_data = mysqli_fetch_assoc($result); + + if($user_data['password'] === $password) + { + + $_SESSION['user_id'] = $user_data['user_id']; + header("Location: index.php"); + die; + } + } + } + + echo "wrong username or password!"; + }else + { + echo "wrong username or password!"; + } + } + +?> + + + + + + Login + + + + + +
+ +
+
Login
+ +

+

+ +

+ + Click to Signup

+
+
+ + \ No newline at end of file diff --git a/logout.php b/logout.php new file mode 100644 index 0000000..fee1d85 --- /dev/null +++ b/logout.php @@ -0,0 +1,12 @@ + + + + + Scratch Card + + + + + + +
Registration Successful
+
+
+
You Won
+

10% Off On Java Course

+

Redeem Code- IGNITE07

+ +
+ +
+ + + + \ No newline at end of file diff --git a/scratchcard.js b/scratchcard.js new file mode 100644 index 0000000..e2e903c --- /dev/null +++ b/scratchcard.js @@ -0,0 +1,95 @@ +let canvas = document.getElementById("scratch"); +let context = canvas.getContext("2d"); + +const init = () => { + let gradientColor = context.createLinearGradient(0, 0, 135, 135); + gradientColor.addColorStop(0, "#c3a3f1"); + gradientColor.addColorStop(1, "#6414e9"); + context.fillStyle = gradientColor; + context.fillRect(0, 0, 200, 200); +}; + +//initially mouse X and mouse Y positions are 0 +let mouseX = 0; +let mouseY = 0; +let isDragged = false; + +//Events for touch and mouse +let events = { + mouse: { + down: "mousedown", + move: "mousemove", + up: "mouseup", + }, + touch: { + down: "touchstart", + move: "touchmove", + up: "touchend", + }, +}; + +let deviceType = ""; + +//Detech touch device +const isTouchDevice = () => { + try { + //We try to create TouchEvent. It would fail for desktops and throw error. + document.createEvent("TouchEvent"); + deviceType = "touch"; + return true; + } catch (e) { + deviceType = "mouse"; + return false; + } +}; + +//Get left and top of canvas +let rectLeft = canvas.getBoundingClientRect().left; +let rectTop = canvas.getBoundingClientRect().top; + +//Exact x and y position of mouse/touch +const getXY = (e) => { + mouseX = (!isTouchDevice() ? e.pageX : e.touches[0].pageX) - rectLeft; + mouseY = (!isTouchDevice() ? e.pageY : e.touches[0].pageY) - rectTop; +}; + +isTouchDevice(); +//Start Scratch +canvas.addEventListener(events[deviceType].down, (event) => { + isDragged = true; + //Get x and y position + getXY(event); + scratch(mouseX, mouseY); +}); + +//mousemove/touchmove +canvas.addEventListener(events[deviceType].move, (event) => { + if (!isTouchDevice()) { + event.preventDefault(); + } + if (isDragged) { + getXY(event); + scratch(mouseX, mouseY); + } +}); + +//stop drawing +canvas.addEventListener(events[deviceType].up, () => { + isDragged = false; +}); + +//If mouse leaves the square +canvas.addEventListener("mouseleave", () => { + isDragged = false; +}); + +const scratch = (x, y) => { + //destination-out draws new shapes behind the existing canvas content + context.globalCompositeOperation = "destination-out"; + context.beginPath(); + //arc makes circle - x,y,radius,start angle,end angle + context.arc(x, y, 12, 0, 2 * Math.PI); + context.fill(); +}; + +window.onload = init(); \ No newline at end of file diff --git a/script.js b/script.js new file mode 100644 index 0000000..e69de29 diff --git a/signup.php b/signup.php new file mode 100644 index 0000000..c756702 --- /dev/null +++ b/signup.php @@ -0,0 +1,92 @@ + + + + + + + Signup + + + + + +
+ +
+
Signup
+ +

+

+

+

+

+

+

+

+

+ + +

+ + Click to Login

+
+
+ + \ No newline at end of file diff --git a/style.css b/style.css new file mode 100644 index 0000000..957a854 --- /dev/null +++ b/style.css @@ -0,0 +1,150 @@ +@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;800&display=swap'); + +*{ + font-family: 'Poppins', sans-serif; +} +.wrapper{ + background: #ececec; + padding: 0 20px 0 20px; +} +.main{ + display: flex; + justify-content: center; + align-items: center; + min-height: 100vh; +} +.row{ + width: 900px; + height: 550px; + border-radius: 10px; + background: #fff; + box-shadow: 5px 5px 10px 1px rgba(0,0,0,0.2); +} +.side-image{ + background-image: url("images/2.jpg"); + background-position: center; + background-size: cover; + background-repeat: no-repeat; + position: relative; + border-radius: 10px 0 0 10px; +} +img{ + width: 35px; + position: absolute; + top: 30px; + left: 30px; +} +.text{ + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); +} +.text p{ + color: #fff; + font-size: 18px; +} +i{ + font-weight: 400; + font-size: 15px; +} +.right{ + display: flex; + justify-content: center; + align-items: center; + position: relative; +} +.input-box{ + width: 330px; + box-sizing: border-box; +} +.input-box header{ + font-weight: 700; + text-align: center; + margin-bottom: 45px; +} +.input-field{ + display: flex; + flex-direction: column; + position: relative; + padding: 0 10px 0 10px; +} +.input{ + height: 45px; + width: 100%; + background: transparent; + border: none; + border-bottom: 1px solid rgba(0,0,0,0.2); + outline: none; + margin-bottom: 20px; + color: #40414a; +} +.input-box .input-field label{ + position: absolute; + top: 10px; + left: 10px; + pointer-events: none; + transition: .5s; +} +.input-field .input:focus ~ label{ + top: -10px; + font-size: 13px; +} +.input-field .input:valid ~ label{ + top: -10px; + font-size: 13px; + color: #5d5076; +} +.input-field .input:focus, .input-field .input:valid{ + border-bottom: 1px solid #743ae1; +} +.submit{ + border: none; + outline: none; + height: 45px; + background: #ececec; + border-radius: 5px; + transition: .4s; +} +.submit:hover{ + background: rgba(37, 95, 156,0.9); + color: #fff; +} +.signin{ + text-align: center; + font-size: small; + margin-top: 25px; +} +span a{ + text-decoration: none; + font-weight: 700; + color: #000; + transition: .5s; +} +span a:hover{ + text-decoration: underline; + color: #000; +} +@media only screen and (max-width: 768px){ + .side-image{ + border-radius: 10px 10px 0 0; + } + img{ + width: 35px; + position: absolute; + top: 20px; + left: 47%; + } + .text{ + position: absolute; + top: 70%; + text-align: center; + } + .text p,i{ + font-size: 17px; + } + .row{ + max-width: 420px; + width: 100%; + } +} \ No newline at end of file diff --git a/style1.css b/style1.css new file mode 100644 index 0000000..7cccb6b --- /dev/null +++ b/style1.css @@ -0,0 +1,150 @@ +@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;800&display=swap'); + +*{ + font-family: 'Poppins', sans-serif; +} +.wrapper{ + background: #ececec; + padding: 0 20px 0 20px; +} +.main{ + display: flex; + justify-content: center; + align-items: center; + min-height: 100vh; +} +.row{ + width: 900px; + height: 550px; + border-radius: 10px; + background: #fff; + box-shadow: 5px 5px 10px 1px rgba(0,0,0,0.2); +} +.side-image{ + background-image: url("images/form.jpg"); + background-position: center; + background-size: cover; + background-repeat: no-repeat; + position: relative; + border-radius: 10px 0 0 10px; +} +img{ + width: 35px; + position: absolute; + top: 30px; + left: 30px; +} +.text{ + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); +} +.text p{ + color: #fff; + font-size: 18px; +} +i{ + font-weight: 400; + font-size: 15px; +} +.right{ + display: flex; + justify-content: center; + align-items: center; + position: relative; +} +.input-box{ + width: 330px; + box-sizing: border-box; +} +.input-box header{ + font-weight: 700; + text-align: center; + margin-bottom: 45px; +} +.input-field{ + display: flex; + flex-direction: column; + position: relative; + padding: 0 10px 0 10px; +} +.input{ + height: 45px; + width: 100%; + background: transparent; + border: none; + border-bottom: 1px solid rgba(0,0,0,0.2); + outline: none; + margin-bottom: 20px; + color: #40414a; +} +.input-box .input-field label{ + position: absolute; + top: 10px; + left: 10px; + pointer-events: none; + transition: .5s; +} +.input-field .input:focus ~ label{ + top: -10px; + font-size: 13px; +} +.input-field .input:valid ~ label{ + top: -10px; + font-size: 13px; + color: #5d5076; +} +.input-field .input:focus, .input-field .input:valid{ + border-bottom: 1px solid #743ae1; +} +.submit{ + border: none; + outline: none; + height: 45px; + background: #ececec; + border-radius: 5px; + transition: .4s; +} +.submit:hover{ + background: rgba(37, 95, 156,0.9); + color: #fff; +} +.signin{ + text-align: center; + font-size: small; + margin-top: 25px; +} +span a{ + text-decoration: none; + font-weight: 700; + color: #000; + transition: .5s; +} +span a:hover{ + text-decoration: underline; + color: #000; +} +@media only screen and (max-width: 768px){ + .side-image{ + border-radius: 10px 10px 0 0; + } + img{ + width: 35px; + position: absolute; + top: 20px; + left: 47%; + } + .text{ + position: absolute; + top: 70%; + text-align: center; + } + .text p,i{ + font-size: 17px; + } + .row{ + max-width: 420px; + width: 100%; + } +} \ No newline at end of file diff --git a/style3.css b/style3.css new file mode 100644 index 0000000..0e1118a --- /dev/null +++ b/style3.css @@ -0,0 +1,150 @@ +@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;800&display=swap'); + +*{ + font-family: 'Poppins', sans-serif; +} +.wrapper{ + background: #ececec; + padding: 0 20px 0 20px; +} +.main{ + display: flex; + justify-content: center; + align-items: center; + min-height: 100vh; +} +.row{ + width: 900px; + height: 550px; + border-radius: 10px; + background: #fff; + box-shadow: 5px 5px 10px 1px rgba(0,0,0,0.2); +} +.side-image{ + background-image: url("images/3.jpg"); + background-position: center; + background-size: cover; + background-repeat: no-repeat; + position: relative; + border-radius: 10px 0 0 10px; +} +img{ + width: 35px; + position: absolute; + top: 30px; + left: 30px; +} +.text{ + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); +} +.text p{ + color: #fff; + font-size: 18px; +} +i{ + font-weight: 400; + font-size: 15px; +} +.right{ + display: flex; + justify-content: center; + align-items: center; + position: relative; +} +.input-box{ + width: 330px; + box-sizing: border-box; +} +.input-box header{ + font-weight: 700; + text-align: center; + margin-bottom: 45px; +} +.input-field{ + display: flex; + flex-direction: column; + position: relative; + padding: 0 10px 0 10px; +} +.input{ + height: 45px; + width: 100%; + background: transparent; + border: none; + border-bottom: 1px solid rgba(0,0,0,0.2); + outline: none; + margin-bottom: 20px; + color: #40414a; +} +.input-box .input-field label{ + position: absolute; + top: 10px; + left: 10px; + pointer-events: none; + transition: .5s; +} +.input-field .input:focus ~ label{ + top: -10px; + font-size: 13px; +} +.input-field .input:valid ~ label{ + top: -10px; + font-size: 13px; + color: #5d5076; +} +.input-field .input:focus, .input-field .input:valid{ + border-bottom: 1px solid #743ae1; +} +.submit{ + border: none; + outline: none; + height: 45px; + background: #ececec; + border-radius: 5px; + transition: .4s; +} +.submit:hover{ + background: rgba(37, 95, 156,0.9); + color: #fff; +} +.signin{ + text-align: center; + font-size: small; + margin-top: 25px; +} +span a{ + text-decoration: none; + font-weight: 700; + color: #000; + transition: .5s; +} +span a:hover{ + text-decoration: underline; + color: #000; +} +@media only screen and (max-width: 768px){ + .side-image{ + border-radius: 10px 10px 0 0; + } + img{ + width: 35px; + position: absolute; + top: 20px; + left: 47%; + } + .text{ + position: absolute; + top: 70%; + text-align: center; + } + .text p,i{ + font-size: 17px; + } + .row{ + max-width: 420px; + width: 100%; + } +} \ No newline at end of file