2013-04-12 21:52:27 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
require_once("../class/config.php");
|
|
|
|
include_once("head.php");
|
|
|
|
|
|
|
|
echo '<h1>youpi gestion des VM</h1>';
|
|
|
|
|
|
|
|
|
|
|
|
$fields = array (
|
|
|
|
"action" => array ("request", "string", FALSE),
|
|
|
|
"login" => array ("request", "string", FALSE),
|
|
|
|
"pass" => array("request", "string", FALSE),
|
|
|
|
"uid" => array("request", "integer", FALSE),
|
|
|
|
);
|
|
|
|
getFields($fields);
|
|
|
|
|
|
|
|
if (in_array($action, array('start', 'stop', 'monit')))
|
|
|
|
{
|
2013-04-21 10:04:32 +00:00
|
|
|
#$res = call_user_func(array($lxc, $action));
|
|
|
|
$res = $hooks->invoke($action, array(), 'lxc');
|
2013-04-12 22:24:38 +00:00
|
|
|
var_dump ($res);
|
2013-04-12 21:52:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
?>
|
|
|
|
|
|
|
|
<h1>Dev only</h1>
|
|
|
|
<form method="post">
|
|
|
|
<p>Action: <select name="action"><option value="monit">Monitoring</option><option value="start">Start</option><option value="stop">Stop</option></select></p>
|
2013-04-15 13:42:59 +00:00
|
|
|
<p>Login: <input type="text" name="login" value="<?php echo $mem->user['login']; ?>" /></p>
|
|
|
|
<p>Pass (hash): <input type="text" name="pass" value="<?php echo $mem->user['pass']; ?>" /></p>
|
|
|
|
<p>Uid: <input type="text" name="uid" value="<?php echo $mem->user['uid']; ?>" /></p>
|
2013-04-12 21:52:27 +00:00
|
|
|
<p><input type="submit" name="tester" /></p>
|
|
|
|
|
|
|
|
</form>
|