You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

193 lines
5.9 KiB

<?php namespace App\Views;
/******************************************************************************************************************
* RPSLS - Rock, Paper, Scissors, Lizard, Spock Game
*
* @file app/views/top10.php
* @package App\Views
* @description
* View - Score page for the game.
* @author Rick Hays
* @date 11/15/2019
* @license MIT
* @copyright Copyright © 2019 - Rick Hays, All Rights Reserved.
*
* Revisions:
* YYYY-MM-DD XX Description
******************************************************************************************************************/
?>
<!-- Begin page content -->
<main role="main" class="flex-shrink-0">
<div class="container">
<h1 class="mt-5">Rock, Paper, Scissors, Lizard, Spock Game</h1>
<h2 class="lead">Top 10 Scores</h2>
<p>&nbsp;</p>
<!-- GAME TOTALS ------------------------------------------------------------------------------------------- -->
<div class="table-responsive-sm">
<table class="table table-sm table-striped table-bordered">
<thead class="thead-dark">
<tr>
<th colspan="4" class="text-center bg-primary">Game Totals</th>
</tr>
<tr>
<th scope="col"></th>
<th scope="col">Wins</th>
<th scope="col">Loses</th>
<th scope="col">Total</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">Player</th>
<td><?= $TotalWinsPlayer->Total ?> </td>
<td><?= $TotalLosesPlayer->Total ?> </td>
<td>&nbsp;</td>
</tr>
<tr>
<th scope="row">Computer</th>
<td><?= $TotalLosesPlayer->Total ?></td>
<td><?= $TotalWinsPlayer->Total ?></td>
<td>&nbsp;</td>
</tr>
<tr>
<th scope="row">Ties</th>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td><?= $TotalTiesPlayer->Total ?> </td>
</tr>
<tr>
<th scope="row">Total Plays</th>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td><?= $TotalPlays->Total ?> </td>
</tr>
</tbody>
</table>
</div>
<p>&nbsp;</p>
<!-- TOP 10 WINNERS ---------------------------------------------------------------------------------------- -->
<div class="table-responsive-sm">
<table class="table table-sm table-striped table-bordered">
<thead class="thead-dark">
<tr><th colspan="3" class="text-center bg-primary">Top 10 Winners</th></tr>
<tr>
<th scope="col">Rank</th>
<th scope="col">User Name</th>
<th scope="col">Points</th>
</tr>
</thead>
<tbody>
<?php foreach ($Win10 as $record => $fields):?>
<tr>
<th scope="row"><?= ($record + 1) ?></th>
<?php foreach ($fields as $field => $value):?>
<td><?= $value ?></td>
<?php endforeach;?>
</tr>
<?php endforeach;?>
</tbody>
</table>
</div>
<p>&nbsp;</p>
<!-- TOP 10 LOSERS ----------------------------------------------------------------------------------------- -->
<div class="table-responsive-sm">
<table class="table table-sm table-striped table-bordered">
<thead class="thead-dark">
<tr><th colspan="3" class="text-center bg-primary">Top 10 Losers</th></tr>
<tr>
<th scope="col">Rank</th>
<th scope="col">User Name</th>
<th scope="col">Points</th>
</tr>
</thead>
<tbody>
<?php foreach ($Lose10 as $record => $fields):?>
<tr>
<th scope="row"><?= ($record + 1) ?></th>
<?php foreach ($fields as $field => $value):?>
<td><?= $value ?></td>
<?php endforeach;?>
</tr>
<?php endforeach;?>
</tbody>
</table>
</div>
<p>&nbsp;</p>
<!-- TOP 10 TIES ------------------------------------------------------------------------------------------- -->
<div class="table-responsive-sm">
<table class="table table-sm table-striped table-bordered">
<thead class="thead-dark">
<tr><th colspan="3" class="text-center bg-primary">Top 10 Ties</th></tr>
<tr>
<th scope="col">Rank</th>
<th scope="col">User Name</th>
<th scope="col">Points</th>
</tr>
</thead>
<tbody>
<?php foreach ($Tie10 as $record => $fields):?>
<tr>
<th scope="row"><?= ($record + 1) ?></th>
<?php foreach ($fields as $field => $value):?>
<td><?= $value ?></td>
<?php endforeach;?>
</tr>
<?php endforeach;?>
</tbody>
</table>
</div>
<p>&nbsp;</p>
<!-- TOP PLAYER PICKS -------------------------------------------------------------------------------------- -->
<div class="table-responsive-sm">
<table class="table table-sm table-striped table-bordered">
<thead class="thead-dark">
<tr><th colspan="3" class="text-center bg-primary">Top Player Picks</th></tr>
<tr>
<th scope="col">Rank</th>
<th scope="col">Pick</th>
<th scope="col">Count</th>
</tr>
</thead>
<tbody>
<?php foreach ($PlayerPicks as $record => $fields):?>
<tr>
<th scope="row"><?= ($record + 1) ?></th>
<?php foreach ($fields as $field => $value):?><td><?= $value ?></td><?php endforeach;?>
</tr>
<?php endforeach;?>
</tbody>
</table>
</div>
<p>&nbsp;</p>
<!-- TOP COMPUTER PICKS ------------------------------------------------------------------------------------ -->
<div class="table-responsive-sm">
<table class="table table-sm table-striped table-bordered">
<thead class="thead-dark">
<tr><th colspan="3" class="text-center bg-primary">Top Computer Picks</th></tr>
<tr>
<th scope="col">Rank</th>
<th scope="col">Pick</th>
<th scope="col">Count</th>
</tr>
</thead>
<tbody>
<?php foreach ($ComputerPicks as $record => $fields):?>
<tr>
<th scope="row"><?= ($record + 1) ?></th>
<?php foreach ($fields as $field => $value):?>
<td><?= $value ?></td>
<?php endforeach;?>
</tr>
<?php endforeach;?>
</tbody>
</table>
</div>
<p>&nbsp;</p>
<a href="play" class="btn btn-outline-dark btn-lg" role="button" aria-pressed="true">Play Game!</a>
<p>&nbsp;</p>
</div>
</main>