assign('xorg_title','Polytechnique.org - Mes préférences'); if (Env::has('mail_fmt')) { $fmt=Env::get('mail_fmt'); if ($fmt != 'texte') $fmt = 'html'; $globals->xdb->execute(" UPDATE auth_user_quick SET core_mail_fmt = '$fmt' WHERE user_id = {?}", Session::getInt('uid')); $_SESSION['mail_fmt'] = $fmt; redirect('preferences.php'); } if (Env::has('rss')) { if (Env::getBool('rss')) { $_SESSION['core_rss_hash'] = rand_url_id(16); $globals->xdb->execute('UPDATE auth_user_quick SET core_rss_hash={?} WHERE user_id={?}', Session::get('core_rss_hash'), Session::getInt('uid')); } else { $globals->xdb->execute('UPDATE auth_user_quick SET core_rss_hash="" WHERE user_id={?}', Session::getInt('uid')); Session::kill('core_rss_hash'); } redirect('preferences.php'); } $page->assign('prefs', $globals->hook->prefs()); $page->run(); // vim:set et sw=4 sts=4 sws=4: ?>