function handler_index(&$page)
{
- if (logged()) {
+ if (S::logged()) {
redirect("events");
}
}
$_SESSION['core_rss_hash'] = rand_url_id(16);
XDB::execute('UPDATE auth_user_quick
SET core_rss_hash={?} WHERE user_id={?}',
- Session::get('core_rss_hash'),
- Session::getInt('uid'));
+ S::v('core_rss_hash'), S::v('uid'));
} else {
XDB::execute('UPDATE auth_user_quick
SET core_rss_hash="" WHERE user_id={?}',
- Session::getInt('uid'));
- Session::kill('core_rss_hash');
+ S::v('uid'));
+ S::kill('core_rss_hash');
}
}
XDB::execute("UPDATE auth_user_quick
SET core_mail_fmt = '$fmt'
WHERE user_id = {?}",
- Session::getInt('uid'));
+ S::v('uid'));
$_SESSION['mail_fmt'] = $fmt;
redirect($globals->baseurl.'/preferences');
}
$page->assign('xorg_title','Polytechnique.org - Redirection de page WEB');
- $log =& Session::getMixed('log');
+ $log =& S::v('log');
$url = Env::get('url');
if (Env::get('submit') == 'Valider' and Env::has('url')) {
XDB::execute('UPDATE auth_user_quick
SET redirecturl = {?} WHERE user_id = {?}',
- $url, Session::getInt('uid'));
+ $url, S::v('uid'));
$log->log('carva_add', 'http://'.Env::get('url'));
$page->trig("Redirection activée vers <a href='http://$url'>$url</a>");
} elseif (Env::get('submit') == "Supprimer") {
XDB::execute("UPDATE auth_user_quick
SET redirecturl = ''
WHERE user_id = {?}",
- Session::getInt('uid'));
+ S::v('uid'));
$log->log("carva_del", $url);
Post::kill('url');
$page->trig('Redirection supprimée');
$res = XDB::query('SELECT redirecturl
FROM auth_user_quick
WHERE user_id = {?}',
- Session::getInt('uid'));
+ S::v('uid'));
$page->assign('carva', $res->fetchOneCell());
}
XDB::execute('UPDATE auth_user_md5
SET password={?}
WHERE user_id={?}', $password,
- Session::getInt('uid'));
+ S::v('uid'));
- $log =& Session::getMixed('log');
+ $log =& S::v('log');
$log->log('passwd', '');
if (Cookie::get('ORGaccess')) {
$page->changeTpl('acces_smtp.tpl');
$page->assign('xorg_title','Polytechnique.org - Acces SMTP/NNTP');
- $uid = Session::getInt('uid');
+ $uid = S::v('uid');
$pass = Env::get('smtppass1');
- $log = Session::getMixed('log');
+ $log = S::v('log');
if (Env::get('op') == "Valider" && strlen($pass) >= 6
&& Env::get('smtppass1') == Env::get('smtppass2'))
XDB::execute('UPDATE auth_user_quick
SET skin={?} WHERE user_id={?}',
Env::getInt('newskin'),
- Session::getInt('uid'));
+ S::v('uid'));
set_skin();
}
function handler_exit(&$page, $level = null)
{
- if (Session::has('suid')) {
- if (Session::has('suid')) {
- $a4l = Session::get('forlife');
- $suid = Session::getMixed('suid');
- $log = Session::getMixed('log');
- $log->log("suid_stop", Session::get('forlife') . " by " . $suid['forlife']);
+ if (S::has('suid')) {
+ if (S::has('suid')) {
+ $a4l = S::v('forlife');
+ $suid = S::v('suid');
+ $log = S::v('log');
+ $log->log("suid_stop", S::v('forlife') . " by " . $suid['forlife']);
$_SESSION = $suid;
- Session::kill('suid');
+ S::kill('suid');
redirect($globals->baseurl.'/admin/utilisateurs.php?login='.$a4l);
} else {
redirect("events");