hasPermission("MACHINEMANAGER_VIEW")) { header("Location: ./app.php?msg=no_permission"); die(); } if (!empty($_GET["id"])) { $machineid = $_GET["id"]; } else if (!empty($_GET["arg"])) { $machineid = $_GET["arg"]; } if (!Machine::exists($machineid)) { header("Location: ./app.php?msg=no_such_machine"); exit(); } $labeltype = "machineid"; if (!empty($VARS["labeltype"])) { switch ($VARS["labeltype"]) { case "doortag": $labeltype = "doortag"; break; case "machineid": default: $labeltype = "machineid"; } } $machine = new Machine($machineid); $pdfurl = "./print/print.php?labeltype=$labeltype&id=$machineid"; ?>