1
0
forked from metin2/web

Localized ranking and modified controllers to read data from cache tables.

This commit is contained in:
Exynox 2024-12-31 20:24:15 +02:00
parent 744e55e385
commit 103d21b5ef
17 changed files with 753 additions and 261 deletions

View File

@ -0,0 +1,86 @@
<?php
namespace App\Http\Controllers\Highscore;
use App\Http\Controllers\Controller;
use App\Models\Enums\EmpireEnum;
use App\Models\Game\Highscore\GuildHighscoreCache;
use Illuminate\Http\Request;
use Illuminate\View\View;
class GuildHighscoreController extends Controller
{
private const RESULTS_PER_PAGE = 10;
public function show(Request $request, ?int $empireChoice = null, ?int $page = null): View
{
$where = [];
// If "empireChoice" is a valid empire, add it to the query; otherwise set empireChoice to -1
if (in_array($empireChoice, array_column(EmpireEnum::cases(), 'value'), true))
$where[] = ['empire', $empireChoice];
else
$empireChoice = -1;
// Check whether "guildChoice" or "guildLeaderChoice" were requested
$validated = $request->validate([
'guild-choice' => 'nullable',
'guild-leader-choice' => 'nullable',
]);
$guildChoice = $validated['guild-choice'] ?? null;
$guildLeaderChoice = $validated['guild-leader-choice'] ?? null;
// If "guild-choice" was specified, find the guild with that name
if (!empty($guildChoice))
$where[] = ['name', $guildChoice];
// If "guild-leader-choice" was specified, find the guild master with that name
if (!empty($guildLeaderChoice))
$where[] = ['master', $guildLeaderChoice];
$highscore = GuildHighscoreCache::where($where)->paginate(self::RESULTS_PER_PAGE, page: $page);
return view('main/guildhighscore', [
'highscore' => $highscore,
'empireChoice' => $empireChoice,
'guildChoice' => $guildChoice,
'guildLeaderChoice' => $guildLeaderChoice,
]);
}
public function search(Request $request): View
{
$where = [];
$validated = $request->validate([
'empire-choice' => 'required|int',
'guild-choice' => 'nullable',
'guild-leader-choice' => 'nullable',
]);
$empireChoice = (int) $validated['empire-choice'];
$guildChoice = $validated['guild-choice'];
$guildLeaderChoice = $validated['guild-leader-choice'];
// If "empire-choice" is a valid empire, add it to the query
if (in_array($empireChoice, array_column(EmpireEnum::cases(), 'value'), true))
$where[] = ['empire', $empireChoice];
// If "guild-choice" was specified, find the guild with that name
if (!empty($guildChoice))
$where[] = ['name', $guildChoice];
// If "guild-leader-choice" was specified, find the guild master with that name
if (!empty($guildLeaderChoice))
$where[] = ['master', $guildLeaderChoice];
$highscore = GuildHighscoreCache::where($where)->paginate(self::RESULTS_PER_PAGE);
return view('main/guildhighscore', [
'highscore' => $highscore,
'empireChoice' => $empireChoice,
'guildChoice' => $guildChoice,
'guildLeaderChoice' => $guildLeaderChoice,
]);
}
}

View File

@ -0,0 +1,85 @@
<?php
namespace App\Http\Controllers\Highscore;
use App\Http\Controllers\Controller;
use App\Models\Enums\CharacterClassEnum;
use App\Models\Enums\EmpireEnum;
use App\Models\Game\Highscore\HighscoreCache;
use Illuminate\Http\Request;
use Illuminate\View\View;
class HighscoreController extends Controller
{
private const RESULTS_PER_PAGE = 10;
public function show(Request $request, ?int $empireChoice = null, ?int $classChoice = null, ?int $page = null): View
{
$where = [];
// If "empireChoice" is a valid empire, add it to the query; otherwise set empireChoice to -1
if (in_array($empireChoice, array_column(EmpireEnum::cases(), 'value'), true))
$where[] = ['empire', $empireChoice];
else
$empireChoice = -1;
// If "classChoice" is a valid empire, add it to the query; otherwise set empireChoice to -1
if (in_array($classChoice, array_column(CharacterClassEnum::cases(), 'value'), true))
$where[] = ['job', $classChoice];
else
$classChoice = -1;
// Check whether "characterChoice" was requested
$validated = $request->validate(['character-choice' => 'nullable']);
$characterChoice = $validated['character-choice'] ?? null;
// If "character-choice" was specified, find the character with that name
if (!empty($characterChoice))
$where[] = ['name', $characterChoice];
$highscore = HighscoreCache::where($where)->paginate(self::RESULTS_PER_PAGE, page: $page);
return view('main/highscore', [
'highscore' => $highscore,
'empireChoice' => $empireChoice,
'classChoice' => $classChoice,
'characterChoice' => $characterChoice,
]);
}
public function search(Request $request): View
{
$where = [];
$validated = $request->validate([
'empire-choice' => 'required|int',
'class-choice' => 'required|int',
'character-choice' => 'nullable',
]);
$empireChoice = (int) $validated['empire-choice'];
$classChoice = (int) $validated['class-choice'];
$characterChoice = $validated['character-choice'];
// If "empire-choice" is a valid empire, add it to the query
if (in_array($empireChoice, array_column(EmpireEnum::cases(), 'value'), true))
$where[] = ['empire', $empireChoice];
// If "class-choice" is a valid character class, add it to the query
if (in_array($classChoice, array_column(CharacterClassEnum::cases(), 'value'), true))
$where[] = ['job', $classChoice];
// If "character-choice" was specified, find the character with that name
if (!empty($characterChoice))
$where[] = ['name', $characterChoice];
$highscore = HighscoreCache::where($where)->paginate(self::RESULTS_PER_PAGE);
return view('main/highscore', [
'highscore' => $highscore,
'empireChoice' => $empireChoice,
'classChoice' => $classChoice,
'characterChoice' => $characterChoice,
]);
}
}

View File

@ -0,0 +1,21 @@
<?php
namespace App\Models\Enums;
enum CharacterClassEnum: int
{
case WARRIOR = 0;
case NINJA = 1;
case SURA = 2;
case SHAMAN = 3;
public function name(): string
{
return match($this) {
self::WARRIOR => __('app/names.classes.warrior'),
self::NINJA => __('app/names.classes.ninja'),
self::SURA => __('app/names.classes.sura'),
self::SHAMAN => __('app/names.classes.shaman'),
};
}
}

View File

