Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@dastiii
Created December 13, 2017 19:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dastiii/3ee6e366ba4af5e9338c16fc52b5b02a to your computer and use it in GitHub Desktop.
Save dastiii/3ee6e366ba4af5e9338c16fc52b5b02a to your computer and use it in GitHub Desktop.
Server Control Module
// application/modules/servercontrol/config/config.php
<?php
/**
* @copyright Ilch 2.0
* @package ilch
*/
namespace Modules\Servercontrol\Config;
use Ilch\Config\Install;
class Config extends Install
{
public $config = [
'key' => 'servercontrol',
'version' => '1.0',
'icon_small' => '', // optional ausfüllen.
'author' => '', // optional ausfüllen.
'link' => '', // optional ausfüllen.
'languages' => [
'de_DE' => [
'name' => 'Serversteuerung',
'description' => '', // optional ausfüllen.
],
'en_EN' => [
'name' => 'Server control',
'description' => '', // optional ausfüllen.
],
],
'ilchCore' => '2.0.0',
'phpVersion' => '5.6',
'boxes' => [
'servercontrolbox' => [
'de_DE' => [
'name' => 'Serversteuerungsbox'
],
'en_EN' => [
'name' => 'Server control box'
]
]
]
];
public function install()
{
}
public function uninstall()
{
}
public function getUpdate($installedVersion)
{
}
}
// application/modules/servercontrol/boxes/Servercontrolbox.php
<?php
namespace Modules\Servercontrol\Boxes;
use Ilch\Box;
/**
* ServerControlBox
*/
class Servercontrolbox extends Box
{
/**
* Feeds the actual view with data.
*
* @return void
*/
public function render()
{
//
}
}
// application/modules/servercontrol/boxes/views/servercontrolbox.php
<div class="serverbtns">
<button id="servermap" class="btn btn-block btn-success" onclick="offlinewarn('sstatus','servermap');">
Server Map
</button>
<?php if (loggedIn() && currentUser()->hasGroup(4)) : ?>
<a class="btn btn-block btn-success" href="https://chaos-reloaded.de/wol.php" target="_blank">
Server starten
</a>
<?php endif; ?>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment