Druckerfreigabe erzwingen (falls beim freigeben Fehlermeldungen angezeigt werden)
| Druckerid | Freigeben |
");
$last_id=0;
while($cnt!=0)
{
$userid=0;
$sql="select id,printer_url,apikey,cancel,used_by_userid from printer where free=0 and 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, $printer_id,$url,$apikey,$cancel,$userid);
mysqli_stmt_fetch($stmt);
$last_id=$printer_id;
$used_by_user="";
$sql="select username from users where id=$userid";
$stmt = mysqli_prepare($link, $sql);
mysqli_stmt_execute($stmt);
mysqli_stmt_store_result($stmt);
mysqli_stmt_bind_result($stmt, $used_by_user);
mysqli_stmt_fetch($stmt);
echo("| $printer_id | |
");
$cnt--;
}
echo("
");
?>
Rotation der Druckerkameras
form => action=rot&rot=180
$cnt=0;
$url="";
$apikey="";
$sql="select count(*) from printer";
$stmt = mysqli_prepare($link, $sql);
mysqli_stmt_execute($stmt);
mysqli_stmt_store_result($stmt);
mysqli_stmt_bind_result($stmt, $cnt);
mysqli_stmt_fetch($stmt);
//echo($cnt);
echo("
| Druckerid | Rotation |
");
$last_id=0;
$rotation=0;
while($cnt!=0)
{
$userid=0;
$sql="select rotation,id from printer 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, $rotation,$printer_id);
mysqli_stmt_fetch($stmt);
$last_id=$printer_id;
$used_by_user="";
echo("| $printer_id | |
");
$cnt--;
}
echo("
");
?>
Filamentfarbe
form => color
$cnt=0;
$url="";
$apikey="";
$sql="select count(*) from printer";
$stmt = mysqli_prepare($link, $sql);
mysqli_stmt_execute($stmt);
mysqli_stmt_store_result($stmt);
mysqli_stmt_bind_result($stmt, $cnt);
mysqli_stmt_fetch($stmt);
//echo($cnt);
echo("
| Druckerid | Rotation |
");
$last_id=0;
$color="";
while($cnt!=0)
{
$userid=0;
$sql="select color,id from printer 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_fetch($stmt);
$last_id=$printer_id;
$used_by_user="";
echo("| $printer_id | |
");
$cnt--;
}
echo("
");
echo("
");
?>
Filamente
form => color
$cnt=0;
$url="";
$apikey="";
$sql="select count(*) from filament";
$stmt = mysqli_prepare($link, $sql);
mysqli_stmt_execute($stmt);
mysqli_stmt_store_result($stmt);
mysqli_stmt_bind_result($stmt, $cnt);
mysqli_stmt_fetch($stmt);
//echo($cnt);
echo("
| Filamente | Farbe | Hinzufügen/Löschen |
");
//form to add a color
echo("");
$last_id=0;
$color="";
$id=0;
$row=1;
while($cnt!=0)
{
$userid=0;
$sql="select id,name,internal_id from filament 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,$id, $color,$printer_id);
mysqli_stmt_fetch($stmt);
$last_id=$id;
$used_by_user="";
$row++;
echo("| $printer_id | | |
");
$cnt--;
}
echo("
");
echo("
");
?>