Subversion Repositories Applications.papyrus

Rev

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

Rev Author Line No. Line
6 jpm 1
<?php
2060 aurelien 2
/*vim: set expandtab tabstop=4 shiftwidth=4: */
6 jpm 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
// +------------------------------------------------------------------------------------------------------+
1970 aperonnet 22
// CVS : $Id: installateur.php,v 1.17 2008-11-19 09:25:36 aperonnet Exp $
6 jpm 23
/**
24
* Application Installateur de Papyrus.
25
*
2060 aurelien 26
* Application permettant de gérer l'installation et les erreurs liés à l'abscence de base de données,
6 jpm 27
* d'extenssin PHP...
28
*
29
*@package Installateur
30
//Auteur original :
1970 aperonnet 31
*@author Jean-Pascal MILCENT <jpm@tela-botanica.org>
6 jpm 32
//Autres auteurs :
33
*@author        Aucun
34
*@copyright     Tela-Botanica 2000-2004
1970 aperonnet 35
*@version       $Revision: 1.17 $ $Date: 2008-11-19 09:25:36 $
6 jpm 36
// +------------------------------------------------------------------------------------------------------+
37
**/
38
 
2060 aurelien 39
if(GEN_VERSION == PAP_VERSION) {
40
	header('location:papyrus.php');
41
	exit;
42
}
43
 
44
 
6 jpm 45
// +------------------------------------------------------------------------------------------------------+
46
// |                                            ENTÊTE du PROGRAMME                                       |
47
// +------------------------------------------------------------------------------------------------------+
458 florian 48
// Constante de l'application Installateur. On devrait créer un fichier de config et un de langue pour rendre l'appli portable...
49
preg_match('/^(.*)papyrus.php/', $_SERVER['SCRIPT_FILENAME'], $instal_tab_txt);
50
define('INSTAL_CHEMIN_ABSOLU', $instal_tab_txt[1]);
51
/** Nom du dossier contenant l'application Installateur.*/
52
define('INSTAL_DOSSIER_APPLI', INSTAL_CHEMIN_ABSOLU.GEN_CHEMIN_APPLICATION.'installateur'.GEN_SEP);
53
/** Nom du dossier contenant la bibliothèque de code de l'application Installateur.*/
54
define('INSTAL_DOSSIER_BIBLIO', INSTAL_DOSSIER_APPLI.'bibliotheque'.GEN_SEP);
55
/** Chemin vers le fichier de configuration de base de l'application Papyrus.*/
56
define('INSTAL_CHEMIN_CONFIG', GEN_CHEMIN_CONFIG.GEN_FICHIER_CONFIG);
57
/** Nom du fichier de configuration de Papyrus à créer.*/
58
define('INSTAL_FICHIER_CONFIG', GEN_FICHIER_CONFIG);
59
/** Chemin vers le fichier de configuration de base de l'application Papyrus.*/
60
define('INSTAL_CHEMIN_SQL', INSTAL_CHEMIN_ABSOLU.GEN_CHEMIN_INSTAL);
61
/** Nom de la constante stockant le numéro de la nouvelle version de l'application Papyrus.*/
62
define('INSTAL_VERSION_NOUVELLE_NOM', 'PAP_VERSION');
63
/** Numéro de la nouvelle version de l'application Papyrus.*/
64
define('INSTAL_VERSION_NOUVELLE', GEN_VERSION);
65
if (defined('PAP_VERSION')) {
66
    define('INSTAL_VERSION_ANCIENNE', PAP_VERSION);
67
} else {
68
    define('INSTAL_VERSION_ANCIENNE', '');
69
}
70
/** Nombre d'étapes totale de l'installation.*/
71
define('INSTAL_NBRE_ETAPE', 3);
6 jpm 72
 
458 florian 73
// Fichiers à inclure
74
require_once INSTAL_DOSSIER_BIBLIO.'instal_installation.fonct.php';
75
 
