From 7037046a4f9dc2652047014ae3fa37bc777ede09 Mon Sep 17 00:00:00 2001 From: ankitjagat07 <97591145+ankitjagat07@users.noreply.github.com> Date: Sun, 16 Apr 2023 10:29:50 +0530 Subject: [PATCH 1/5] Added My Full Source Code With Their Extensions Team Name- ignite07 E-mail- jagatankit177@gmail.com --- connect.php | 1 + form.html | 83 +++++++++++++++++++++++ homepage.html | 167 +++++++++++++++++++++++++++++++++++++++++++++++ index.html | 53 +++++++++++++++ login.html | 52 +++++++++++++++ scratchcard.css | 55 ++++++++++++++++ scratchcard.html | 28 ++++++++ scratchcard.js | 95 +++++++++++++++++++++++++++ script.js | 0 style.css | 150 ++++++++++++++++++++++++++++++++++++++++++ style1.css | 150 ++++++++++++++++++++++++++++++++++++++++++ style3.css | 150 ++++++++++++++++++++++++++++++++++++++++++ 12 files changed, 984 insertions(+) create mode 100644 connect.php create mode 100644 form.html create mode 100644 homepage.html create mode 100644 index.html create mode 100644 login.html create mode 100644 scratchcard.css create mode 100644 scratchcard.html create mode 100644 scratchcard.js create mode 100644 script.js create mode 100644 style.css create mode 100644 style1.css create mode 100644 style3.css diff --git a/connect.php b/connect.php new file mode 100644 index 0000000..5c15a99 --- /dev/null +++ b/connect.php @@ -0,0 +1 @@ + + + + + + + + + IGNITE07 + + +
+
+
+
+ + +
+

+
+
+ +
+
+
Online Voter Registration Portal
+
+ + +
+
+ + +
+
+ + +
+ +
+ + +
+ + + +
+ + +
+ +
+ + +
+ + +
+ + + +
+ +
+
+
+
+
+ + \ No newline at end of file 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/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/scratchcard.css b/scratchcard.css new file mode 100644 index 0000000..7a8d2b7 --- /dev/null +++ b/scratchcard.css @@ -0,0 +1,55 @@ +* { + padding: 0; + margin: 0; + box-sizing: border-box; + } + body { + height: 100vh; + background: linear-gradient(135deg, #a3aff1, #14e9a6); + } + .container { + width: 31em; + height: 31em; + background-color: #f5f5f5; + position: absolute; + transform: translate(-50%, -50%); + top: 50%; + left: 50%; + border-radius: 0.6em; + } + .base, + #scratch { + height: 200px; + width: 200px; + position: absolute; + transform: translate(-50%, -50%); + top: 50%; + left: 50%; + text-align: center; + cursor: grabbing; + border-radius: 0.3em; + } + .base { + background-color: #ffffff; + font-family: "Poppins", sans-serif; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + box-shadow: 0 1.2em 2.5em rgba(16, 2, 96, 0.15); + } + .base h3 { + font-weight: 600; + font-size: 1.5em; + color: #17013b; + } + .base h4 { + font-weight: 400; + color: #746e7e; + } + #scratch { + -webkit-tap-highlight-color: transparent; + -webkit-touch-callout: none; + -webkit-user-select: none; + user-select: none; + } \ No newline at end of file diff --git a/scratchcard.html b/scratchcard.html new file mode 100644 index 0000000..f224900 --- /dev/null +++ b/scratchcard.html @@ -0,0 +1,28 @@ + + + + + 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/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 From 8c960066567285a19d0b59ce2e908b2dce6c8a16 Mon Sep 17 00:00:00 2001 From: ankitjagat07 <97591145+ankitjagat07@users.noreply.github.com> Date: Sun, 16 Apr 2023 10:31:17 +0530 Subject: [PATCH 2/5] Delete connect.php --- connect.php | 1 - 1 file changed, 1 deletion(-) delete mode 100644 connect.php diff --git a/connect.php b/connect.php deleted file mode 100644 index 5c15a99..0000000 --- a/connect.php +++ /dev/null @@ -1 +0,0 @@ - Date: Sun, 16 Apr 2023 10:32:13 +0530 Subject: [PATCH 3/5] Add files via upload --- connection.php | 12 ++++++ functions.php | 45 ++++++++++++++++++++++ login.php | 100 +++++++++++++++++++++++++++++++++++++++++++++++++ logout.php | 12 ++++++ signup.php | 92 +++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 261 insertions(+) create mode 100644 connection.php create mode 100644 functions.php create mode 100644 login.php create mode 100644 logout.php create mode 100644 signup.php diff --git a/connection.php b/connection.php new file mode 100644 index 0000000..540cb06 --- /dev/null +++ b/connection.php @@ -0,0 +1,12 @@ + 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/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 @@ + + + + + + + Signup + + + + + +
+ +
+
Signup
+ +

+

+

+

+

+

+

+

+

+ + +

+ + Click to Login

+
+
+ + \ No newline at end of file From ad23c12b5e2f162b6a9adc58dbd933077a5c4b1a Mon Sep 17 00:00:00 2001 From: ankitjagat07 <97591145+ankitjagat07@users.noreply.github.com> Date: Sun, 16 Apr 2023 10:33:25 +0530 Subject: [PATCH 4/5] Add files via upload --- index.php | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 index.php 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 From 481bc5308d8f32bded907abd5c8fd30cc1bdce72 Mon Sep 17 00:00:00 2001 From: ankitjagat07 <97591145+ankitjagat07@users.noreply.github.com> Date: Sun, 16 Apr 2023 10:51:30 +0530 Subject: [PATCH 5/5] Updated README.md --- README.md | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) 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