Subversion Repositories Applications.papyrus

Rev

Rev 79 | Rev 91 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
6 jpm 1
<?php
2
/*vim: set expandtab tabstop=4 shiftwidth=4: */
3
// +------------------------------------------------------------------------------------------------------+
4
// | PHP version 4.1                                                                                      |
5
// +------------------------------------------------------------------------------------------------------+
6
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org)                                         |
7
// +------------------------------------------------------------------------------------------------------+
8
// | This library is free software; you can redistribute it and/or                                        |
9
// | modify it under the terms of the GNU Lesser General Public                                           |
10
// | License as published by the Free Software Foundation; either                                         |
11
// | version 2.1 of the License, or (at your option) any later version.                                   |
12
// |                                                                                                      |
13
// | This library is distributed in the hope that it will be useful,                                      |
14
// | but WITHOUT ANY WARRANTY; without even the implied warranty of                                       |
15
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU                                    |
16
// | Lesser General Public License for more details.                                                      |
17
// |                                                                                                      |
18
// | You should have received a copy of the GNU Lesser General Public                                     |
19
// | License along with this library; if not, write to the Free Software                                  |
20
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                            |
21
// +------------------------------------------------------------------------------------------------------+
80 jpm 22
// CVS : $Id: installateur.php,v 1.6 2004-10-19 17:01:12 jpm Exp $
6 jpm 23
/**
24
* Application Installateur de Papyrus.
25
*
26
* Application permettant de gérer l'installation et les erreurs liés à l'abscence de base de données,
27
* d'extenssin PHP...
28
*
29
*@package Installateur
30
//Auteur original :
31
*@author        Jean-Pascal MILCENT <jpm@tela-botanica.org>
32
//Autres auteurs :
33
*@author        Aucun
34
*@copyright     Tela-Botanica 2000-2004
80 jpm 35
*@version       $Revision: 1.6 $ $Date: 2004-10-19 17:01:12 $
6 jpm 36
// +------------------------------------------------------------------------------------------------------+
37
**/
38
 
39
// +------------------------------------------------------------------------------------------------------+
40
// |                                            ENTÊTE du PROGRAMME                                       |
41
// +------------------------------------------------------------------------------------------------------+
66 jpm 42
// Constante de l'application Installateur. On devrait créer un fichier de config et un de langue pour rendre l'appli portable...
43
/** <br> Nom du dossier contenant l'application Installateur.*/
44
define('INSTAL_DOSSIER_APPLI', GEN_CHEMIN_APPLICATION.'installateur/');
45
/** <br> Nom du dossier contenant la bibliothèque de code de l'application Installateur.*/
46
define('INSTAL_DOSSIER_BIBLIO', INSTAL_DOSSIER_APPLI.'bibliotheque/');
47
/** <br> Chemin vers le fichier de configuration de base de l'application Papyrus.*/
48
define('INSTAL_CHEMIN_CONFIG', GEN_CHEMIN_CONFIG.'pap_config.inc.php');
49
/** <br> Chemin vers le fichier de configuration de base de l'application Papyrus.*/
50
define('INSTAL_CHEMIN_SQL', GEN_CHEMIN_INSTAL);
51
/** <br> Nom de la constante stockant le numéro de la nouvelle version de l'application Papyrus.*/
52
define('INSTAL_VERSION_NOUVELLE_NOM', 'PAP_VERSION');
53
/** <br> Numéro de la nouvelle version de l'application Papyrus.*/
54
define('INSTAL_VERSION_NOUVELLE', GEN_VERSION);
55
if (defined('PAP_VERSION')) {
56
    define('INSTAL_VERSION_ANCIENNE', PAP_VERSION);
57
} else {
58
    define('INSTAL_VERSION_ANCIENNE', '');
59
}
60
 
61
// Fichiers à inclure
62
require_once INSTAL_DOSSIER_BIBLIO.'instal_installation.fonct.php';
6 jpm 63
 
