diff --git a/sys0-code/app/debug.php b/sys0-code/app/debug.php index 91098f8..6ef46b7 100644 --- a/sys0-code/app/debug.php +++ b/sys0-code/app/debug.php @@ -81,6 +81,13 @@ function delete_input(input,action,id,row){ $stmt = mysqli_prepare($link, $sql); mysqli_stmt_execute($stmt); } + if($_GET["action"]=="add_class"){ + $name=$_POST["class_name"]; + $id=$_POST["filament_id"]; + $sql="INSERT INTO class (name) VALUES ('$name')"; + $stmt = mysqli_prepare($link, $sql); + mysqli_stmt_execute($stmt); + } $cnt=0; $url=""; $apikey=""; @@ -164,47 +171,56 @@ function delete_input(input,action,id,row){ } echo(""); ?> -

-

Filamentfarbe

- form => color +

+

Klassen

+
"); + echo("
DruckeridRotation
"); + + //form to add a color + echo(""); + echo(""); + echo(""); + echo(""); + $last_id=0; $color=""; + $id=0; + $row=1; while($cnt!=0) { $userid=0; - $sql="select color,id from printer where id>$last_id ORDER BY id"; + $sql="select id,name, from class where id>$last_id ORDER BY id"; $cancel=0; $stmt = mysqli_prepare($link, $sql); mysqli_stmt_execute($stmt); mysqli_stmt_store_result($stmt); - mysqli_stmt_bind_result($stmt, $color,$printer_id); + mysqli_stmt_bind_result($stmt,$id, $name); mysqli_stmt_fetch($stmt); - $last_id=$printer_id; + $last_id=$id; $used_by_user=""; - - echo(""); - + $row++; + echo(""); $cnt--; } echo("
KlasseHinzufügen/Löschen
$printer_id
"); echo(""); + + ?> - ?>

Filamente

form => color