@ -0,0 +1,25 @@
<?php
namespace App\Models\Enums;
enum CharacterJobEnum: int
{
case WARRIOR_M = 0;
case NINJA_F = 1;
case SURA_M = 2;
case SHAMAN_F = 3;
case WARRIOR_F = 4;
case NINJA_M = 5;
case SURA_F = 6;
case SHAMAN_M = 7;
public function name(): string
{
return match($this) {
self::WARRIOR_M, self::WARRIOR_F => __('app/names.classes.warrior'),
self::NINJA_M, self::NINJA_F => __('app/names.classes.ninja'),
self::SURA_M, self::SURA_F => __('app/names.classes.sura'),
self::SHAMAN_M, self::SHAMAN_F => __('app/names.classes.shaman'),
};
}
}

View File

@ -0,0 +1,28 @@
<?php
namespace App\Models\Enums;
enum EmpireEnum: int
{
case SHINSOO = 1;
case CHUNJO = 2;
case JINNO = 3;
public function name(): string
{
return match($this) {
self::SHINSOO => __('app/names.empires.shinsoo'),
self::CHUNJO => __('app/names.empires.chunjo'),
self::JINNO => __('app/names.empires.jinno'),
};
}
public function longName(): string
{
return match($this) {
self::SHINSOO => __('app/names.empires.shinsoo.long'),
self::CHUNJO => __('app/names.empires.chunjo.long'),
self::JINNO => __('app/names.empires.jinno.long'),
};
}
}

View File

@ -0,0 +1,65 @@
<?php
namespace App\Models\Game\Highscore;
use App\Models\Enums\EmpireEnum;
use Illuminate\Database\Eloquent\Model;
class GuildHighscoreCache extends Model
{
/**
* Indicates if the model should be timestamped.
*
* @var bool
*/
public $timestamps = false;
/**
* The connection name for the model.
*
* @var string|null
*/
protected $connection = 'website';
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'guild_highscore_cache';
/**
* The primary key for the model.
*
* @var string
*/
protected $primaryKey = 'id';
/**
* The attributes that are mass assignable.
*
* @var array<int, string>
*/
protected $fillable = [
];
/**
* The attributes that should be hidden for serialization.
*
* @var array<int, string>
*/
protected $hidden = [
];
/**
* The attributes that should be cast.
*
* @var array<string, string>
*/
protected $casts = [
'empire' => EmpireEnum::class,
'date' => 'datetime'
];
}

View File

@ -0,0 +1,67 @@
<?php
namespace App\Models\Game\Highscore;
use App\Models\Enums\CharacterClassEnum;
use App\Models\Enums\EmpireEnum;
use Illuminate\Database\Eloquent\Model;
class HighscoreCache extends Model
{
/**
* Indicates if the model should be timestamped.
*
* @var bool
*/
public $timestamps = false;
/**
* The connection name for the model.
*
* @var string|null
*/
protected $connection = 'website';
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'highscore_cache';
/**
* The primary key for the model.
*
* @var string
*/
protected $primaryKey = 'id';
/**
* The attributes that are mass assignable.
*
* @var array<int, string>
*/
protected $fillable = [
];
/**
* The attributes that should be hidden for serialization.
*
* @var array<int, string>
*/
protected $hidden = [
];
/**
* The attributes that should be cast.
*
* @var array<string, string>
*/
protected $casts = [
'job' => CharacterClassEnum::class,
'empire' => EmpireEnum::class,
'date' => 'datetime'
];
}

View File

@ -2,6 +2,7 @@
namespace App\Providers; namespace App\Providers;
use App\View\Composers\HighscoreComposer;
use App\View\Composers\MallComposer; use App\View\Composers\MallComposer;
use App\View\Composers\ThemeComposer; use App\View\Composers\ThemeComposer;
use Illuminate\Support\Facades; use Illuminate\Support\Facades;
@ -24,5 +25,6 @@ public function boot(): void
{ {
Facades\View::composer('layouts.app', ThemeComposer::class); Facades\View::composer('layouts.app', ThemeComposer::class);
Facades\View::composer('layouts.mall', MallComposer::class); Facades\View::composer('layouts.mall', MallComposer::class);
Facades\View::composer('layouts.app', HighscoreComposer::class);
} }
} }

View File

@ -0,0 +1,24 @@
<?php
namespace App\View\Composers;
use App\Models\Game\Highscore\GuildHighscoreCache;
use App\Models\Game\Highscore\HighscoreCache;
use Illuminate\View\View;
class HighscoreComposer
{
/**
* Bind data to the view.
*/
public function compose(View $view): void
{
// Fetch the top highscore
$topHighscore = HighscoreCache::orderBy('id')->take(10)->get();
$view->with('topHighscore', $topHighscore);
// Fetch the top guild highscore
$topGuildHighscore = GuildHighscoreCache::orderBy('id')->take(10)->get();
$view->with('topGuildHighscore', $topGuildHighscore);
}
}

30
lang/en/app/highscore.php Normal file
View File

@ -0,0 +1,30 @@
<?php
return [
'title' => 'Metin2 - Ranking',
'search.select-empire' => 'Select empire:',
'search.all-empires' => '[All empires]',
'search.select-class' => 'Select class:',
'search.all-classes' => '[All classes]',
'search.find-character' => 'Find character:',
'search.find-guild' => 'Find guild:',
'search.find-guild-leader' => 'Find guild leader:',
'search' => 'Search',
'no-results' => 'The search returned no results.',
'pagination.prev' => 'previous :count ranks',
'pagination.next' => 'next :count ranks',
'header.rank' => 'Rank',
'header.character-name' => 'Character name',
'header.guild-name' => 'Guild name',
'header.guild-leader' => 'Guild leader',
'header.empire' => 'Empire',
'header.level' => 'Level',
'header.exp' => 'EXP',
'header.guild-points' => 'Points',
'update-time' => 'Updated at:'
];

17
lang/en/app/names.php Normal file
View File

@ -0,0 +1,17 @@
<?php
return [
// Empire names
'empires.shinsoo' => 'Shinsoo',
'empires.shinsoo.long' => 'Shinsoo Empire',
'empires.chunjo' => 'Chunjo',
'empires.chunjo.long' => 'Chunjo Empire',
'empires.jinno' => 'Jinno',
'empires.jinno.long' => 'Jinno Empire',
// Character class names
'classes.warrior' => "Warrior",
'classes.ninja' => "Ninja",
'classes.sura' => "Sura",
'classes.shaman' => "Shaman",
];

30
lang/ro/app/highscore.php Normal file
View File

