$session['contributions'] = serialize($contribs); $list_contribs = $contribs->getContributionsList(true); //assign pagination variables to the template and add pagination links $contribs->setSmartyPagination($tpl); $tpl->assign('page_title', _T("Contributions managment")); $tpl->assign('max_amount', $contribs->max_amount); $tpl->assign('require_dialog', true); $tpl->assign('require_calendar', true); if (isset($error_detected)) { $tpl->assign('error_detected', $error_detected); } if (isset($warning_detected)) { $tpl->assign('warning_detected', $warning_detected); } $tpl->assign('list_contribs', $list_contribs); $tpl->assign('contributions', $contribs); if ($contribs->filtre_cotis_adh != null && !$ajax) { $member = new Galette\Entity\Adherent(); $member->load($contribs->filtre_cotis_adh); $tpl->assign('member', $member); } $tpl->assign('nb_contributions', $contribs->getCount()); $tpl->assign('mode', 'std'); if ($ajax) { $tpl->assign('mode', 'ajax'); $tpl->display('gestion_contributions.tpl'); } else { $content = $tpl->fetch('gestion_contributions.tpl'); $tpl->assign('content', $content); $tpl->display('page.tpl'); }
if (($login->isAdmin() || $login->isStaff()) && isset($_GET['id_adh']) && $_GET['id_adh'] != '') { if ($_GET['id_adh'] == 'all') { $trans->filtre_cotis_adh = null; } else { $trans->filtre_cotis_adh = $_GET['id_adh']; } } if ($login->isAdmin() || $login->isStaff()) { $trans_id = get_numeric_form_value('sup', ''); if ($trans_id != '') { $trans->removeTransactions($trans_id); } } $session['transactions'] = serialize($trans); $list_trans = $trans->getTransactionsList(true); //assign pagination variables to the template and add pagination links $trans->setSmartyPagination($tpl); $tpl->assign('page_title', _T("Transactions managment")); $tpl->assign('require_dialog', true); $tpl->assign('require_calendar', true); $tpl->assign('list_trans', $list_trans); $tpl->assign('transactions', $trans); $tpl->assign('nb_transactions', $trans->getCount()); if ($trans->filtre_cotis_adh != null) { $member = new Galette\Entity\Adherent(); $member->load($trans->filtre_cotis_adh); $tpl->assign('member', $member); } $content = $tpl->fetch('gestion_transactions.tpl'); $tpl->assign('content', $content); $tpl->display('page.tpl');
} if (isset($hash) && !empty($hash)) { if ($id_adh = $password->isHashValid($hash)) { // Validation if (isset($_POST['valid']) && $_POST['valid'] == '1') { if ($_POST['mdp_adh'] == '') { $error_detected[] = _T("No password"); } else { if (isset($_POST['mdp_adh2'])) { if (strcmp($_POST['mdp_adh'], $_POST['mdp_adh2'])) { $error_detected[] = _T("- The passwords don't match!"); } else { if (strlen($_POST['mdp_adh']) < 4) { $error_detected[] = _T("- The password must be of at least 4 characters!"); } else { $res = Galette\Entity\Adherent::updatePassword($id_adh, $_POST['mdp_adh']); if ($res !== true) { $error_detected[] = _T("An error occured while updating your password."); } else { $hist->add(str_replace('%s', $id_adh, _T("Password changed for member '%s'."))); //once password has been changed, we can remove the //temporary password entry $password->removeHash($hash); $password_updated = true; } } } } } } } else {
/** * Return member name. Smarty cannot directly use static functions * * @param array $params Parameters * * @return Adherent::getSName * @see Adherent::getSName */ function getMemberName($params) { extract($params); return Galette\Entity\Adherent::getSName($id); }
$logo->display(); } else { if (isset($_GET['print_logo']) && $_GET['print_logo'] == 'true') { //displays the logo for printing $print_logo = new Galette\Core\PrintLogo(); $print_logo->display(); } else { //displays the picture $id_adh = (int) $_GET['id_adh']; $deps = array('picture' => true, 'groups' => false, 'dues' => false); //if loggedin user is a group manager, we have to check //he manages a group requested member belongs to. if ($login->isGroupManager()) { $deps['groups'] = true; } $adh = new Galette\Entity\Adherent($id_adh, $deps); $is_manager = false; if (!$login->isAdmin() && !$login->isStaff() && $login->isGroupManager()) { $groups = $adh->groups; foreach ($groups as $group) { if ($login->isGroupManager($group->getId())) { $is_manager = true; break; } } } $picture = null; if ($login->isAdmin() || $login->isStaff() || $adh->appearsInMembersList() || $login->login == $adh->login || $is_manager) { $picture = $adh->picture; //new Picture($id_adh); } else {