{
$page->changeTpl('marketing/index.tpl');
- $page->assign('xorg_title','Polytechnique.org - Marketing');
+ $page->setTitle('Polytechnique.org - Marketing');
// Quelques statistiques
}
if ($action == 'del') {
+ S::assert_xsrf_token();
Marketing::clear($uid, $value);
}
}
if ($action == 'relforce') {
+ S::assert_xsrf_token();
+
$market = Marketing::get($uid, Post::v('to'));
if (is_null($market)) {
$market = new Marketing($uid, Post::v('to'), 'default', null, 'staff');
}
$market->send(Post::v('title'), Post::v('message'));
- $page->trigSuccess("Mail envoyé");
+ $page->trigSuccess("Email envoyé");
}
if ($action == 'insrel') {
+ S::assert_xsrf_token();
if (Marketing::relance($uid)) {
$page->trigSuccess('relance faite');
}
$email = valide_email(Post::v('mail'));
}
if (Post::has('valide') && isvalid_email_redirection($email)) {
+ S::assert_xsrf_token();
+
// security stuff
check_email($email, "Proposition d'une adresse surveillee pour " . $user['forlife'] . " par " . S::v('forlife'));
- $res = XDB::query("SELECT state
+ $res = XDB::query("SELECT e.flags
FROM emails AS e
INNER JOIN aliases AS a ON (a.id = e.uid)
WHERE e.email = {?} AND a.alias = {?}", $email, $user['forlife']);
$page->assign('promo', $promo);
if (Post::has('valide')) {
- require_once('xorg.misc.inc.php');
+ S::assert_xstf_token();
$email = trim(Post::v('mail'));
if (!isvalid_email_redirection($email)) {