From 7f1fca14e680b85b50e2914d1e9240b3bf7a74e0 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Fri, 26 Jul 2019 11:56:53 +0200 Subject: httpdocs/index.php: fertig --- httpdocs/index.php | 38 +++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/httpdocs/index.php b/httpdocs/index.php index 3bb3330..0513515 100644 --- a/httpdocs/index.php +++ b/httpdocs/index.php @@ -1,3 +1,39 @@ \n"; +print "\n"; +print 'fileserver lights-out' . "\n"; +if (array_key_exists('push', $_GET)) + print '' . "\n"; +print "\n"; +print "\n"; +print 'Fileserver is currently '; +if ($l == '1') + print 'off'; +else + print 'on'; +print "
\n"; +if (array_key_exists('push', $_GET) +&& ($_GET['push'] > 0) +&& ($_GET['push'] < 300)) { + print 'pushing for ' . ($_GET['push'] * 0.1) . ' seconds ...
' . "\n"; + shell_exec('/usr/bin/gpio write 28 1'); + flush(); + usleep(100000 * $_GET['push']); + shell_exec('/usr/bin/gpio write 28 0'); + print '... done
' . "\n"; +} +print 'short power button push'; +print "
\n"; +print 'long power button push'; +print "
\n"; +print "\n"; +print "\n"; -- cgit v1.2.3-54-g00ecf