Commit aa6bf9b0 authored by Chris92's avatar Chris92

Last updates

- Added planets management
- Began work on Map Management 2.0
- Fixed player controller
- Began adding localization support
- Fixed Map Upload (requires FTP/SFTP/Local File Access)
parent 5bd35100
......@@ -37,6 +37,11 @@ class Maniaplanet
return $out->stripAll()->toHtml();
}
public function stripAll($string){
$out = new \Manialib\Formatting\ManiaplanetString($string);
return $out->stripAll();
}
/**
* connect to Server
......
......@@ -71,10 +71,15 @@ class MapInfo extends Controller
try {
Maniaplanet::fileAccess($id)->put('/UserData/Maps/' . $file->getClientOriginalName(), $data);
//TODO: WriteFile() does not work on Linux - inquire with xbx
//Maniaplanet::connect($id)->writeFile($file->getClientOriginalName(), base64_encode($data));
Maniaplanet::connect($id)->addMap($file->getClientOriginalName());
$map = Map::loadString($data);
Maniaplanet::connect($id)->chatSendServerMessage('$z$s$fff#Admin$0cfServ $fff» [$7F7 Maps.Add$FFF] ' . $map->getName() . ' $z$s$FFFby ' . $map->getAuthor());
return response()->json('success', 200);
} catch (\Exception $ex) {
return response()->json("error: " . $ex->getMessage(), 400);
return response()->json("error: " . $ex->getCode(), 400);
Console.log($ex->getMessage());
}
}
}
<?php
namespace App\Http\Controllers;
use App\Helpers\Maniaplanet;
use App\Permission;
use App\Server;
use App\User;
use Maniaplanet\DedicatedServer\Structures\Map;
class FileBrowserController extends Controller
{
public function index($id){
$conn = Maniaplanet::connect($id);
$files = Maniaplanet::fileAccess($id)->listContents("Maniaplanet/Maps");
array_multisort(array_column($files, 'type'), SORT_ASC, SORT_NATURAL, $files);
$maps = array();
return view("server.maps.filebrowser", compact('id', 'files'));
}
}
\ No newline at end of file
......@@ -28,8 +28,8 @@ class ManiaExchangeController extends Controller
$maps = $this->paginate($mapsData, 15);
return view("server.manage.maps", compact('maps', "id"))
->with('i', ($request->input('page', 1) - 1) * 15);
return view("server.maps.upload", compact('maps', "id"))
->with('i', ($request->input('page', 1) - 1) * 50);
}
......@@ -86,7 +86,7 @@ class ManiaExchangeController extends Controller
//if ($connection->checkMapForCurrentServerParams($file)) {
try {
Maniaplanet::connect($id)->writeFile($file, base64_encode($string));
//Maniaplanet::connect($id)->writeFile($file, base64_encode($string));
//$custom_callback_data = array('filename' => $file,
//'map_uid' => $map->getUid(),
//'map_author' => $map->getAuthor(),
......@@ -98,6 +98,7 @@ class ManiaExchangeController extends Controller
} catch (\Exception $ex) {
return back()->with(["warning" => "upload to server failed: " . $ex->getMessage()]);
}
Maniaplanet::connect($id)->chatSendServerMessage('$z$s$fff#Admin$0cfServ $fff» [$7F7 Maps.Add $FFF(M$08FX$FFF)] ' . $map->getName() . ' $z$s$FFFby ' . $map->getAuthor());
return back()->with(["info" => "success"]);
//} else {
// return back()->with(["warning" => "current map type is not supported."]);
......
<?php
namespace App\Http\Controllers;
use App\Helpers\Maniaplanet;
use App\Permission;
use App\Server;
use App\User;
use Illuminate\Http\Request;
use Maniaplanet\DedicatedServer\Xmlrpc\Exception;
class Planets extends Controller {
public function overview($id){
$planets = Maniaplanet::connect($id)->getServerPlanets();
$playerList = Maniaplanet::connect($id)->getplayerList();
return view("server.settings.planets", compact("planets", "playerList", "id"));
}
public function transfer($id, Request $request){
$login = $request->get("login");
$player = Maniaplanet::connect($id)->getPlayerInfo($login);
$amount = (int) $request->get("amount");
$planets = Maniaplanet::connect($id)->getServerPlanets();
if($amount > Maniaplanet::connect($id)->getServerPlanets() - 500){
return back()->with(["error" => "The amount you're trying to transfer is higher than the server's current planets."]);
} else {
try{
Maniaplanet::connect($id)->pay($login, $amount, "Transferred via \$fffAdmin\$0cfServ");
} catch (\Exception $ex){
return back()->with(["error" => $ex->getMessage()]);
}
Maniaplanet::connect($id)->chatSendServerMessage('$z$s$fff#Admin$0cfServ $fff» [$0FF Planets.Payout$FFF] '.$amount.' planets → '.$player->nickName.' $z$s$FFF(Login: '.$player->login.')');
return back()->with(["success" => "Planets successfully transferred"]);
}
}
public function billPlayer($id, Request $request){
$login = $request->get("login");
$amount = (int) $request->get("amount");
$message = $request->get("message");
try{
Maniaplanet::connect($id)->sendBill($login, $amount, $message);
} catch (\Exception $ex){
return back()->with(["error" => $ex->getMessage()]);
}
return back()->with(["success" => "Bill sent to player."]);
}
}
\ No newline at end of file
......@@ -8,6 +8,7 @@ use App\Server;
use App\User;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Manialib\Formatting\ManiaplanetString;
use Maniaplanet\DedicatedServer\Structures\GameInfos;
use Maniaplanet\DedicatedServer\Structures\ServerOptions;
use Maniaplanet\DedicatedServer\Structures\ScriptSettings;
......@@ -37,7 +38,17 @@ class ServerPlayerController extends Controller
try {
$players = Maniaplanet::connect($id)->getPlayerList();
$ignored = Maniaplanet::connect($id)->getIgnoreList();
return view("server.ajax.playerlist", compact('players', 'id', 'ignored'));
$guests = Maniaplanet::connect($id)->getGuestList();
$ignoredList = array();
$guestList = array();
foreach($ignored as $player){
array_push($ignoredList, $player->login);
}
foreach($guests as $player){
array_push($guestList, $player->login);
}
return view("server.ajax.playerlist", compact('players', 'id', 'ignoredList', 'guestList'));
} catch (\Exception $ex) {
return response("Error: " . $ex->getMessage() . "<br>Your server might be offline.");
}
......@@ -46,61 +57,78 @@ class ServerPlayerController extends Controller
/** Mute, Guestlist, Kick, Ban, Blacklist **/
public function kickPlayer($id, $login){
public function kickPlayer($id, $login, $nickName){
try{
$connection = Maniaplanet::connect($id);
$connection->kick($login, "Kicked via AdminServ");
$connection->chatSendServerMessage('$z$s$fff#Admin$0cfServ $fff» [$FF0✗ KICK$FFF] ' .$nickName. ' $z$s$fff(Login: '.$login.')' );
}
catch (\Exception $ex) {
return response("Error: " . $ex->getMessage());
}
}
public function banPlayer($id, $login)
public function banPlayer($id, $login, $nickName)
{
try {
$connection = Maniaplanet::connect($id);
$connection->ban($login, "Banned via AdminServ");
$connection->chatSendServerMessage('$z$s$fff#Admin$0cfServ $fff» [$F00 BAN$FFF] ' .$nickName. ' $z$s$fff(Login: '.$login.')' );
} catch (\Exception $ex) {
return response("Error: " . $ex->getMessage());
}
}
public function blacklistAndBanPlayer($id, $login)
public function blacklistAndBanPlayer($id, $login, $nickName)
{
try {
$connection = Maniaplanet::connect($id);
$connection->banAndBlackList($login, "Banned via AdminServ");
$connection->chatSendServerMessage('$z$s$fff#Admin$0cfServ $fff» [$000 BLACKLIST$FFF] ' .$nickName. ' $z$s$fff(Login: '.$login.').' );
} catch (\Exception $ex) {
return response("Error: " . $ex->getMessage());
}
}
public function addPlayerToGuestlist($id, $login)
public function addPlayerToGuestlist($id, $login, $nickName)
{
try {
$connection = Maniaplanet::connect($id);
$connection->addGuest($login);
$connection->chatSendServerMessage('$z$s$fff#Admin$0cfServ $fff» [$7F7 Guestlist.Add$FFF] ' .$nickName. ' $z$s$fff(Login: '.$login.') ' );
} catch (\Exception $ex) {
return response("Error: " . $ex->getMessage());
}
}
public function mutePlayer($id, $login)
public function removePlayerFromGuestlist($id, $login, $nickName)
{
try{
$connection = Maniaplanet::connect($id);
$connection->removeGuest($login);
$connection->chatSendServerMessage('$z$s$fff#Admin$0cfServ $fff» [$F77 Guestlist.Remove$FFF] ' .$nickName. ' $z$s$fff(Login: '.$login.')' );
} catch (\Exception $ex) {
return response("Error" . $ex->getMessage());
}
}
public function mutePlayer($id, $login, $nickName)
{
try {
$connection = Maniaplanet::connect($id);
$connection->ignore($login);
$connection->chatSendServerMessage('$z$s$fff#Admin$0cfServ $fff» [$F77 Mute$FFF] ' .$nickName. ' $z$s$fff(Login: '.$login.')' );
} catch (\Exception $ex) {
return response("Error: " . $ex->getMessage());
}
}
public function unmutePlayer($id, $login)
public function unmutePlayer($id, $login, $nickName)
{
try {
$connection = Maniaplanet::connect($id);
$connection->unIgnore($login);
$connection->chatSendServerMessage('$z$s$fff#Admin$0cfServ $fff» [$7F7 Unmute$FFF] ' .$nickName. ' $z$s$fff(Login: '.$login.')' );
} catch (\Exception $ex) {
return response("Error: " . $ex->getMessage());
}
......@@ -108,25 +136,34 @@ class ServerPlayerController extends Controller
public function handleRequest(Request $request, $id, $login)
{
$nickName = $request->get("nickname");
switch($request->get("action")){
case "kick":
$this->kickPlayer($id, $login);
$this->kickPlayer($id, $login, $nickName);
return redirect()->route("server.manage.players", $id);
break;
case "ban":
$this->banPlayer($id, $login);
$this->banPlayer($id, $login, $nickName);
return redirect()->route("server.manage.players", $id);
break;
case "guestlist-add":
$this->addPlayerToGuestlist($id, $login, $nickName);
return redirect()->route("server.manage.players", $id);
break;
case "guestlist":
$this->addPlayerToGuestlist($id, $login);
case "guestlist-remove":
$this->removePlayerFromGuestlist($id, $login, $nickName);
return redirect()->route("server.manage.players", $id);
break;
case "blacklist":
$this->blacklistAndBanPlayer($id, $login);
$this->blacklistAndBanPlayer($id, $login, $nickName);
return redirect()->route("server.manage.players", $id);
break;
case "mute":
$this->mutePlayer($id, $login);
$this->mutePlayer($id, $login, $nickName);
return redirect()->route("server.manage.players", $id);
break;
case "unmute":
$this->unmutePlayer($id, $login, $nickName);
return redirect()->route("server.manage.players", $id);
break;
default:
......
This diff is collapsed.
File added
<?php
return [
'welcome' => 'Willkommen bei #AdminServ!',
// General messages that reappear everywhere
'submit' => 'Absenden',
'edit' => 'Bearbeiten',
'delete' => 'Löschen',
'create' => 'Erstellen',
'cancel' => 'Abbrechen',
'home' => 'Home',
'servers' => 'Server',
'users' => 'Benutzer',
'manage' => 'Verwalten',
'back' => 'Zurück',
'logout' => 'Ausloggen',
'login' => 'Login',
'setting-name' => 'Name der Einstellung',
'value' => 'Wert',
'select-player' => 'Spieler auswählen',
'transfer' => 'Übertragen',
// Add/edit servers
'add-new-server' => 'Neuen Server hinzufügen',
'add-a-server' => 'Einen Server hinzufügen',
'server-name' => 'Server Name',
'server-description' => 'Beschreibung',
'server-host' => 'Host',
'server-xml-rpc-port' => 'XML-RPC Port',
'server-xml-rpc-user' => 'XML-RPC Benutzer (SuperAdmin)',
'server-xml-rpc-pwd' => 'XML-RPC Passwort',
'server-uses-ftp' => 'Server benutzt FTP zur Dateiübertragung (Nur aktivieren falls Host nicht localhost)',
'server-uses-sftp' => 'Server benutzt SFTP',
'server-ftp-remote-host' => 'Remote Host',
'server-ftp-remote-port' => 'Remote Port',
'server-ftp-remote-user' => 'Remote User',
'server-ftp-remote-pass' => 'Remote Pass',
// Server Manage Page and sub pages
'server-manage-overview' => 'Übersicht',
'server-manage-settings' => 'Einstellungen',
'server-manage-game-settings' => 'Spieleinstellungen',
'server-manage-server-options' => 'Serveroptionen',
'server-manage-match-settings' => 'Matcheinstellungen',
'server-manage-script-settings' => 'Skripteinstellungen',
'server-manage-planets' => 'Planets',
'server-manage-adminserv-specific' => 'AdminServ Spezifisch',
'server-manage-roles-management' => 'Rollenverwaltung',
'server-manage-planets-message' => '{0} Der Server hat momentan keine Planets.|{1} Der Server hat momentan :value Planet.|[2,*] Der Server hat momentan :value Planets.',
'server-manage-planets-transfer' => 'Planets übertragen',
'server-manage-planets-amount' => 'Planets Anzahl angeben',
'server-manage-planets-send-bill' => 'Sende Rechnung an Spieler',
'server-manage-planets-bill-msg' => 'Nachricht für die Rechnung angeben',
'server-manage-planets-bill-create' => 'Rechnung erstellen'
];
......@@ -2,7 +2,56 @@
return [
'welcome' => 'Welcome to #AdminServ!',
// General messages that reappear everywhere
'submit' => 'Submit',
'edit' => 'Edit',
'delete' => 'Delete',
'create' => 'Create',
'cancel' => 'Cancel',
'home' => 'Home',
'servers' => 'Servers',
'users' => 'Users',
'manage' => 'Manage',
'back' => 'Back',
'logout' => 'Logout',
'login' => 'Login',
'setting-name' => 'Setting name',
'value' => 'Value',
'select-player' => 'Select player',
'transfer' => 'Transfer',
// Add/edit servers
'add-new-server' => 'Add New Server',
'add-a-server' => 'Add a Server',
'server-name' => 'Server Name',
'server-description' => 'Description',
'server-host' => 'Host',
'server-xml-rpc-port' => 'XML-RPC Port',
'server-xml-rpc-user' => 'XML-RPC User (SuperAdmin)',
'server-xml-rpc-pwd' => 'XML-RPC Password',
'server-uses-ftp' => 'Server uses FTP remote file storage (only enable this if host isn\'t localhost)',
'server-uses-sftp' => 'Server uses SFTP',
'server-ftp-remote-host' => 'Remote Host',
'server-ftp-remote-port' => 'Remote Port',
'server-ftp-remote-user' => 'Remote User',
'server-ftp-remote-pass' => 'Remote Pass',
// Server Manage Page and sub pages
'server-manage-overview' => 'Overview',
'server-manage-settings' => 'Settings',
'server-manage-game-settings' => 'Game Settings',
'server-manage-server-options' => 'Server Options',
'server-manage-match-settings' => 'Match Settings',
'server-manage-script-settings' => 'Script Settings',
'server-manage-planets' => 'Planets',
'server-manage-adminserv-specific' => 'AdminServ Specific',
'server-manage-roles-management' => 'Roles Management',
'server-manage-planets-message' => '{0} The server currently has no planets|{1} The server currently has :value planet.|{2,*} The server currently has :value planets.',
'server-manage-planets-transfer' => 'Transfer planets',
'server-manage-planets-amount' => 'Choose amount of planets',
'server-manage-planets-send-bill' => 'Send bill to player',
'server-manage-planets-bill-msg' => 'Enter a message for the bill',
'server-manage-planets-bill-create' => 'Create bill'
];
......@@ -22,9 +22,9 @@
</div>
<a class="item" href="{{route("home")}}">Home</a>
@if (Auth::check())
<a class="item" href="{{route("server.index")}}">Servers</a>
<a class="item" href="{{route("server.index")}}">{{__('messages.servers')}}</a>
@role('adminserv-master')
<a class="item" href="{{route("users.index")}}">Users</a>
<a class="item" href="{{route("users.index")}}">{{__('messages.users')}}</a>
@endrole
@endif
<div class="menu right">
......@@ -35,9 +35,9 @@
@else <span>{!! Auth::user()->name !!}</span>
@endif
</a>
<a class="item" href="/logout"><i class="white sign out icon"></i>Logout</a>
<a class="item" href="/logout"><i class="white sign out icon"></i>{{__('messages.logout')}}</a>
@else
<a class="item floated" href="/login"><i class="white sign in icon"></i>Login</a>
<a class="item floated" href="/login"><i class="white sign in icon"></i>{{__('messages.login')}}</a>
@endif
</div>
</div>
......
......@@ -14,6 +14,7 @@
</tr>
</thead>
<tbody>
@foreach($players as $i => $player)
<?php $login = $player->login ?>
......@@ -30,13 +31,21 @@
<td>{{ round($player->ladderScore, 2) }}</td>
<td>
<div class="ui buttons">
{!! Form::open(['route' => ['ajax.handlePlayerListRequest', $id, $login]]) !!}
{!! Form::open(['route' => ['ajax.handlePlayerListRequest', $id, $player->login]]) !!}
@if(in_array($login, $ignoredList))
<button class="ui button" type="submit" name="action" value="unmute">Unmute</button>
@else
<button class="ui button" type="submit" name="action" value="mute">Mute</button>
<button class="ui button" type="submit" name="action" value="guestlist">Guest</button>
@endif
@if(in_array($login, $guestList))
<button class="ui button" type="submit" name="action" value="guestlist-remove">Remove as Guest</button>
@else
<button class="ui button" type="submit" name="action" value="guestlist-add">Add as Guest</button>
@endif
<button class="ui button" type="submit" name="action" value="kick">Kick</button>
<button class="ui button" type="submit" name="action" value="ban">Ban</button>
<button class="ui button" type="submit" name="action" value="blacklist">Black</button>
<!--{{ Form::submit(null, ["class" => "ui button", "id" => "kick"]) }}-->
<input type="hidden" name="nickname" value="{{$player->nickName}}"></input>
{!! Form::close() !!}
</div>
</td>
......
......@@ -25,7 +25,7 @@
<a class="item" href="{{ route('server.scriptsettings', [$id]) }}"><i class="code icon"></i> Script Settings</a>
@endability
@ability('adminserv-master', 'planets-view,planets-send')
<a class="item" href="#"><i class="money icon"></i> Planets</a>
<a class="item" href="{{ route('server.planets', [$id]) }}"><i class="money icon"></i> Planets</a>
@endability
@ability('adminserv-master', 'role-list,role-create,role-edit,role-delete')
<div class="header">AdminServ specific</div>
......@@ -33,7 +33,13 @@
@endability
</div>
</div>
<a class="item" href="{{ route('server.manage.maps', [$id]) }}"><i class="map icon"></i> Maps</a>
<div class="ui dropdown link item">
<i class="map icon"></i> Maps<i class="dropdown icon"></i>
<div class="menu">
<a class="item" href="{{ route('server.maps.upload', [$id]) }}"><i class="map icon"></i> Upload Maps & MX</a>
<a class="item" href="{{ route('server.maps.filebrowser', [$id]) }}"><i class="folder open icon"></i> File Browser</a>
</div>
</div>
<a class="item" href="{{ route('server.manage.players', [$id]) }}"><i class="gamepad icon"></i> Players</a>
<div class="right menu" data-ajax-url="/server/{{$id}}/ajax/quickcontrols">
</div>
......
<?php
/** @var \Manialib\Gbx\Map $map */
?>
@extends("layouts.menuapp")
@section('title', 'File Browser')
@section('content')
<div class="ui very padded raised container segment">
<div class="ui grid">
<div class="row">
<div class="eight wide column">
<h2 class="ui header">File Browser</h2>
</div>
<div class="eight wide column right aligned">
<a class="ui black labeled icon button" href="{{ route('server.manage', [$id]) }}"><i
class="reply icon"></i><span>Back</span></a>
</div>
</div>
<div class="row">
<div class="ui list">
@foreach($files as $file)
<div class="ui item">
@if($file['type'] == "dir")
<i class="folder open icon"></i>
<div class="content">
<div class="header">{{$file['basename']}}</div>
</div>
@elseif($file['type'] == "file")
<i class="map icon"></i>
<div class="content">
<div class="header">{{$file['basename']}}</div>
<div class="description">
@php $map = \Manialib\Gbx\Map::loadString(\App\Helpers\Maniaplanet::fileAccess($id)->read($file['path']));
echo "Author: ".$map->getAuthor()." - Environment: ".$map->getEnvironment();
@endphp
</div>
</div>
@endif
</div>
@endforeach
</div>
</div>
</div>
</div>
@endsection
@push('scripts')
<!--<script>
$('#maps').sortable({
containerSelector: 'table',
itemPath: '> tbody',
itemSelector: 'tr',
placeholder: '<tr class="placeholder" />'
});
</script>-->
@endpush
<?php
/** @var \Maniaplanet\DedicatedServer\Structures\Map $map */
?>
@extends("layouts.menuapp")
@section('title', 'Maps')
@section('content')
<div class="ui very padded raised container segment">
......@@ -18,57 +18,46 @@
</div>
</div>
</div>
{!! Form::open(["route" => ["server.manage.mxinstall", $id], "class" => "ui form"]) !!}
<div class="ui fields">
<div class="field">
<select name="gametype" class="ui dropdown">
<option value="TM">TM</option>
<option value="SM">SM</option>
</select>
</div>
<div class="field required">
<input type="text" name="mxid" placeholder="Mania-exchange map id"/>
</div>
<div class="field">
<button class="ui green inverted button" type="submit">Install</button>
</div>
</div>
{!! Form::close()!!}
@if(\App\Server::findOrFail($id)->getAttributeValue("host") != "localhost" && \App\Server::findOrFail($id)->useRemote || \App\Server::findOrFail($id)->getAttributeValue("host") == "localhost" || \App\Server::findOrFail($id)->getAttributeValue("host") != "127.0.0.1" && \App\Server::findOrFail($id)->useRemote || \App\Server::findOrFail($id)->getAttributeValue("host") == "127.0.0.1")
{!! Form::open(["route" => ["server.manage.mxinstall", $id], "class" => "ui form"]) !!}
<div class="ui fields">
<div class="field">
<select name="gametype" class="ui dropdown">
<option value="TM">TM</option>
<option value="SM">SM</option>
</select>
</div>
<div class="field required">
<input type="text" name="mxid" placeholder="Mania-exchange map id"/>
</div>
<div class="field">
<button class="ui green inverted button" type="submit">Install</button>
</div>
@include('partials.upload', ["id" =>$id])
</div>
{!! Form::close()!!}
@include('partials.upload', ["id" =>$id])
@else
<div class="ui error message">
<i class="close icon"></i>
<div class="header">
Map uploading and installing maps from Mania-Exchange are not available!
</div>
Your server seems to be running on a remote host with no FTP/SFTP file storage configured.<br>
Due to ManiaPlanet API limitations, please setup FTP/SFTP remote file storage. You can do so <a href="{{ route('server.edit', [$id]) }}">here</a>.
<table id="maps" class="ui celled green sortable table">
<thead>
<tr>
<th>Name</th>
<th>Author</th>
<th>Time</th>
<th>Environment</th>
</tr>
</thead>
<tbody>
@foreach($maps as $map)
<tr>
<td class="active"><i class="move icon"></i>{!! Maniaplanet::toHtml('$s'.$map->name) !!}</td>
<td> {{$map->author}}</td>
<td> {{ Maniaplanet::toMS($map->goldTime)}}</td>
<td> {{ $map->environnement }}</td>
</tr>
@endforeach
</tbody>
</table>
{{ $maps->links() }}
</div>
@endif
</div>
@endsection
@push('scripts')
<script>
<!--<script>
$('#maps').sortable({
containerSelector: 'table',
itemPath: '> tbody',
itemSelector: 'tr',
placeholder: '<tr class="placeholder" />'
});
</script>
</script>-->
@endpush
@extends('layouts.menuapp')
@section('title', 'Planets')
@section('content')
<div class="ui very padded raised container segment">
<div class="ui grid">
<div class="row">
<div class="eight wide column">
<h2 class="ui header">Planets</h2>
</div>
<div class="eight wide column right aligned">
<a class="ui black labeled icon button" href="{{ route('server.manage', [$id]) }}"><i
class="reply icon"></i><span>{{__('messages.back')}}</span></a>
</div>
</div>
<div class="row">
<div class="sixteen wide column">
<h4 class="ui header">
<i class="globe icon"></i>
<div class="content">
@php echo trans_choice('messages.server-manage-planets-message', $planets, ['value' => $planets])@endphp
</div>
</h4>
{!! Form::open(["route" => ["server.planets.transfer", $id], "class" => "ui form"]) !!}
<h4 class="ui dividing header">{{__('messages.server-manage-planets-transfer')}}</h4>
<div class="field">
<div class="fields">
<div class="four wide field">
<label>{{__('messages.select-player')}}</label>
<select name="login" class="ui dropdown">
@foreach($playerList as $player)
<option value="{{$player->login}}">{!! Maniaplanet::stripAll($player->nickName) !!}</option>
@endforeach
</select>
</div>
<div class="three wide field">
<label>{{__('messages.server-manage-planets-amount')}}</label>
<input type="number" name="amount">
</div>
<div class="two wide field">
<label>&#0160;</label>
<button class="ui green button" type="submit">{{__('messages.transfer')}}</button>
</div>
</div>
</div>
{!! Form::close() !!}
{!! Form::open(["route" => ["server.planets.createbill", $id], "class" => "ui form"]) !!}
<h4 class="ui dividing header">{{__('messages.server-manage-planets-send-bill')}}</h4>
<div class="field">
<div class="fields">