Source for file tpl_user.php
Documentation is available at tpl_user.php
* @author linea21 <info@linea21.com>
* @license http://opensource.org/licenses/gpl-3.0.html
include_once('../user/display.php');
include_once('../lib/input_helpers.php');
//////////////////////////////////////////
///// déconnexion utilisateur authentifié
//////////////////////////////////////////
header("Location: ". SITE_CITY_URL);
SetHTMLTitle($GLOBALS['lang']['user']['section']); // set HTML title
//////////////////////////////////////////
/////affichage profil utilisateur
//////////////////////////////////////////
/** préparation des variables
if(isset ($_REQUEST['id'])) $id= $_REQUEST['id']; else $id=- 1;
/** Détail d'un utilisateur
if(isset ($_REQUEST['id'])) {
//////////////////////////////////////////
/////affichage formulaire inscription utilisateur
//////////////////////////////////////////
if(ActiveItemKey($GLOBALS['activeitem']) == 'user-registration') {
if(isset ($_POST['valid'])) {
include_once('../class/class.user.php');
$data_table_user[0]= $_POST['login'];
$data_table_user[1]= $_POST['email'];
$data_table_user[2]= 'N'; // Affichage public de l'email ( par défaut Non
$data_table_user[3] = $user_object -> GetNewPassword();
$data_table_right= $user_object->InitUserRight('SIMPLE_USER');
$result= $user_object->CheckDataIntegrity($data_table_user, $GLOBALS['sql_object']);
/** include envoi de mail */
include_once('../user/mail_actions.php');
include_once('../mail/template.php');
$result= $user_object->AddUser($data_table_user, $data_table_right, $GLOBALS['sql_object']);
if(is_numeric($result)) $msg= '<p class="confirm">'. $GLOBALS['lang']['user']['confirm_public']. '</p>'. END_LINE;
SetHTMLTitle($GLOBALS['lang']['divers']['user_inscription']);
echo '<h1>'. $GLOBALS['lang']['divers']['user_inscription']. '</h1>'. END_LINE;
echo '<div class="h1_comment" id="h1_user_insc">';
echo $GLOBALS['lang']['user']['h1_public_comment_insc'];
if(isset ($msg)) echo $msg;
//////////////////////////////////////////
/////affichage prefs utilisateurs
//////////////////////////////////////////
SetHTMLTitle($GLOBALS['lang']['divers']['auth']. ' / '. $GLOBALS['lang']['user']['p_mod']);
if(isset ($_REQUEST['login'])) {
if(isset ($_COOKIE['linea21']['id'])) {
$content = '<h1>'. $GLOBALS['lang']['user']['p_mod']. ' - ' . $_COOKIE['linea21']['login']. '</h1>'. END_LINE;
$content.= '<div class="h1_comment" id="h1_user">';
$content.= $GLOBALS['lang']['user']['h1_public_comment'];
if(isset ($_REQUEST['current_email'])) {
echo '<h1>'. $GLOBALS['lang']['divers']['auth']. '</h1>'. END_LINE;
echo '<div class="h1_comment" id="h1_user_auth">';
echo $GLOBALS['lang']['user']['h1_public_comment_auth'];
|