VPN-Management-GUI 2.0.3 porting start
This commit is contained in:
50
install/install4.php
Normal file
50
install/install4.php
Normal file
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
include("../Site/mysql.php");
|
||||
|
||||
$ovpnconfdir = db_getconfval("ovpnconfdir");
|
||||
$ovpnconffile = db_getconfval("ovpnconffile");
|
||||
// echo $ovpnconfdir."/".$ovpnconffile;
|
||||
|
||||
echo "
|
||||
<html>
|
||||
<head><title>Installer Page STEP 4</title></head>
|
||||
<body>
|
||||
<form action=\"install4.php\" method =\"post\">
|
||||
Change the OpenVPN Server config...
|
||||
<textarea name=\"inhalt\" rows=25 cols=100 wrap=\"virtual\">
|
||||
";
|
||||
|
||||
include($ovpnconfdir."/".$ovpnconffile);
|
||||
|
||||
echo "
|
||||
</textarea>
|
||||
<input name=\"submit\" type=\"submit\" id=\"submit\" value=\"Speichern\">
|
||||
<input type=\"reset\" name=\"Submit2\" value=\"Reset\">
|
||||
|
||||
</form>";
|
||||
|
||||
if ($_REQUEST["submit"] == "Speichern")
|
||||
{
|
||||
$fp = fopen($ovpnconfdir."/".$ovpnconffile,"w");
|
||||
$data =$_REQUEST["inhalt"];
|
||||
$data = str_replace("\r","",$data);
|
||||
fputs($fp,$data);
|
||||
fclose($fp);
|
||||
|
||||
echo "<meta http-equiv=\"Refresh\" content=\"4; url=install4.php?changedone=1\">";
|
||||
$check_ok = "<font color = 'red'>Ihre Daten wurden erfolgreich ge<67>ndert!<br>Bitte warten sie bis die Daten aktualisiert werden.</font>";
|
||||
echo $check_ok;
|
||||
}
|
||||
if ($_REQUEST["changedone"] == "1")
|
||||
{
|
||||
$check_ok = "<font color = 'green'>Ihre Daten wurden erfolgreich gespeichert!</font>";
|
||||
echo $check_ok;
|
||||
}
|
||||
|
||||
|
||||
echo "<form action=\"install5.php\" method=\"post\">
|
||||
<input type=\"submit\" value=\"Install! STEP 5\">
|
||||
</form> ";
|
||||
?>
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user