no drive should stay no drive in web. Createkey, gitignore

This commit is contained in:
mad
2018-09-23 15:51:44 +02:00
parent 3367b8a13f
commit 223090c0e4
3 changed files with 15 additions and 2 deletions

View File

@@ -42,7 +42,7 @@ function serverdepropdown($server, $val, $what){
echo "<a class=dropdown-item href=\"javascript:dropdown('".$what."button','$file[$lastpart]')\">$file[$lastpart]</a>";
}
}
echo "$enddiv</div></div></div><input type=hidden id=".$what."buttonh name=$what value=$val>";
echo "$enddiv</div></div></div><input type=hidden id=".$what."buttonh name=$what value=\"$val\">";
}
function formatbuttons($label, $val){
echo "<div class=row><div class=col>$label</div><div class=col><div class=dropdown><button class=\"btn btn-secondary dropdown-toggle\" type=button id=".$label."button$label data-toggle=dropdown aria-haspopup=true aria-expanded=false>$val</button>";
@@ -290,6 +290,8 @@ if (isset($_SESSION['username'])){
$rvalue = clean($_REQUEST[$rkey]);
if ($rvalue == "x86_64"){
$rvalue = "qemu-system-x86_64";
} elseif ((preg_match('/no drive/', $rvalue))||($rvalue == "no cdrom")){
$rvalue = "";
}
$sqlc .= "$rkey,";
$sqlv .= "'$rvalue',";
@@ -318,6 +320,8 @@ if (isset($_SESSION['username'])){
}
if ($rvalue == "x86_64"){
$rvalue = "qemu-system-x86_64";
} elseif ((preg_match('/no drive/', $rvalue))||($rvalue == "no cdrom")){
$rvalue = "";
}
$sql .= " $rkey='$rvalue',";
}