* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
- parent::__construct('axletter/letter.tpl', 'ax.css', 'ax/show');
+ parent::__construct('axletter/letter.mail.tpl', 'ax.css', 'ax/show', 'axletter', 'axletter_ins');
list($this->_id, $this->_shortname, $this->_title_mail, $this->_title,
$this->_body, $this->_signature, $this->_promo_min, $this->_promo_max,
$this->_echeance, $this->_date, $this->_bits) = $id;
list($this->_id, $this->_shortname, $this->_title_mail, $this->_title,
$this->_body, $this->_signature, $this->_promo_min, $this->_promo_max,
$this->_echeance, $this->_date, $this->_bits) = $id;
LEFT JOIN aliases AS a ON(u.user_id=a.id AND FIND_IN_SET('bestalias',a.flags))
LEFT JOIN emails AS e ON(e.uid=u.user_id AND e.flags='active')
WHERE ni.last < {?} AND {$this->subscriptionWhere()}
LEFT JOIN aliases AS a ON(u.user_id=a.id AND FIND_IN_SET('bestalias',a.flags))
LEFT JOIN emails AS e ON(e.uid=u.user_id AND e.flags='active')
WHERE ni.last < {?} AND {$this->subscriptionWhere()}
FROM axletter_ins
WHERE user_id={?}", $user);
return $res->fetchOneCell();
FROM axletter_ins
WHERE user_id={?}", $user);
return $res->fetchOneCell();
static public function unsubscribe($uid = null, $hash = false)
{
$user = is_null($uid) ? S::v('uid') : $uid;
static public function unsubscribe($uid = null, $hash = false)
{
$user = is_null($uid) ? S::v('uid') : $uid;
if (!is_numeric($uid)) {
$res = XDB::query("SELECT id FROM aliases WHERE alias = {?}", $uid);
$uid = $res->fetchOneCell();
if (!is_numeric($uid)) {
$res = XDB::query("SELECT id FROM aliases WHERE alias = {?}", $uid);
$uid = $res->fetchOneCell();
- {
- $res = XDB::query("SELECT IF(shortname IS NULL, id, shortname) as id, date, subject AS titre
+ {
+ $res = XDB::query("SELECT IF(short_name IS NULL, id, short_name) as id, date, subject AS titre
- {
- $res = XDB::query("SELECT IF(shortname IS NULL, id, shortname) as id, date, subject AS titre
+ {
+ $res = XDB::query("SELECT IF(short_name IS NULL, id, short_name) as id, date, subject AS titre