6 jpm 76
// +------------------------------------------------------------------------------------------------------+
77
// |                                          CORPS du PROGRAMME                                          |
78
// +------------------------------------------------------------------------------------------------------+
2060 aurelien 79
function afficherContenuCorps()
458 florian 80
{
1362 florian 81
    // Entête XHTML des pages de l'installation de Papyrus
458 florian 82
    $sortie = '';
83
    $sortie .= '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"'."\n";
84
    $sortie .= '"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">'."\n";
85
    $sortie .= '<html xmlns="http://www.w3.org/1999/xhtml" lang="fr-FR" xml:lang="fr-FR">'."\n";
86
    $sortie .= '  <head>'."\n";
87
    $sortie .= '    <link rel="stylesheet" type="text/css" media="screen" title="Installateur" href="papyrus/applications/installateur/presentations/styles/installateur.css" />'."\n";
88
    $sortie .= '    <title>Installation de Papyrus</title>'."\n";
89
    $sortie .= '  </head>'."\n";
986 florian 90
 	$sortie .= '  <body xml:lang="fr" lang="fr" >'."\n";
91
	$sortie .= '  <div id="page">'."\n";
2060 aurelien 92
    $sortie .= '  	<div id="zone_bandeau">'."\n";
93
	$sortie .= '  		<div id="logo">'."\n";
986 florian 94
    $sortie .= '              <img src="papyrus/applications/installateur/presentations/images/Logo_papyrus.jpg" alt="Logo Papyrus" />'."\n";
458 florian 95
    $sortie .= '        </div>'."\n";
96
    $sortie .= '        <div id="site_nom">'."\n";
97
    $sortie .= '          <h1>Installation de Papyrus</h1>'."\n";
98
    $sortie .= '        </div>'."\n";
99
    $sortie .= '      </div>'."\n";
100
    $sortie .= '      <div id="zone_contenu">'."\n";
101
    // Message situation de l'installation
102
    if (defined('PAP_VERSION')) {
993 florian 103
        $sortie .=  '<p class="zone_info">Votre syst&egrave;me Papyrus existant a &eacute;t&eacute; reconnu comme &eacute;tant la version '.
458 florian 104
                    INSTAL_VERSION_ANCIENNE.'.<br />'.
993 florian 105
                    'Vous &ecirc;tes sur le point de <strong>mettre &agrave; jour</strong> Papyrus pour la version '.
458 florian 106
                    INSTAL_VERSION_NOUVELLE.'.<br />'.
993 florian 107
                    'Veuillez revoir vos informations de configuration ci-dessous.</p><br style="clear:both;">'."\n";
458 florian 108
    } else {
993 florian 109
        $sortie .=  '<p class="zone_info">Vous &ecirc;tes sur le point d\'installer Papyrus '.INSTAL_VERSION_NOUVELLE.'.<br />'.
1362 florian 110
                    'Veuillez configurer votre Papyrus en remplissant les formulaires &eacute;tape par &eacute;tape.</p><br style="clear:both;">'."\n";
458 florian 111
    }
2060 aurelien 112
 
458 florian 113
    if(!isset($_GET['installation']) || ($_GET['installation'] == 'form_pref' || $_GET['installation'] == 'verif_pref')) {
114
        include_once GEN_CHEMIN_APPLICATION.'installateur/instal_preference.inc.php';
115
    } else if($_GET['installation'] == 'form_bdd' || $_GET['installation'] == 'verif_bdd') {
116
        include_once GEN_CHEMIN_APPLICATION.'installateur/instal_base_de_donnees.inc.php';
117
    } else if($_GET['installation'] == 'form_fichier' || $_GET['installation'] == 'verif_fichier') {
118
        include_once GEN_CHEMIN_APPLICATION.'installateur/instal_fichier.inc.php';
119
    }
2060 aurelien 120
 
458 florian 121
    // Pied XHTML des pages de l'installation de Papyrus
122
    $sortie .= '    </div>'."\n";
123
    $sortie .= '      <div id="zone_pied">'."\n";
990 florian 124
    $sortie .= '       <div id="copyright">'."\n";
458 florian 125
    $sortie .= '        <a href="http://frenchmozilla.org"><img src="papyrus/applications/installateur/presentations/images/logo-firefox.png" alt="Logo Firefox" /></a>&nbsp;'."\n";
126
    $sortie .= '        <a href="http://validator.w3.org/check?uri=referer"><img src="papyrus/applications/installateur/presentations/images/logo-xhtml11.png" alt="Logo XHTML" /></a>&nbsp;'."\n";
127
    $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";
1362 florian 128
    $sortie .= '        &copy;&nbsp;<a href="http://www.tela-botanica.org/">Tela Botanica</a> et  <a href="http://www.ecole-et-nature.org/">R&eacute;seau Ecole et Nature</a> / 2004-2006<br />'."\n";
990 florian 129
    $sortie .= '        Site utilisant <a href="http://outils-reseaux.org/wiki_papyrus">Papyrus, le CMS coop&eacute;ratif</a>'."\n";
130
    $sortie .= '       </div>'."\n";
458 florian 131
    $sortie .= '      </div>'."\n";
132
    $sortie .= '  </div>'."\n";
133
    $sortie .= ' </body>'."\n";
134
    $sortie .= '</html>';
2060 aurelien 135
 
458 florian 136
    return $sortie;
137
}
1024 ddelon 138
 
