+ } else {
+ global $globals;
+ require_once 'marketing.inc.php';
+
+ $sender = User::getSilent(S::v('uid'));
+ $market = new AnnuaireMarketing(null, true);
+ $text = $market->getText(array(
+ 'sexe' => $user->isFemale(),
+ 'forlife_email' => $user->login() . '@' . $globals->mail->domain,
+ 'forlife_email2' => $user->login() . '@' . $globals->mail->domain2
+ ));
+ $text = str_replace('%%hash%%', '', $text);
+ $text = str_replace('%%personal_notes%%', '<em id="personal_notes_display"></em>', $text);
+ $text = str_replace('%%sender%%',
+ "<span id=\"sender\">" . $sender->fullName() . '</span>', $text);
+ $page->assign('text', nl2br($text));
+ // TODO (JAC): define a unique Xorg signature for all the emails we send.
+ $page->assign('xorg_signature', "L'équipe de Polytechnique.org,<br />Le portail des élèves & anciens élèves de l'École polytechnique");
+ $page->assign('perso_signature', $sender->fullName());