Migration
This commit is contained in:
97
0.7.1/daemon/system/core.php
Executable file
97
0.7.1/daemon/system/core.php
Executable file
@@ -0,0 +1,97 @@
|
||||
<?php
|
||||
/*
|
||||
Copyright (C) 2007 Mercier Benjamin
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
// Fichier Core : Inclusion et connexion a MySql
|
||||
|
||||
// Inclusion de la class mysql
|
||||
require ('system/class.mysql.php');
|
||||
|
||||
// D<>claration du serveur :
|
||||
$ServeurFichier = "";
|
||||
$ServeurMySql = "";
|
||||
|
||||
// Base de donn<6E>es Panel :
|
||||
$Connexion["Panel"]["Serveur"] = "";
|
||||
$Connexion["Panel"]["Login"] = "root_panel";
|
||||
$Connexion["Panel"]["Database"] = "root_panel";
|
||||
$Connexion["Panel"]["Passwd"] = "";
|
||||
|
||||
// Base de donn<6E>es System :
|
||||
$Connexion["System"]["Serveur"] = "";
|
||||
$Connexion["System"]["Login"] = "root_system";
|
||||
$Connexion["System"]["Database"] = "root_system";
|
||||
$Connexion["System"]["Passwd"] = "";
|
||||
|
||||
// Identifiant serveur local (Uniquement si un serveur MySql est d<>finit) :
|
||||
$Connexion["Local"]["Serveur"] = "";
|
||||
$Connexion["Local"]["Login"] = "";
|
||||
$Connexion["Local"]["Database"] = "";
|
||||
$Connexion["Local"]["Passwd"] = "";
|
||||
|
||||
|
||||
/* ---------------------------------------- */
|
||||
/* ---------------------------------------- */
|
||||
/* ---------------------------------------- */
|
||||
|
||||
// Afficharge de l'heure
|
||||
echo "---------------------------\n";
|
||||
echo "--> ".date ("d-m-Y H:i:s")." <--\n";
|
||||
echo "---------------------------\n\n";
|
||||
|
||||
// Connexion MySql au panel :
|
||||
$ConnexionPanel = new MySql ($Connexion["Panel"]["Serveur"], $Connexion["Panel"]["Database"], $Connexion["Panel"]["Login"], $Connexion["Panel"]["Passwd"]);
|
||||
if ( $ConnexionPanel->id_connect == FALSE )
|
||||
{
|
||||
die ("Erreur : Connexion a la bdd panel <20>chou<6F>");
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "Connexion a la bdd panel reussie\n";
|
||||
}
|
||||
|
||||
// Connexion MySql au system :
|
||||
$ConnexionSystem = new MySql ($Connexion["System"]["Serveur"], $Connexion["System"]["Database"], $Connexion["System"]["Login"], $Connexion["System"]["Passwd"]);
|
||||
if ( $ConnexionSystem->id_connect == FALSE )
|
||||
{
|
||||
die ("Erreur : Connexion a la bdd system <20>chou<6F>");
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "Connexion a la bdd system reussie\n";
|
||||
}
|
||||
|
||||
// Connexion au serveur MySql local :
|
||||
if ( !empty($ServeurMySql) )
|
||||
{
|
||||
if ( !isset($ConnexionLocale) )
|
||||
{
|
||||
$ConnexionLocale = new MySql ($Connexion["Local"]["Serveur"], $Connexion["Local"]["Database"], $Connexion["Local"]["Login"], $Connexion["Local"]["Passwd"]);
|
||||
if ( $ConnexionLocale->id_connect == FALSE )
|
||||
{
|
||||
die ("Erreur : Connexion au serveur MySql local <20>chou<6F>");
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "Connexion au serveur MySql local reussie\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
echo "---------------------------\n\n";
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user