Afficher une date correctement après une requête
Bonjour.
J'ai créé une petite page dont une requête affiche les derniers inscrits ; seulement, la date est affichée en "timestamp" et je ne sais pas comment faire pour l'afficher correctement.
Voici mon fichier PHP :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
| <?php
define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
$result = mysql_query('SELECT user_id, username, user_regdate FROM phpbb_users ORDER BY user_id DESC LIMIT 0 , 10');
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
$page_title = $lang['Lastreg'];
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
$template->set_filenames(array(
'body' => 'lastreg_body.tpl')
);
while( $row = mysql_fetch_array($result) )
{
$template->assign_block_vars( 'lastreg', array(
'LASTREG_USER' => stripslashes($row['username']),
'LASTREG_DATE' => $row['user_regdate']
));
}
$template->assign_vars( array(
'L_LASTREGS' => $lang['Lastregs'],
));
$template->pparse('body');
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
?> |