Example #1
0
set_time_limit(300);
ini_set('display_errors', 'Off');
ini_set('date.timezone', 'Asia/Tokyo');
require_once './config.php';
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"])) {