@ -0,0 +1,30 @@
<?php
return [
'title' => 'Metin2 - Clasament',
'search.select-empire' => 'Alege regat:',
'search.all-empires' => '[Toate regatele]',
'search.select-class' => 'Alege categoria:',
'search.all-classes' => '[Toate categoriile]',
'search.find-character' => 'Caută caracter:',
'search.find-guild' => 'Caută breaslă:',
'search.find-guild-leader' => 'Caută lider breaslă:',
'search' => 'Caută',
'no-results' => 'Căutarea nu a întors niciun rezultat.',
'pagination.prev' => 'anterioarele :count ranguri',
'pagination.next' => 'următoarele :count ranguri',
'header.rank' => 'Rang',
'header.character-name' => 'Numele caracterului',
'header.guild-name' => 'Numele breslei',
'header.guild-leader' => 'Lider breaslă',
'header.empire' => 'Regat',
'header.level' => 'Nivel',
'header.exp' => 'EXP',
'header.guild-points' => 'Puncte',
'update-time' => 'Actualizat la:'
];

17
lang/ro/app/names.php Normal file
View File

@ -0,0 +1,17 @@
<?php
return [
// Empire names
'empires.shinsoo' => 'Shinsoo',
'empires.shinsoo.long' => 'Imperiul Shinsoo',
'empires.chunjo' => 'Chunjo',
'empires.chunjo.long' => 'Imperiul Chunjo',
'empires.jinno' => 'Jinno',
'empires.jinno.long' => 'Imperiul Jinno',
// Character class names
'classes.warrior' => "Războinic",
'classes.ninja' => "Ninja",
'classes.sura' => "Sura",
'classes.shaman' => "Șaman",
];

View File

