0){ echo "Admin password didn't match"; header("refresh: 5;"); die; } $handle_cfg[9]="overscan=". $_POST['overscan'] . ("\n"); $handle_cfg[10]="rotate=". $_POST['rotate'] . ("\n"); if (empty($_POST['SSID'])){ $_POST['SSID'] = "whit"; $_POST['PSK'] = "whitwhit"; } if (!empty($_POST['webadmin'])){ $admin_pass_cfg[70]='$validUser[2] = $_POST["username"] == "admin" && $_POST["password"] == "' . $_POST['webadmin'] . '";'; } $autostart_cfg[14] = "USER=" . $_POST['username'] . ("\n"); $autostart_cfg[15] = "PASS=" . $_POST['password'] . ("\n"); $autostart_cfg[13] = "Server=" . $_POST['ftp'] . ("\n"); $autostart_cfg[17] = "time=" . $_POST['timeout'] . ("\n"); $autostart_cfg[24] = "export essid=" . $_POST['SSID'] . ("\n"); $autostart_cfg[25] = "export wifipassword=" . $_POST['PSK'] . ("\n"); $autostart_cfg[23] = ("export wifiupdate=true\n"); $autostart_cfg[26] = "export updatehost=" . $_POST['netname'] . ("\n"); $autostart_cfg[36] = "export reboottime=" . $_POST['crontime'] . ("\n"); file_put_contents($startup, $autostart_cfg); file_put_contents($configtest, $handle_cfg); file_put_contents($admin_password, $admin_pass_cfg); echo "Rebooting reload page in about 1 min."; header("refresh: 10;"); exec('sudo /sbin/reboot'); } if(isset($_POST["reboot"])) { echo "Server is rebooting please wait."; exec('sudo /sbin/reboot'); } ?>