Subversion Repositories Applications.papyrus

Rev

Rev 66 | Rev 76 | 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.3 2004-10-18 09:12:09 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.3 $ $Date: 2004-10-18 09:12:09 $
// +------------------------------------------------------------------------------------------------------+
**/

// +------------------------------------------------------------------------------------------------------+
// |                                            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...
/** <br> Nom du dossier contenant l'application Installateur.*/
define('INSTAL_DOSSIER_APPLI', GEN_CHEMIN_APPLICATION.'installateur/');
/** <br> Nom du dossier contenant la bibliothèque de code de l'application Installateur.*/
define('INSTAL_DOSSIER_BIBLIO', INSTAL_DOSSIER_APPLI.'bibliotheque/');
/** <br> Chemin vers le fichier de configuration de base de l'application Papyrus.*/
define('INSTAL_CHEMIN_CONFIG', GEN_CHEMIN_CONFIG.'pap_config.inc.php');
/** <br> Chemin vers le fichier de configuration de base de l'application Papyrus.*/
define('INSTAL_CHEMIN_SQL', GEN_CHEMIN_INSTAL);
/** <br> Nom de la constante stockant le numéro de la nouvelle version de l'application Papyrus.*/
define('INSTAL_VERSION_NOUVELLE_NOM', 'PAP_VERSION');
/** <br> 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', '');
}

// Fichiers à inclure
require_once INSTAL_DOSSIER_BIBLIO.'instal_installation.fonct.php';

// Entêtre XHTML des pages de l'installation de Papyrus
$sortie = '';
$sortie .= '<html>';
$sortie .= '  <head>';
$sortie .= '    <title>Installation de Papyrus</title>';
$sortie .= '    <style>';
$sortie .= '      p, body, td, li, input, select, textarea { font-family: Verdana; font-size: 13px; }';
$sortie .= '      h1 { font-size: 1.8em; text-align: center; color: #880000; }';
$sortie .= '      h2 { font-size: 1.2em; text-align: left; color: #880000; }';
$sortie .= '      input { color: #880000; }';
$sortie .= '      form ul { list-style-type: none; padding : 0px; }';
$sortie .= '      form ul li { text-align: left; padding-left: 0px; margin-left: 0px; }';
$sortie .= '      form label { float: left; width: 175px; text-align: left; }';
$sortie .= '      li { margin: 5px 5px 5px 5px; }';
$sortie .= '      a { color: #0000FF; }';
$sortie .= '      .ok { color: #008800; font-weight: bold; }';
$sortie .= '      .failed { color: #880000; font-weight: bold; }';
$sortie .= '    </style>';
$sortie .= '  </head>';
$sortie .= '  <body>';

// +------------------------------------------------------------------------------------------------------+
// |                                          CORPS du PROGRAMME                                          |
// +------------------------------------------------------------------------------------------------------+
if(!isset($_GET['installation'])) {
    include_once GEN_CHEMIN_APPLICATION.'installateur/instal_defaut.inc.php';
} else if($_GET['installation'] == 'bdd') {
    include_once GEN_CHEMIN_APPLICATION.'installateur/instal_base_de_donnees.inc.php';
} else if($_GET['installation'] == 'config') {
    include_once GEN_CHEMIN_APPLICATION.'installateur/instal_fichier.inc.php';
}

// +------------------------------------------------------------------------------------------------------+
// |                                            PIED du PROGRAMME                                         |
// +------------------------------------------------------------------------------------------------------+
// Pied XHTML des pages de l'installation de Papyrus
$sortie .= '  </body>';
$sortie .= '</html>';

// Attribution à la variable globale de sortie de Papyrus du texte XHTML de l'installation
$GLOBALS['_GEN_commun']['sortie'] = $sortie;

/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* 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 ----------------------------------------------------------------------------------------+
*/
?>