Citation :
<html>
<head>
<?php
if ($langue != "" ){
$langue2 = "../langues/".$langue.".php";
include ($langue2); }
?>
<title>@lexPHPteam - <?php echo "$titre2"; ?></title>
</head>
<body>
<p align="center"><a href="http://www.alexphpteam.com" target="_blank"><img src="../images/alexphpteam.gif" border="0" width="300" height="50" <?php echo "alt=\"$slogan\""; ?>></a></p>
<div align="center">
<?php
if ($langue == "" )
{
?>
<div align="center">
<center>
<table border="0" width="650" cellspacing="1">
<tr>
<td width="100%" bgcolor="#000000">
<table border="0" width="100%" cellspacing="0" cellpadding="5">
<tr>
<td width="100%" bgcolor="#E4E4E4">
<p align="center"> </p>
<form method="POST" action="setup.php">
<? $nomrep = "../langues"; $dossier = opendir($nomrep);
$nbfic = 1;
while ($Fichier = readdir($dossier)) { if ($Fichier != "." && $Fichier != ".." ) { $nomfic[$nbfic] = $Fichier; $nbfic = $nbfic + 1;; } }
closedir($dossier); $i = 1;
while ($i <= $nbfic)
{
$nomfic[$i] = str_replace(".php","",$nomfic[$i]);
$i = $i + 1;
}
?>
<p align="center"><select size="1" name="langue">
<?php
$i = 1;
while ($i < $nbfic)
{
echo "<option value=\"$nomfic[$i]\">$nomfic[$i]</option>";
$i = $i + 1;
}
?>
</select><br>
<br>
<input type="submit" value="Ok >>" name="B1"></p>
</form>
<p align="center"><br>
</p>
</center>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<?php
}
if ($suite == "ok" && $nom != "" && $host != "" && $login != "" && $nom_base != "" && $nom_table_admin != "" && $login_access != "" && $pass_access != "" )
{//2
$fd = fopen("../identif/logins.php","w" );
fwrite($fd, "<?php\n$" );
fwrite($fd, "langue = \"$langue\";\n$" );
fwrite($fd, "nom_site = \"$nom\";\n$" );
fwrite($fd, "serveur = \"$host\";\n$" );
fwrite($fd, "login2 = \"$login\";\n$" );
fwrite($fd, "pass2 = \"$pass\";\n$" );
fwrite($fd, "base = \"$nom_base\";\n$" );
fwrite($fd, "table = \"$nom_table_admin\";\n$" );
fwrite($fd, "login_access = \"$login_access\";\n$" );
fwrite($fd, "pass_access = \"$pass_access\";\n" );
fwrite($fd, "?>" );
fclose($fd);
include ("../identif/logins.php" );
@MYSQL_CONNECT ($serveur,$login2,$pass2) or die ("<br><div align=\"center\">
<center>
<table border=\"1\" width=\"350\" bordercolorlight=\"#C0C0C0\" cellspacing=\"0\" cellpadding=\"3\" bordercolordark=\"#C0C0C0\">
<tr>
<td width=\"100%\" bgcolor=\"#CC3300\">
<p align=\"center\"><font size=\"2\" color=\"#FFFFFF\" face=\"Arial\"><b> <br>
- $erreur -<br>
<br>
</b>$erreur_bis<br>
<a href=\"javascript:window.history.back();\" style=\"color: #FFFFFF\"><b>$retour>><br>
</b></a> </font></td>
</tr>
</table>
</center>
</div>" );
mysql_select_db("$base" );
$requete = "CREATE TABLE $nom_table_admin (
id int NOT NULL auto_increment,
f_nom varchar(40) NOT NULL,
f_email varchar(150) NOT NULL,
f_url varchar(150),
f_pays varchar(50) NOT NULL,
f_message text,
f_date varchar(10),
f_heure varchar(5),
PRIMARY KEY (id)
)";
$resultat = mysql_query($requete);
$requete = "CREATE TABLE alex_session (
numero varchar(70) NOT NULL,
login varchar(20) NOT NULL,
pass varchar(20) NOT NULL,
heure int(50) NOT NULL
)";
$resultat = mysql_query($requete);
mysql_close();
}//2
elseif ($suite == "ok" )
{//3
if ($pass_access == "" )
$id_erreur = "$erreur6";
if ($login_access == "" )
$id_erreur = "$erreur7";
if ($nom_table_admin == "" )
$id_erreur = "$erreur1";
if ($nom_base == "" )
$id_erreur = "$erreur2";
if ($login == "" )
$id_erreur = "$erreur3";
if ($host == "" )
$id_erreur = "$erreur4";
if ($nom == "" )
$id_erreur = "$erreur5";
}//3
if (($suite == "" or $nom == "" or $host == "" or $login == "" or $nom_base == "" or $nom_table_admin == "" or $login_access == "" or $pass_access == "" ) && $langue != "" )
{//1
?>
<div align="center">
<center>
<table border="0" width="650" cellspacing="1">
<tr>
<td width="100%" bgcolor="#000000">
<table border="0" width="100%" cellspacing="0" cellpadding="5">
<tr>
<td width="100%" bgcolor="#E4E4E4">
<p align="center"><font size="2" face="Arial"><b><?php echo "$install"; ?><br>
<br>
</b><font color="#CC3300"><?php echo "$install2"; ?><br><br><?php echo "$install3"; ?></font></font></p>
</center>
<div align="center">
<?php echo "<form method=\"POST\" action=\"setup.php?suite=ok&langue=$langue\">"; ?>
<table border="0" width="100%" cellspacing="0" cellpadding="0" height="254">
<?php
if ($id_erreur != "" )
{
?>
<tr>
<td width="100%" height="29" colspan="3">
<p align="center"><font size="2" face="Arial" color="#CC3300"><b><?php echo "$id_erreur"; ?></b></font></td>
</tr>
<?php
}
?>
<tr>
<td width="45%" height="29">
<p align="right"><font size="2" face="Arial"><?php echo "$a_nom"; ?></font></td>
<td width="3%" height="29">
<p align="center">:</td>
<td width="52%" height="29">
<input type="text" name="nom" size="20" <?php if ($suite == "" )
echo "value=\"http://\""; else
echo "value=\"$nom\""; ?>
>
</td>
</tr>
<tr>
<td width="45%" height="29">
<p align="right"><font size="2" face="Arial"><?php echo "$a_host"; ?></font></td>
<td width="3%" height="29">
<p align="center">:</td>
<td width="52%" height="29">
<input type="text" name="host" size="20" <?php if ($suite == "" )
echo "value=\"localhost\""; else
echo "value=\"$host\""; ?>
>
</td>
</tr>
<tr>
<td width="45%" height="29">
<p align="right"><font size="2" face="Arial"><?php echo "$a_login"; ?></font></td>
<td width="3%" height="29">
<p align="center">:</td>
<td width="52%" height="29">
<input type="text" name="login" size="20" <?php echo "value=\"$login\""; ?>>
</td>
</tr>
<tr>
<td width="45%" height="29">
<p align="right"><font size="2" face="Arial"><?php echo "$a_pass"; ?></font></td>
<td width="3%" height="29">
<p align="center">:</td>
<td width="52%" height="29">
<input type="password" name="pass" size="20">
</td>
</tr>
<tr>
<td width="45%" height="29">
<p align="right"><font size="2" face="Arial"><?php echo "$a_nom_base"; ?></font></td>
<td width="3%" height="29">
<p align="center">:</td>
<td width="52%" height="29">
<input type="text" name="nom_base" size="20" <?php echo "value=\"$nom_base\""; ?>>
</td>
</tr>
<tr>
<td width="45%" height="29">
<p align="right"><font size="2" face="Arial"><?php echo "$a_nom_table_admin"; ?></font></td>
<td width="3%" height="29">
<p align="center">:</td>
<td width="52%" height="29">
<input type="text" name="nom_table_admin" size="20" <?php if ($suite == "" )
echo "value=\"alex_livre_messages\"";
else
echo "value=\"$nom_table_admin\"";
?>
>
</td>
</tr>
<tr>
<td width="45%" height="29">
<p align="right"><font size="2" face="Arial"><?php echo "$login_admin"; ?></font></td>
<td width="3%" height="29">
<p align="center">:</td>
<td width="52%" height="29">
<input type="text" name="login_access" size="20" <?php echo "value=\"$login_access\""; ?>>
</td>
</tr>
<tr>
<td width="45%" height="29">
<p align="right"><font size="2" face="Arial"><?php echo "$pass_admin"; ?></font></td>
<td width="3%" height="29">
<p align="center">:</td>
<td width="52%" height="29">
<input type="password" name="pass_access" size="20">
</td>
</tr>
<tr>
<td width="100%" height="46" colspan="3">
<p align="center"><input type="submit" <?php
echo "value=\"$lan_instal\"";
?> name="B1"></p>
</td>
<center><center>
</tr>
</table>
</form>
</center>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<?php
}
elseif ($suite != "" )
{
?>
<div align="center">
<center>
<table border="0" width="650" cellspacing="1">
<tr>
<td width="100%" bgcolor="#000000">
<table border="0" width="100%" cellspacing="0" cellpadding="5">
<tr>
<td width="100%" bgcolor="#E4E4E4">
<p align="center"> <br>
<font size="2" face="Arial" color="#CC3300"><b>Ok !<br>
<br>
</b><?php echo "$succes"; ?><br>
<br>
</font><font size="2" face="Arial" color="#000000"><?php echo "$conseil"; ?><br><br><?php echo "$conseil2"; ?><br>
<br>
<?php echo "$conseil3"; ?> <a href="index.php" style="color: #000000"><b><?php echo "$conseil4"; ?></b></a>.<br>
</font>
</p>
</center>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<?php
}
?>
</body>
</html>
|