This repository has been archived by the owner on Jan 3, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
25 changed files
with
5,310 additions
and
287 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
.exe | ||
node_modules/ |
Binary file added
BIN
+2.94 MB
assets/img/wallpapersden.com_bloom-edges-blue-windows-11_3840x2160.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,30 @@ | ||
<?php | ||
session_start(); | ||
|
||
// Check if user is logged in and is a voter, if not, redirect to login page | ||
if (!isset($_SESSION["username"])) { | ||
header("Location: ../index.html"); | ||
exit(); | ||
} | ||
|
||
// Include database connection | ||
require_once "./conn/db_connection.php"; | ||
|
||
?> | ||
|
||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<html lang="en" data-theme="cyberpunk"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>SK E-Voting System - Candidate List</title> | ||
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/tailwind.min.css" rel="stylesheet"> | ||
<link href="../frontend/css/output.css" rel="stylesheet"> | ||
</head> | ||
<body class="bg-gray-100 p-8"> | ||
<h1 class="text-2xl font-bold mb-4">Candidate List</h1><hr><br> | ||
<h1 class="text-2xl font-bold mb-4 text-black">Candidate List</h1><hr><br> | ||
|
||
<!-- Candidate list container --> | ||
<div id="candidateListContainer"> | ||
<?php include 'CdListLoader.php'; ?> | ||
</div> | ||
|
||
<script> | ||
// Function to load candidate list using AJAX | ||
function loadCandidateList() { | ||
var xhr = new XMLHttpRequest(); | ||
xhr.open('GET', './CdListLoader.php', true); | ||
|
@@ -47,7 +42,6 @@ function loadCandidateList() { | |
xhr.send(); | ||
} | ||
|
||
// Load candidate list immediately and every 5 seconds | ||
loadCandidateList(); | ||
setInterval(loadCandidateList, 5000); | ||
</script> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,13 +11,13 @@ | |
?> | ||
|
||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<html lang="en" data-theme="dark"> | ||
|
||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>SK E-Voting System - User Dashboard</title> | ||
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/tailwind.min.css" rel="stylesheet"> | ||
<link rel="stylesheet" href="../frontend/css/output.css"> | ||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> | ||
<script src="./js/RulesNotif.js" async></script> | ||
<!--<script src="./js/alrVoted.js" async></script>--> | ||
|
@@ -29,59 +29,62 @@ | |
<body class="bg-gray-100"> | ||
<div class="flex h-screen"> | ||
<!-- Sidebar --> | ||
<div class="bg-gray-800 text-gray-100 flex-shrink-0 w-64 z-50 sidebar"> | ||
<div class="bg-gray-800 text-gray-100 flex-shrink-0 w-64 z-50 sidebar"><br> | ||
<div class="p-4"> | ||
<!-- Logo --> | ||
<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/b/b2/Sangguniang_Kabataan_logo.svg/150px-Sangguniang_Kabataan_logo.svg.png" | ||
alt="Logo" class="w-32 mx-auto mb-4"> | ||
<!-- Navigation Links --> | ||
<ul> | ||
<li class="mb-2"> | ||
<div class="flex items-center"> | ||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" | ||
stroke="currentColor" class="w-6 h-6"> | ||
<path stroke-linecap="round" stroke-linejoin="round" | ||
d="M8.25 21v-4.875c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21m0 0h4.5V3.545M12.75 21h7.5V10.75M2.25 21h1.5m18 0h-18M2.25 9l4.5-1.636M18.75 3l-1.5.545m0 6.205 3 1m1.5.5-1.5-.5M6.75 7.364V3h-3v18m3-13.636 10.5-3.819" /> | ||
<img src="https://i.ibb.co/rsxxP8b/150px-Sangguniang-Kabataan-logo-svg.png" alt="Logo" | ||
class="w-32 mx-auto mb-4"> | ||
<div class="w-full px-2"> | ||
<div class="flex flex-col items-center w-full mt-3 border-t border-gray-700"> | ||
<a class="flex items-center w-full h-12 px-3 mt-2 rounded hover:bg-gray-700 hover:text-gray-300" | ||
href="#home" onclick="loadPage('../frontend/home.html')"> | ||
<svg class="w-6 h-6 stroke-current" xmlns="http://www.w3.org/2000/svg" fill="none" | ||
viewBox="0 0 24 24" stroke="currentColor"> | ||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" | ||
d="M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6" /> | ||
</svg> | ||
|
||
<a href="#home" onclick="loadPage('../frontend/home.html')" | ||
class="block px-4 py-2 rounded-md hover:bg-gray-700 flex-grow">Home</a> | ||
</div> | ||
</li> | ||
<li class="mb-2"> | ||
<div class="flex items-center"> | ||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" | ||
stroke="currentColor" class="w-6 h-6"> | ||
<span class="ml-2 text-sm font-medium">Home</span> | ||
</a> | ||
<a class="flex items-center w-full h-12 px-3 mt-2 rounded hover:bg-gray-700 hover:text-gray-300" | ||
href="#vote" onclick="loadPage('../frontend/voteReg.html')"> | ||
<svg class="w-6 h-6 stroke-current" xmlns="http://www.w3.org/2000/svg" fill="none" | ||
viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-6"> | ||
<path stroke-linecap="round" stroke-linejoin="round" | ||
d="m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L10.582 16.07a4.5 4.5 0 0 1-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 0 1 1.13-1.897l8.932-8.931Zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0 1 15.75 21H5.25A2.25 2.25 0 0 1 3 18.75V8.25A2.25 2.25 0 0 1 5.25 6H10" /> | ||
</svg> | ||
<a href="#voter" onclick="loadPage('../frontend/voterReg.html')" | ||
class="block px-4 py-2 rounded-md hover:bg-gray-700 flex-grow votec">Voter</a> | ||
</div> | ||
</li> | ||
<li class="mb-2"> | ||
<div class="flex items-center"> | ||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" | ||
stroke="currentColor" class="w-6 h-6"> | ||
<span class="ml-2 text-sm font-medium">Voter</span> | ||
</a> | ||
<a class="flex items-center w-full h-12 px-3 mt-2 rounded hover:bg-gray-700 hover:text-gray-300" | ||
href="#candidacy" onclick="loadPage('../frontend/candidateReg.html')"> | ||
<svg class="w-6 h-6 stroke-current" xmlns="http://www.w3.org/2000/svg" fill="none" | ||
viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-6"> | ||
<path stroke-linecap="round" stroke-linejoin="round" | ||
d="M12 7.5h1.5m-1.5 3h1.5m-7.5 3h7.5m-7.5 3h7.5m3-9h3.375c.621 0 1.125.504 1.125 1.125V18a2.25 2.25 0 0 1-2.25 2.25M16.5 7.5V18a2.25 2.25 0 0 0 2.25 2.25M16.5 7.5V4.875c0-.621-.504-1.125-1.125-1.125H4.125C3.504 3.75 3 4.254 3 4.875V18a2.25 2.25 0 0 0 2.25 2.25h13.5M6 7.5h3v3H6v-3Z" /> | ||
d="M15.75 9V5.25A2.25 2.25 0 0 0 13.5 3h-6a2.25 2.25 0 0 0-2.25 2.25v13.5A2.25 2.25 0 0 0 7.5 21h6a2.25 2.25 0 0 0 2.25-2.25V15m3 0 3-3m0 0-3-3m3 3H9" /> | ||
</svg> | ||
<a href="#candidacy" onclick="loadPage('../frontend/candidateReg.html')" | ||
class="block px-4 py-2 rounded-md hover:bg-gray-700 flex-grow">Candidacy</a> | ||
</div> | ||
</li> | ||
<li class="mb-2"> | ||
<div class="flex items-center"> | ||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" | ||
stroke="currentColor" class="w-6 h-6"> | ||
<span class="ml-2 text-sm font-medium">Candidacy</span> | ||
</a> | ||
</div> | ||
<div class="flex flex-col items-center w-full mt-2 border-t border-gray-700"> | ||
<a class="flex items-center w-full h-12 px-3 mt-2 rounded hover:bg-gray-700 hover:text-gray-300" | ||
href="#about" onclick="loadPage('../frontend/about.html')"> | ||
<svg class="w-6 h-6 stroke-current" xmlns="http://www.w3.org/2000/svg" fill="none" | ||
viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-6"> | ||
<path stroke-linecap="round" stroke-linejoin="round" | ||
d="m11.25 11.25.041-.02a.75.75 0 0 1 1.063.852l-.708 2.836a.75.75 0 0 0 1.063.853l.041-.021M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9-3.75h.008v.008H12V8.25Z" /> | ||
</svg> | ||
<span class="ml-2 text-sm font-medium">About</span> | ||
</a> | ||
<a class="relative flex items-center w-full h-12 px-3 mt-2 rounded hover:bg-gray-700 hover:text-gray-300" | ||
href="./logout.php"> | ||
<svg class="w-6 h-6 stroke-current" xmlns="http://www.w3.org/2000/svg" fill="none" | ||
viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-6"> | ||
<path stroke-linecap="round" stroke-linejoin="round" | ||
d="M9 15 3 9m0 0 6-6M3 9h12a6 6 0 0 1 0 12h-3" /> | ||
</svg> | ||
<a href="./logout.php" | ||
class="block px-4 py-2 rounded-md hover:bg-gray-700 flex-grow">Logout</a> | ||
</div> | ||
</li> | ||
</ul> | ||
<span class="ml-2 text-sm font-medium">Logout</span> | ||
</a> | ||
</div> | ||
|
||
</div> | ||
</div> | ||
</div> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
document.addEventListener('DOMContentLoaded', function() { | ||
fetch('./fetchUsers.php') | ||
.then(response => response.json()) | ||
.then(data => { | ||
const userCount = data.user_count; | ||
document.getElementById('user-count').innerText = userCount; | ||
}) | ||
.catch(error => console.error('Error fetching user count:', error)); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.