<?php
if
(
empty
(
$_POST
[
'step'
]) ) { ?>
<html>
<head><title>[ I n s t a l l a t i o n l]Download mit Rechte vergabe</title>
<link rel=
"stylesheet"
href=
"include/designs/ilchClan/style.css"
type=
"text/css"
>
</head>
<body>
<form action=
"install.php"
method=
"POST"
>
<input type=
"hidden"
name=
"step"
value=
"3"
>
<table width=
"50%"
class
=
"border"
border=
"0"
cellspacing=
"1"
cellpadding=
"3"
align=
"center"
>
<tr
class
=
"Chead"
>
<td colspan=
"3"
><h2><b>Installation:</b></h2></td>
</tr><tr
class
=
"Cmite"
>
<td colspan=
"3"
align=
"center"
>Legen Sie sich zu erst eine <b>Sicherheits Kopie</b> ihrer <b>Datenbank</b> an.<br><br>
Drücken sie Installieren, um
die
MySQL Datenbank zu erweitern.<br/><br>
</td>
</tr><tr
class
=
"Cdark"
>
<td colspan=
"3"
align=
"center"
><input type=
"submit"
value=
"Installieren"
/></td>
</tr>
</table>
</form>
</body>
</html>
<?php
}
elseif
(
$_POST
[
'step'
] ==
'3'
) {
define (
'main'
, TRUE );
require_once
(
'include/includes/config.php'
);
require_once
(
'include/includes/func/db/mysql.php'
);
db_connect();
$sql_file
= implode(
''
,file(
'install.sql'
));
$sql_file
= preg_replace (
"/(\015\012|\015|\012)/"
,
"\n"
,
$sql_file
);
$sql_statements
=
explode
(
";\n"
,
$sql_file
);
foreach
(
$sql_statements
as
$sql_statement
) {
if
( trim(
$sql_statement
) !=
''
) {
#
echo
'<pre>'
.
$sql_statement
.
'</pre><hr>'
;
db_query(
$sql_statement
) OR
die
(
'<span style="color:#FF0000;font-size:bold;">Bei der Installation ist ein Fehler aufgetreten oder der Datenbank Eintrag existiert bereits.</span><br><br>Fehler: '
.mysql_error());
}
}
?>
<html>
<head><title>[ I n s t a l l a t i o ]Download mit Rechte vergabe</title>
<link rel=
"stylesheet"
href=
"include/designs/ilchClan/style.css"
type=
"text/css"
></head>
<body>
<table width=
"50%"
class
=
"border"
border=
"0"
cellspacing=
"1"
cellpadding=
"3"
align=
"center"
>
<tr
class
=
"Chead"
>
<td colspan=
"3"
><h2><b>Installation abgeschlosen</b></h2></td>
</tr><tr
class
=
"Cmite"
>
<td colspan=
"3"
align=
"center"
>Sofern keine Fehler aufgetreten sind ist
die
Installation abgeschloßen.<br><br>
Bitte unbedingt <b>install.sql</b> und <b>install.php</b> löschen!<br><br>
</tr>
</tr><tr
class
=
"Chead"
>
<td colspan=
"3"
align=
"center"
><a href=
"index.php"
><u>Auf
die
Startseite</u></a></td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
<?php
}
?>