Correction bug au moment d'enregistrer quand PHP fonctionne en CGI.

Retour à la page après validation.
Uniformisation du look avec les autres pages de configuration.
This commit is contained in:
Laurent Destailleur 2004-02-28 17:18:33 +00:00
parent 376de7c3ec
commit 20994125c2

View File

@ -1,6 +1,7 @@
<?PHP <?PHP
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2003 Éric Seigne <erics@rycks.com> * Copyright (C) 2003 Éric Seigne <erics@rycks.com>
* Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -21,14 +22,15 @@
*/ */
require("./pre.inc.php"); require("./pre.inc.php");
if (!$user->admin)
accessforbidden();
llxHeader(); llxHeader();
if (!$user->admin) print_titre("Configuration du lien vers le calendrier");
{ print '<br>';
print "Forbidden";
llxfooter();
exit;
}
$def = array(); $def = array();
@ -59,50 +61,53 @@ if ($action == 'save')
print "<p>erreur, votre mot de passe n'est pas vérifié, merci de retourner à la page de saisie pour corriger votre erreur</p>\n"; print "<p>erreur, votre mot de passe n'est pas vérifié, merci de retourner à la page de saisie pour corriger votre erreur</p>\n";
} }
} }
else
{
/*
* Affichage du formulaire de saisie
*/
print_titre("Configuration du lien vers le calendrier");
print "\n<form name=\"phpwebcalendarconfig\" action=\"" . $_SERVER['SCRIPT_NAME'] . "\" method=\"post\"> /*
<table border=\"1\" cellpadding=\"3\" cellspacing=\"0\"> * Affichage du formulaire de saisie
<tr> */
print "\n<form name=\"phpwebcalendarconfig\" action=\"" . $PHP_SELF . "\" method=\"post\">
<table class=\"noborder\" cellpadding=\"3\" cellspacing=\"1\">
<tr class=\"liste_titre\">
<td>Paramètre</td>
<td>Valeur</td>
</tr>
<tr class=\"impair\">
<td>Adresse URL d'accès au calendrier</td> <td>Adresse URL d'accès au calendrier</td>
<td><input type=\"text\" name=\"phpwebcalendar_url\" value=\"". PHPWEBCALENDAR_URL . "\" size=\"45\"></td> <td><input type=\"text\" name=\"phpwebcalendar_url\" value=\"". PHPWEBCALENDAR_URL . "\" size=\"45\"></td>
</tr> </tr>
<tr> <tr class=\"pair\">
<td>Serveur où la base du calendrier est hébergée</td> <td>Serveur où la base du calendrier est hébergée</td>
<td><input type=\"text\" name=\"phpwebcalendar_host\" value=\"". PHPWEBCALENDAR_HOST . "\" size=\"45\"></td> <td><input type=\"text\" name=\"phpwebcalendar_host\" value=\"". PHPWEBCALENDAR_HOST . "\" size=\"45\"></td>
</tr> </tr>
<tr> <tr class=\"impair\">
<td>Nom de la base de données</td> <td>Nom de la base de données</td>
<td><input type=\"text\" name=\"phpwebcalendar_dbname\" value=\"". PHPWEBCALENDAR_DBNAME . "\" size=\"45\"></td> <td><input type=\"text\" name=\"phpwebcalendar_dbname\" value=\"". PHPWEBCALENDAR_DBNAME . "\" size=\"45\"></td>
</tr> </tr>
<tr> <tr class=\"pair\">
<td>Identifiant d'accès à la base</td> <td>Identifiant d'accès à la base</td>
<td><input type=\"text\" name=\"phpwebcalendar_user\" value=\"". PHPWEBCALENDAR_USER . "\" size=\"45\"></td> <td><input type=\"text\" name=\"phpwebcalendar_user\" value=\"". PHPWEBCALENDAR_USER . "\" size=\"45\"></td>
</tr> </tr>
<tr> <tr class=\"impair\">
<td>Mot de passe d'accès à la base</td> <td>Mot de passe d'accès à la base</td>
<td><input type=\"password\" name=\"phpwebcalendar_pass\" value=\"" . PHPWEBCALENDAR_PASS . "\" size=\"45\"></td> <td><input type=\"password\" name=\"phpwebcalendar_pass\" value=\"" . PHPWEBCALENDAR_PASS . "\" size=\"45\"></td>
</tr> </tr>
<tr> <tr class=\"pair\">
<td>Mot de passe (vérification)</td> <td>Mot de passe (vérification)</td>
<td><input type=\"password\" name=\"phpwebcalendar_pass2\" value=\"" . PHPWEBCALENDAR_PASS ."\" size=\"45\"></td> <td><input type=\"password\" name=\"phpwebcalendar_pass2\" value=\"" . PHPWEBCALENDAR_PASS ."\" size=\"45\"></td>
</tr> </tr>
<tr> <tr class=\"impair\">
<td colspan=\"2\"><input type=\"submit\" name=\"envoyer\" value=\"Enregistrer\"></td> <td colspan=\"2\"><input type=\"submit\" name=\"envoyer\" value=\"Enregistrer\"></td>
</tr>\n"; </tr>\n";
clearstatcache(); clearstatcache();
print "</table> print "
<input type=\"hidden\" name=\"action\" value=\"save\"></td> </table>
<input type=\"hidden\" name=\"action\" value=\"save\">
</form>\n"; </form>\n";
}
/* /*
* *