forked from rmbinder/Mitgliedsbeitrag
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathroleoverview.php
64 lines (49 loc) · 2.13 KB
/
roleoverview.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?php
/**
***********************************************************************************************
* Rollenübersicht fuer das Admidio-Plugin Mitgliedsbeitrag
*
* @copyright The Admidio Team
* @see https://www.admidio.org/
* @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License v2.0 only
*
* Parameters: none
*
***********************************************************************************************
*/
require_once(__DIR__ . '/../../adm_program/system/common.php');
require_once(__DIR__ . '/common_function.php');
require_once(__DIR__ . '/classes/configtable.php');
// only authorized user are allowed to start this module
if (!isUserAuthorized($_SESSION['pMembershipFee']['script_name']))
{
$gMessage->show($gL10n->get('SYS_NO_RIGHTS'));
}
$pPreferences = new ConfigTablePMB();
$pPreferences->read();
$role = new TableRoles($gDb);
$headline = $gL10n->get('PLG_MITGLIEDSBEITRAG_ROLE_OVERVIEW');
$page = new HtmlPage('plg-mitgliedsbeitrag-eoleoverview', $headline);
$gNavigation->addUrl(CURRENT_URL, $headline);
$datatable = true;
$hoverRows = true;
$classTable = 'table table-condensed';
$table = new HtmlTable('table_role_overview', $page, $hoverRows, $datatable, $classTable);
$columnAlign = array('left', 'right', 'right');
$table->setColumnAlignByArray($columnAlign);
$columnValues = array($gL10n->get('PLG_MITGLIEDSBEITRAG_ROLE_NAME'), 'dummy', $gL10n->get('PLG_MITGLIEDSBEITRAG_MEMBER_ACCOUNT'));
$table->addRowHeadingByArray($columnValues);
$rollen = beitragsrollen_einlesen('', array('LAST_NAME'));
foreach ($rollen as $rol_id => $data)
{
$role->readDataById($rol_id);
$columnValues = array();
$columnValues[] = '<a href="'. SecurityUtils::encodeUrl(ADMIDIO_URL . FOLDER_MODULES . '/groups-roles/groups_roles_new.php', array('role_uuid' => $role->getValue('rol_uuid'))). '">'.$data['rolle']. '</a>';
$columnValues[] = expand_rollentyp($data['rollentyp']);
$columnValues[] = count($data['members']);
$table->addRowByArray($columnValues);
}
$table->setDatatablesGroupColumn(2);
$table->setDatatablesRowsPerPage(10);
$page->addHtml($table->show(false));
$page->show();