6 |
jpm |
1 |
<?php
|
|
|
2 |
/*vim: set expandtab tabstop=4 shiftwidth=4: */
|
|
|
3 |
// +------------------------------------------------------------------------------------------------------+
|
|
|
4 |
// | PHP version 4.1 |
|
|
|
5 |
// +------------------------------------------------------------------------------------------------------+
|
|
|
6 |
// | Copyright (C) 2001 COUDOUNEAU Laurent (lc@gsite.org) |
|
|
|
7 |
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) |
|
|
|
8 |
// +------------------------------------------------------------------------------------------------------+
|
|
|
9 |
// | |
|
|
|
10 |
// | This library is free software; you can redistribute it and/or |
|
|
|
11 |
// | modify it under the terms of the GNU Lesser General Public |
|
|
|
12 |
// | License as published by the Free Software Foundation; either |
|
|
|
13 |
// | version 2.1 of the License, or (at your option) any later version. |
|
|
|
14 |
// | |
|
|
|
15 |
// | This library is distributed in the hope that it will be useful, |
|
|
|
16 |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
|
|
17 |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
|
|
18 |
// | Lesser General Public License for more details. |
|
|
|
19 |
// | |
|
|
|
20 |
// | You should have received a copy of the GNU Lesser General Public |
|
|
|
21 |
// | License along with this library; if not, write to the Free Software |
|
|
|
22 |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
|
|
23 |
// | |
|
|
|
24 |
// +------------------------------------------------------------------------------------------------------+
|
|
|
25 |
// CVS : $Id: instal_installation.fonct.php,v 1.1 2004-06-16 14:34:12 jpm Exp $
|
|
|
26 |
/**
|
|
|
27 |
* Bibliothèque des fonctions de l'application Installateur de Génésia.
|
|
|
28 |
*
|
|
|
29 |
* Ce sous-paquetage contient les fonctions de l'application Installateur de Génésia. Cette application gère
|
|
|
30 |
* l'installation de Génésia (base de données).
|
|
|
31 |
*
|
|
|
32 |
*@package Installateur
|
|
|
33 |
*@subpackage Fonctions
|
|
|
34 |
//Auteur original :
|
|
|
35 |
*@author Laurent COUDOUNEAU <mail@tela-botanica.org>
|
|
|
36 |
//Autres auteurs :
|
|
|
37 |
*@author Jean-Pascal MILCENT <jpm@tela-botanica.org>
|
|
|
38 |
*@copyright Tela-Botanica 2000-2004
|
|
|
39 |
*@version $Date: 2004-06-16 14:34:12 $
|
|
|
40 |
*/
|
|
|
41 |
|
|
|
42 |
// +------------------------------------------------------------------------------------------------------+
|
|
|
43 |
// | LISTE de FONCTIONS |
|
|
|
44 |
// +------------------------------------------------------------------------------------------------------+
|
|
|
45 |
|
|
|
46 |
|
|
|
47 |
/**Fonction projectForm() - Permet de choisir le projet de site web.
|
|
|
48 |
*
|
|
|
49 |
* Cette fonction crée une page html retournant un formulaire qui permet de choisir le projet de site web.
|
|
|
50 |
*
|
|
|
51 |
* @param string le message d'erreur.
|
|
|
52 |
* @return string page html affichant un formulaire pour choisir un projet.
|
|
|
53 |
*/
|
|
|
54 |
function projectForm ($msg)
|
|
|
55 |
{
|
|
|
56 |
header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
|
|
|
57 |
header ("Pragma: no-cache"); // HTTP/1.0
|
|
|
58 |
|
|
|
59 |
$html_retour = "\n".'<html>';
|
|
|
60 |
$html_retour .= "\n".' <head>';
|
|
|
61 |
$html_retour .= "\n".' <title>Project selection</title>';
|
|
|
62 |
$html_retour .= "\n".' <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">';
|
|
|
63 |
$html_retour .= "\n".' </head>';
|
|
|
64 |
$html_retour .= "\n".' <body bgcolor="white">';
|
|
|
65 |
$html_retour .= "\n".' <div align="center">';
|
|
|
66 |
$html_retour .= "\n".' <br /> <b>'.$msg.'</b>';
|
|
|
67 |
$html_retour .= "\n".' <form action="index.php" method="get">';
|
|
|
68 |
$html_retour .= "\n".' <input type="text" name="project" value="admin">';
|
|
|
69 |
$html_retour .= "\n".' <br />';
|
|
|
70 |
$html_retour .= "\n".' <input type="submit" value="Valider ce projet">';
|
|
|
71 |
$html_retour .= "\n".' </form>';
|
|
|
72 |
$html_retour .= "\n".' </div>';
|
|
|
73 |
$html_retour .= "\n".' </body>';
|
|
|
74 |
$html_retour .= "\n".'</html>';
|
|
|
75 |
|
|
|
76 |
//Codage en entité html des caractères accentués
|
|
|
77 |
$html_retour = htmlentities($html_retour);
|
|
|
78 |
echo $html_retour;
|
|
|
79 |
}
|
|
|
80 |
|
|
|
81 |
/**Fonction installForm() - Permet de choisir le projet de site web.
|
|
|
82 |
*
|
|
|
83 |
* Cette fonction renvoie une page web demandant de relancer l'installation.
|
|
|
84 |
*
|
|
|
85 |
* @param string le message d'erreur.
|
|
|
86 |
* @return string page html affichant un lien pour relancer l'installation.
|
|
|
87 |
*/
|
|
|
88 |
|
|
|
89 |
function installForm ($msg)
|
|
|
90 |
{
|
|
|
91 |
//Recherche de la présence du fichier d'installation
|
|
|
92 |
$presence_instal = file_exists ('gsinstall.php');
|
|
|
93 |
|
|
|
94 |
header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
|
|
|
95 |
header ("Pragma: no-cache"); // HTTP/1.0
|
|
|
96 |
|
|
|
97 |
$html_retour = "\n".'<html>';
|
|
|
98 |
$html_retour .= "\n".' <head>';
|
|
|
99 |
$html_retour .= "\n".' <title>Mauvaise installation</title>';
|
|
|
100 |
$html_retour .= "\n".' <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">';
|
|
|
101 |
$html_retour .= "\n".' </head>';
|
|
|
102 |
$html_retour .= "\n".' <body bgcolor="white">';
|
|
|
103 |
$html_retour .= "\n".' <div align="center" >';
|
|
|
104 |
$html_retour .= "\n"." <br /><b>Vous avez rencontré le message d'erreur suivant:<br />".
|
|
|
105 |
$msg.'</b><br /><br />';
|
|
|
106 |
$html_retour .= "\n".' <b>Votre installation est peut être défectueuse.</b><br /><br />';
|
|
|
107 |
|
|
|
108 |
if ($presence_instal) {
|
|
|
109 |
$html_retour .= "\n".' <b>S\'il vous plait'.
|
|
|
110 |
'<a href="gsinstall.php" target="_blank">relancer l\'installation</a>'.
|
|
|
111 |
'.</b>';
|
|
|
112 |
$html_retour .= "\n".' <br />';
|
|
|
113 |
$html_retour .= "\n"." <b>N'oubliez pas de supprimer le fichier '.
|
|
|
114 |
'<i>gsinstall.php</i> aprés l'installation.</b>";
|
|
|
115 |
$html_retour .= "\n"." <br /><br />";
|
|
|
116 |
|
|
|
117 |
}
|
|
|
118 |
else {
|
|
|
119 |
$html_retour .= "\n".' <b>Installez le fichier <i>gsinstall.php</i> et essayez à nouveau.</b>';
|
|
|
120 |
$html_retour .= "\n"." <br /><br />";
|
|
|
121 |
}
|
|
|
122 |
|
|
|
123 |
$html_retour .= "\n".' </div>';
|
|
|
124 |
$html_retour .= "\n".' </body>';
|
|
|
125 |
$html_retour .= "\n".'</html>';
|
|
|
126 |
|
|
|
127 |
//Codage en entité html des caractères accentués
|
|
|
128 |
$html_retour = htmlentities($html_retour);
|
|
|
129 |
echo $html_retour;
|
|
|
130 |
}
|
|
|
131 |
|
|
|
132 |
/* +--Fin du code ---------------------------------------------------------------------------------------+
|
|
|
133 |
* $Log: not supported by cvs2svn $
|
|
|
134 |
* Revision 1.5 2004/04/08 13:20:44 jpm
|
|
|
135 |
* Suppression de la fonction de gestion des erreurs.
|
|
|
136 |
*
|
|
|
137 |
* Revision 1.4 2004/04/02 16:37:38 jpm
|
|
|
138 |
* Modification des commentaires.
|
|
|
139 |
*
|
|
|
140 |
* Revision 1.3 2004/03/25 16:55:24 jpm
|
|
|
141 |
* Ajout de la fonction gs_bdError(), provenant du fichier gen_initialisation.inc.php.
|
|
|
142 |
*
|
|
|
143 |
* Revision 1.2 2004/03/22 11:42:31 jpm
|
|
|
144 |
* Ajout de commentaires et mise en forme.
|
|
|
145 |
*
|
|
|
146 |
*
|
|
|
147 |
* +--Fin du code ----------------------------------------------------------------------------------------+
|
|
|
148 |
*/
|
|
|
149 |
?>
|