Subversion Repositories Applications.papyrus

Rev

Rev 6 | Rev 69 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6 Rev 66
Line 17... Line 17...
17
// |                                                                                                      |
17
// |                                                                                                      |
18
// | You should have received a copy of the GNU Lesser General Public                                     |
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                                  |
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                            |
20
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                            |
21
// +------------------------------------------------------------------------------------------------------+
21
// +------------------------------------------------------------------------------------------------------+
22
// CVS : $Id: installateur.php,v 1.1 2004-06-16 14:33:13 jpm Exp $
22
// CVS : $Id: installateur.php,v 1.2 2004-10-15 18:28:59 jpm Exp $
23
/**
23
/**
24
* Application Installateur de Papyrus.
24
* Application Installateur de Papyrus.
25
*
25
*
26
* Application permettant de gérer l'installation et les erreurs liés à l'abscence de base de données, 
26
* Application permettant de gérer l'installation et les erreurs liés à l'abscence de base de données, 
27
* d'extenssin PHP...
27
* d'extenssin PHP...
Line 30... Line 30...
30
//Auteur original :
30
//Auteur original :
31
*@author        Jean-Pascal MILCENT <jpm@tela-botanica.org>
31
*@author        Jean-Pascal MILCENT <jpm@tela-botanica.org>
32
//Autres auteurs :
32
//Autres auteurs :
33
*@author        Aucun
33
*@author        Aucun
34
*@copyright     Tela-Botanica 2000-2004
34
*@copyright     Tela-Botanica 2000-2004
35
*@version       $Revision: 1.1 $ $Date: 2004-06-16 14:33:13 $
35
*@version       $Revision: 1.2 $ $Date: 2004-10-15 18:28:59 $
36
// +------------------------------------------------------------------------------------------------------+
36
// +------------------------------------------------------------------------------------------------------+
37
**/
37
**/
Line 38... Line 38...
38
 
38
 
39
// +------------------------------------------------------------------------------------------------------+
39
// +------------------------------------------------------------------------------------------------------+
40
// |                                            ENTÊTE du PROGRAMME                                       |
40
// |                                            ENTÊTE du PROGRAMME                                       |
-
 
41
// +------------------------------------------------------------------------------------------------------+
-
 
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';
-
 
63
 
-
 
64
// Entêtre XHTML des pages de l'installation de Papyrus
-
 
65
$sortie = '';
-
 
66
$sortie .= '<html>';
-
 
67
$sortie .= '  <head>';
-
 
68
$sortie .= '    <title>Installation de Papyrus</title>';
-
 
69
$sortie .= '    <style>';
-
 
70
$sortie .= '      p, body, td, li, input, select, textarea { font-family: Verdana; font-size: 13px; }';
41
// +------------------------------------------------------------------------------------------------------+
71
$sortie .= '      h1 { font-size: 1.8em; text-align: center; color: #880000; }';
-
 
72
$sortie .= '      h2 { font-size: 1.2em; text-align: left; color: #880000; }';
-
 
73
$sortie .= '      input { color: #880000; }';
-
 
74
$sortie .= '      form ul { list-style-type: none; padding : 0px; }';
-
 
75
$sortie .= '      form ul li { text-align: left; padding-left: 0px; margin-left: 0px; }';
-
 
76
$sortie .= '      form label { float: left; width: 175px; text-align: left; }';
-
 
77
$sortie .= '      li { margin: 5px 5px 5px 5px; }';
-
 
78
$sortie .= '      a { color: #0000FF; }';
-
 
79
$sortie .= '      .ok { color: #008800; font-weight: bold; }';
-
 
80
$sortie .= '      .failed { color: #880000; font-weight: bold; }';
-
 
81
$sortie .= '    </style>';
-
 
82
$sortie .= '  </head>';
Line 42... Line 83...
42
                                    /*Mettre ici les inclusions de fichiers*/                             
83
$sortie .= '  <body>';
43
 
84
 
44
// +------------------------------------------------------------------------------------------------------+
85
// +------------------------------------------------------------------------------------------------------+
45
// |                                          CORPS du PROGRAMME                                          |
-
 
46
// +------------------------------------------------------------------------------------------------------+
-
 
47
 
86
// |                                          CORPS du PROGRAMME                                          |
48
// A retravailler complétement!!!
87
// +------------------------------------------------------------------------------------------------------+
49
    if ($_GEN_commun['erreur_site_introuvable']) {
-
 
50
        projectForm($_GEN_commun['message_erreur_bd']);
-
 
51
        exit;
-
 
52
    }
88
if(!isset($_GET['installation'])) {
53
    else {
-
 
54
        if ($_GEN_commun['erreur_config'] || $_GEN_commun['erreur_bd']) {
-
 
55
            installForm($_GEN_commun['message_erreur_bd']);
-
 
56
            exit;
-
 
57
        }
-
 
58
        else {
-
 
59
            exit (
-
 
60
                    '<html>'.
-
 
61
                    "\n".'  <head>'.
89
    include_once GEN_CHEMIN_APPLICATION.'installateur/instal_defaut.inc.php';
62
                    "\n".'    <title>Error</title>'.
-
 
63
                    "\n".'    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">'.
90
} else if($_GET['installation'] == 'bdd') {
64
                    "\n".'  </head>'.
-
 
65
                    "\n".'  <body>'.
91
    include_once GEN_CHEMIN_APPLICATION.'installateur/instal_base_de_donnees.inc.php';
66
                    "\n".'    <br /><br />'.
-
 
67
                    "\n".'    <p align="center"><b>'.$_GEN_commun['message_erreur_bd'].'</b></p>'.
-
 
68
                    "\n".'  </body>'.
92
} else if($_GET['installation'] == 'config') {
69
                    "\n".'</html>');
93
    include_once GEN_CHEMIN_APPLICATION.'installateur/instal_configuration.inc.php';
70
        }
94
}
71
    }
95
 
72
// +------------------------------------------------------------------------------------------------------+
96
// +------------------------------------------------------------------------------------------------------+
73
// |                                            PIED du PROGRAMME                                         |
97
// |                                            PIED du PROGRAMME                                         |
-
 
98
// +------------------------------------------------------------------------------------------------------+
-
 
99
// Pied XHTML des pages de l'installation de Papyrus
74
// +------------------------------------------------------------------------------------------------------+
100
$sortie .= '  </body>';
-
 
101
$sortie .= '</html>';
-
 
102
 
Line 75... Line 103...
75
                                           /*Partie non obligatoire*/                                     
103
// Attribution à la variable globale de sortie de Papyrus du texte XHTML de l'installation
76
 
104
$GLOBALS['_GEN_commun']['sortie'] = $sortie;
77
 
105
 
-
 
106
/* +--Fin du code ----------------------------------------------------------------------------------------+
-
 
107
*
-
 
108
* $Log: not supported by cvs2svn $
-
 
109
* Revision 1.1  2004/06/16 14:33:13  jpm
78
/* +--Fin du code ----------------------------------------------------------------------------------------+
110
* Changement de nom de Génésia en Papyrus.
79
*
111
* Changement de l'arborescence.
80
* $Log: not supported by cvs2svn $
112
*
81
* Revision 1.6  2004/04/22 08:25:48  jpm
113
* Revision 1.6  2004/04/22 08:25:48  jpm
82
* Transformation de $GS_GLOBAL en $_GEN_commun.
114
* Transformation de $GS_GLOBAL en $_GEN_commun.