Ejemplo n.º 1
0
require_once './Error.php';
require_once './Parse.php';
require_once './Vmservers.php';
require_once './Zfs.php';
require_once './Guests.php';
$error = new Error();
$parse = new Parse();
/***
 *** Sanitize
 ***/
if (isset($_REQUEST["vm_name"])) {
    $vm_name = $parse->vm_name($_REQUEST["vm_name"]);
    $error->check();
}
if (isset($_REQUEST["template_name"])) {
    $template_name = $parse->template_name($_REQUEST["template_name"]);
    $error->check();
}
if (isset($_REQUEST["vm_password"])) {
    $vm_password = $parse->vm_password($_REQUEST["vm_password"]);
    $error->check();
}
if (isset($_REQUEST["vm_ip"])) {
    $vm_ip = $parse->vm_ip($_REQUEST["vm_ip"]);
    $error->check();
}
if (isset($_REQUEST["vm_cpu"])) {
    $vm_cpu = $parse->vm_cpu($_REQUEST["vm_cpu"]);
    $error->check();
}
if (isset($_REQUEST["vm_memory"])) {