<?php
/***************************************************************************
- * Copyright (C) 2003-2007 Polytechnique.org *
+ * Copyright (C) 2003-2008 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
// }}}
// {{{ function get_event_participants()
-function get_event_participants($evt, $item_id, $tri, $limit = '') {
+function get_event_participants(&$evt, $item_id, $tri, $limit = '') {
global $globals;
if (Env::has('initiale')) {
$tab = array();
$user = 0;
+ $evt['adminpaid'] = 0;
+ $evt['telepaid'] = 0;
+ $evt['topay'] = 0;
+ $evt['paid'] = 0;
while ($u = $res->next()) {
if ($u['nb'] == 0) {
continue;
$pay_id, $u['uid']);
$montants = $res_->fetchColumn();
foreach ($montants as $m) {
- $p = strtr(substr($m, 0, strpos($m, "EUR")), ",", ".");
- $u['paid'] += trim($p);
+ $p = strtr(substr($m, 0, strpos($m, "EUR")), ",", ".");
+ $u['paid'] += trim($p);
}
}
$u['telepayment'] = $u['paid'] - $u['adminpaid'];
$u['montant'] += $i['montant']*$i['nb'];
}
$tab[] = $u;
+ $evt['telepaid'] += $u['telepayment'];
+ $evt['adminpaid'] += $u['adminpaid'];
+ $evt['paid'] += $u['paid'];
+ $evt['topay'] += $u['montant'];
}
return $tab;
}
$participant_list = $evt['participant_list'];
$absent_list = $evt['absent_list'];
- $email = get_user_forlife($uid);
+ $email = get_user_forlife($uid, '_silent_user_callback');
if ($email) {
$email .= '@'.$globals->mail->domain;