"; // Aufbau der Datenbankverbindung @$y = mysql_connect($_REQUEST["dbserv"],$_REQUEST["dbuser"],$_REQUEST["dbpwd"]); $sql = 'CREATE DATABASE ' . $_REQUEST["dbname"]; if (mysql_query($sql, $y)) { echo "Datenbank erfolgreich angelegt! [
OK
]
\n"; $config = ""; $dateiname = "../Config/_dbconfig_.php"; $handler = fOpen($dateiname , "w"); fWrite($handler , $config); fClose($handler); $config = "user: ".$_REQUEST["dbuser"]. "\npasswd: ".$_REQUEST["dbpwd"]. "\ndatabase: ".$_REQUEST["dbname"]. "\nhost: ".$_REQUEST["dbserv"]; $dateiname = $_REQUEST["vpndir"]."/database"; $handler = fOpen($dateiname , "w"); fWrite($handler , $config); fClose($handler); exec("chmod 777 ".$dateiname); echo "Konfiguration erfolgreich angelegt! [
OK
]
\n"; include("../Config/_dbconfig_.php"); } else { die("Fehler beim Anlegen der Datenbank! [
FAIL
]
"); } @$x = mysql_select_db($MYSQL_DATABASE); if (empty($x)) { die ("Keine Verbindung zur Datenbank! [
FAIL
]
"); } // MYSQL QUERYS.... mysql_query (" CREATE TABLE userdata ( Id Int(11) NOT NULL auto_increment, IsAdmin Int(1) NOT NULL default 0, VPNId VarChar(2) NOT NULL default '-', Nickname VarChar(50) NOT NULL default '', Kennwort VarChar(50) NOT NULL default '', Nachname VarChar(50) NOT NULL default '', Vorname VarChar(50) NOT NULL default '', Email VarChar(100) NOT NULL default '', Avatar Int(1) NOT NULL default 0, NovLogin VarChar(50) NOT NULL default '', NovPass VarChar(50) NOT NULL default '', PRIMARY KEY (Id) ) "); mysql_query (" CREATE TABLE `connections` ( `id` int(255) unsigned NOT NULL auto_increment, `start` int(14) unsigned NOT NULL default '0', `stop` int(14) unsigned NOT NULL default '0', `ip` varchar(15) default NULL, `local_ip` varchar(15) default NULL, `remote_ip` varchar(15) default NULL, `client` varchar(255) NOT NULL default '', `sent` bigint(255) NOT NULL default '0', `received` bigint(255) NOT NULL default '0', PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=ascii; "); mysql_query (" CREATE TABLE `month` ( `id` int(255) unsigned NOT NULL auto_increment, `month` int(2) unsigned NOT NULL default '0', `year` int(5) unsigned NOT NULL default '0', `sent` bigint(255) unsigned NOT NULL default '0', `received` bigint(255) unsigned NOT NULL default '0', `client` varchar(255) NOT NULL default '', `time` int(255) unsigned NOT NULL default '0', PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=ascii; "); mysql_query (" CREATE TABLE `year` ( `id` int(255) unsigned NOT NULL auto_increment, `year` int(5) unsigned NOT NULL default '0', `sent` bigint(255) unsigned NOT NULL default '0', `received` bigint(255) unsigned NOT NULL default '0', `client` varchar(255) NOT NULL default '', `time` int(255) unsigned NOT NULL default '0', PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=ascii; "); mysql_query (" CREATE TABLE `forum_question` ( `id` int(4) NOT NULL auto_increment, `topic` varchar(255) NOT NULL default '', `detail` longtext NOT NULL, `name` varchar(65) NOT NULL default '', `avatar` varchar(65) NOT NULL default '0', `closed` varchar(65) NOT NULL default '0', `category` varchar(65) NOT NULL default '0', `w_adminonly` varchar(65) NOT NULL default '0', `w_guest` varchar(65) NOT NULL default '0', `r_adminonly` varchar(65) NOT NULL default '0', `r_guest` varchar(65) NOT NULL default '0', `datetime` varchar(25) NOT NULL default '', `view` int(4) NOT NULL default '0', `reply` int(4) NOT NULL default '0', `lastupdate` varchar(50) NOT NULL default '', PRIMARY KEY (`id`) ) TYPE=MyISAM AUTO_INCREMENT=1 ; "); mysql_query (" CREATE TABLE `forum_answer` ( `question_id` int(4) NOT NULL default '0', `a_id` int(4) NOT NULL default '0', `a_name` varchar(65) NOT NULL default '', `a_avatar` varchar(65) NOT NULL default '', `a_answer` longtext NOT NULL, `a_datetime` varchar(25) NOT NULL default '', `a_attachment` varchar(25) NOT NULL default '', KEY `a_id` (`a_id`) ) TYPE=MyISAM; "); mysql_query (" CREATE TABLE `config` ( `id` int(254) NOT NULL auto_increment, `attr` varchar(100) NOT NULL default '', `value` varchar(500) NOT NULL default '', `extra` varchar(100) NOT NULL default 'NULL', PRIMARY KEY (`id`) ) TYPE=MyISAM; "); mysql_query (" CREATE TABLE `proxyrepair` ( `Count` int(11) NOT NULL AUTO_INCREMENT, `Id` int(11) NOT NULL, `VPNId` varchar(3) NOT NULL, `IP` varchar(16) NOT NULL, `Time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `RepID` varchar(3) NOT NULL, PRIMARY KEY (`Count`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=77 ; "); // Definition des standard Benutzer $benutzer[0]["IsAdmin"] =1; $benutzer[0]["VPNId"] = "-"; $benutzer[0]["Nickname"] =$_REQUEST["name"]; $benutzer[0]["Kennwort"] = $_REQUEST["pwd"]; $benutzer[0]["Nachname"] = "Admin"; $benutzer[0]["Vorname"] = "Server"; $benutzer[0]["Email"] = $_REQUEST["email"]; // Zuerst alle Datensätze löschen um keine Dopplungen zu bekommen. mysql_query ("DELETE FROM userdata"); // Daten eintragen while (list ($key, $value) = each ($benutzer)) { // SQL-Anweisung erstellen $sql = "INSERT INTO ". "userdata (IsAdmin, VPNId, Nickname, Kennwort, Nachname, Vorname, Email) ". "VALUES ('".$value["IsAdmin"]."','". $value["VPNId"]."', '". $value["Nickname"]."', '". md5 ($value["Kennwort"])."', '". $value["Nachname"]."', '". $value["Vorname"]."', '". $value["Email"]."')"; mysql_query ($sql); if (mysql_affected_rows ($y) > 0) { echo "Benutzer erfolgreich angelegt! [
OK
]
\n"; echo "
Sitename:
Sitesubname
Siteinfo (Header Marquee, empty = no marquee)
Theme:
"; // Öffnet ein Unterverzeichnis mit dem Namen "daten" $verzeichnis = openDir($_SERVER["DOCUMENT_ROOT"]."/Themes"); // Verzeichnis lesen while ($file = readDir($verzeichnis)) { // Höhere Verzeichnisse nicht anzeigen! if ($file != "." && $file != "..") { $filecut = strpos($file, "."); if($filecut > 0) { $file = substr($file,0,$filecut); echo "
".$file."
"; } } } // Verzeichnis schließen closeDir($verzeichnis); echo "
OpenVPN Config Directory (WITHOUT ending /):
OpenVPN Config File Name:
OpenVPN Key Directory (WITHOUT ending /):
OpenVPN Additional Download Directory (e.g. for client.ovpn, ca.crt, readme ...) (WITHOUT ending /):
Download Directory (for Explorer, WITHOUT ending /):
Enable Mail Support:
Yes
No
SMTP Server:
SMTP User:
SMTP Password:
SMTP Sender Mail-Address:
Enable Squid Support:
Yes
No
SQUID Config Directory (WITHOUT ending /):
SQUID Config File Name:
SQUID Dynamic Directory (WIHTOUT ending /):
"; } else { echo "Fehler beim Anlegen der Benutzer. [
FAIL
]
\n"; } } ?>