73 lines
1.2 KiB
PHP
73 lines
1.2 KiB
PHP
<?php
|
|
|
|
/*
|
|
* Script d'installation de D'Astre.Net
|
|
* -------------------------------------
|
|
*
|
|
* A exécuter pour :
|
|
* - créer les tables de la base de donnée
|
|
* - remplir avec des valeurs par défaut (démonstration).
|
|
*/
|
|
|
|
$include_path=ini_get('include_path');
|
|
$include_path.=":../includes:../config";
|
|
ini_set('include_path', $include_path);
|
|
require("db.conf.php");
|
|
require("libdbmanip.inc.php");
|
|
|
|
print "<html>\n";
|
|
print "<head>\n";
|
|
print "<title>D'Astre.Net : Script d'installation </title>\n";
|
|
print "<style type='text/css'>";
|
|
?>
|
|
span.good {
|
|
color: green;
|
|
font-weight: bold;
|
|
}
|
|
|
|
span.bad{
|
|
color: red;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.code {
|
|
font-family: courier, mono;
|
|
background: #eee;
|
|
padding:0px;
|
|
margin:0px;
|
|
margin-left:20px;
|
|
margin-right:20px;
|
|
margin-top: 10px;
|
|
}
|
|
|
|
.msg {
|
|
padding:0px;
|
|
margin:0px;
|
|
margin-left:20px;
|
|
margin-right:20px;
|
|
margin-bottom:5px;
|
|
background: #ddd;
|
|
text-align: center;
|
|
}
|
|
|
|
div.traitement{
|
|
max-height: 300px;
|
|
overflow: auto;
|
|
}
|
|
<?php
|
|
print "</style>";
|
|
print "</head>";
|
|
print "<body>";
|
|
echo "$include_path<br />";
|
|
echo "<b>SQL_SERVER:</b> ".SQL_SERVER."<br />";
|
|
echo "<b>SQL_USER:</b> ".SQL_USER."<br />";
|
|
|
|
$files=array(
|
|
"db-drop.sql"
|
|
);
|
|
|
|
executeSQLFiles($files);
|
|
|
|
print "</body></html>";
|
|
|
|
?>
|