Ciao.
Sto cercando di eseguire una funzione che fa un UPDATE su una data nel DB in una pagina custom del forum.
Mi spiego meglio voglio che quando un utente clicca su una determinata immagine venga richiamata una determinata funzione.

Per ora ho provato inserendo nel file php della pagina la mia funzione:
custompage.php
Codice PHP:
?php
define
('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include(
$phpbb_root_path . 'common.' . $phpEx);
// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup();
page_header('pagina test');

Function
Test_UPD_Date ()
{
global
$db;
$sql = 'UPDATE ' . USERS_TABLE . ' SET Test_Data = current_timestamp WHERE user_id = ' . $user -> data['user_id'];
$db->sql_query($sql);
}

if (
$user -> data['group_id'] == 5 ||
$user -> data['group_id'] == 8 )
{

} else {
login_box('', $user->lang['LOGIN']);
}
$template->set_filenames(array(
'body' => 'paginatest.html',
));
make_jumpbox(append_sid("{$phpbb_root_path}viewforum.$phpEx"));
page_footer();
?>

Ora non so come richiamarla dal evento click nel mio file template.
Grazie 1000000000