Beispiel #1
0
        </div>
        <div class="content">           
			<?php 
    $file = dir::addon($addon, 'README.md');
    if (file_exists($file)) {
        echo markdown::parse(file_get_contents($file));
    } else {
        echo lang::get('addon_no_readme');
    }
    ?>
		</div>
    </div>
<?php 
} else {
    $table = new table();
    $table->addCollsLayout('25,*,215, 70');
    $table->addRow()->addCell('')->addCell(lang::get('name'))->addCell(lang::get('status'))->addCell('');
    $table->addSection('tbody');
    $addons = array_diff(scandir(dir::base('addons' . DIRECTORY_SEPARATOR)), ['.', '..', '.htaccess']);
    if (count($addons)) {
        foreach ($addons as $dir) {
            $curAddon = new addon($dir);
            $status = '';
            $delete = '<a href="?page=addons&addon=' . $dir . '&action=delete" class="delete"></a>';
            $status .= '
				<form action="" method="get">
					<input type="hidden" name="page" value="addons">
					<input type="hidden" name="addon" value="' . $dir . '">
					<select class="addonAction" name="action">';
            if ($curAddon->isActive()) {
                $status .= '<option selected="selected" value="">' . lang::get('addon_actived') . '</option>';
Beispiel #2
0
                echo message::danger(lang::get('user_delete_own'));
            } else {
                foreach ($ids as $var) {
                    $sql = new sql();
                    $sql->setTable('user');
                    $sql->setWhere("id=" . $var);
                    $sql->delete();
                }
                echo message::success(lang::get('user_deleted'));
            }
        } else {
            echo message::danger(lang::get('choose_user'));
        }
    }
    $table = new table();
    $table->addCollsLayout('25, 30%, *, 140, 100');
    $table->addRow()->addCell("\n\t\t\t<input type='checkbox' id='all'>\n\t\t\t<label for='all'></label>\n\t\t", ['class' => 'checkbox'])->addCell(lang::get('name'))->addCell(lang::get('email'))->addCell(lang::get('username'))->addCell("");
    $table->addSection('tbody');
    $table->setSql('SELECT * FROM ' . sql::table('user'));
    while ($table->isNext()) {
        $id = $table->get('id');
        $edit = '<a class="btn" href="?page=user&action=edit&id=' . $id . '">' . layout::svg('edit') . '</a>';
        $table->addRow()->addCell("\n\t\t\t\t<input type='checkbox' name='ids[]' value='" . $id . "' id='id" . $id . "'>\n\t\t\t\t<label for='id" . $id . "'></label>\n\t\t\t", ['class' => 'checkbox'])->addCell($table->get('firstname') . " " . $table->get('name'))->addCell($table->get('email'))->addCell($table->get('username'))->addCell($edit);
        $table->next();
    }
    ?>

<div class="panel">
    <form action="" method="post">
    <div class="top">
        <h3><?php 
Beispiel #3
0
<div class="row">

    <div class="col-lg-8 col-md-7">
    
        <div class="panel">
            <div class="top">
                <h3><?php 
echo lang::get('server_info');
?>
</h3>
            </div>
            <div class="content">
            	<?php 
$table = new table(['class' => ['horizontal']]);
$table->addCollsLayout('40%, *');
$table->addSection('tbody');
$table->addRow()->addCell(lang::get('distribution'), ['class' => 'first'])->addCell($host->distribution());
$table->addRow()->addCell(lang::get('firmware'), ['class' => 'first'])->addCell($host->firmware());
$table->addRow()->addCell(lang::get('hostname'), ['class' => 'first'])->addCell($host->hostname());
$table->addRow()->addCell(lang::get('kernel'), ['class' => 'first'])->addCell($host->kernel());
$ethernet = $host->ethernet();
$table->addRow()->addCell(lang::get('ethernet'), ['class' => 'first'])->addCell('Up: ' . byteToSize($ethernet['up']) . ' / Down: ' . byteToSize($ethernet['down']));
echo $table->show();
?>
            </div>
        </div>
    
    </div>
    
    <div class="col-lg-4 col-md-5">
Beispiel #4
0
 }
 if (ajax::is()) {
     if ($action == 'start' && $id) {
         $server = new server($id);
         $server->start();
         $return = message::success(lang::get('server_started'));
     }
     if ($action == 'stop' && $id) {
         $server = new server($id);
         $server->stop();
         $return = message::success(lang::get('server_stopped'));
     }
     ajax::addReturn($return);
 }
 $table = new table();
 $table->addCollsLayout('25, 32%, *, 70, 170');
 $table->addRow()->addCell("\n\t\t\t<input type='checkbox' id='all'>\n\t\t\t<label for='all'></label>\n\t\t", ['class' => 'checkbox'])->addCell(lang::get('name'))->addCell(lang::get('game'))->addCell(lang::get('port'))->addCell(lang::get('status'));
 $table->addSection('tbody');
 $table->setSql('SELECT * FROM ' . sql::table('server'));
 if ($table->numSql()) {
     while ($table->isNext()) {
         $id = $table->get('id');
         $server = new server($id);
         $status = $server->status($table->get('status'));
         $table->addRow()->addCell("\n\t\t\t\t\t<input type='checkbox' name='ids[]' value='" . $id . "' id='id" . $id . "'>\n\t\t\t\t\t<label for='id" . $id . "'></label>\n\t\t\t\t", ['class' => 'checkbox'])->addCell($table->get('name'))->addCell($table->get('gameID'))->addCell($table->get('port'))->addCell($status, ['class' => 'toggleState']);
         $table->next();
     }
 } else {
     $table->addRow()->addCell(lang::get('no_entries'), ['colspan' => 5, 'class' => 'first']);
 }
 ?>