Пример #1
0
            $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']);
    }
    ?>

<div class="row">

    <div class="col-md-12">
    
        <div class="panel">
        	<form action="" method="post">
            <div class="top">