* 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 *
$res = XDB::query("SELECT asso_id, short_name FROM groupex.evenements
WHERE eid = {?} AND asso_id = {?}",
$res = XDB::query("SELECT asso_id, short_name FROM groupex.evenements
WHERE eid = {?} AND asso_id = {?}",
XDB::execute("DELETE FROM requests
WHERE type = 'paiements' AND data LIKE {?}",
PayReq::same_event($eid, $globals->asso('id')));
XDB::execute("DELETE FROM requests
WHERE type = 'paiements' AND data LIKE {?}",
PayReq::same_event($eid, $globals->asso('id')));
$page->assign('archive', $archive);
$evenements = XDB::iterator(
$page->assign('archive', $archive);
$evenements = XDB::iterator(
- "SELECT e.*, LEFT(10, e.debut) AS debut_day, LEFT(10, e.fin) AS fin_day,
+ "SELECT e.*, LEFT(10, e.debut) AS first_day, LEFT(10, e.fin) AS last_day,
IF(e.deadline_inscription, e.deadline_inscription >= LEFT(NOW(), 10),
1) AS inscr_open, e.deadline_inscription,
u.nom, u.prenom, u.promo, a.alias,
IF(e.deadline_inscription, e.deadline_inscription >= LEFT(NOW(), 10),
1) AS inscr_open, e.deadline_inscription,
u.nom, u.prenom, u.promo, a.alias,
if (Env::has('updated') && $e['eid'] == Env::i('updated')) {
$page->assign('updated', $e);
}
if (Env::has('updated') && $e['eid'] == Env::i('updated')) {
$page->assign('updated', $e);
}
+ if ($evt === false) {
+ global $globals, $platal;
+ $url = $globals->asso('sub_url');
+ if (empty($url)) {
+ $url = $platal->ns . 'subscribe';
+ }
+ $page->kill('Cet événement est reservé aux membres du groupe ' . $globals->asso('nom') .
+ '. Pour devenir membre, rends-toi sur la page de <a href="' . $url . '">demande d\'inscripton</a>.');
+ }
// impossible to unsubscribe if you already paid sthing
if (!array_sum($subs) && $evt['paid'] != 0) {
// impossible to unsubscribe if you already paid sthing
if (!array_sum($subs) && $evt['paid'] != 0) {
- $page->trig("Impossible de te désinscrire complètement ".
- "parce que tu as fait un paiement par ".
- "chèque ou par liquide. Contacte un ".
- "administrateur du groupe si tu es sûr de ".
- "ne pas venir");
+ $page->trigError("Impossible de te désinscrire complètement ".
+ "parce que tu as fait un paiement par ".
+ "chèque ou par liquide. Contacte un ".
+ "administrateur du groupe si tu es sûr de ".
+ "ne pas venir");
subscribe_lists_event($total, S::i('uid'), $evt);
}
$page->assign('event', get_event_detail($eid));
subscribe_lists_event($total, S::i('uid'), $evt);
}
$page->assign('event', get_event_detail($eid));
$page->assign('moments', $moments);
if (Post::v('intitule')) {
$page->assign('moments', $moments);
if (Post::v('intitule')) {
$short_name = event_change_shortname($page, $eid,
$infos['short_name'],
Env::v('short_name', ''));
$short_name = event_change_shortname($page, $eid,
$infos['short_name'],
Env::v('short_name', ''));
// request for a new payment
if (Post::v('paiement_id') == -1 && $money_defaut >= 0) {
require_once 'validations.inc.php';
// request for a new payment
if (Post::v('paiement_id') == -1 && $money_defaut >= 0) {
require_once 'validations.inc.php';
Post::v('intitule')." - ".$globals->asso('nom'),
Post::v('site'), $money_defaut,
Post::v('confirmation'), 0, 999,
Post::v('intitule')." - ".$globals->asso('nom'),
Post::v('site'), $money_defaut,
Post::v('confirmation'), 0, 999,
ORDER BY nom, prenom, promo", $evt['eid']);
$ofs = Env::i('offset');
ORDER BY nom, prenom, promo", $evt['eid']);
$ofs = Env::i('offset');
- $tot = (Env::v('initiale') ? $tot : $nb_tot) - $absents->total();
- $nbp = intval(($tot-1)/NB_PER_PAGE);
- $links = array();
- if ($ofs) {
- $links['précédent'] = $ofs-1;
- }
- for ($i = 0; $i <= $nbp; $i++) {
- $links[(string)($i+1)] = $i;
- }
- if ($ofs < $nbp) {
- $links['suivant'] = $ofs+1;
- }
- if (count($links)>1) {
+ $tot = (Env::v('initiale') ? $tot : $nb_tot);
+ $nbp = ceil($tot / NB_PER_PAGE);
+ if ($nbp > 1) {
+ $links = array();
+ if ($ofs) {
+ $links['précédent'] = $ofs - 1;
+ }
+ for ($i = 1 ; $i <= $nbp; $i++) {
+ $links[(string)$i] = $i - 1;
+ }
+ if ($ofs < $nbp) {
+ $links['suivant'] = $ofs+1;
+ }