$res = $globals->xdb->query("
SELECT deadline_inscription,
LEFT(NOW(), 10) AS now,
+ noinvite,
membres_only
FROM groupex.evenements
WHERE eid = {?}", $eid);
$inscriptions[$j] = 0;
// avoid floating count if other field incorrect
$inscriptions[$j] = floor($inscriptions[$j]);
+ // avoid invite if no invite allowed
+ if ($inscriptions[$j] > 1 && $e['noinvite'])
+ $inscriptions[$j] = 1;
$total_inscr += $inscriptions[$j];
}
$unsubscribing = ($total_inscr == 0);
e.debut, e.fin,
LEFT(10,e.debut) AS debut_day,
LEFT(10,e.fin) AS fin_day,
- e.paiement_id, e.membres_only,
+ e.paiement_id, e.membres_only, e.noinvite,
e.show_participants, u.nom, u.prenom, u.promo, a.alias, MAX(ep.nb) AS inscrit,
MAX(ep.paid) AS paid,
e.short_name,
$evt['membres_only'] = Post::get('membres_only');
$evt['advertise'] = Post::get('advertise');
$evt['show_participants'] = Post::get('show_participants');
+ $evt['noinvite'] = Post::get('noinvite');
if (!$short_name) $short_name = '';
$evt['short_name'] = $short_name;
$evt['deadline_inscription'] = (Post::get('deadline', 'off')=='on')?null:(Post::get('inscr_Year')."-".Post::get('inscr_Month')."-".Post::get('inscr_Day'));
paiement_id = {?}, descriptif = {?},
debut = {?}, fin = {?},
membres_only = {?}, advertise = {?}, show_participants = {?},
- short_name = {?}, deadline_inscription = {?}",
+ short_name = {?}, deadline_inscription = {?}, noinvite = {?}",
$evt['eid'], $evt['asso_id'], $evt['organisateur_uid'], $evt['intitule']
, $evt['paiement_id'], $evt['descriptif'],
$evt['debut'], $evt['fin'],
$evt['membres_only'], $evt['advertise'], $evt['show_participants'],
- $evt['short_name'], $evt['deadline_inscription']);
+ $evt['short_name'], $evt['deadline_inscription'], $evt['noinvite']);
// if new event, get its id
if (!$eid) {
// when modifying an old event retreive the old datas
if ($eid) {
$res = $globals->xdb->query(
- "SELECT eid, intitule, descriptif, debut, fin, membres_only, advertise, show_participants, paiement_id, short_name, deadline_inscription
+ "SELECT eid, intitule, descriptif, debut, fin, membres_only, advertise, show_participants, paiement_id, short_name, deadline_inscription, noinvite
FROM groupex.evenements
WHERE eid = {?}", $eid);
$evt = $res->fetchOneAssoc();
{if $e.inscr_open}
<input type="radio" name="moment{$e.eid}_{$m.item_id}" value="0"
{if !$m.nb}checked="checked"{/if}/>non
- <input type="radio" name="moment{$e.eid}_{$m.item_id}" value="1"
- {if $m.nb eq 1}checked="checked"{/if}/>seul<br />
- <input type="radio" name="moment{$e.eid}_{$m.item_id}" value="2"
- {if $m.nb > 1}checked="checked"{/if}/>avec <input size="2" name="personnes{$e.eid}_{$m.item_id}" value="{if $m.nb > 1}{math equation="x - y" x=$m.nb y=1}{else}1{/if}"/> personnes
+ {if $e.noinvite}
+ <input type="radio" name="moment{$e.eid}_{$m.item_id}" value="1"
+ {if $m.nb eq 1}checked="checked"{/if}/>oui
+ {else}
+ <input type="radio" name="moment{$e.eid}_{$m.item_id}" value="1"
+ {if $m.nb eq 1}checked="checked"{/if}/>seul<br />
+ <input type="radio" name="moment{$e.eid}_{$m.item_id}" value="2"
+ {if $m.nb > 1}checked="checked"{/if}/>avec <input size="2" name="personnes{$e.eid}_{$m.item_id}" value="{if $m.nb > 1}{math equation="x - y" x=$m.nb y=1}{else}1{/if}"/> personnes
+ {/if}
{else}
{if !$m.nb}
Je ne viendrai pas.
{elseif $m.nb eq 1}
- Je viendrai seul.
+ Je viendrai{if !$e.noinvite} seul{/if}.
{else}
Je viendrai avec {$m.nb} personne{if $m.nb > 2}s{/if}
{/if}