- added form to add new froxlor-clients (no deploy etc.)

- implemented function to return all active client-id's for inserttask-function (task for all clients+master)
This commit is contained in:
Michael Kaufmann (d00p)
2010-10-19 14:35:33 +00:00
parent c0b19fa2b2
commit b2ea0cb666
5 changed files with 116 additions and 8 deletions

View File

@@ -90,11 +90,37 @@ if((int)$settings['multiserver']['enabled'] == 1)
if(isset($_POST['send'])
&& $_POST['send'] == 'send')
{
$name = validate($_POST['name'], 'name');
$desc = validate($_POST['desc'], 'desc');
$client_enabled = intval($_POST['vhostcontainer']);
if($name == '')
{
standard_error(array('stringisempty', 'name'));
}
if($desc == '')
{
standard_error(array('stringisempty', 'desc'));
}
if($client_enabled != 1) {
$client_enabled = 0;
}
$new_client = froxlorclient::getInstance($userinfo, $db, $settings, -1);
$new_client->Set('name', $name, true, false);
$new_client->Set('desc', $desc, true, false);
$new_client->Set('enabled', $client_enabled, true, true);
$cid = $new_client->Insert();
$log->logAction(ADM_ACTION, LOG_WARNING, "added froxlor-client '" . $name . "' (#" . $cid . ")");
redirectTo($filename, Array('page' => $page, 's' => $s));
}
else
{
$client_enabled = makeyesno('enabled', '1', '0', '0');
eval("echo \"" . getTemplate("froxlorclients/froxlorclients_add") . "\";");
}
}
/**