- <?php
- if (isset($_POST['buttonO1'])) { shell_exec('/home/pi/upload-now.sh <?php echo $_POST["title"]; ?> <?php echo $_POST["file"]; ?> <?php echo $_POST["time"]; ?>'); }
- $systemp = shell_exec('/var/www/scripts/temp.sh');
- ?>
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
- "http://www.w3.org/TR/html4/loose.dtd">
- <html>
- <head>
- <link rel="apple-touch-icon" href="./icons/apple-touch-icon-57x57.png" />
- <link rel="apple-touch-icon" sizes="500x500" href="./icons/apple-touch-icon.png" />
- <link rel="apple-touch-icon" sizes="72x72" href="./icons/apple-touch-icon-72x72.png" />
- <link rel="apple-touch-icon" sizes="114x114" href="./icons/apple-touch-icon-114x114.png" />
- <link rel="apple-touch-icon" sizes="144x144" href="./icons/apple-touch-icon-144x144.png" />
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <title>PYouTube Upload</title>
- <style type="text/css">
- body {
- background-color:#1b191a;
- background-image:url(./);
- background-repeat:no-repeat;
- color: white;
- }
- .Buttons {
- text-align:center;
- font-size:50px;
- font-family:verdana, sans-serif;
- }
- .onButton{
- width:200px;
- height:100px;
- margin:-10px 10px 0px 10px;
- color:white;
- background-color:#53bc41;
- border-radius:8px;
- font-size:50px;
- }
- .bottom_text {
- text-align-center;
- font-size: 20px;
- font-family: verdana, sans-serif;
- position: static;
- }
- </style>
- </head>
- <body>
- <form action="" method="post">
- <div class="bottom_text">
- <p style="text-align:center">Title:</p><input type="text" name="title">
- <p style="text-align:center">File</p> <input type="text" name="file">
- <p style="text-align:center">Time:</p> <input type="text" name="time">
- </div>
- <div class="Buttons">
- <p>Upload to YouTube</p>
- <button class="onButton" type="submit" name="buttonO1">Upload</button>
- </div>
- </form>
- <hr style="margin-top:20px;">
- <div class="bottom_text">
- <p style="text-align:center;">Systemtemperature: <?php echo $systemp; ?></p>
- </div>
- </body>
- </html>
Der Code ist genommen von einer funksteckdosen-control seite, die ich schonmal geschrieben habe. Wäre toll, wenn ihr mir hiermit helfen könntet!