Rev 119 | Rev 990 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
<?php/*vim: set expandtab tabstop=4 shiftwidth=4: */// +------------------------------------------------------------------------------------------------------+// | PHP version 4.1 |// +------------------------------------------------------------------------------------------------------+// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) |// +------------------------------------------------------------------------------------------------------+// | This library is free software; you can redistribute it and/or |// | modify it under the terms of the GNU Lesser General Public |// | License as published by the Free Software Foundation; either |// | version 2.1 of the License, or (at your option) any later version. |// | |// | This library 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 |// | Lesser General Public License for more details. |// | |// | You should have received a copy of the GNU Lesser General Public |// | 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.10 2005-09-23 14:20:23 florian Exp $/*** Application Installateur de Papyrus.** Application permettant de gérer l'installation et les erreurs liés à l'abscence de base de données,* d'extenssin PHP...**@package Installateur//Auteur original :*@author Jean-Pascal MILCENT <jpm@tela-botanica.org>//Autres auteurs :*@author Aucun*@copyright Tela-Botanica 2000-2004*@version $Revision: 1.10 $ $Date: 2005-09-23 14:20:23 $// +------------------------------------------------------------------------------------------------------+**/// +------------------------------------------------------------------------------------------------------+// | 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 à inclurerequire_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 .= ' <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'installationif (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.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.** Revision 1.4 2004/04/08 12:25:16 jpm* Suppression de tous le code réalisant les vérifications. L'application Installateur ne fera qu'installer Génésia et non vérifier son bon fonctionnement.** Revision 1.3 2004/04/02 16:37:51 jpm* Modification des commentaires.** Revision 1.2 2004/03/31 16:57:16 jpm* Ajout de la gestion des erreur de base de données, de la connexion à celle-ci et des extenssions php disponibles.** Revision 1.1 2004/03/29 11:00:12 jpm* Transfert d'un morceau de code gérant les erreurs et l'installation mais qui a actuellement aucun effet sur Génésia.*** +-- Fin du code ----------------------------------------------------------------------------------------+*/?>