New file |
0,0 → 1,149 |
<?php |
/*vim: set expandtab tabstop=4 shiftwidth=4: */ |
// +------------------------------------------------------------------------------------------------------+ |
// | PHP version 4.1 | |
// +------------------------------------------------------------------------------------------------------+ |
// | Copyright (C) 2001 COUDOUNEAU Laurent (lc@gsite.org) | |
// | 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: instal_installation.fonct.php,v 1.1 2004-06-16 14:34:12 jpm Exp $ |
/** |
* Bibliothèque des fonctions de l'application Installateur de Génésia. |
* |
* Ce sous-paquetage contient les fonctions de l'application Installateur de Génésia. Cette application gère |
* l'installation de Génésia (base de données). |
* |
*@package Installateur |
*@subpackage Fonctions |
//Auteur original : |
*@author Laurent COUDOUNEAU <mail@tela-botanica.org> |
//Autres auteurs : |
*@author Jean-Pascal MILCENT <jpm@tela-botanica.org> |
*@copyright Tela-Botanica 2000-2004 |
*@version $Date: 2004-06-16 14:34:12 $ |
*/ |
|
// +------------------------------------------------------------------------------------------------------+ |
// | LISTE de FONCTIONS | |
// +------------------------------------------------------------------------------------------------------+ |
|
|
/**Fonction projectForm() - Permet de choisir le projet de site web. |
* |
* Cette fonction crée une page html retournant un formulaire qui permet de choisir le projet de site web. |
* |
* @param string le message d'erreur. |
* @return string page html affichant un formulaire pour choisir un projet. |
*/ |
function projectForm ($msg) |
{ |
header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 |
header ("Pragma: no-cache"); // HTTP/1.0 |
|
$html_retour = "\n".'<html>'; |
$html_retour .= "\n".' <head>'; |
$html_retour .= "\n".' <title>Project selection</title>'; |
$html_retour .= "\n".' <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">'; |
$html_retour .= "\n".' </head>'; |
$html_retour .= "\n".' <body bgcolor="white">'; |
$html_retour .= "\n".' <div align="center">'; |
$html_retour .= "\n".' <br /> <b>'.$msg.'</b>'; |
$html_retour .= "\n".' <form action="index.php" method="get">'; |
$html_retour .= "\n".' <input type="text" name="project" value="admin">'; |
$html_retour .= "\n".' <br />'; |
$html_retour .= "\n".' <input type="submit" value="Valider ce projet">'; |
$html_retour .= "\n".' </form>'; |
$html_retour .= "\n".' </div>'; |
$html_retour .= "\n".' </body>'; |
$html_retour .= "\n".'</html>'; |
|
//Codage en entité html des caractères accentués |
$html_retour = htmlentities($html_retour); |
echo $html_retour; |
} |
|
/**Fonction installForm() - Permet de choisir le projet de site web. |
* |
* Cette fonction renvoie une page web demandant de relancer l'installation. |
* |
* @param string le message d'erreur. |
* @return string page html affichant un lien pour relancer l'installation. |
*/ |
|
function installForm ($msg) |
{ |
//Recherche de la présence du fichier d'installation |
$presence_instal = file_exists ('gsinstall.php'); |
|
header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 |
header ("Pragma: no-cache"); // HTTP/1.0 |
|
$html_retour = "\n".'<html>'; |
$html_retour .= "\n".' <head>'; |
$html_retour .= "\n".' <title>Mauvaise installation</title>'; |
$html_retour .= "\n".' <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">'; |
$html_retour .= "\n".' </head>'; |
$html_retour .= "\n".' <body bgcolor="white">'; |
$html_retour .= "\n".' <div align="center" >'; |
$html_retour .= "\n"." <br /><b>Vous avez rencontré le message d'erreur suivant:<br />". |
$msg.'</b><br /><br />'; |
$html_retour .= "\n".' <b>Votre installation est peut être défectueuse.</b><br /><br />'; |
|
if ($presence_instal) { |
$html_retour .= "\n".' <b>S\'il vous plait'. |
'<a href="gsinstall.php" target="_blank">relancer l\'installation</a>'. |
'.</b>'; |
$html_retour .= "\n".' <br />'; |
$html_retour .= "\n"." <b>N'oubliez pas de supprimer le fichier '. |
'<i>gsinstall.php</i> aprés l'installation.</b>"; |
$html_retour .= "\n"." <br /><br />"; |
|
} |
else { |
$html_retour .= "\n".' <b>Installez le fichier <i>gsinstall.php</i> et essayez à nouveau.</b>'; |
$html_retour .= "\n"." <br /><br />"; |
} |
|
$html_retour .= "\n".' </div>'; |
$html_retour .= "\n".' </body>'; |
$html_retour .= "\n".'</html>'; |
|
//Codage en entité html des caractères accentués |
$html_retour = htmlentities($html_retour); |
echo $html_retour; |
} |
|
/* +--Fin du code ---------------------------------------------------------------------------------------+ |
* $Log: not supported by cvs2svn $ |
* Revision 1.5 2004/04/08 13:20:44 jpm |
* Suppression de la fonction de gestion des erreurs. |
* |
* Revision 1.4 2004/04/02 16:37:38 jpm |
* Modification des commentaires. |
* |
* Revision 1.3 2004/03/25 16:55:24 jpm |
* Ajout de la fonction gs_bdError(), provenant du fichier gen_initialisation.inc.php. |
* |
* Revision 1.2 2004/03/22 11:42:31 jpm |
* Ajout de commentaires et mise en forme. |
* |
* |
* +--Fin du code ----------------------------------------------------------------------------------------+ |
*/ |
?> |