@ -364,13 +364,43 @@ function () {
<h3 style="margin-top:0">{{ __('app/main.ranking.players') }}</h3> <h3 style="margin-top:0">{{ __('app/main.ranking.players') }}</h3>
<div class="form-score"> <div class="form-score">
<div id="highscore-player"> <div id="highscore-player">
<ul><li><div class="empire2"><strong class="offset">1</strong>&ndash;<a href="https://web.archive.org/web/20130621071508/http://www.metin2.ro/main/highscore" class="first">picyu3</a></div></li><li class="light"><div class="empire1"><strong class="offset">2</strong>&ndash;<a href="https://web.archive.org/web/20130621071508/http://www.metin2.ro/main/highscore">XXXMEN77</a></div></li><li><div class="empire1"><strong class="offset">3</strong>&ndash;<a href="https://web.archive.org/web/20130621071508/http://www.metin2.ro/main/highscore">Spydy</a></div></li><li class="light"><div class="empire3"><strong class="offset">4</strong>&ndash;<a href="https://web.archive.org/web/20130621071508/http://www.metin2.ro/main/highscore">beLeSe</a></div></li><li><div class="empire2"><strong class="offset">5</strong>&ndash;<a href="https://web.archive.org/web/20130621071508/http://www.metin2.ro/main/highscore">alexdenis</a></div></li><li class="light"><div class="empire3"><strong class="offset">6</strong>&ndash;<a href="https://web.archive.org/web/20130621071508/http://www.metin2.ro/main/highscore">Pixie03</a></div></li><li><div class="empire3"><strong class="offset">7</strong>&ndash;<a href="https://web.archive.org/web/20130621071508/http://www.metin2.ro/main/highscore">KingARAGORN</a></div></li><li class="light"><div class="empire1"><strong class="offset">8</strong>&ndash;<a href="https://web.archive.org/web/20130621071508/http://www.metin2.ro/main/highscore">SCORPIO1</a></div></li><li><div class="empire2"><strong class="offset">9</strong>&ndash;<a href="https://web.archive.org/web/20130621071508/http://www.metin2.ro/main/highscore">Parazltu</a></div></li><li class="light"><div class="empire2"><strong>10</strong>&ndash;<a href="https://web.archive.org/web/20130621071508/http://www.metin2.ro/main/highscore">Sayana</a></div></li></ul> </div> <ul>
@foreach ($topHighscore as $entry)
<li @class(['light' => $loop->even])>
<div
@class([
'empire1' => $entry->empire == \App\Models\Enums\EmpireEnum::SHINSOO,
'empire2' => $entry->empire == \App\Models\Enums\EmpireEnum::CHUNJO,
'empire3' => $entry->empire == \App\Models\Enums\EmpireEnum::JINNO
])
>
<strong @class(['offset' => $entry->id < 10])>{{ $entry->id }}</strong>&ndash;<a href="{{ url('main/highscore') }}" @class(['first' => $loop->first])>{{ $entry->name }}</a>
</div>
</li>
@endforeach
</ul>
</div>
<a href="{{ url('main/highscore') }}" class="btn" rel="nofollow">{{ __('app/main.ranking.btn_highscore') }}</a> <a href="{{ url('main/highscore') }}" class="btn" rel="nofollow">{{ __('app/main.ranking.btn_highscore') }}</a>
</div> </div>
<h3 style="margin-top:0">{{ __('app/main.ranking.guilds') }}</h3> <h3 style="margin-top:0">{{ __('app/main.ranking.guilds') }}</h3>
<div class="form-score"> <div class="form-score">
<div id="highscore-guild"> <div id="highscore-guild">
<ul><li><div class="empire2"><strong class="offset">1</strong>&ndash;<a href="https://web.archive.org/web/20130621071508/http://www.metin2.ro/main/guildhighscore" class="first">InStyle</a></div></li><li class="light"><div class="empire3"><strong class="offset">2</strong>&ndash;<a href="https://web.archive.org/web/20130621071508/http://www.metin2.ro/main/guildhighscore">ISENGARD</a></div></li><li><div class="empire2"><strong class="offset">3</strong>&ndash;<a href="https://web.archive.org/web/20130621071508/http://www.metin2.ro/main/guildhighscore">TheRulers</a></div></li><li class="light"><div class="empire2"><strong class="offset">4</strong>&ndash;<a href="https://web.archive.org/web/20130621071508/http://www.metin2.ro/main/guildhighscore">A55A55INII</a></div></li><li><div class="empire3"><strong class="offset">5</strong>&ndash;<a href="https://web.archive.org/web/20130621071508/http://www.metin2.ro/main/guildhighscore">TheElfs</a></div></li><li class="light"><div class="empire3"><strong class="offset">6</strong>&ndash;<a href="https://web.archive.org/web/20130621071508/http://www.metin2.ro/main/guildhighscore">MAESTRIIpur</a></div></li><li><div class="empire2"><strong class="offset">7</strong>&ndash;<a href="https://web.archive.org/web/20130621071508/http://www.metin2.ro/main/guildhighscore">NeBuNaTiCii</a></div></li><li class="light"><div class="empire1"><strong class="offset">8</strong>&ndash;<a href="https://web.archive.org/web/20130621071508/http://www.metin2.ro/main/guildhighscore">TheGoDs</a></div></li><li><div class="empire2"><strong class="offset">9</strong>&ndash;<a href="https://web.archive.org/web/20130621071508/http://www.metin2.ro/main/guildhighscore">7UP</a></div></li><li class="light"><div class="empire2"><strong>10</strong>&ndash;<a href="https://web.archive.org/web/20130621071508/http://www.metin2.ro/main/guildhighscore">ReVoLuTioN</a></div></li></ul> </div> <ul>
@foreach ($topGuildHighscore as $entry)
<li @class(['light' => $loop->even])>
<div
@class([
'empire1' => $entry->empire == \App\Models\Enums\EmpireEnum::SHINSOO,
'empire2' => $entry->empire == \App\Models\Enums\EmpireEnum::CHUNJO,
'empire3' => $entry->empire == \App\Models\Enums\EmpireEnum::JINNO
])
>
<strong @class(['offset' => $entry->id < 10])>{{ $entry->id }}</strong>&ndash;<a href="{{ url('main/guildhighscore') }}" @class(['first' => $loop->first])>{{ $entry->name }}</a>
</div>
</li>
@endforeach
</ul>
</div>
<a href="{{ url('main/guildhighscore') }}" class="btn" rel="nofollow">{{ __('app/main.ranking.btn_highscore') }}</a> <a href="{{ url('main/guildhighscore') }}" class="btn" rel="nofollow">{{ __('app/main.ranking.btn_highscore') }}</a>
</div> </div>
</div> </div>

View File

@ -6,153 +6,131 @@
<div class="content content-last"> <div class="content content-last">
<div class="content-bg"> <div class="content-bg">
<div class="content-bg-bottom"> <div class="content-bg-bottom">
<h2>Metin2 - Listarea rangurilor</h2> <h2>{{ __('app/highscore.title') }}</h2>
<div class="ranks-inner-content"><br/> <div class="ranks-inner-content"><br/>
<div class="ranks-dropdowns-box"> <div class="ranks-dropdowns-box">
<form action="{{ url('main/guildhighscore') }}" name="highscoreform" method="POST"> <form action="{{ url('main/guildhighscore') }}" name="highscore-form" method="POST">
@csrf
{{-- Temporarily disabled until multi-server support is implemented; added guild leader instead
<div class="ranks-select-box">
<label>Server:</label>
<select name="serverchoice">
<option value="1" selected="selected">Server name 1</option>
<option value="2">Server name 2</option>
<option value="3">Server name 3</option>
</select>
</div>
--}}
<div class="ranks-select-box"> <div class="ranks-select-box">
<label>Server:</label> <label>{{ __('app/highscore.search.select-empire') }}</label>
<select name="serverchoice"> <select name="empire-choice">
<option value="1" selected="selected">Leonis</option> <option value="-1" selected>{{ __('app/highscore.search.all-empires') }}</option>
<option value="2">Virgo</option> @foreach (\App\Models\Enums\EmpireEnum::cases() as $empire)
<option value="3">Pegasus</option> <option value="{{ $empire->value }}" @selected($empireChoice === $empire->value)>
<option value="4">Sagitta</option> {{ $empire->name() }}
<option value="5">Corvus</option> </option>
<option value="6">Taurus</option> @endforeach
<option value="7">Hydra</option>
<option value="8">Aries</option>
<option value="9">Gemini</option>
<option value="10">Lupus</option>
<option value="11">Draco</option>
<option value="12">Volans</option>
<option value="13">Trianguli</option>
</select> </select>
</div> </div>
<div class="ranks-select-box"> <div class="ranks-select-box">
<label>Arată imperiu:</label> <label>{{ __('app/highscore.search.find-guild') }}</label>
<select name="empirechoice">
<option value="-1" selected>[toate imperiile]</option>
<option value="1">Imperiul Shinsoo</option>
<option value="2">Imperiul Chunjo</option>
<option value="3">Imperiul Jinno</option>
</select>
</div>
<div class="ranks-select-box">
<label>Caută breasla:</label>
<div class="ranks-input"> <div class="ranks-input">
<input type="text" value="" name="guildchoice"/> <input type="text" value="{{ $guildChoice ?? '' }}" name="guild-choice"/>
</div>
</div>
<div class="ranks-select-box">
<label>{{ __('app/highscore.search.find-guild-leader') }}</label>
<div class="ranks-input">
<input type="text" value="{{ $guildLeaderChoice ?? '' }}" name="guild-leader-choice"/>
</div> </div>
</div> </div>
<div class="ranks-select-box-btn"> <div class="ranks-select-box-btn">
<a class="small-btn" href="#" onclick="document.forms['highscoreform'].submit();return false;">Căutare</a> <a class="small-btn" href="#" onclick="document.forms['highscore-form'].submit();return false;">
{{ __('app/highscore.search') }}
</a>
</div> </div>
<div class="clearfloat"></div> <div class="clearfloat"></div>
</form> </form>
</div> </div>
<div class="ranks-nav prev prev-top"><a href="https://web.archive.org/web/20130715184054/http://www.metin2.ro/main/guildhighscore/1/-1/1/">&lt;&lt; anterioarele 10 ranguri</a></div>
<div class="ranks-nav next next-top"><a href="https://web.archive.org/web/20130621071508/http://www.metin2.ro/main/guildhighscore/1/-1/11/">urmatoarele 10 ranguri &gt;&gt;</a></div> @if ($highscore->isEmpty())
<br class="clearfloat"/> <div class="error-mini error-mini-margin error-mini-maxwidth">{{ __("app/highscore.no-results") }}</div>
<table border="0" cellpadding="0" cellspacing="0"> @else
<thead> @if ($highscore->lastPage() > 1)
<tr> <div class="ranks-nav prev prev-top">
<th class="guildrank-th-1">Rang</th> @if ($highscore->currentPage() > 1)
<th class="guildrank-th-2">Breasla</th> <a href="{{ route('guild-highscore-page', ['empireChoice' => $empireChoice, 'page' => $highscore->currentPage() - 1, 'guild-choice' => $guildChoice ?? null, 'guild-leader-choice' => $guildChoice ?? null]) }}">&lt;&lt; {{ __("app/highscore.pagination.prev", ['count' => $highscore->perPage()]) }}</a>
<th class="guildrank-th-3">Lider Breaslă</th> @endif
<th class="guildrank-th-4">Regat</th> </div>
<th class="guildrank-th-5">Nivel</th> <div class="ranks-nav next next-top">
<th class="guildrank-th-6">Puncte</th> @if ($highscore->hasMorePages())
</tr> <a href="{{ route('guild-highscore-page', ['empireChoice' => $empireChoice, 'page' => $highscore->currentPage() + 1, 'guild-choice' => $guildChoice ?? null, 'guild-leader-choice' => $guildChoice ?? null]) }}">{{ __("app/highscore.pagination.next", ['count' => $highscore->perPage()]) }} &gt;&gt;</a>
</thead> @endif
<tbody> </div>
<tr class="rankfirst"> @endif
<td class="guildrank-td-1-1">1</td>
<td class="guildrank-td-1-2">InStyle</td>
<td class="guildrank-td-1-3">divolitzaTa</td>
<td class="guildrank-td-1-4"><img src="https://web.archive.org/web/20130621071508im_/http://gf3.geo.gfsrv.net/cdnbe/2bb161df7f13e26bd0545acc5967b2.png" width="34px" alt="Imperiul Chunjo" title="Imperiul Chunjo"/></td>
<td class="guildrank-td-1-5">20</td>
<td class="guildrank-td-1-6">119494</td>
</tr>
<tr>
<td class="guildrank-td-2-1">2</td>
<td class="guildrank-td-2-2">ISENGARD</td>
<td class="guildrank-td-2-3">Florin10</td>
<td class="guildrank-td-2-4"><img src="https://web.archive.org/web/20130621071508im_/http://gf2.geo.gfsrv.net/cdn17/202178f2cf7a2e45f4be61bb360228.png" width="34px" alt="Imperiul Jinno" title="Imperiul Jinno"/></td>
<td class="guildrank-td-2-5">20</td>
<td class="guildrank-td-2-6">113902</td>
</tr>
<tr>
<td class="guildrank-td-1-1">3</td>
<td class="guildrank-td-1-2">TheRulers</td>
<td class="guildrank-td-1-3">gabitza20</td>
<td class="guildrank-td-1-4"><img src="https://web.archive.org/web/20130621071508im_/http://gf3.geo.gfsrv.net/cdnbe/2bb161df7f13e26bd0545acc5967b2.png" width="34px" alt="Imperiul Chunjo" title="Imperiul Chunjo"/></td>
<td class="guildrank-td-1-5">20</td>
<td class="guildrank-td-1-6">76941</td>
</tr>
<tr>
<td class="guildrank-td-2-1">4</td>
<td class="guildrank-td-2-2">A55A55INII</td>
<td class="guildrank-td-2-3">AnA3634</td>
<td class="guildrank-td-2-4"><img src="https://web.archive.org/web/20130621071508im_/http://gf3.geo.gfsrv.net/cdnbe/2bb161df7f13e26bd0545acc5967b2.png" width="34px" alt="Imperiul Chunjo" title="Imperiul Chunjo"/></td>
<td class="guildrank-td-2-5">20</td>
<td class="guildrank-td-2-6">75729</td>
</tr>
<tr>
<td class="guildrank-td-1-1">5</td>
<td class="guildrank-td-1-2">TheElfs</td>
<td class="guildrank-td-1-3">SorrcerreR</td>
<td class="guildrank-td-1-4"><img src="https://web.archive.org/web/20130621071508im_/http://gf2.geo.gfsrv.net/cdn17/202178f2cf7a2e45f4be61bb360228.png" width="34px" alt="Imperiul Jinno" title="Imperiul Jinno"/></td>
<td class="guildrank-td-1-5">20</td>
<td class="guildrank-td-1-6">55547</td>
</tr>
<tr>
<td class="guildrank-td-2-1">6</td>
<td class="guildrank-td-2-2">MAESTRIIpur</td>
<td class="guildrank-td-2-3">MAESTRAiuby</td>
<td class="guildrank-td-2-4"><img src="https://web.archive.org/web/20130621071508im_/http://gf2.geo.gfsrv.net/cdn17/202178f2cf7a2e45f4be61bb360228.png" width="34px" alt="Imperiul Jinno" title="Imperiul Jinno"/></td>
<td class="guildrank-td-2-5">15</td>
<td class="guildrank-td-2-6">50908</td>
</tr>
<tr>
<td class="guildrank-td-1-1">7</td>
<td class="guildrank-td-1-2">NeBuNaTiCii</td>
<td class="guildrank-td-1-3">MANXL</td>
<td class="guildrank-td-1-4"><img src="https://web.archive.org/web/20130621071508im_/http://gf3.geo.gfsrv.net/cdnbe/2bb161df7f13e26bd0545acc5967b2.png" width="34px" alt="Imperiul Chunjo" title="Imperiul Chunjo"/></td>
<td class="guildrank-td-1-5">20</td>
<td class="guildrank-td-1-6">50164</td>
</tr>
<tr>
<td class="guildrank-td-2-1">8</td>
<td class="guildrank-td-2-2">TheGoDs</td>
<td class="guildrank-td-2-3">PaCaToaSa</td>
<td class="guildrank-td-2-4"><img src="https://web.archive.org/web/20130621071508im_/http://gf2.geo.gfsrv.net/cdn13/7211083d422c5dc6c70b198e850004.png" width="34px" alt="Imperiul Shinsoo" title="Imperiul Shinsoo"/></td>
<td class="guildrank-td-2-5">12</td>
<td class="guildrank-td-2-6">48107</td>
</tr>
<tr>
<td class="guildrank-td-1-1">9</td>
<td class="guildrank-td-1-2">7UP</td>
<td class="guildrank-td-1-3">KANNDY</td>
<td class="guildrank-td-1-4"><img src="https://web.archive.org/web/20130621071508im_/http://gf3.geo.gfsrv.net/cdnbe/2bb161df7f13e26bd0545acc5967b2.png" width="34px" alt="Imperiul Chunjo" title="Imperiul Chunjo"/></td>
<td class="guildrank-td-1-5">20</td>
<td class="guildrank-td-1-6">45964</td>
</tr>
<tr>
<td class="guildrank-td-2-1">10</td>
<td class="guildrank-td-2-2">ReVoLuTioN</td>
<td class="guildrank-td-2-3">Tucson</td>
<td class="guildrank-td-2-4"><img src="https://web.archive.org/web/20130621071508im_/http://gf3.geo.gfsrv.net/cdnbe/2bb161df7f13e26bd0545acc5967b2.png" width="34px" alt="Imperiul Chunjo" title="Imperiul Chunjo"/></td>
<td class="guildrank-td-2-5">20</td>
<td class="guildrank-td-2-6">42929</td>
</tr>
</tbody>
</table>
<div class="ranks-nav prev"><a href="https://web.archive.org/web/20130715184054/http://www.metin2.ro/main/guildhighscore/1/-1/1/">&lt;&lt; anterioarele 10 ranguri</a></div>
<div class="ranks-nav next"><a href="https://web.archive.org/web/20130621071508/http://www.metin2.ro/main/guildhighscore/1/-1/11/">urmatoarele 10 ranguri &gt;&gt;</a></div> <br class="clearfloat"/>
<table border="0" cellpadding="0" cellspacing="0">
<thead>
<tr>
<th class="guildrank-th-1">{{ __("app/highscore.header.rank") }}</th>
<th class="guildrank-th-2">{{ __("app/highscore.header.guild-name") }}</th>
<th class="guildrank-th-3">{{ __("app/highscore.header.guild-leader") }}</th>
<th class="guildrank-th-4">{{ __("app/highscore.header.empire") }}</th>
<th class="guildrank-th-5">{{ __("app/highscore.header.level") }}</th>
<th class="guildrank-th-6">{{ __("app/highscore.header.guild-points") }}</th>
</tr>
</thead>
<tbody>
@foreach ($highscore as $entry)
<tr @class(["rankfirst" => $entry->id == 1, "zebra" => $loop->odd])>
<td @class(["guildrank-td-1-1" => $loop->odd, "guildrank-td-2-1" => $loop->even])>
{{ $entry->id }}
</td>
<td @class(["guildrank-td-1-2" => $loop->odd, "guildrank-td-2-2" => $loop->even])>
{{ $entry->name }}
</td>
<td @class(["guildrank-td-1-3" => $loop->odd, "guildrank-td-2-3" => $loop->even])>
{{ $entry->master }}
</td>
<td @class(["guildrank-td-1-4" => $loop->odd, "guildrank-td-2-4" => $loop->even])>
@if ($entry->empire == \App\Models\Enums\EmpireEnum::SHINSOO)
<img src="{{ asset("assets/main/img/empire1.png") }}" width="34" alt="{{ $entry->empire->longName() }}" title="{{ $entry->empire->longName() }}" />
@elseif ($entry->empire == \App\Models\Enums\EmpireEnum::CHUNJO)
<img src="{{ asset("assets/main/img/empire2.png") }}" width="34" alt="{{ $entry->empire->longName() }}" title="{{ $entry->empire->longName() }}" />
@elseif ($entry->empire == \App\Models\Enums\EmpireEnum::JINNO)
<img src="{{ asset("assets/main/img/empire3.png") }}" width="34" alt="{{ $entry->empire->longName() }}" title="{{ $entry->empire->longName() }}" />
@endif
</td>
<td @class(["guildrank-td-1-5" => $loop->odd, "guildrank-td-2-5" => $loop->even])>
{{ $entry->level }}
</td>
<td @class(["guildrank-td-1-6" => $loop->odd, "guildrank-td-2-6" => $loop->even])>
{{ $entry->ladder_point }}
</td>
</tr>
@endforeach
</tbody>
</table>
<div class="clearfloat"></div> @if ($highscore->lastPage() > 1)
<div class="ranks-update-time">Update: 21.06.2013 05:27:36</div> <div class="ranks-nav prev">
@if ($highscore->currentPage() > 1)
<a href="{{ route('guild-highscore-page', ['empireChoice' => $empireChoice, 'page' => $highscore->currentPage() - 1, 'guild-choice' => $guildChoice ?? null, 'guild-leader-choice' => $guildChoice ?? null]) }}">&lt;&lt; {{ __("app/highscore.pagination.prev", ['count' => $highscore->perPage()]) }}</a>
@endif
</div>
<div class="ranks-nav next">
@if ($highscore->hasMorePages())
<a href="{{ route('guild-highscore-page', ['empireChoice' => $empireChoice, 'page' => $highscore->currentPage() + 1, 'guild-choice' => $guildChoice ?? null, 'guild-leader-choice' => $guildChoice ?? null]) }}">{{ __("app/highscore.pagination.next", ['count' => $highscore->perPage()]) }} &gt;&gt;</a>
@endif
</div>
@endif
<div class="clearfloat"></div>
<div class="ranks-update-time">{{ __('app/highscore.update-time') }} {{ $highscore->max('date')->translatedFormat('d F Y H:i:s') }}</div>
@endif
<div class="box-foot"></div> <div class="box-foot"></div>
</div> </div>
</div> </div>
@ -160,9 +138,4 @@
</div> </div>
<div class="shadow">&nbsp;</div> <div class="shadow">&nbsp;</div>
</div> </div>
<script type="text/javascript">
$(document).ready(function(){
$('#guildHighscore table tr:odd').addClass('zebra');
});
</script>
@endsection @endsection

View File

@ -6,143 +6,132 @@
<div class="content content-last"> <div class="content content-last">
<div class="content-bg"> <div class="content-bg">
<div class="content-bg-bottom"> <div class="content-bg-bottom">
<h2>Metin2 - Listarea rangurilor</h2> <h2>{{ __('app/highscore.title') }}</h2>
<div class="ranks-inner-content"><br/> <div class="ranks-inner-content"><br/>
<div class="ranks-dropdowns-box"> <div class="ranks-dropdowns-box">
<form action="{{ url('main/highscore') }}" name="highscoreform" method="post"> <form action="{{ url('main/highscore') }}" name="highscore-form" method="post">
@csrf
{{-- Temporarily disabled until multi-server support is implemented; added empire choice instead
<div class="ranks-select-box">
<label>Server:</label>
<select name="serverchoice">
<option value="1" selected="selected">Server name 1</option>
<option value="2">Server name 2</option>
<option value="3">Server name 3</option>
</select>
</div>
--}}
<div class="ranks-select-box"> <div class="ranks-select-box">
<label>Server:</label> <label>{{ __('app/highscore.search.select-empire') }}</label>
<select name="serverchoice"> <select name="empire-choice">
<option value="1" selected="selected">Leonis</option> <option value="-1">{{ __('app/highscore.search.all-empires') }}</option>
<option value="2">Virgo</option> @foreach (\App\Models\Enums\EmpireEnum::cases() as $empire)
<option value="3">Pegasus</option> <option value="{{ $empire->value }}" @selected($empireChoice === $empire->value)>
<option value="4">Sagitta</option> {{ $empire->name() }}
<option value="5">Corvus</option> </option>
<option value="6">Taurus</option> @endforeach
<option value="7">Hydra</option>
<option value="8">Aries</option>
<option value="9">Gemini</option>
<option value="10">Lupus</option>
<option value="11">Draco</option>
<option value="12">Volans</option>
<option value="13">Trianguli</option>
</select> </select>
</div> </div>
<div class="ranks-select-box"> <div class="ranks-select-box">
<label>Arata categoriile:</label> <label>{{ __('app/highscore.search.select-class') }}</label>
<select name="classchoice"> <select name="class-choice">
<option value="-1" selected="selected">[all classes]</option> <option value="-1">{{ __('app/highscore.search.all-classes') }}</option>
<option value="0">Războinic</option> @foreach (\App\Models\Enums\CharacterClassEnum::cases() as $class)
<option value="1">Ninja</option> <option value="{{ $class->value }}" @selected($classChoice === $class->value)>
<option value="2">Sura</option> {{ $class->name() }}
<option value="3">Şaman</option> </option>
@endforeach
</select> </select>
</div> </div>
<div class="ranks-select-box"> <div class="ranks-select-box">
<label>Alege caracterul:</label> <label>{{ __('app/highscore.search.find-character') }}</label>
<div class="ranks-input"> <div class="ranks-input">
<input type="text" value="" name="characterchoice"/> <input type="text" value="{{ $characterChoice ?? '' }}" name="character-choice"/>
</div> </div>
</div> </div>
<div class="ranks-select-box-btn"> <div class="ranks-select-box-btn">
<a class="small-btn" href="#" onclick="document.forms['highscoreform'].submit();return false;">Căutare</a> <a class="small-btn" href="#" onclick="document.forms['highscore-form'].submit();return false;">
{{ __('app/highscore.search') }}
</a>
</div> </div>
<div class="clearfloat"></div> <div class="clearfloat"></div>
</form> </form>
</div> </div>
<div class="ranks-nav prev prev-top"><a href="https://web.archive.org/web/20130715184054/http://www.metin2.ro/main/guildhighscore/1/-1/1/">&lt;&lt; anterioarele 10 ranguri</a></div>
<div class="ranks-nav next next-top"><a href="https://web.archive.org/web/20130708165425/http://www.metin2.ro/main/highscore/1/-1/11/">urmatoarele 10 ranguri &gt;&gt;</a></div> @if ($highscore->isEmpty())
<br class="clearfloat"/> <div class="error-mini error-mini-margin error-mini-maxwidth">{{ __("app/highscore.no-results") }}</div>
<table border="0" style="table-layout:fixed"> @else
<thead> @if ($highscore->lastPage() > 1)
<tr> <div class="ranks-nav prev prev-top">
<th class="rank-th-1">Rang</th> @if ($highscore->currentPage() > 1)
<th class="rank-th-2">Numele Caracterului</th> <a href="{{ route('highscore-page', ['empireChoice' => $empireChoice, 'classChoice' => $classChoice, 'page' => $highscore->currentPage() - 1, 'character-choice' => $characterChoice ?? null]) }}">&lt;&lt; {{ __("app/highscore.pagination.prev", ['count' => $highscore->perPage()]) }}</a>
<th class="rank-th-3">Regat</th> @endif
<th class="rank-th-4">Nivel</th> </div>
<th class="rank-th-5">EXP</th> <div class="ranks-nav next next-top">
</tr> @if ($highscore->hasMorePages())
</thead> <a href="{{ route('highscore-page', ['empireChoice' => $empireChoice, 'classChoice' => $classChoice, 'page' => $highscore->currentPage() + 1, 'character-choice' => $characterChoice ?? null]) }}">{{ __("app/highscore.pagination.next", ['count' => $highscore->perPage()]) }} &gt;&gt;</a>
<tbody> @endif
<tr class="rankfirst"> </div>
<td class="rank-td-1-1">1</td> @endif
<td class="rank-td-1-2">picyu3</td>
<td class="rank-td-1-3"><img src="https://web.archive.org/web/20130708165425im_/http://gf3.geo.gfsrv.net/cdnbe/2bb161df7f13e26bd0545acc5967b2.png" width="34" alt="Imperiul Chunjo" title="Imperiul Chunjo"/></td>
<td class="rank-td-1-4">105</td>
<td class="rank-td-1-5">0</td>
</tr>
<tr>
<td class="rank-td-2-1">2</td>
<td class="rank-td-2-2">XXXMEN77</td>
<td class="rank-td-2-3"><img src="https://web.archive.org/web/20130708165425im_/http://gf2.geo.gfsrv.net/cdn13/7211083d422c5dc6c70b198e850004.png" width="34" alt="Imperiul Shinsoo" title="Imperiul Shinsoo"/></td>
<td class="rank-td-2-4">105</td>
<td class="rank-td-2-5">0</td>
</tr>
<tr>
<td class="rank-td-1-1">3</td>
<td class="rank-td-1-2">Spydy</td>
<td class="rank-td-1-3"><img src="https://web.archive.org/web/20130708165425im_/http://gf2.geo.gfsrv.net/cdn13/7211083d422c5dc6c70b198e850004.png" width="34" alt="Imperiul Shinsoo" title="Imperiul Shinsoo"/></td>
<td class="rank-td-1-4">105</td>
<td class="rank-td-1-5">0</td>
</tr>
<tr>
<td class="rank-td-2-1">4</td>
<td class="rank-td-2-2">beLeSe</td>
<td class="rank-td-2-3"><img src="https://web.archive.org/web/20130708165425im_/http://gf2.geo.gfsrv.net/cdn17/202178f2cf7a2e45f4be61bb360228.png" width="34" alt="Imperiul Jinno" title="Imperiul Jinno"/></td>
<td class="rank-td-2-4">105</td>
<td class="rank-td-2-5">0</td>
</tr>
<tr>
<td class="rank-td-1-1">5</td>
<td class="rank-td-1-2">alexdenis</td>
<td class="rank-td-1-3"><img src="https://web.archive.org/web/20130708165425im_/http://gf3.geo.gfsrv.net/cdnbe/2bb161df7f13e26bd0545acc5967b2.png" width="34" alt="Imperiul Chunjo" title="Imperiul Chunjo"/></td>
<td class="rank-td-1-4">105</td>
<td class="rank-td-1-5">0</td>
</tr>
<tr>
<td class="rank-td-2-1">6</td>
<td class="rank-td-2-2">addygryg</td>
<td class="rank-td-2-3"><img src="https://web.archive.org/web/20130708165425im_/http://gf2.geo.gfsrv.net/cdn17/202178f2cf7a2e45f4be61bb360228.png" width="34" alt="Imperiul Jinno" title="Imperiul Jinno"/></td>
<td class="rank-td-2-4">105</td>
<td class="rank-td-2-5">0</td>
</tr>
<tr>
<td class="rank-td-1-1">7</td>
<td class="rank-td-1-2">Pixie03</td>
<td class="rank-td-1-3"><img src="https://web.archive.org/web/20130708165425im_/http://gf2.geo.gfsrv.net/cdn17/202178f2cf7a2e45f4be61bb360228.png" width="34" alt="Imperiul Jinno" title="Imperiul Jinno"/></td>
<td class="rank-td-1-4">105</td>
<td class="rank-td-1-5">0</td>
</tr>
<tr>
<td class="rank-td-2-1">8</td>
<td class="rank-td-2-2">KingARAGORN</td>
<td class="rank-td-2-3"><img src="https://web.archive.org/web/20130708165425im_/http://gf2.geo.gfsrv.net/cdn17/202178f2cf7a2e45f4be61bb360228.png" width="34" alt="Imperiul Jinno" title="Imperiul Jinno"/></td>
<td class="rank-td-2-4">105</td>
<td class="rank-td-2-5">0</td>
</tr>
<tr>
<td class="rank-td-1-1">9</td>
<td class="rank-td-1-2">pauldpv2001</td>
<td class="rank-td-1-3"><img src="https://web.archive.org/web/20130708165425im_/http://gf3.geo.gfsrv.net/cdnbe/2bb161df7f13e26bd0545acc5967b2.png" width="34" alt="Imperiul Chunjo" title="Imperiul Chunjo"/></td>
<td class="rank-td-1-4">105</td>
<td class="rank-td-1-5">0</td>
</tr>
<tr>
<td class="rank-td-2-1">10</td>
<td class="rank-td-2-2">SCORPIO1</td>
<td class="rank-td-2-3"><img src="https://web.archive.org/web/20130708165425im_/http://gf2.geo.gfsrv.net/cdn13/7211083d422c5dc6c70b198e850004.png" width="34" alt="Imperiul Shinsoo" title="Imperiul Shinsoo"/></td>
<td class="rank-td-2-4">105</td>
<td class="rank-td-2-5">0</td>
</tr>
</tbody>
</table>
<div class="ranks-nav prev"><a href="https://web.archive.org/web/20130715184054/http://www.metin2.ro/main/guildhighscore/1/-1/1/">&lt;&lt; anterioarele 10 ranguri</a></div>
<div class="ranks-nav next"><a href="https://web.archive.org/web/20130708165425/http://www.metin2.ro/main/highscore/1/-1/11/">urmatoarele 10 ranguri &gt;&gt;</a></div> <br class="clearfloat"/>
<table border="0" style="table-layout:fixed">
<thead>
<tr>
<th class="rank-th-1">{{ __("app/highscore.header.rank") }}</th>
<th class="rank-th-2">{{ __("app/highscore.header.character-name") }}</th>
<th class="rank-th-3">{{ __("app/highscore.header.empire") }}</th>
<th class="rank-th-4">{{ __("app/highscore.header.level") }}</th>
<th class="rank-th-5">{{ __("app/highscore.header.exp") }}</th>
</tr>
</thead>
<tbody>
@foreach ($highscore as $entry)
<tr @class(["rankfirst" => $entry->id == 1, "zebra" => $loop->odd])>
<td @class(["rank-td-1-1" => $loop->odd, "rank-td-2-1" => $loop->even])>
{{ $entry->id }}
</td>
<td @class(["rank-td-1-2" => $loop->odd, "rank-td-2-2" => $loop->even])>
{{ $entry->name }}
</td>
<td @class(["rank-td-1-3" => $loop->odd, "rank-td-2-3" => $loop->even])>
@if ($entry->empire == \App\Models\Enums\EmpireEnum::SHINSOO)
<img src="{{ asset("assets/main/img/empire1.png") }}" width="34" alt="{{ $entry->empire->longName() }}" title="{{ $entry->empire->longName() }}" />
@elseif ($entry->empire == \App\Models\Enums\EmpireEnum::CHUNJO)
<img src="{{ asset("assets/main/img/empire2.png") }}" width="34" alt="{{ $entry->empire->longName() }}" title="{{ $entry->empire->longName() }}" />
@elseif ($entry->empire == \App\Models\Enums\EmpireEnum::JINNO)
<img src="{{ asset("assets/main/img/empire3.png") }}" width="34" alt="{{ $entry->empire->longName() }}" title="{{ $entry->empire->longName() }}" />
@endif
</td>
<td @class(["rank-td-1-4" => $loop->odd, "rank-td-2-4" => $loop->even])>
{{ $entry->level }}
</td>
<td @class(["rank-td-1-5" => $loop->odd, "rank-td-2-5" => $loop->even])>
{{ $entry->exp }}
</td>
</tr>
@endforeach
</tbody>
</table>
<div class="clearfloat"></div> @if ($highscore->lastPage() > 1)
<div class="ranks-update-time">Update: 08.07.2013 14:57:16</div> <div class="ranks-nav prev">
@if ($highscore->currentPage() > 1)
<a href="{{ route('highscore-page', ['empireChoice' => $empireChoice, 'classChoice' => $classChoice, 'page' => $highscore->currentPage() - 1, 'character-choice' => $characterChoice ?? null]) }}">&lt;&lt; {{ __("app/highscore.pagination.prev", ['count' => $highscore->perPage()]) }}</a>
@endif
</div>
<div class="ranks-nav next">
@if ($highscore->hasMorePages())
<a href="{{ route('highscore-page', ['empireChoice' => $empireChoice, 'classChoice' => $classChoice, 'page' => $highscore->currentPage() + 1, 'character-choice' => $characterChoice ?? null]) }}">{{ __("app/highscore.pagination.next", ['count' => $highscore->perPage()]) }} &gt;&gt;</a>
@endif
</div>
@endif
<div class="clearfloat"></div>
<div class="ranks-update-time">{{ __('app/highscore.update-time') }} {{ $highscore->max('date')->translatedFormat('d F Y H:i:s') }}</div>
@endif
<div class="box-foot"></div> <div class="box-foot"></div>
</div> </div>
</div> </div>
@ -150,9 +139,4 @@
</div> </div>
<div class="shadow">&nbsp;</div> <div class="shadow">&nbsp;</div>
</div> </div>
<script type="text/javascript">
$(document).ready(function(){
$('#highscore table tr:odd').addClass('zebra');
});
</script>
@endsection @endsection

View File

@ -31,8 +31,16 @@
Route::get('/media', fn () => view('main/media')); Route::get('/media', fn () => view('main/media'));
Route::get('/news', fn () => view('main/news')); Route::get('/news', fn () => view('main/news'));
Route::get('/download', fn () => view('main/download')); Route::get('/download', fn () => view('main/download'));
Route::get('/highscore', fn () => view('main/highscore'));
Route::get('/guildhighscore', fn () => view('main/guildhighscore')); # Highscore
Route::get('/highscore', [HighscoreController::class, 'show']);
Route::post('/highscore', [HighscoreController::class, 'search']);
Route::get('/highscore/{empireChoice}/{classChoice}/{page}', [HighscoreController::class, 'show'])->name('highscore-page');
# Guild highscore
Route::get('/guildhighscore', [GuildHighscoreController::class, 'show']);
Route::post('/guildhighscore', [GuildHighscoreController::class, 'search']);
Route::get('/guildhighscore/{empireChoice}/{page}', [GuildHighscoreController::class, 'show'])->name('guild-highscore-page');
# The game # The game
Route::get('/thegame', fn () => view('main/thegame/thegame')); Route::get('/thegame', fn () => view('main/thegame/thegame'));