19,7 → 19,7 |
// | License along with this library; if not, write to the Free Software | |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
// +------------------------------------------------------------------------------------------------------+ |
// CVS : $Id: installateur.php,v 1.9 2004-10-27 11:43:32 jpm Exp $ |
// CVS : $Id: installateur.php,v 1.10 2005-09-23 14:20:23 florian Exp $ |
/** |
* Application Installateur de Papyrus. |
* |
32,7 → 32,7 |
//Autres auteurs : |
*@author Aucun |
*@copyright Tela-Botanica 2000-2004 |
*@version $Revision: 1.9 $ $Date: 2004-10-27 11:43:32 $ |
*@version $Revision: 1.10 $ $Date: 2005-09-23 14:20:23 $ |
// +------------------------------------------------------------------------------------------------------+ |
**/ |
|
39,130 → 39,134 |
// +------------------------------------------------------------------------------------------------------+ |
// | ENTÊTE du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
// Constante de l'application Installateur. On devrait créer un fichier de config et un de langue pour rendre l'appli portable... |
preg_match('/^(.*)papyrus.php/', $_SERVER['SCRIPT_FILENAME'], $instal_tab_txt); |
define('INSTAL_CHEMIN_ABSOLU', $instal_tab_txt[1]); |
/** Nom du dossier contenant l'application Installateur.*/ |
define('INSTAL_DOSSIER_APPLI', INSTAL_CHEMIN_ABSOLU.GEN_CHEMIN_APPLICATION.'installateur'.GEN_SEP); |
/** Nom du dossier contenant la bibliothèque de code de l'application Installateur.*/ |
define('INSTAL_DOSSIER_BIBLIO', INSTAL_DOSSIER_APPLI.'bibliotheque'.GEN_SEP); |
/** Chemin vers le fichier de configuration de base de l'application Papyrus.*/ |
define('INSTAL_CHEMIN_CONFIG', GEN_CHEMIN_CONFIG.GEN_FICHIER_CONFIG); |
/** Nom du fichier de configuration de Papyrus à créer.*/ |
define('INSTAL_FICHIER_CONFIG', GEN_FICHIER_CONFIG); |
/** Chemin vers le fichier de configuration de base de l'application Papyrus.*/ |
define('INSTAL_CHEMIN_SQL', INSTAL_CHEMIN_ABSOLU.GEN_CHEMIN_INSTAL); |
/** Nom de la constante stockant le numéro de la nouvelle version de l'application Papyrus.*/ |
define('INSTAL_VERSION_NOUVELLE_NOM', 'PAP_VERSION'); |
/** Numéro de la nouvelle version de l'application Papyrus.*/ |
define('INSTAL_VERSION_NOUVELLE', GEN_VERSION); |
if (defined('PAP_VERSION')) { |
define('INSTAL_VERSION_ANCIENNE', PAP_VERSION); |
} else { |
define('INSTAL_VERSION_ANCIENNE', ''); |
} |
/** Nombre d'étapes totale de l'installation.*/ |
define('INSTAL_NBRE_ETAPE', 3); |
|
// Fichiers à inclure |
require_once INSTAL_DOSSIER_BIBLIO.'instal_installation.fonct.php'; |
// Constante de l'application Installateur. On devrait créer un fichier de config et un de langue pour rendre l'appli portable... |
preg_match('/^(.*)papyrus.php/', $_SERVER['SCRIPT_FILENAME'], $instal_tab_txt); |
define('INSTAL_CHEMIN_ABSOLU', $instal_tab_txt[1]); |
/** Nom du dossier contenant l'application Installateur.*/ |
define('INSTAL_DOSSIER_APPLI', INSTAL_CHEMIN_ABSOLU.GEN_CHEMIN_APPLICATION.'installateur'.GEN_SEP); |
/** Nom du dossier contenant la bibliothèque de code de l'application Installateur.*/ |
define('INSTAL_DOSSIER_BIBLIO', INSTAL_DOSSIER_APPLI.'bibliotheque'.GEN_SEP); |
/** Chemin vers le fichier de configuration de base de l'application Papyrus.*/ |
define('INSTAL_CHEMIN_CONFIG', GEN_CHEMIN_CONFIG.GEN_FICHIER_CONFIG); |
/** Nom du fichier de configuration de Papyrus à créer.*/ |
define('INSTAL_FICHIER_CONFIG', GEN_FICHIER_CONFIG); |
/** Chemin vers le fichier de configuration de base de l'application Papyrus.*/ |
define('INSTAL_CHEMIN_SQL', INSTAL_CHEMIN_ABSOLU.GEN_CHEMIN_INSTAL); |
/** Nom de la constante stockant le numéro de la nouvelle version de l'application Papyrus.*/ |
define('INSTAL_VERSION_NOUVELLE_NOM', 'PAP_VERSION'); |
/** Numéro de la nouvelle version de l'application Papyrus.*/ |
define('INSTAL_VERSION_NOUVELLE', GEN_VERSION); |
if (defined('PAP_VERSION')) { |
define('INSTAL_VERSION_ANCIENNE', PAP_VERSION); |
} else { |
define('INSTAL_VERSION_ANCIENNE', ''); |
} |
/** Nombre d'étapes totale de l'installation.*/ |
define('INSTAL_NBRE_ETAPE', 3); |
|
// Fichiers à inclure |
require_once INSTAL_DOSSIER_BIBLIO.'instal_installation.fonct.php'; |
|
// +------------------------------------------------------------------------------------------------------+ |
// | CORPS du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
function afficherContenuCorps() |
{ |
// Entêtre XHTML des pages de l'installation de Papyrus |
$sortie = ''; |
$sortie .= '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"'."\n"; |
$sortie .= '"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">'."\n"; |
$sortie .= '<html xmlns="http://www.w3.org/1999/xhtml" lang="fr-FR" xml:lang="fr-FR">'."\n"; |
$sortie .= ' <head>'."\n"; |
$sortie .= ' <title>Installation de Papyrus</title>'."\n"; |
$sortie .= ' <style type="text/css">'."\n"; |
$sortie .= ' p, body, td, li, input, select, textarea { font-family: Verdana; font-size: 13px; }'."\n"; |
$sortie .= ' h1 { font-size: 1.8em; text-align: center; color: #0C6628; }'."\n"; |
$sortie .= ' h2 { font-size: 1.2em; text-align: left; color: #0C6628; }'."\n"; |
$sortie .= ' input { color: #0C6628; }'."\n"; |
$sortie .= ' form ul { list-style-type: none; padding : 0px; }'."\n"; |
$sortie .= ' form ul li { clear:both;text-align: left; padding-left: 0px; margin-left: 0px; }'."\n"; |
$sortie .= ' form ul li label { float: left; width: 175px; text-align: left; }'."\n"; |
$sortie .= ' li { margin: 5px 5px 5px 5px; }'."\n"; |
$sortie .= ' a { color: #0000FF; }'."\n"; |
$sortie .= ' .ok { color: #008800; font-weight: bold; }'."\n"; |
$sortie .= ' .failed { color: #880000; font-weight: bold; }'."\n"; |
$sortie .= ' .erreur { color: red; font-weight: bold;}'."\n"; |
$sortie .= ' .zone_requete { height: 300px; width: 550px; overflow: scroll;}'."\n"; |
$sortie .= ' .etape_info { margin: 5px 10% 5px 10%; padding: 3px; text-align: center; background-color: #92C492; border: 1px dashed black; }'."\n"; |
$sortie .= ' .etape_numero { width: 200px; text-align: center; padding: 3px; font-size: 1.2em; border: 1px dotted black; color: #0C6628;}'."\n"; |
$sortie .= ' #fichier_config { background-color: #EEEEEE; padding: 10px 10px;}'."\n"; |
$sortie .= ' </style>'."\n"; |
$sortie .= ' </head>'."\n"; |
$sortie .= ' <body>'."\n"; |
$sortie .= ' <h1>Installation de Papyrus</h1></h1>'."\n"; |
|
// Message situation de l'installation |
if (defined('PAP_VERSION')) { |
$sortie .= '<p>Votre système Papyrus existant a été reconnu comme étant la version '. |
INSTAL_VERSION_ANCIENNE.'.<br />'. |
'Vous êtes sur le point de <b>mettre à jour</b> Papyrus pour la version '. |
INSTAL_VERSION_NOUVELLE.'.<br />'. |
'Veuillez revoir vos informations de configuration ci-dessous.</p>'."\n"; |
} else { |
$sortie .= '<p>Vous êtes sur le point d\'installer Papyrus '.INSTAL_VERSION_NOUVELLE.'.<br />'. |
'Veuillez configurer votre Papyrus en remplissant les formulaires étape par étape.</p>'."\n"; |
} |
|
if(!isset($_GET['installation']) || ($_GET['installation'] == 'form_pref' || $_GET['installation'] == 'verif_pref')) { |
include_once GEN_CHEMIN_APPLICATION.'installateur/instal_preference.inc.php'; |
} else if($_GET['installation'] == 'form_bdd' || $_GET['installation'] == 'verif_bdd') { |
include_once GEN_CHEMIN_APPLICATION.'installateur/instal_base_de_donnees.inc.php'; |
} else if($_GET['installation'] == 'form_fichier' || $_GET['installation'] == 'verif_fichier') { |
include_once GEN_CHEMIN_APPLICATION.'installateur/instal_fichier.inc.php'; |
} |
|
// Pied XHTML des pages de l'installation de Papyrus |
$sortie .= ' </body>'."\n"; |
$sortie .= '</html>'; |
|
return $sortie; |
} |
function afficherContenuCorps() |
{ |
// Entêtre XHTML des pages de l'installation de Papyrus |
$sortie = ''; |
$sortie .= '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"'."\n"; |
$sortie .= '"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">'."\n"; |
$sortie .= '<html xmlns="http://www.w3.org/1999/xhtml" lang="fr-FR" xml:lang="fr-FR">'."\n"; |
$sortie .= ' <head>'."\n"; |
$sortie .= ' <link rel="stylesheet" type="text/css" media="screen" title="Installateur" href="papyrus/applications/installateur/presentations/styles/installateur.css" />'."\n"; |
$sortie .= ' <title>Installation de Papyrus</title>'."\n"; |
$sortie .= ' </head>'."\n"; |
$sortie .= ' <body>'."\n"; |
$sortie .= ' <div id="container">'."\n"; |
$sortie .= ' <div id="zone_bandeau" >'."\n"; |
$sortie .= ' <div id="logo">'."\n"; |
$sortie .= ' <a href="/" title="Retour en page d\'accueil">'."\n"; |
$sortie .= ' <img src="papyrus/applications/installateur/presentations/images/logo_papyrus.png" width="183" height="63" alt="Logo Papyrus" />'."\n"; |
$sortie .= ' </a>'."\n"; |
$sortie .= ' </div>'."\n"; |
$sortie .= ' <div id="site_nom">'."\n"; |
$sortie .= ' <h1>Installation de Papyrus</h1>'."\n"; |
$sortie .= ' </div>'."\n"; |
$sortie .= ' </div>'."\n"; |
$sortie .= ' <div id="zone_contenu">'."\n"; |
// Message situation de l'installation |
if (defined('PAP_VERSION')) { |
$sortie .= '<p>Votre système Papyrus existant a été reconnu comme étant la version '. |
INSTAL_VERSION_ANCIENNE.'.<br />'. |
'Vous êtes sur le point de <b>mettre à jour</b> Papyrus pour la version '. |
INSTAL_VERSION_NOUVELLE.'.<br />'. |
'Veuillez revoir vos informations de configuration ci-dessous.</p>'."\n"; |
} else { |
$sortie .= '<p>Vous êtes sur le point d\'installer Papyrus '.INSTAL_VERSION_NOUVELLE.'.<br />'. |
'Veuillez configurer votre Papyrus en remplissant les formulaires étape par étape.</p>'."\n"; |
} |
|
if(!isset($_GET['installation']) || ($_GET['installation'] == 'form_pref' || $_GET['installation'] == 'verif_pref')) { |
include_once GEN_CHEMIN_APPLICATION.'installateur/instal_preference.inc.php'; |
} else if($_GET['installation'] == 'form_bdd' || $_GET['installation'] == 'verif_bdd') { |
include_once GEN_CHEMIN_APPLICATION.'installateur/instal_base_de_donnees.inc.php'; |
} else if($_GET['installation'] == 'form_fichier' || $_GET['installation'] == 'verif_fichier') { |
include_once GEN_CHEMIN_APPLICATION.'installateur/instal_fichier.inc.php'; |
} |
|
// Pied XHTML des pages de l'installation de Papyrus |
$sortie .= ' </div>'."\n"; |
$sortie .= ' <div id="zone_pied">'."\n"; |
$sortie .= ' <a href="http://frenchmozilla.org"><img src="papyrus/applications/installateur/presentations/images/logo-firefox.png" alt="Logo Firefox" /></a> '."\n"; |
$sortie .= ' <a href="http://validator.w3.org/check?uri=referer"><img src="papyrus/applications/installateur/presentations/images/logo-xhtml11.png" alt="Logo XHTML" /></a> '."\n"; |
$sortie .= ' <a href="http://jigsaw.w3.org/css-validator/check/referer"><img src="papyrus/applications/installateur/presentations/images/logo-css.png" alt="Logo CSS" /></a><br />'."\n"; |
$sortie .= ' ©<a href="http://www.tela-botanica.org/">Tela Botanica</a> et <a href="http://www.ecole-et-nature.org/">Réseau Ecole et Nature</a> / 2004-2006'."\n"; |
$sortie .= ' </div>'."\n"; |
$sortie .= ' </div>'."\n"; |
$sortie .= ' </body>'."\n"; |
$sortie .= '</html>'; |
|
return $sortie; |
} |
// +------------------------------------------------------------------------------------------------------+ |
// | PIED du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
// +------------------------------------------------------------------------------------------------------+ |
|
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.8 2004/10/25 10:22:48 jpm |
* Correction de quelques bogues, ajouts d'explications pour l'utilisateur et modification des styles CSS. |
* |
* Revision 1.7 2004/10/22 17:23:04 jpm |
* Simplification del'installation de Papyrus. |
* |
* Revision 1.6 2004/10/19 17:01:12 jpm |
* Correction bogues. |
* |
* Revision 1.5 2004/10/19 16:47:28 jpm |
* Transformation en fonction de l'appel de l'application. |
* |
* Revision 1.4 2004/10/19 15:59:18 jpm |
* Ajout de la gestion des valeurs propre à Papyrus à insérer dans la base de données. |
* Ajout des constantes FTP. |
* |
* Revision 1.3 2004/10/18 09:12:09 jpm |
* Changement de nom d'un fichier. |
* |
* Revision 1.2 2004/10/15 18:28:59 jpm |
* Début appli installateur de Papyrus. |
* |
* Revision 1.1 2004/06/16 14:33:13 jpm |
* Changement de nom de Génésia en Papyrus. |
* Changement de l'arborescence. |
* |
* Revision 1.6 2004/04/22 08:25:48 jpm |
* Transformation de $GS_GLOBAL en $_GEN_commun. |
* $Log: not supported by cvs2svn $ |
* Revision 1.9 2004/10/27 11:43:32 jpm |
* Correction bogues diff mise à jour / installation. |
* |
* Revision 1.8 2004/10/25 10:22:48 jpm |
* Correction de quelques bogues, ajouts d'explications pour l'utilisateur et modification des styles CSS. |
* |
* Revision 1.7 2004/10/22 17:23:04 jpm |
* Simplification del'installation de Papyrus. |
* |
* Revision 1.6 2004/10/19 17:01:12 jpm |
* Correction bogues. |
* |
* Revision 1.5 2004/10/19 16:47:28 jpm |
* Transformation en fonction de l'appel de l'application. |
* |
* Revision 1.4 2004/10/19 15:59:18 jpm |
* Ajout de la gestion des valeurs propre à Papyrus à insérer dans la base de données. |
* Ajout des constantes FTP. |
* |
* Revision 1.3 2004/10/18 09:12:09 jpm |
* Changement de nom d'un fichier. |
* |
* Revision 1.2 2004/10/15 18:28:59 jpm |
* Début appli installateur de Papyrus. |
* |
* Revision 1.1 2004/06/16 14:33:13 jpm |
* Changement de nom de Génésia en Papyrus. |
* Changement de l'arborescence. |
* |
* Revision 1.6 2004/04/22 08:25:48 jpm |
* Transformation de $GS_GLOBAL en $_GEN_commun. |
* |
* Revision 1.5 2004/04/08 13:21:05 jpm |
* Le code pour l'installation uniquement. |
* |