Files
sarah_rfid_lab_access/website_data/html/manual_open.php
2022-06-15 16:57:55 +02:00

50 lines
1.5 KiB
PHP

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html><head>
<meta name="description" content="fet.at - abgesagte Prüfungen">
<meta name="author" content="fet.at">
<link href="style.css" rel="stylesheet" type="text/css">
<meta charset="UTF-8">
<title>fet.at - Lab Doorknob</title>
<meta name=viewport content="width=device-width, initial-scale=1, user-scalable=yes">
</head>
<body>
<script>0</script>
<div class="breitenbegrenzer">
<div class="centertext">
<big><big>Sarah <br>MANUAL OPEN</big></big><br>
<a href="/">
<img src="FET-Logo.png" height="100px">
<br>
HOME</a>
</div>
<br>
Auf Knopfdruck öffnet sich die Tür - Sesam öffne dich. <br><br>
<?php
if(isset($_POST['open_door'])) {
$manual_door_open_file = fopen("/home/zutritt/Documents/sarah/system_request_commands/manual_door_open_request_set", "w");
fclose($manual_door_open_file);
chmod("/home/zutritt/Documents/sarah/system_request_commands/manual_door_open_request_set", 0777); //chmod so that the python script can delete
//we just open the file so it exists, no need to write anything to it
$date_now = date("Y-m-d H:i:s");
echo $date_now.": Door openened.";
}
?>
<form method="post">
<input type="submit" name="open_door"
value="open door now"/>
</form>
<div class="centertext">
<br><br><br>
<a href="https://www.fet.at/kontakt">Kontakt</a> <br>pet@fet.at - 2022
</div>
</div>
</body></html>