<?php

	$login     = $_SESSION['s_utilisateur']['login'];
	$nom       = $_SESSION['s_utilisateur']['nom'];
	$prenom    = $_SESSION['s_utilisateur']['prenom'];
	$email     = $_SESSION['s_utilisateur']['email'];
	$privilege = $_SESSION['s_utilisateur']['privilege'];
	
	$sTitle = decode_lng_text('ADMIN_TITRE');


	echo "<center><h1 class='titre_page'>".$sTitle."</h1></center>";

	echo "<br><center><h2 >".decode_lng_text('ADMIN_MODIF_TITRE')." '".$login."' (".$prenom." ".$nom.") </h2></center><br/><br/>";

	echo "<br/>";
	echo "<center><table ><tr><td height='25'>".$this->Session->message()."</td></tr></table></center>";
	echo "<br/>";

	echo "<form action='".Router::url('users/admin_edit')."' method='post' name='valid'>";
	echo "<table class='w50 txtcenter box-center'  border='0' align='center' cellpadding='10' cellspacing='0' bgcolor='#F9DFA9' class='tableaux'";
	echo "<tr><td colspan=2>&nbsp</td></tr>";
	echo "<input type=hidden name='user' id='user' value='".$login."'>";
	//echo $this->Form->input('login',decode_lng_text('ADMIN_EDIT_LOGIN'),array('value'=>$login));
	echo $this->Form->input('nom',decode_lng_text('ADMIN_EDIT_NOM'),array('value'=>$nom));
	echo $this->Form->input('prenom',decode_lng_text('ADMIN_EDIT_PRENOM'),array('value'=>$prenom));
	echo $this->Form->input('email',decode_lng_text('ADMIN_EDIT_EMAIL'),array('value'=>$email));
	if ($privilege=='admin') {
		echo $this->Form->input('privilege',decode_lng_text('ADMIN_EDIT_PRIVILEGE'),array('type'=>'select','options' =>array('admin','invité')));
	} else {
		echo $this->Form->input('privilege',decode_lng_text('ADMIN_EDIT_PRIVILEGE'),array('type'=>'select','options' =>array('invité','admin')));
	}

	echo "<tr><td height='34' colspan='2'><div align='center'><input type='submit' class='box1 bouton bouton-envoyer'  value=".decode_lng_text('PRIVATE_ENTER')."></td></tr>";
	echo "</div></table></form>";
	echo "<center><b><i>$error</i></b></center>";

	/*
* pour comprendre les libellés multi-langues
// */	
// "ADMIN_EDIT_LOGIN" =>"Identifiant",
// "ADMIN_EDIT_PSWD" =>"Mot de passe",
// "ADMIN_EDIT_NOM" =>"Nom",
// "ADMIN_EDIT_PRENOM" =>"Prénom",
// "ADMIN_EDIT_EMAIL" =>"Adresse Email",
// "ADMIN_EDIT_PRIVILEGE" =>"Privilège",
?>