- $tri = (Env::get('order') == 'alpha' ? 'promo, nom, prenom' : 'nom, prenom, promo');
- $whereitemid = is_null($item_id) ? '' : "AND ep.item_id = $item_id";
- $res = XDB::iterRow(
- 'SELECT UPPER(SUBSTRING(IF(u.nom IS NULL, m.nom,
- IF(u.nom_usage<>"", u.nom_usage, u.nom)), 1, 1)),
- COUNT(DISTINCT ep.uid)
- FROM groupex.evenements_participants AS ep
- INNER JOIN groupex.evenements AS e ON (ep.eid = e.eid)
- LEFT JOIN groupex.membres AS m ON ( ep.uid = m.uid AND e.asso_id = m.asso_id)
- LEFT JOIN auth_user_md5 AS u ON ( u.user_id = ep.uid )
- WHERE ep.eid = {?} '.$whereitemid.'
- GROUP BY UPPER(SUBSTRING(IF(u.nom IS NULL,m.nom,u.nom), 1, 1))', $eid);
-
- $alphabet = array();
- $nb_tot = 0;
- while (list($char, $nb) = $res->next()) {
- $alphabet[ord($char)] = $char;
- $nb_tot += $nb;
- if (Env::has('initiale') && $char == strtoupper(Env::get('initiale'))) {
- $tot = $nb;
- }
- }
- ksort($alphabet);
- $page->assign('alphabet', $alphabet);
-
- $ofs = Env::getInt('offset');
- $tot = Env::get('initiale') ? $tot : $nb_tot;
- $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) {
- $page->assign('links', $links);
+ if ($evt['paiement_id']) {
+ $infos = User::getBulkUsersWithUIDs(
+ XDB::fetchAllAssoc('SELECT t.uid, t.amount
+ FROM payment_transactions AS t
+ LEFT JOIN group_event_participants AS ep ON(ep.uid = t.uid AND ep.eid = {?})
+ WHERE t.ref = {?} AND ep.uid IS NULL',
+ $evt['eid'], $evt['paiement_id']),
+ 'uid', 'user');
+ $page->assign('oublis', count($infos));
+ $page->assign('oubliinscription', $infos);