31,7 → 31,7 |
// | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | |
// | THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
// +------------------------------------------------------------------------------------------------------+ |
// CVS : $Id: instal_preference.inc.php,v 1.7 2004-10-25 10:22:48 jpm Exp $ |
// CVS : $Id: instal_preference.inc.php,v 1.8 2004-10-27 11:43:32 jpm Exp $ |
/** |
* Page d'initialisation de l'installation de Papyrus. |
* |
45,7 → 45,7 |
*@author Patrick PAUL |
*@author Jean-Pascal MILCENT <jpm@tela-botanica.org> |
*@copyright Tela-Botanica 2000-2004 |
*@version $Revision: 1.7 $ $Date: 2004-10-25 10:22:48 $ |
*@version $Revision: 1.8 $ $Date: 2004-10-27 11:43:32 $ |
// +------------------------------------------------------------------------------------------------------+ |
**/ |
|
89,28 → 89,31 |
'devrez modifier ce fichier manuellement (ce programme d\'installation vous dira comment).</p>'."\n"; |
|
// Nous vérifions si nous sommes en phase de test du formulaire de config des préférences |
if ($_GET['installation'] == 'verif_pref') { |
if ($_GET['installation'] == 'verif_pref' ) { |
$sortie_verif = ''; |
$sortie_verif .= testerPresenceExtension(); |
// Nous vérifions que l'utilisateur à bien saisie les infos dans les champs du formulaire |
if(empty($_POST['pref']['ADMIN_PRENOM'])) { |
$sortie_verif .= '<p class="erreur">Le champ "Prénom" ne doit pas être vide!</p>'."\n"; |
// En mise à jour, nous n'affichons pas les champs pour saisir un administrateur |
if (!defined(INSTAL_VERSION_NOUVELLE_NOM)) { |
// Nous vérifions que l'utilisateur à bien saisie les infos dans les champs du formulaire |
if(empty($_POST['pref']['ADMIN_PRENOM'])) { |
$sortie_verif .= '<p class="erreur">Le champ "Prénom" ne doit pas être vide!</p>'."\n"; |
} |
if(empty($_POST['pref']['ADMIN_NOM'])) { |
$sortie_verif .= '<p class="erreur">Le champ "Nom" ne doit pas être vide!</p>'."\n"; |
} |
if(empty($_POST['pref']['ADMIN_LOGIN'])) { |
$sortie_verif .= '<p class="erreur">Le champ "Login" ne doit pas être vide!</p>'."\n"; |
} |
if(empty($_POST['pref']['ADMIN_MAIL'])) { |
$sortie_verif .= '<p class="erreur">Le champ "Courriel" ne doit pas être vide!</p>'."\n"; |
} |
if(empty($_POST['pref']['ADMIN_MDP_01'])) { |
$sortie_verif .= '<p class="erreur">Le champ "Mot de passe" ne doit pas être vide!</p>'."\n"; |
} |
if($_POST['pref']['ADMIN_MDP_01'] != $_POST['pref']['ADMIN_MDP_02']) { |
$sortie_verif .= '<p class="erreur">Le deux mots de passes saisis pour le compte administrateur sont différents!</p>'."\n"; |
} |
} |
if(empty($_POST['pref']['ADMIN_NOM'])) { |
$sortie_verif .= '<p class="erreur">Le champ "Nom" ne doit pas être vide!</p>'."\n"; |
} |
if(empty($_POST['pref']['ADMIN_LOGIN'])) { |
$sortie_verif .= '<p class="erreur">Le champ "Login" ne doit pas être vide!</p>'."\n"; |
} |
if(empty($_POST['pref']['ADMIN_MAIL'])) { |
$sortie_verif .= '<p class="erreur">Le champ "Courriel" ne doit pas être vide!</p>'."\n"; |
} |
if(empty($_POST['pref']['ADMIN_MDP_01'])) { |
$sortie_verif .= '<p class="erreur">Le champ "Mot de passe" ne doit pas être vide!</p>'."\n"; |
} |
if($_POST['pref']['ADMIN_MDP_01'] != $_POST['pref']['ADMIN_MDP_02']) { |
$sortie_verif .= '<p class="erreur">Le deux mots de passes saisis pour le compte administrateur sont différents!</p>'."\n"; |
} |
} |
|
// Gestion de l'affichage de sortie |
152,38 → 155,41 |
$sortie_form = ''; |
$sortie_form .= ' <form action="'.donnerUrlCourante().'?installation=verif_pref" method="post">'; |
$sortie_form .= ' <ul>'."\n"; |
$sortie_form .= '<li><h2>Configuration d\'un administrateur de Papyrus</h2></li>'."\n"; |
$sortie_form .= '<li>Tous les champs ci-dessous sont obligatoires.</li>'."\n"; |
$sortie_form .= '<li>'."\n". |
'<label for="admin_prenom">Prénom :</label>'. |
'<input id="admin_prenom"'.$disabled.'type="text" size="30" name="pref[ADMIN_PRENOM]" value="'.$pref['ADMIN_PRENOM'].'" />'. |
'</li>'."\n"; |
$sortie_form .= '<li>'."\n". |
'<label for="admin_nom">Nom :</label>'. |
'<input id="admin_nom"'.$disabled.'type="text" size="30" name="pref[ADMIN_NOM]" value="'.$pref['ADMIN_NOM'].'" />'. |
'</li>'."\n"; |
$sortie_form .= '<li>'."\n". |
'<label for="admin_login">Login :</label>'. |
'<input id="admin_login"'.$disabled.'type="text" size="30" name="pref[ADMIN_LOGIN]" value="'.$pref['ADMIN_LOGIN'].'" />'. |
'</li>'."\n"; |
$sortie_form .= '<li>'."\n". |
'<label for="admin_mail">Courriel :</label>'. |
'<input id="admin_mail"'.$disabled.'type="text" size="30" name="pref[ADMIN_MAIL]" value="'.$pref['ADMIN_MAIL'].'" />'. |
'</li>'."\n"; |
$sortie_form .= '<li>'."\n". |
'<label for="admin_mdp_01">Mot de passe :</label>'. |
'<input id="admin_mdp_01"'.$disabled.'type="password" size="10" name="pref[ADMIN_MDP_01]" value="'.$pref['ADMIN_MDP_01'].'" />'. |
'</li>'."\n"; |
$sortie_form .= '<li>'."\n". |
'<label for="admin_mdp_02">Taper à nouveau votre mot de passe :</label>'. |
'<input id="admin_mdp_02"'.$disabled.'type="password" size="10" name="pref[ADMIN_MDP_02]" value="'.$pref['ADMIN_MDP_02'].'" />'. |
'</li>'."\n"; |
$sortie_form .= '<li>'."\n". |
'<label for="admin_i18n">Langue :</label>'. |
'<select id="admin_i18n"'.$disabled.'name="pref[ADMIN_I18N]">'. |
'<option value="fr-FR" selected="selected">français</option>'. |
'</select>'. |
'</li>'."\n"; |
// En mise à jour, nous n'affichons pas les champs pour saisir un administrateur |
if (!defined(INSTAL_VERSION_NOUVELLE_NOM)) { |
$sortie_form .= '<li><h2>Configuration d\'un administrateur de Papyrus</h2></li>'."\n"; |
$sortie_form .= '<li>Tous les champs ci-dessous sont obligatoires.</li>'."\n"; |
$sortie_form .= '<li>'."\n". |
'<label for="admin_prenom">Prénom :</label>'. |
'<input id="admin_prenom"'.$disabled.'type="text" size="30" name="pref[ADMIN_PRENOM]" value="'.$pref['ADMIN_PRENOM'].'" />'. |
'</li>'."\n"; |
$sortie_form .= '<li>'."\n". |
'<label for="admin_nom">Nom :</label>'. |
'<input id="admin_nom"'.$disabled.'type="text" size="30" name="pref[ADMIN_NOM]" value="'.$pref['ADMIN_NOM'].'" />'. |
'</li>'."\n"; |
$sortie_form .= '<li>'."\n". |
'<label for="admin_login">Login :</label>'. |
'<input id="admin_login"'.$disabled.'type="text" size="30" name="pref[ADMIN_LOGIN]" value="'.$pref['ADMIN_LOGIN'].'" />'. |
'</li>'."\n"; |
$sortie_form .= '<li>'."\n". |
'<label for="admin_mail">Courriel :</label>'. |
'<input id="admin_mail"'.$disabled.'type="text" size="30" name="pref[ADMIN_MAIL]" value="'.$pref['ADMIN_MAIL'].'" />'. |
'</li>'."\n"; |
$sortie_form .= '<li>'."\n". |
'<label for="admin_mdp_01">Mot de passe :</label>'. |
'<input id="admin_mdp_01"'.$disabled.'type="password" size="10" name="pref[ADMIN_MDP_01]" value="'.$pref['ADMIN_MDP_01'].'" />'. |
'</li>'."\n"; |
$sortie_form .= '<li>'."\n". |
'<label for="admin_mdp_02">Taper à nouveau votre mot de passe :</label>'. |
'<input id="admin_mdp_02"'.$disabled.'type="password" size="10" name="pref[ADMIN_MDP_02]" value="'.$pref['ADMIN_MDP_02'].'" />'. |
'</li>'."\n"; |
$sortie_form .= '<li>'."\n". |
'<label for="admin_i18n">Langue :</label>'. |
'<select id="admin_i18n"'.$disabled.'name="pref[ADMIN_I18N]">'. |
'<option value="fr-FR" selected="selected">français</option>'. |
'</select>'. |
'</li>'."\n"; |
} |
$sortie_form .= '<li><h2>Configuration de l\'URL</h2></li>'."\n"; |
$sortie_form .= '<li>L\'URL courante dans la barre d\'adresse de votre navigateur devrait correspondre à la valeur '. |
'présente dans le champ ci-dessous. Si ce n\'est pas le cas, veuillez corriger la valeur ci-dessous.'."\n"; |
235,6 → 241,9 |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.7 2004/10/25 10:22:48 jpm |
* Correction de quelques bogues, ajouts d'explications pour l'utilisateur et modification des styles CSS. |
* |
* Revision 1.6 2004/10/22 17:23:04 jpm |
* Simplification del'installation de Papyrus. |
* |