Commit 51c36ad7 authored by Marwolf's avatar Marwolf 💬

Checkpoint

parent f917efd2
......@@ -13,7 +13,7 @@
<table>
@foreach ($skill_array as $skill)
<tr>
<td class="rsc-col-name text-right">
<td class="rsc-col-name text-center">
@if ($skill != "overall")
<img src="{{ asset('images/skill_icons').'/'.$skill }}.svg"
alt="{{ $skill }}" height="20px"/>
......@@ -48,69 +48,46 @@
<th class="rsc-col-level">Level</th>
<th class="rsc-col-xp">XP</th>
</tr>
@if (Config::get('app.authentic') == true)
@foreach ($highscores_authentic as $key=>$player)
<tr style="line-height: 1.2rem">
<td class="rsc-col-rank">
@foreach ($hiscores as $key=>$player)
<tr style="line-height: 1.2rem">
<td class="rsc-col-rank">
<span>
{{ ( $highscores_authentic->currentpage()-1) * $highscores_authentic->perpage() + $key + 1 }}
{{ ( $hiscores->currentpage()-1) * $hiscores->perpage() + $key + 1 }}
</span>
</td>
<td class="rsc-col-name">
<a class="rsc-link" href="/hiscores/player/{{ ucfirst($player->username) }}">
</td>
<td class="rsc-col-name">
<a class="rsc-link" href="/hiscores/player/{{ ucfirst($player->username) }}">
<span>
{{ ucfirst($player->username) }}
</span>
</a>
</td>
<td class="rsc-col-level">
</a>
</td>
<td class="rsc-col-level">
<span>
@if ($subpage ?? '')
{{ number_format((new App\Http\Controllers\HighscoresController)->experienceToLevel($player->${'exp_'.$subpage})) }}
{{ number_format((new App\Http\Controllers\HiscoresController)->experienceToLevel($player->${'exp_'.$subpage})) }}
@else
{{ number_format($player->skill_total) }}
@endif
</span>
</td>
<td class="rsc-col-xp">
</td>
<td class="rsc-col-xp">
<span>
@if ($subpage ?? '')
{{ number_format($player->${'exp_'.$subpage}/4.0) }}
@else
{{ number_format((new App\Http\Controllers\HighscoresController)->totalXP($player)/4.0) }}
{{ number_format((new App\Http\Controllers\HiscoresController)->totalXP($player)/4.0) }}
@endif
</span>
</td>
</tr>
@endforeach
@else
@foreach ($highscores_custom as $key=>$player)
<tr>
<td class="rsc-col-rank">
<span>
{{ ($highscores_custom->currentpage()-1) * $highscores_custom->perpage() + $key + 1 }}
</span>
</td>
<td class="rsc-col-name">
<span>
{{ ucfirst($player->username) }}
</span>
</td>
<td class="rsc-col-level">
<span>
{{ number_format($player->skill_total) }}
</span>
</td>
<td class="rsc-col-xp">
<span>
{{ number_format((new App\Http\Controllers\HighscoresController)->totalXP($player)/4.0) }}
</span>
</td>
</tr>
@endforeach
@endif
</td>
</tr>
@endforeach
</table>
</div>
<div class="pt-2">
{{ $hiscores->links('pagination::bootstrap-4') }}
</div>
</div>
</div>
......@@ -149,12 +126,4 @@
</div>
</div>
<div class="pt-4">
@if (Config::get('app.authentic') == true)
{{ $highscores_authentic->links('pagination::bootstrap-4') }}
@else
{{ $highscores_custom->links('pagination::bootstrap-4') }}
@endif
</div>
@endsection
......@@ -18,7 +18,8 @@
</span>
<table>
<tr>
<th class="rsc-col-name">Skill</th>
<th class="rsc-col-level text-center">Skill</th>
<th class="rsc-col-name"></th>
<th class="rsc-col-xp">Rank</th>
<th class="rsc-col-level">Level</th>
<th class="rsc-col-xp">XP</th>
......@@ -26,15 +27,17 @@
@foreach ($skill_array as $skill)
<tr style="line-height: 1.2rem">
<td class="rsc-col-name">
<span>
<a class="rsc-link d-block"
href="/hiscores/{{ $skill }}">
<img class="pr-2" src="{{ asset('images/skill_icons').'/'.$skill }}.svg"
<td class="rsc-col-name text-center">
@if ($skill != "overall")
<img src="{{ asset('images/skill_icons').'/'.$skill }}.svg"
alt="{{ $skill }}" height="20px"/>
@endif
</td>
<td class="rsc-col-name text-left">
<a class="rsc-link"
href="/hiscores/{{ $skill }}">
{{ ucwords(preg_replace("/[^A-Za-z0-9 ]/", " ", $skill)) }}
</a>
</span>
</a>
</td>
<td class="rsc-col-xp">
<span>
......@@ -124,45 +127,45 @@
<td class="rsc-col-level">
<span>
@if ($skill == 'attack')
{{ number_format((new App\Http\Controllers\HighscoresController)->experienceToLevel($player->exp_attack)) }}
{{ number_format((new App\Http\Controllers\HiscoresController)->experienceToLevel($player->exp_attack)) }}
@elseif ($skill == 'strength')
{{ number_format((new App\Http\Controllers\HighscoresController)->experienceToLevel($player->exp_strength)) }}
{{ number_format((new App\Http\Controllers\HiscoresController)->experienceToLevel($player->exp_strength)) }}
@elseif ($skill == 'defense')
{{ number_format((new App\Http\Controllers\HighscoresController)->experienceToLevel($player->exp_defense)) }}
{{ number_format((new App\Http\Controllers\HiscoresController)->experienceToLevel($player->exp_defense)) }}
@elseif ($skill == 'hits')
{{ number_format((new App\Http\Controllers\HighscoresController)->experienceToLevel($player->exp_hits)) }}
{{ number_format((new App\Http\Controllers\HiscoresController)->experienceToLevel($player->exp_hits)) }}
@elseif ($skill == 'ranged')
{{ number_format((new App\Http\Controllers\HighscoresController)->experienceToLevel($player->exp_ranged)) }}
{{ number_format((new App\Http\Controllers\HiscoresController)->experienceToLevel($player->exp_ranged)) }}
@elseif ($skill == 'prayer')
{{ number_format((new App\Http\Controllers\HighscoresController)->experienceToLevel($player->exp_prayer)) }}
{{ number_format((new App\Http\Controllers\HiscoresController)->experienceToLevel($player->exp_prayer)) }}
@elseif ($skill == 'magic')
{{ number_format((new App\Http\Controllers\HighscoresController)->experienceToLevel($player->exp_magic)) }}
{{ number_format((new App\Http\Controllers\HiscoresController)->experienceToLevel($player->exp_magic)) }}
@elseif ($skill == 'cooking')
{{ number_format((new App\Http\Controllers\HighscoresController)->experienceToLevel($player->exp_cooking)) }}
{{ number_format((new App\Http\Controllers\HiscoresController)->experienceToLevel($player->exp_cooking)) }}
@elseif ($skill == 'woodcut')
{{ number_format((new App\Http\Controllers\HighscoresController)->experienceToLevel($player->exp_woodcut)) }}
{{ number_format((new App\Http\Controllers\HiscoresController)->experienceToLevel($player->exp_woodcut)) }}
@elseif ($skill == 'fletching')
{{ number_format((new App\Http\Controllers\HighscoresController)->experienceToLevel($player->exp_fletching)) }}
{{ number_format((new App\Http\Controllers\HiscoresController)->experienceToLevel($player->exp_fletching)) }}
@elseif ($skill == 'fishing')
{{ number_format((new App\Http\Controllers\HighscoresController)->experienceToLevel($player->exp_fishing)) }}
{{ number_format((new App\Http\Controllers\HiscoresController)->experienceToLevel($player->exp_fishing)) }}
@elseif ($skill == 'firemaking')
{{ number_format((new App\Http\Controllers\HighscoresController)->experienceToLevel($player->exp_firemaking)) }}
{{ number_format((new App\Http\Controllers\HiscoresController)->experienceToLevel($player->exp_firemaking)) }}
@elseif ($skill == 'crafting')
{{ number_format((new App\Http\Controllers\HighscoresController)->experienceToLevel($player->exp_crafting)) }}
{{ number_format((new App\Http\Controllers\HiscoresController)->experienceToLevel($player->exp_crafting)) }}
@elseif ($skill == 'smithing')
{{ number_format((new App\Http\Controllers\HighscoresController)->experienceToLevel($player->exp_smithing)) }}
{{ number_format((new App\Http\Controllers\HiscoresController)->experienceToLevel($player->exp_smithing)) }}
@elseif ($skill == 'mining')
{{ number_format((new App\Http\Controllers\HighscoresController)->experienceToLevel($player->exp_mining)) }}
{{ number_format((new App\Http\Controllers\HiscoresController)->experienceToLevel($player->exp_mining)) }}
@elseif ($skill == 'herblaw')
{{ number_format((new App\Http\Controllers\HighscoresController)->experienceToLevel($player->exp_herblaw)) }}
{{ number_format((new App\Http\Controllers\HiscoresController)->experienceToLevel($player->exp_herblaw)) }}
@elseif ($skill == 'agility')
{{ number_format((new App\Http\Controllers\HighscoresController)->experienceToLevel($player->exp_agility)) }}
{{ number_format((new App\Http\Controllers\HiscoresController)->experienceToLevel($player->exp_agility)) }}
@elseif ($skill == 'thieving')
{{ number_format((new App\Http\Controllers\HighscoresController)->experienceToLevel($player->exp_thieving)) }}
{{ number_format((new App\Http\Controllers\HiscoresController)->experienceToLevel($player->exp_thieving)) }}
@elseif ($skill == 'runecraft')
{{ number_format((new App\Http\Controllers\HighscoresController)->experienceToLevel($player->exp_runecraft)) }}
{{ number_format((new App\Http\Controllers\HiscoresController)->experienceToLevel($player->exp_runecraft)) }}
@elseif ($skill == 'harvesting')
{{ number_format((new App\Http\Controllers\HighscoresController)->experienceToLevel($player->exp_harvesting)) }}
{{ number_format((new App\Http\Controllers\HiscoresController)->experienceToLevel($player->exp_harvesting)) }}
@else
N/A
@endif
......
This diff is collapsed.
......@@ -56,7 +56,7 @@
Reddit</a></li>
</ul>
</li>
<li><a href="{{ asset('highscores') }}">Highscores</a></li>
<li><a href="{{ asset('hiscores') }}">Hiscores</a></li>
<li>
<label for="drop-3" class="toggle">Information ▾</label>
<a href="#">Information</a>
......
......@@ -26,50 +26,50 @@
<div id="sm-skill" class="pt-4 col-7">
@foreach ($skill_array as $skill)
<a class="text-secondary d-block"
href="/highscores/{{ $skill }}">
href="/hiscores/{{ $skill }}">
<img src="{{ asset('images/skill_icons').'/'.$skill }}.svg"
alt="{{ $skill }}" height="20px"/>
{{ ucwords(preg_replace("/[^A-Za-z0-9 ]/", " ", $skill)) }}
@if ($skill == 'attack')
{{ number_format((new App\Http\Controllers\HighscoresController)->experienceToLevel($player->exp_attack)) }}
{{ number_format((new App\Http\Controllers\HiscoresController)->experienceToLevel($player->exp_attack)) }}
@elseif ($skill == 'strength')
{{ number_format((new App\Http\Controllers\HighscoresController)->experienceToLevel($player->exp_strength)) }}
{{ number_format((new App\Http\Controllers\HiscoresController)->experienceToLevel($player->exp_strength)) }}
@elseif ($skill == 'defense')
{{ number_format((new App\Http\Controllers\HighscoresController)->experienceToLevel($player->exp_defense)) }}
{{ number_format((new App\Http\Controllers\HiscoresController)->experienceToLevel($player->exp_defense)) }}
@elseif ($skill == 'hits')
{{ number_format((new App\Http\Controllers\HighscoresController)->experienceToLevel($player->exp_hits)) }}
{{ number_format((new App\Http\Controllers\HiscoresController)->experienceToLevel($player->exp_hits)) }}
@elseif ($skill == 'ranged')
{{ number_format((new App\Http\Controllers\HighscoresController)->experienceToLevel($player->exp_ranged)) }}
{{ number_format((new App\Http\Controllers\HiscoresController)->experienceToLevel($player->exp_ranged)) }}
@elseif ($skill == 'prayer')
{{ number_format((new App\Http\Controllers\HighscoresController)->experienceToLevel($player->exp_prayer)) }}
{{ number_format((new App\Http\Controllers\HiscoresController)->experienceToLevel($player->exp_prayer)) }}
@elseif ($skill == 'magic')
{{ number_format((new App\Http\Controllers\HighscoresController)->experienceToLevel($player->exp_magic)) }}
{{ number_format((new App\Http\Controllers\HiscoresController)->experienceToLevel($player->exp_magic)) }}
@elseif ($skill == 'cooking')
{{ number_format((new App\Http\Controllers\HighscoresController)->experienceToLevel($player->exp_cooking)) }}
{{ number_format((new App\Http\Controllers\HiscoresController)->experienceToLevel($player->exp_cooking)) }}
@elseif ($skill == 'woodcut')
{{ number_format((new App\Http\Controllers\HighscoresController)->experienceToLevel($player->exp_woodcut)) }}
{{ number_format((new App\Http\Controllers\HiscoresController)->experienceToLevel($player->exp_woodcut)) }}
@elseif ($skill == 'fletching')
{{ number_format((new App\Http\Controllers\HighscoresController)->experienceToLevel($player->exp_fletching)) }}
{{ number_format((new App\Http\Controllers\HiscoresController)->experienceToLevel($player->exp_fletching)) }}
@elseif ($skill == 'fishing')
{{ number_format((new App\Http\Controllers\HighscoresController)->experienceToLevel($player->exp_fishing)) }}
{{ number_format((new App\Http\Controllers\HiscoresController)->experienceToLevel($player->exp_fishing)) }}
@elseif ($skill == 'firemaking')
{{ number_format((new App\Http\Controllers\HighscoresController)->experienceToLevel($player->exp_firemaking)) }}
{{ number_format((new App\Http\Controllers\HiscoresController)->experienceToLevel($player->exp_firemaking)) }}
@elseif ($skill == 'crafting')
{{ number_format((new App\Http\Controllers\HighscoresController)->experienceToLevel($player->exp_crafting)) }}
{{ number_format((new App\Http\Controllers\HiscoresController)->experienceToLevel($player->exp_crafting)) }}
@elseif ($skill == 'smithing')
{{ number_format((new App\Http\Controllers\HighscoresController)->experienceToLevel($player->exp_smithing)) }}
{{ number_format((new App\Http\Controllers\HiscoresController)->experienceToLevel($player->exp_smithing)) }}
@elseif ($skill == 'mining')
{{ number_format((new App\Http\Controllers\HighscoresController)->experienceToLevel($player->exp_mining)) }}
{{ number_format((new App\Http\Controllers\HiscoresController)->experienceToLevel($player->exp_mining)) }}
@elseif ($skill == 'herblaw')
{{ number_format((new App\Http\Controllers\HighscoresController)->experienceToLevel($player->exp_herblaw)) }}
{{ number_format((new App\Http\Controllers\HiscoresController)->experienceToLevel($player->exp_herblaw)) }}
@elseif ($skill == 'agility')
{{ number_format((new App\Http\Controllers\HighscoresController)->experienceToLevel($player->exp_agility)) }}
{{ number_format((new App\Http\Controllers\HiscoresController)->experienceToLevel($player->exp_agility)) }}
@elseif ($skill == 'thieving')
{{ number_format((new App\Http\Controllers\HighscoresController)->experienceToLevel($player->exp_thieving)) }}
{{ number_format((new App\Http\Controllers\HiscoresController)->experienceToLevel($player->exp_thieving)) }}
@elseif ($skill == 'runecraft')
{{ number_format((new App\Http\Controllers\HighscoresController)->experienceToLevel($player->exp_runecraft)) }}
{{ number_format((new App\Http\Controllers\HiscoresController)->experienceToLevel($player->exp_runecraft)) }}
@elseif ($skill == 'harvesting')
{{ number_format((new App\Http\Controllers\HighscoresController)->experienceToLevel($player->exp_harvesting)) }}
{{ number_format((new App\Http\Controllers\HiscoresController)->experienceToLevel($player->exp_harvesting)) }}
@else
N/A
@endif
......
@if ($paginator->hasPages())
<ul class="pagination text-primary justify-content-center">
<ul class="pagination rsc-link justify-content-center">
{{-- Previous Page Link --}}
@if ($paginator->onFirstPage())
<li class="page-item disabled">
<a class="bg-dark border-info page-link" href="#" aria-label="Previous">
<a class="bg-transparent p-1 rsc-link" href="#" aria-label="Previous">
<span aria-hidden="true">&laquo;</span>
<span class="sr-only">Previous</span>
</a>
......@@ -11,7 +11,7 @@
@else
<!-- left button -->
<li class="page-item">
<a href="{{ $paginator->previousPageUrl() }}" class="bg-dark border-info text-primary page-link"
<a href="{{ $paginator->previousPageUrl() }}" class="bg-transparent p-1 rsc-link"
rel="prev">&laquo;</a>
</li>
@endif
......@@ -29,13 +29,13 @@
@if ($page == $paginator->currentPage())
<li class="page-item active">
<!-- current page button -->
<a href="#" class="bg-info border-info text-white page-link">{{ $page }}<span
<a href="#" class="bg-transparent p-1 whitelink">{{ $page }}<span
class="sr-only">(current)</span></a>
</li>
@else
<li class="page-item">
<!-- nearby pages buttons -->
<a href="{{ $url }}" class="bg-dark border-info text-primary page-link">{{ $page }}</a>
<a href="{{ $url }}" class="bg-transparent p-1 rsc-link">{{ $page }}</a>
</li>
@endif
@endforeach
......@@ -46,11 +46,11 @@
@if ($paginator->hasMorePages())
<!-- right button -->
<li class="page-item">
<a href="{{ $paginator->nextPageUrl() }}" class="bg-dark border-info text-primary page-link" rel="next">&raquo;</a>
<a href="{{ $paginator->nextPageUrl() }}" class="bg-transparent p-1 rsc-link" rel="next">&raquo;</a>
</li>
@else
<li class="page-item disabled">
<a class="bg-dark border-info page-link" href="#" aria-label="Next">
<a class="bg-transparent p-1 rsc-link" href="#" aria-label="Next">
<span aria-hidden="true">&raquo;</span>
<span class="sr-only">Next</span>
</a>
......
......@@ -41,12 +41,12 @@ Route::get('/npcs', 'NpcController@index')->name('npcs');
Route::get('/npcdef/{id}', 'NpcController@show')->name('npcdef');
// Hiscores
Route::get('/hiscores', 'HighscoresController@index')->name('hiscores');
Route::get('/hiscores/overall', 'HighscoresController@index')->name('hiscores');
Route::get('/hiscores/{subpage}', 'HighscoresController@show')->name('hiscores');
Route::get('/hiscores/{subpage}', 'HighscoresController@searchByRank')->name('hiscores');
Route::get('/hiscores/{subpage}', 'HighscoresController@searchByName')->name('hiscores');
Route::get('/hiscores/player/{subpage}', 'HighscoresController@player')->name('player');
Route::get('/hiscores', 'HiscoresController@index')->name('hiscores');
Route::get('/hiscores/overall', 'HiscoresController@index')->name('hiscores');
Route::get('/hiscores/{subpage}', 'HiscoresController@show')->name('hiscores');
Route::get('/hiscores/{subpage}', 'HiscoresController@searchByRank')->name('hiscores');
Route::get('/hiscores/{subpage}', 'HiscoresController@searchByName')->name('hiscores');
Route::get('/hiscores/player/{subpage}', 'HiscoresController@player')->name('player');
// Afman staff zone
Route::get('/chat_logs', 'StaffController@chat_logs')->middleware('is_admin')->name('chat_logs');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment