Beispiel #1
0
if (!$preferences->showPublicPages($login)) {
    //public pages are not actives
    header('location:' . GALETTE_BASE_PATH . 'index.php');
    die;
}
if (isset($session['public_filters']['members'])) {
    $filters = unserialize($session['public_filters']['members']);
} else {
    $filters = new MembersList();
}
// Filters
if (isset($_GET['page'])) {
    $filters->current_page = (int) $_GET['page'];
}
if (isset($_GET['clear_filter'])) {
    $filters->reinit();
}
//numbers of rows to display
if (isset($_GET['nbshow']) && is_numeric($_GET['nbshow'])) {
    $filters->show = $_GET['nbshow'];
}
// Sorting
if (isset($_GET['tri'])) {
    $filters->orderby = $_GET['tri'];
}
$m = new Galette\Repository\Members($filters);
$members = $m->getPublicList(false, null);
//assign pagination variables to the template and add pagination links
$filters->setSmartyPagination($tpl);
$tpl->assign('filters', $filters);
$session['public_filters']['members'] = serialize($filters);
 /**
  * Reinit default parameters
  *
  * @return void
  */
 public function reinit()
 {
     parent::reinit();
     $this->_creation_date_begin = null;
     $this->_creation_date_end = null;
     $this->_modif_date_begin = null;
     $this->_modif_date_end = null;
     $this->_due_date_begin = null;
     $this->_due_date_end = null;
     $this->_birth_date_begin = null;
     $this->_birth_date_end = null;
     $this->_show_public_infos = Members::FILTER_DC_PUBINFOS;
     $this->_status = array();
     $this->_contrib_creation_date_begin = null;
     $this->_contrib_creation_date_end = null;
     $this->_contrib_begin_date_begin = null;
     $this->_contrib_begin_date_end = null;
     $this->_contrib_end_date_begin = null;
     $this->_contrib_begin_date_end = null;
     $this->_contributions_types = array();
     $this->_payments_types = array();
     $this->_free_search = array('empty' => array('field' => '', 'search' => '', 'log_op' => self::OP_AND, 'qry_op' => self::OP_EQUALS));
     $this->_contrib_dynamic = array('empty' => array('field' => '', 'search' => '', 'log_op' => self::OP_AND, 'qry_op' => self::OP_EQUALS));
 }