Initial Code import.
This commit is contained in:
26
toggle.php
Normal file
26
toggle.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
if(isset($_POST['toggle'])) {
|
||||
if(file_exists("open.flag")) {
|
||||
unlink("open.flag");
|
||||
} else {
|
||||
touch("open.flag");
|
||||
}
|
||||
}
|
||||
?>
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Verander de status van de foobar</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>De foobar is nu
|
||||
<?php
|
||||
echo file_exists("open.flag") ? " " : " niet ";
|
||||
?>
|
||||
open.</h1>
|
||||
<form method="post">
|
||||
<input type="submit" name="toggle" value="Verander dit">
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user