Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some operational changes #1

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 85 additions & 0 deletions admin_dashboard.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
<?php session_start();
if(isset($_SESSION['aid'])){
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="css/.css">
<link href="https://fonts.googleapis.com/css2?family=Poppins&display=swap" rel="stylesheet">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<title></title>
</head>
<body>
<div class="container-fluid" id="cont-3">
<header id="nav-bar">
<nav class="navbar navbar-expand-lg navbar-light bg-dark">
<a class="navbar-brand" href=index.html style="color: white; font-weight: 600; margin-top: 15px;">GO VOTE</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon" style="color: white;"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav ml-auto animate__animated animate__bounceInDown" style="padding-right: 50px;">
<li class="nav-item" >
<a class="nav-link" href="index.html" style="color:white; font-weight: 600; text-align: center; font-size: 18px; margin-top: 20px; text-transform: capitalize; padding: 20px;">Home</a>
</li>
<li class="nav-item" >
<a class="nav-link" href="admin_dashboard.php" style="color:white; font-weight: 600; text-align: center; font-size: 18px; margin-top: 20px; text-transform: capitalize; padding: 20px;">Dashboard</a>
</li>
<li class="nav-item" >
<a class="nav-link" href="user_suggestion.php" style="color: white; font-weight: 600; text-align: center; font-size: 18px; margin-top: 20px; text-transform: capitalize; padding: 20px;">Suggestions</a>
</li>
<li class="nav-item" >
<a class="nav-link" href="show_contact.php" style="color: white; font-weight: 600; text-align: center; font-size: 18px; margin-top: 20px; text-transform: capitalize; padding: 20px;">Contact</a>
</li>

<li class="nav-item">
<a class="nav-link" href="user_details_1.php" style="color: white; font-weight: 600; text-align: center; font-size: 18px; margin-top: 20px; text-transform: capitalize; padding: 20px;">Users</a>
</li>
<li class="nav-item">
<a class="nav-link" href="user_cand.php" style="color: white; font-weight: 600; text-align: center; font-size: 18px; margin-top: 20px; text-transform: capitalize; padding: 20px;">Candidates</a>
</li>

<li class="nav-item" >
<a class="nav-link" href="logout.php" style="color: white; font-weight: 600; text-align: center; font-size: 18px; margin-top: 20px; text-transform: capitalize; padding: 20px;">Logout</a>
</li>

</ul>
</div>
</nav>
</header>
<section>
<div class="container">
<div class="row">
<div class="col-md-12">
<h1 style="margin-top: 15px;">ADMIN DASHBOARD</h1>
</div>
</div>
</div>
</section>
<section>
<?php
include('start_voting.php');
?>
</section>
<?php
include('validation.php');
?>
<!-- JS -->
<script src="js/jquery-3.2.1.slim.min.js"></script>
<script src="js/popper.min.js"></script>
<script src="js/bootstrap.min.js"></script>
</body>
</html>
<?php
}
else{

header("location:admin_login.php");
}
?>
131 changes: 131 additions & 0 deletions already.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<title></title>
<style>
.fa-check{
font-size: 80px;
color: #27ae60;
font-weight: bold;
height: 110px;
width: 110px;
border: 1px solid #27ae60;
text-align: center;
padding-top: 13px;
border-radius: 50%;
box-sizing: border-box;
margin: 40px 0 0 0px;
}
*{
margin: 0;
padding: 0;
box-sizing: border-box;
scroll-behavior: smooth;
text-align: center;
font-family: 'Poppins', sans-serif;
}
.card{
width:400px;
margin-left:auto;
margin-right:auto;
margin-top:100px;
text-align:center;
padding:30px;
border:4px #a517ba solid;
border-radius:5px;
}


</style>
</head>
<body>
<!------------------ Navbar Section ------------------>
<div class="container-fluid" id="cont-3">
<header id="nav-bar">
<nav class="navbar navbar-expand-lg navbar-light bg-dark">
<a class="navbar-brand" href="index.html" style="color: white; font-weight: 600; margin-top: 15px;">GO VOTE</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon" style="color: white;"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav ml-auto animate__animated animate__bounceInDown" style="padding-right: 50px;">
<li class="nav-item" >
<a class="nav-link" href="index.html" style="color:white; font-weight: 600; text-align: center; font-size: 18px; margin-top: 20px; text-transform: capitalize; padding: 20px;">Home</a>
</li>
<li class="nav-item" >
<a class="nav-link" href="year.php" style="color: white; font-weight: 600; text-align: center; font-size: 18px; margin-top: 20px; text-transform: capitalize; padding: 20px;">Candidate</a>
</li>
<li class="nav-item" >
<a class="nav-link" href="about.php" style="color: white; font-weight: 600; text-align: center; font-size: 18px; margin-top: 20px; text-transform: capitalize; padding: 20px;">About</a>
</li>

</ul>
</div>
</nav>
</header>

<div class="container">

<div class="row">
<div class="col-md-12" >

<h1 class="text-center" style="margin-bottom: 10px;">ALREADY VOTED</h1>
</div>
</dvi>
</div>

<?php

$email = $_GET['username'];
$sql = "select * from users where email = '".$email."' ";
include("dbConnect.php");

$rs = mysqli_query($conn, $sql);

foreach($rs as $row){
?>

<div class="col-md-12 " style=" margin-left:25px; padding-top: 30px;">
<div class="card" style="width: 30 rem;">
<img class="card-img-top" src="img/9.svg" alt="shinzo" height="350px">

<!-- the username -->
<h1>
<?php echo $row['name']; ?>
</h1>

<!-- and role or location -->
<h2>
VoterID: <?php echo $row['reason']; ?>
</h2>

</header>

<p> <?php echo $row['Branch']; ?>
</p>
<p> <?php echo $row['email']; ?>
</p>
<p> <?php echo $row['number'];?>
</p>
<p> Voted For: <?php echo $row['candidate'];?>
<?php } ?>
</p>
<p>
<a href="index.html"><button class="magnifyBtn">HOME</button></a>
</p>
</div>
</div>

</section>


</body>
</html>
18 changes: 18 additions & 0 deletions can_vote.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php

include('dbConnect.php');

$sql = "select * from comm ";

$rs = mysqli_query($conn, $sql);
foreach($rs as $row)
if ($row['start']==1) {
header("location:confirmation.php");
}
else
{
header("location:wait.php");
}
mysqli_close($conn);

?>
Loading