Rev 100 | Rev 986 | 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.9 2004-10-27 11:43:32 jpm 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.9 $ $Date: 2004-10-27 11:43:32 $// +------------------------------------------------------------------------------------------------------+**/// +------------------------------------------------------------------------------------------------------+// | 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 .= ' <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'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 .= ' </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.** 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 ----------------------------------------------------------------------------------------+*/?>