Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <?php
- require_once("config.php");
- require_once("functions.php");
- include_once __DIR__.'/../analyticstracking.php';
- $wake_up_pc = isset($_POST["wake_up_pc"]) ? $_POST["wake_up_pc"] : "";
- $password = isset($_POST["password"]) ? $_POST["password"] : "opoqpeoiqw897419872jkasdhj213";
- $ip = "";
- $isrunning = false;
- ?>
- <html>
- <head>
- <meta http-equiv="content-type" content="text/html; charset=<?php echo "$website_charset"; ?>">
- <title>
- <?php
- echo "$website_title";
- ?>
- </title>
- </head>
- <body>
- Welcher Rechner soll gestartet werden?
- <br>
- <form method="POST" action="index.php">
- <input type="radio" name="wake_up_pc" value="Benziuminator"> Benziuminator<br>
- Passwort:
- <input type="password" name="password"><br>
- <input type="submit" name="submit" value="Starten!">
- </form>
- <br>
- Meldungen:
- <div id="refresh" style = "border:1px solid black; width:700px; height:120px">
- <?php
- if ($password == $passwordcheck) {
- echo timestamp();
- echo " <font color=\"lime\">Passwort korrekt!</font>";
- if ($wake_up_pc == "Benziuminator") {
- $ip = $Benziuminator_ip;
- if (ping($ip) == true) {
- echo "<br>" . timestamp();
- echo " Rechner läuft bereits!";
- $isrunning = true;
- }
- else {
- WakeOnLAN($Benziuminator_mac, $broadcast);
- }
- }
- else {
- echo "<br>" . timestamp();
- echo " <font color=\"red\">Bitte wählen Sie einen Rechner aus!</font>";
- }
- }
- else if ($password == "opoqpeoiqw897419872jkasdhj213") {
- }
- else {
- echo timestamp();
- echo " <font color=\"red\">Passwort inkorrekt!</font>";
- }
- if ($ip != "" && $isrunning == false) {
- echo "<br>" . timestamp();
- echo " Warten auf Antwort des Rechners...";
- for ($i = 0; $i <= 120; $i++) {
- if (ping($ip) == true) {
- echo "<br>" . timestamp();
- echo " <font color=\"lime\">Rechner wurde erfolgreich gestartet!</font>";
- break;
- }
- else {
- sleep(1);
- if ($i == 120) {
- echo "<br>" . timestamp();
- echo " <font color=\"red\">Rechner konnte nicht gestartet werden!</font>";
- }
- }
- }
- }
- ?>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment