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(themePath('../user/display.php'));
include_once(themePath('../lib/input_helpers.php'));
//////////////////////////////////////////
///// déconnexion utilisateur authentifié
//////////////////////////////////////////
header("Location: ". $_SERVER['HTTP_REFERER']);
//////////////////////////////////////////
/////affichage formulaire Password
//////////////////////////////////////////
echo '<h2>'. ucfirst(_t('user', 'forgot_pass')). '</h2>';
if(isset ($_REQUEST['token'])) {
$user_email= $r[0]['profile_email'];
$user_login= $r[0]['user_login'];
$user_id= $r[0]['user_id'];
include_once('../class/class.user.php');
$new_pass = $user->GetNewPassword();
$res = $user->UpdateUserPassword($user_id, $new_pass, $GLOBALS['sql_object']);
$user->resetPasskey($user_id, $GLOBALS['sql_object']);
$todo_mail= 'change_pass';
include_once(themePath('../user/mail_actions.php'));
include_once('../mail/template.php');
echo '<div class="info">'. _t('user', 'new_password_confirmation'). '</div>';
//////////////////////////////////////////
/////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']) || isset ($_POST['valid_x'])) {
include_once('../class/class.user.php');
$data_table_user[0] = $u_login = $_POST['login'];
$data_table_user[1] = $u_mail = $_POST['email'];
$data_table_user[2] = 'N'; // Affichage public de l'email (par défaut Non)
$data_table_user[3] = $_POST['firstname'];
$data_table_user[4] = $_POST['lastname'];
$data_table_user[5] = $u_password = $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(themePath('../user/mail_actions.php'));
include_once(themePath('../mail/template.php'));
$result= $user_object->AddUser($data_table_user, $data_table_right, $GLOBALS['sql_object']);
echo '<h1>'. _t('divers','user_inscription'). '</h1>'. END_LINE;
echo '<div class="sub-title">';
echo _t('user','h1_public_comment_insc');
if(isset ($msg)) echo $msg;
if(!isset ($result) || (isset ($result) && !is_numeric($result))) echo AuthForm('SUBSCRIBE');
//////////////////////////////////////////
/////affichage prefs utilisateurs
//////////////////////////////////////////
if(isset ($_REQUEST['login'])) {
if($auth_value === true) header("Location: ". $_POST['referer']);
if(isset ($_COOKIE['linea21']['id'])) {
$content = '<h1>'. _t('user','p_mod'). ' - ' . $_COOKIE['linea21']['login']. '</h1>'. END_LINE;
$content.= '<div class="sub-title">';
$content.= _t('user','h1_public_comment');
// confirmation message on changes
if(isset ($_REQUEST['notifyUpdate'])) {
if(isset ($_REQUEST['current_email'])) {
echo '<h1>'. _t('user','preferences'). '</h1>'. END_LINE;
echo '<div class="sub-title">';
echo _t('user','h1_public_comment_auth');
echo '<div id="cookieEnabled"></div>';
echo '<script type="text/javascript">cookieAlert("#cookieEnabled", "'. _t('alert', 'cookie_disabled'). '");</script>';
|