function to_rss ($s)
{
if(is_string($s)) {
- return utf8_encode($s);
+ return iconv('ISO_8859-15', 'UTF8', $s);
} else {
return $s;
}
{
return array(
'events' => $this->make_hook('ev', AUTH_COOKIE),
+ 'rss' => $this->make_hook('rss', AUTH_PUBLIC),
'send_bug' => $this->make_hook('bug', AUTH_COOKIE),
'events/submit' => $this->make_hook('ev_submit', AUTH_MDP),
'admin/events' => $this->make_hook('admin_events', AUTH_MDP, 'admin'),
);
}
+ function handler_rss(&$page, $user = null, $hash = null)
+ {
+ require_once 'rss.inc.php';
+
+ $uid = init_rss('rss.tpl', $user, $hash);
+
+ $rss = XDB::iterator(
+ 'SELECT e.id, e.titre, e.texte, e.creation_date,
+ IF(u2.nom_usage = "", u2.nom, u2.nom_usage) AS nom, u2.prenom, u2.promo
+ FROM auth_user_md5 AS u
+ INNER JOIN evenements AS e ON ( (e.promo_min = 0 || e.promo_min <= u.promo)
+ AND (e.promo_max = 0 || e.promo_max >= u.promo) )
+ INNER JOIN auth_user_md5 AS u2 ON (u2.user_id = e.user_id)
+ WHERE u.user_id = {?} AND FIND_IN_SET(e.flags, "valide")
+ AND peremption >= NOW()', $uid);
+ $page->assign('rss', $rss);
+ }
+
function handler_ev_submit(&$page)
{
$page->changeTpl('evenements.tpl');
$valid_mesg = Post::v('valid_mesg');
$action = Post::v('action');
- if ($promo_min > $promo_max ||
+ if (($promo_min > $promo_max && $promo_max != 0)||
($promo_min != 0 && ($promo_min <= 1900 || $promo_min >= 2020)) ||
($promo_max != 0 && ($promo_max <= 1900 || $promo_max >= 2020)))
{
'recovery' => $this->make_hook('recovery', AUTH_PUBLIC),
'exit' => $this->make_hook('exit', AUTH_PUBLIC),
'deconnexion.php' => $this->make_hook('exit', AUTH_PUBLIC),
-
- // happenings related thingies
- 'rss' => $this->make_hook('rss', AUTH_PUBLIC),
);
}
$page->changeTpl('exit.tpl');
}
}
-
- function handler_rss(&$page, $user = null, $hash = null)
- {
- require_once 'rss.inc.php';
-
- $uid = init_rss('rss.tpl', $user, $hash);
-
- $rss = XDB::iterator(
- 'SELECT e.id, e.titre, e.texte, e.creation_date,
- IF(u2.nom_usage = "", u2.nom, u2.nom_usage) AS nom, u2.prenom, u2.promo
- FROM auth_user_md5 AS u
- INNER JOIN evenements AS e ON ( (e.promo_min = 0 || e.promo_min <= u.promo)
- AND (e.promo_max = 0 || e.promo_max >= u.promo) )
- INNER JOIN auth_user_md5 AS u2 ON (u2.user_id = e.user_id)
- WHERE u.user_id = {?} AND FIND_IN_SET(e.flags, "valide")
- AND peremption >= NOW()', $uid);
- $page->assign('rss', $rss);
- }
}
?>
}
if (!$art['public'] &&
- ($art['promo_min'] > $art['promo_max'] ||
+ (($art['promo_min'] > $art['promo_max'] && $art['promo_max'] != 0) ||
($art['promo_min'] != 0 && ($art['promo_min'] <= 1900 || $art['promo_min'] >= 2020)) ||
($art['promo_max'] != 0 && ($art['promo_max'] <= 1900 || $art['promo_max'] >= 2020))))
{
if (preg_match('/^\d{14}$/', $d)) {
$t = mktime(substr($d,8,2), substr($d,10,2), substr($d,12,2), substr($d,4,2), substr($d,6,2), substr($d,0,4));
+ } elseif (preg_match('/^\d{8}$/', $d)) {
+ $t = mktime(0, 0, 0, substr($d,4,2), substr($d,6,2), substr($d,0,4));
} elseif (is_numeric($d)) {
$t = intval($d);
} else {
interprétée comme polémique par un membre de la communauté polytechnicienne.
</p>
- <p>
- <a href="events/submit">Proposer une information événementielle</a>
+ <p class="center">
+ <a href="events/submit">{icon name=add}Proposer une information événementielle</a>
</p>
{/if}
</td>
</tr>
{/iterate}
+ {if $is_admin}
+ <tr class="pair">
+ <td class="center">
+ <a href="{$platal->ns}announce/new">{icon name=add} Ajouter une annonce</a>
+ </td>
+ </tr>
+ {/if}
</table>
-{/if}
<br />
<br />
{/iterate}
</div>
-{/if}
-{if $is_admin}
+<p style="text-align: justify;">
+<small>
+<em>Nota Bene :</em> les informations présentées ici n'engagent que leurs auteurs
+respectifs et sont publiées à leur initiative. L'association Polytechnique.org
+ne pourrait en aucun cas être tenue responsable de la nature des propos relatés
+sur cet espace d'expression et d'information. Elle se réserve le droit de
+refuser ou de retirer toute information de nature diffamante ou pouvant être
+interprétée comme polémique par un membre de la communauté polytechnicienne.
+</small>
+</p>
+{/if}
+{elseif $is_admin}
<div class="center">
- [<a href="{$platal->ns}announce/new">Ajouter une annonce</a>]
+ [<a href="{$platal->ns}announce/new">{icon name=add} Ajouter une annonce</a>]
</div>
{/if}