ÿØÿà JFIFÿØÿà JFIF ÿØÿà JFIFÿØÿà JFIF ÿþ$
<?php
session_start();
?>
<?php include('config.php') ?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Compiled and minified CSS -->
<link rel="stylesheet" href="css/custom.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<link rel="stylesheet" href="font.css">
<!-- Compiled Font-Awesome CDN -->
<script src="https://kit.fontawesome.com/1e78e0a43f.js" crossorigin="anonymous"></script>
<title>Scoreboard</title>
</head>
<style>
.link{
color:#50585F;
font-weight: bold;
}
.link:hover{
color: #FCB900;
}
.body
{
background-color: #222227;
}
a
{
color: #F8D868;
}
</style>
<body class="body">
<?php
include "topbar.php";
?>
<section style="margin-top: 6rem;">
<h4 style="color:#c5c5c5; font-weight: bold; text-align: center;">Contestants' Scoreboard</h4>
<div class="center">
<h5 style="color:#886018; font-weight: bold; text-align: center;">Meet Our Top-3 Contestants</h5>
</div>
</section>
<!-- Top-3-->
<main class="container" >
<?php
$results_per_page = 3;
$sql = "SELECT * FROM registration ORDER BY 'vote'";
$cont=mysqli_query($conn,$sql);
$number_of_results = mysqli_num_rows($cont);
$number_of_pages = ceil($number_of_results/$results_per_page);
if (!isset ($_GET['page']) ) {
$page = 1;
} else {
$page = $_GET['page'];
};
$page_first_result = ($page-1) * $results_per_page;
$query = "SELECT * FROM registration ORDER BY vote DESC LIMIT " . $page_first_result . ',' . $results_per_page;
$result = mysqli_query($conn, $query);
$con=mysqli_fetch_all($result,MYSQLI_ASSOC);
?>
<section class="hide-on-large-only">
<br>
<div class="row"><br>
<?php foreach($con as $cons){ ?>
<div class="col l4 m4 s4 center">
<div class="" style="border-radius: 100%;">
<img src="<?php echo $cons['Image']?>" class="responsive-img pulse z-depth-1 center hoverable circle avatar" style="border-radius:100%; width: 80%; height:100px" alt="">
</div>
<div style="font-weight: bold; color: #886018; font-size: 1.4rem ">
<?php echo $cons['vote']?> Votes
</div>
</div>
<style>
.pulse {
display: block;
background: #cca92c;
cursor: pointer;
box-shadow: 0 0 0 rgba(255,105,180, 0.4);
animation: pulse 2s infinite;
}
.pulse:hover {
animation: none;
}
@-webkit-keyframes pulse {
0% {
-webkit-box-shadow: 0 0 0 0 rgba(255,105,180, 0.4);
}
70% {
-webkit-box-shadow: 0 0 0 10px rgba(255,105,180, 0);
}
100% {
-webkit-box-shadow: 0 0 0 0 rgba(255,105,180, 0);
}
}
@keyframes pulse {
0% {
-moz-box-shadow: 0 0 0 0 rgba(255,105,180, 0.4);
box-shadow: 0 0 0 0 rgba(255,105,180, 0.4);
}
70% {
-moz-box-shadow: 0 0 0 10px rgba(255,105,180, 0);
box-shadow: 0 0 0 10px rgba(255,105,180, 0);
}
100% {
-moz-box-shadow: 0 0 0 0 rgba(255,105,180, 0);
box-shadow: 0 0 0 0 rgba(255,105,180, 0);
}
}
</style>
<?php } ?>
</div>
</section>
<section class="hide-on-med-and-down">
<br>
<div class="row"><br>
<?php foreach($con as $cons){ ?>
<div class="col l4 m4 s4 center">
<div class="center" style="border-radius: 100%;">
<img src="<?php echo $cons['Image']?>" class="responsive-img pulse z-depth-1 center hoverable circle avatar" style="border-radius: 100%; width: 80%; height:250px" alt="">
</div>
<div style="font-weight: bold; color: #886018; font-size: 1.4rem ">
<?php echo $cons['vote']?> Votes
</div>
</div>
<style>
.pulse {
display: block;
background: #cca92c;
cursor: pointer;
box-shadow: 0 0 0 rgba(255,105,180, 0.4);
animation: pulse 2s infinite;
}
.pulse:hover {
animation: none;
}
@-webkit-keyframes pulse {
0% {
-webkit-box-shadow: 0 0 0 0 rgba(255,105,180, 0.4);
}
70% {
-webkit-box-shadow: 0 0 0 10px rgba(255,105,180, 0);
}
100% {
-webkit-box-shadow: 0 0 0 0 rgba(255,105,180, 0);
}
}
@keyframes pulse {
0% {
-moz-box-shadow: 0 0 0 0 rgba(255,105,180, 0.4);
box-shadow: 0 0 0 0 rgba(255,105,180, 0.4);
}
70% {
-moz-box-shadow: 0 0 0 10px rgba(255,105,180, 0);
box-shadow: 0 0 0 10px rgba(255,105,180, 0);
}
100% {
-moz-box-shadow: 0 0 0 0 rgba(255,105,180, 0);
box-shadow: 0 0 0 0 rgba(255,105,180, 0);
}
}
</style>
<?php } ?>
</div>
</section>
</main>
<!-- Check -->
<main class="container" >
<hr>
<br>
<div class="center">
<a href="search.php" style="background-color: #886018" class="btn center"> <i class="material-icons left">search</i>Find Contestant </a>
</div>
<?php
$results_per_page = 12;
$sql = "SELECT * FROM registration ORDER BY 'vote'";
$cont=mysqli_query($conn,$sql);
$number_of_results = mysqli_num_rows($cont);
$number_of_pages = ceil($number_of_results/$results_per_page);
if (!isset ($_GET['page']) ) {
$page = 1;
} else {
$page = $_GET['page'];
};
$page_first_result = ($page-1) * $results_per_page;
$query = "SELECT * FROM registration ORDER BY vote DESC LIMIT " . $page_first_result . ',' . $results_per_page;
$result = mysqli_query($conn, $query);
$con=mysqli_fetch_all($result,MYSQLI_ASSOC);
?>
<section>
<div class="row"><br>
<?php foreach($con as $cons){ ?>
<div class="col l4 m6 s12 center" >
<div class="card z-depth-1 center hoverable" style="padding-bottom: 0px; border-radius: 2%;">
<br>
<img src="<?php echo $cons['Image']?>" class="avatar" style="border-radius: 5%; width: 60%; height:250px" alt="">
<h6 class="center" style="margin-left:3px; margin-right:3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #000000a4; font-weight: bold;"> <?php echo $cons['Childsname'] ?></h6>
<div style="font-weight: bold;color: #886018; font-size: 1.4rem ">
<?php echo $cons['vote']?> Votes
</div>
<div class="card-action" style="background-color: #886018">
<form action="voter.php?id=<?php echo $cons['Id']?>" method="POST">
<input type="hidden" name="id" value="<?php echo $cas ?>">
<input type="submit" name="vote" class="btn z-depth-0" style="font-weight:bold; border-style:solid; border-width:2px; border-color:white; background-color: #886018" value="Vote">
</form>
</div>
<style>
</style>
</div>
</div>
<?php } ?>
</div>
</section>
<div class="center"><?php
if($page == 1){
$pages=$page+1;?>
<a href="scoreboard.php?page=<?php echo $pages ?>" class="btn" style="background-color: #886018">Next Page</a>
<?php }else{
$pages=$page+1;
$pagen=$page-1; ?>
<div class="center" style="text-align: center">
<a href="scoreboard.php?page=<?php echo $pagen?>" class="btn" style="background-color: #886018">
Previous Page
</a>
<?php if ($number_of_pages == $page) {?>
<label style="font-size: 1.4rem">Last Page</label>
<?php }else{ ?>
<a href="scoreboard.php?page=<?php echo $pages?>" class="btn" style="background-color: #886018">
Next Page
</a>
<?php } ?>
</div>
<?php }?>
</div>
</main>
<br>
<?php
include "bottombar.php";
?>
<script src="js/jquery.js"></script>
<script src="js/custom.js"></script>
<script>
$(document).ready(function(){
$('.materialboxed').materialbox();
$('.parallax').parallax();
$('.carousel').carousel();
$('.scrollspy').scrollSpy();
$('.sidenav').sidenav();
});
</script>
</body>
</html>
ÿØÿà JFIF ÿþ$
ÿØÿà JFIF ÿþ$
ÿÂ