64
// +------------------------------------------------------------------------------------------------------+
65
// |                                          CORPS du PROGRAMME                                          |
66
// +------------------------------------------------------------------------------------------------------+
79 jpm 67
function afficherContenuCorps()
68
{
69
    // Entêtre XHTML des pages de l'installation de Papyrus
70
    $sortie = '';
71
    $sortie .= '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"'."\n";
72
    $sortie .= '"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">'."\n";
73
    $sortie .= '<html xmlns="http://www.w3.org/1999/xhtml" lang="fr-FR" xml:lang="fr-FR">'."\n";
74
    $sortie .= '  <head>'."\n";
75
    $sortie .= '    <title>Installation de Papyrus</title>'."\n";
80 jpm 76
    $sortie .= '    <style type="text/css">'."\n";
79 jpm 77
    $sortie .= '      p, body, td, li, input, select, textarea { font-family: Verdana; font-size: 13px; }'."\n";
78
    $sortie .= '      h1 { font-size: 1.8em; text-align: center; color: #880000; }'."\n";
79
    $sortie .= '      h2 { font-size: 1.2em; text-align: left; color: #880000; }'."\n";
80
    $sortie .= '      input { color: #880000; }'."\n";
81
    $sortie .= '      form ul { list-style-type: none; padding : 0px; }'."\n";
82
    $sortie .= '      form ul li { clear:both;text-align: left; padding-left: 0px; margin-left: 0px; }'."\n";
83
    $sortie .= '      form ul li label { float: left; width: 175px; text-align: left; }'."\n";
84
    $sortie .= '      li { margin: 5px 5px 5px 5px; }'."\n";
85
    $sortie .= '      a { color: #0000FF; }'."\n";
86
    $sortie .= '      .ok { color: #008800; font-weight: bold; }'."\n";
87
    $sortie .= '      .failed { color: #880000; font-weight: bold; }'."\n";
88
    $sortie .= '      .erreur { color: red; font-weight: bold;}'."\n";
89
    $sortie .= '      .zone_requete { height: 300px; width: 550px; overflow: auto;}'."\n";
90
    $sortie .= '    </style>'."\n";
91
    $sortie .= '  </head>'."\n";
92
    $sortie .= '  <body>'."\n";
93
 
94
    if(!isset($_GET['installation'])) {
95
        include_once GEN_CHEMIN_APPLICATION.'installateur/instal_defaut.inc.php';
96
    } else if($_GET['installation'] == 'verif') {
97
        include_once GEN_CHEMIN_APPLICATION.'installateur/instal_verification.inc.php';
98
    } else if($_GET['installation'] == 'bdd') {
99
        include_once GEN_CHEMIN_APPLICATION.'installateur/instal_base_de_donnees.inc.php';
100
    } else if($_GET['installation'] == 'config') {
101
        include_once GEN_CHEMIN_APPLICATION.'installateur/instal_fichier.inc.php';
102
    }
103
    // Pied XHTML des pages de l'installation de Papyrus
104
    $sortie .= '  </body>'."\n";
105
    $sortie .= '</html>';
106
 
107
    return $sortie;
66 jpm 108
}
6 jpm 109
// +------------------------------------------------------------------------------------------------------+
110
// |                                            PIED du PROGRAMME                                         |
66 jpm 111
// +------------------------------------------------------------------------------------------------------+
6 jpm 112
 
113
/* +--Fin du code ----------------------------------------------------------------------------------------+
114
*
115
* $Log: not supported by cvs2svn $
80 jpm 116
* Revision 1.5  2004/10/19 16:47:28  jpm
117
* Transformation en fonction de l'appel de l'application.
118
*
79 jpm 119
* Revision 1.4  2004/10/19 15:59:18  jpm
120
* Ajout de la gestion des valeurs propre à Papyrus à insérer dans la base de données.
121
* Ajout des constantes FTP.
122
*
76 jpm 123
* Revision 1.3  2004/10/18 09:12:09  jpm
124
* Changement de nom d'un fichier.
125
*
69 jpm 126
* Revision 1.2  2004/10/15 18:28:59  jpm
127
* Début appli installateur de Papyrus.
128
*
66 jpm 129
* Revision 1.1  2004/06/16 14:33:13  jpm
130
* Changement de nom de Génésia en Papyrus.
131
* Changement de l'arborescence.
132
*
6 jpm 133
* Revision 1.6  2004/04/22 08:25:48  jpm
134
* Transformation de $GS_GLOBAL en $_GEN_commun.
135
*
136
* Revision 1.5  2004/04/08 13:21:05  jpm
137
* Le code pour l'installation uniquement.
138
*
139
* Revision 1.4  2004/04/08 12:25:16  jpm
140
* 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.
141
*
142
* Revision 1.3  2004/04/02 16:37:51  jpm
143
* Modification des commentaires.
144
*
145
* Revision 1.2  2004/03/31 16:57:16  jpm
146
* Ajout de la gestion des erreur de base de données, de la connexion à celle-ci et des extenssions php disponibles.
147
*
148
* Revision 1.1  2004/03/29 11:00:12  jpm
149
* Transfert d'un morceau de code gérant les erreurs et l'installation mais qui a actuellement aucun effet sur Génésia.
150
*
151
*
152
* +-- Fin du code ----------------------------------------------------------------------------------------+
153
*/
154
?>