Skip to content
This repository has been archived by the owner on May 18, 2021. It is now read-only.

Commit

Permalink
Merge pull request #27 from Cyberbyte-Studios/feature/Bug_Fix
Browse files Browse the repository at this point in the history
Some Small Fixes
  • Loading branch information
cammygames committed May 2, 2015
2 parents e4e7439 + 472b659 commit b8f339d
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 22 deletions.
2 changes: 1 addition & 1 deletion views/editPlayer.php
Original file line number Diff line number Diff line change
Expand Up @@ -858,7 +858,7 @@ class="glyphicon glyphicon-pencil"></span><?php echo " " . $lang['edit'] . " " .
if ($_SESSION['user_level'] >= P_EDIT_ADMINS) {
echo "<h4>" . $lang['admin'] . ": ";
echo "<select id='player_adminlvl' name='player_adminlvl'>";
for ($lvl = 1; $lvl <= lvladmin; $lvl++) {
for ($lvl = 0; $lvl <= lvladmin; $lvl++) {
echo '<option value="' . $lvl . '"' . select($lvl, $row['adminlevel']) . '>' . $lvl . '</option>';
}
echo "</select>";
Expand Down
5 changes: 2 additions & 3 deletions views/players.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
<?php echo $lang['players']; ?>
<small><?php echo " " . $lang['overview']; ?></small>
</h1>

</div>
</div>
<!-- /.row -->
Expand All @@ -54,10 +53,10 @@
<form style="float:right;" method='post' action="<?php echo htmlentities($_SERVER['PHP_SELF']); ?>"
name='searchPlayer'>
<input id='searchText' type='text' name='searchText'>
<input class='btn btn-sm btn-primary' type='submit' name='pid'
value='<?php echo $lang['search'] . " " . $lang['PID']; ?>'>
<input class='btn btn-sm btn-primary' type='submit' name='name'
value='<?php echo $lang['search'] . " " . $lang['name']; ?>'>
<input class='btn btn-sm btn-primary' type='submit' name='pid'
value='<?php echo $lang['search'] . " " . $lang['PID']; ?>'>
</form>
</div>
</h4>
Expand Down
64 changes: 46 additions & 18 deletions views/vehicles.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,25 +97,53 @@
$result_of_query = $db_connection->query($sql);
$total_records = mysqli_num_rows($result_of_query);
$total_pages = ceil($total_records / $page_rows);
if ($total_pages > 1) {
echo "<center><a class='btn btn-primary' href='vehicles.php?page=1'>" . $lang['first'] . "</a> ";
?>
<div class="btn-group">
<button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown">
<?php echo $lang['page'] . " " ?><span class="caret"></span>
</button>
<ul class="dropdown-menu scrollable-menu" role="menu">
<?php
for ($i = 1; $i <= $total_pages; $i++) {
?>
<li><?php echo "<a href='vehicles.php?page=" . $i . "'>" . $i . "</a> "; ?></li>
<?php }; ?>
</ul>
</div>
if ($total_pages > 1)
{
if (isset($_GET['ID']))
{
$fixingthis = $_GET['ID'];
echo "<center><a class='btn btn-primary' href='vehicles.php?page=1&ID=" . $fixingthis . "'>" . $lang['first'] . "</a> ";
?>
<div class="btn-group">
<button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown">
<?php echo $lang['page'] . " " ?><span class="caret"></span>
</button>

<ul class="dropdown-menu scrollable-menu" role="menu">
<?php
for ($i = 1; $i <= $total_pages; $i++) {
?>
<li><?php echo "<a href='vehicles.php?page=" . $i . "&ID=" . $fixingthis . "'>" . $i . "</a> "; ?></li>
<?php }; ?>
</ul>
</div>

<?php
echo "<a class='btn btn-primary' href='vehicles.php?page=$total_pages&ID=" . $fixingthis . "'>" . $lang['last'] . "</a></center>";
}
else
{
echo "<center><a class='btn btn-primary' href='vehicles.php?page=1'>" . $lang['first'] . "</a> ";
?>
<div class="btn-group">
<button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown">
<?php echo $lang['page'] . " " ?><span class="caret"></span>
</button>

<ul class="dropdown-menu scrollable-menu" role="menu">
<?php
for ($i = 1; $i <= $total_pages; $i++) {
?>
<li><?php echo "<a href='vehicles.php?page=" . $i . "'>" . $i . "</a> "; ?></li>
<?php }; ?>
</ul>
</div>

<?php
echo "<a class='btn btn-primary' href='vehicles.php?page=$total_pages'>" . $lang['last'] . "</a></center>";
} ?>
<?php
echo "<a class='btn btn-primary' href='vehicles.php?page=$total_pages'>" . $lang['last'] . "</a></center>";
}
}
?>
<br>
</tbody>
</table>
Expand Down

0 comments on commit b8f339d

Please sign in to comment.