86 lines
1.6 KiB
PHP
86 lines
1.6 KiB
PHP
|
<?php
|
|||
|
|
|||
|
/*
|
|||
|
* Script d'installation de D'Astre.Net
|
|||
|
* -------------------------------------
|
|||
|
*
|
|||
|
* A ex<EFBFBD>cuter pour :
|
|||
|
* - cr<EFBFBD>er les tables de la base de donn<EFBFBD>e
|
|||
|
* - remplir avec des valeurs par d<EFBFBD>faut (d<EFBFBD>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-create-mcd.sql",
|
|||
|
"db-create-table-users.sql",
|
|||
|
"db-alter-inc.sql",
|
|||
|
"db-fill-sites.sql",
|
|||
|
"db-fill-users.sql",
|
|||
|
"db-fill-famille_produit.sql",
|
|||
|
/* "db-fill-fournisseur.sql", */
|
|||
|
"db-fill-produit_interne.sql",
|
|||
|
/* "db-fill-produit_extern.sql", */
|
|||
|
/* "db-fill-magasinier.sql", */
|
|||
|
/* "db-fill-acheteur.sql", */
|
|||
|
/* "db-fill-demandeDA.sql", danger rivka */
|
|||
|
"db-fill-site.sql",
|
|||
|
);
|
|||
|
|
|||
|
executeSQLFiles($files);
|
|||
|
|
|||
|
print "</body></html>";
|
|||
|
|
|||
|
?>
|