if (is_array($ids) && count($ids) >= 1) { foreach ($ids as $var) { $sql = new sql(); $sql->setTable('server'); $sql->setWhere("id=" . $var); $sql->delete(); server::deleteDir($var); } echo message::success(lang::get('server_deleted')); } else { echo message::danger(lang::get('choose_server')); } } if ($action == 'install' && $id) { $server = new server($id); $server->install(); $return = message::success(lang::get('server_install')); } 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); }