65 lines
1.6 KiB
PHP
65 lines
1.6 KiB
PHP
<html>
|
|
<head><title>Installer Page STEP 2</title></head>
|
|
<body>
|
|
<?php
|
|
echo "INSTALLING...STEP 2<br>";
|
|
include("../Site/mysql.php");
|
|
|
|
list($db,$conn) = db_connect();
|
|
if (empty($db))
|
|
{
|
|
die ("Keine Verbindung zur Datenbank! [<b><font color=red>FAIL</b></font>]<br>");
|
|
}
|
|
|
|
// Daten eintragen
|
|
while (list ($attr, $value) = each ($_REQUEST))
|
|
{
|
|
// SQL-Anweisung erstellen
|
|
$sql = "INSERT INTO ".
|
|
"config (attr, value) ".
|
|
"VALUES ('".$attr."','".
|
|
$value."')";
|
|
mysql_query ($sql);
|
|
}
|
|
//$sql = "UPDATE config SET value='".md5 ($_REQUEST["mpass"])."' WHERE attr='mpass';";
|
|
if (mysql_affected_rows ($conn) > 0)
|
|
{
|
|
echo "Config erfolgreich gespeichert! [<b><font color=lime>OK</b></font>]<br>\n";
|
|
echo "
|
|
<form action=\"install3.php\" method=\"post\">
|
|
<table>
|
|
<br>
|
|
<tr>
|
|
<td>Country Shortcut:</td>
|
|
<td><input type=\"text\" name=\"country\" size=\"50\" value=\"AT\"><td>
|
|
</tr>
|
|
<tr>
|
|
<td>Province:</td>
|
|
<td><input type=\"text\" name=\"province\" size=\"50\" value=\"Tirol\"><td>
|
|
</tr>
|
|
<tr>
|
|
<td>City:</td>
|
|
<td><input type=\"text\" name=\"city\" size=\"50\" value=\"Innsbruck\"><td>
|
|
</tr>
|
|
<tr>
|
|
<td>Organisation:</td>
|
|
<td><input type=\"text\" name=\"organisation\" size=\"50\" value=\"HTL\"><td>
|
|
</tr>
|
|
<tr>
|
|
<td>Default Email:</td>
|
|
<td><input type=\"text\" name=\"email\" size=\"50\" value=\"vpn@students.htlinn.ac.at\"><td>
|
|
</tr>
|
|
</table>
|
|
<input type=\"submit\" value=\"Install! STEP 3\">
|
|
</form> ";
|
|
}
|
|
else
|
|
{
|
|
echo "Fehler beim Anlegen der Config!! [<b><font color=red>FAIL</b></font>]<br>\n";
|
|
}
|
|
mysql_close();
|
|
?>
|
|
|
|
</body>
|
|
</html>
|