139
 
6 jpm 140
// +------------------------------------------------------------------------------------------------------+
141
// |                                            PIED du PROGRAMME                                         |
458 florian 142
// +------------------------------------------------------------------------------------------------------+
6 jpm 143
 
144
/* +--Fin du code ----------------------------------------------------------------------------------------+
145
*
986 florian 146
* $Log: not supported by cvs2svn $
1970 aperonnet 147
* Revision 1.16  2007-04-20 13:31:42  florian
148
* remplacement des caracteres speciaux par des entite html
149
*
1362 florian 150
* Revision 1.15  2006/10/16 15:49:07  ddelon
151
* Refactorisation code mulitlinguisme et gestion menu invisibles
152
*
1033 ddelon 153
* Revision 1.14  2006/10/09 14:35:50  ddelon
154
* bug caractere invalide trainant dans fichier
155
*
1024 ddelon 156
* Revision 1.13  2006/10/05 15:17:29  florian
157
* changement presentation
158
*
993 florian 159
* Revision 1.12  2006/10/05 15:11:17  florian
160
* changement presentation
161
*
990 florian 162
* Revision 1.11  2006/10/05 14:41:53  florian
163
* changement presentation
164
*
986 florian 165
* Revision 1.10  2005/09/23 14:20:23  florian
166
* nouvel habillage installateur, plus correction de quelques bugs
167
*
458 florian 168
* Revision 1.9  2004/10/27 11:43:32  jpm
169
* Correction bogues diff mise à jour / installation.
6 jpm 170
*
458 florian 171
* Revision 1.8  2004/10/25 10:22:48  jpm
172
* Correction de quelques bogues, ajouts d'explications pour l'utilisateur et modification des styles CSS.
173
*
174
* Revision 1.7  2004/10/22 17:23:04  jpm
175
* Simplification del'installation de Papyrus.
176
*
177
* Revision 1.6  2004/10/19 17:01:12  jpm
178
* Correction bogues.
179
*
180
* Revision 1.5  2004/10/19 16:47:28  jpm
181
* Transformation en fonction de l'appel de l'application.
182
*
183
* Revision 1.4  2004/10/19 15:59:18  jpm
184
* Ajout de la gestion des valeurs propre à Papyrus à insérer dans la base de données.
185
* Ajout des constantes FTP.
186
*
187
* Revision 1.3  2004/10/18 09:12:09  jpm
188
* Changement de nom d'un fichier.
189
*
190
* Revision 1.2  2004/10/15 18:28:59  jpm
191
* Début appli installateur de Papyrus.
192
*
193
* Revision 1.1  2004/06/16 14:33:13  jpm
1362 florian 194
* Changement de nom de Papyrus en Papyrus.
458 florian 195
* Changement de l'arborescence.
196
*
197
* Revision 1.6  2004/04/22 08:25:48  jpm
198
* Transformation de $GS_GLOBAL en $_GEN_commun.
199
*
6 jpm 200
* Revision 1.5  2004/04/08 13:21:05  jpm
201
* Le code pour l'installation uniquement.
202
*
203
* Revision 1.4  2004/04/08 12:25:16  jpm
1362 florian 204
* Suppression de tous le code réalisant les vérifications. L'application Installateur ne fera qu'installer Papyrus et non vérifier son bon fonctionnement.
6 jpm 205
*
206
* Revision 1.3  2004/04/02 16:37:51  jpm
207
* Modification des commentaires.
208
*
209
* Revision 1.2  2004/03/31 16:57:16  jpm
210
* Ajout de la gestion des erreur de base de données, de la connexion à celle-ci et des extenssions php disponibles.
211
*
212
* Revision 1.1  2004/03/29 11:00:12  jpm
1362 florian 213
* Transfert d'un morceau de code gérant les erreurs et l'installation mais qui a actuellement aucun effet sur Papyrus.
6 jpm 214
*
215
*
216
* +-- Fin du code ----------------------------------------------------------------------------------------+
217
*/
218
?>