$itemsAdministrationMenu->addItem('menu_item_create_user', $g_root_path . '/adm_program/modules/inventory/item_new.php', $gL10n->get('INV_CREATE_ITEM'), 'add.png'); // show link to room management $itemsAdministrationMenu->addItem('menu_item_manage_rooms', $g_root_path . '/adm_program/modules/rooms/rooms.php', $gL10n->get('DAT_SWITCH_TO_ROOM_ADMINISTRATION'), 'home.png'); if ($gCurrentUser->isWebmaster()) { // show link to maintain profile fields $itemsAdministrationMenu->addItem('menu_item_maintain_inventory_fields', $g_root_path . '/adm_program/modules/inventory/fields.php', $gL10n->get('PRO_MAINTAIN_ITEM_FIELDS'), 'application_form_edit.png'); } // Create table object $itemsTable = new HtmlTable('tbl_invent', $page, true, true, 'table table-condensed'); // create array with all column heading values $columnHeading = array($gL10n->get('SYS_ABR_NO'), $gL10n->get('SYS_NAME'), $gL10n->get('SYS_ROOM'), $gL10n->get('MEM_UPDATED_ON'), ' '); $itemsTable->setColumnAlignByArray(array('left', 'left', 'left', 'left', 'right')); $itemsTable->disableDatatablesColumnsSort(5); $itemsTable->addRowHeadingByArray($columnHeading); $itemsTable->setDatatablesRowsPerPage($gPreferences['members_users_per_page']); $itemsTable->setMessageIfNoRowsFound('SYS_NO_ENTRIES'); $irow = 1; // count for line in table while ($row = $mglStatement->fetch()) { $timestampChange = new DateTimeExtended($row['timestamp'], 'Y-m-d H:i:s'); $room = new TableRooms($gDb, $row['room_id']); $roomLink = $g_root_path . '/adm_program/system/msg_window.php?message_id=room_detail&message_title=DAT_ROOM_INFORMATIONS&message_var1=' . $row['room_id'] . '&inline=true'; // create array with all column values $columnValues = array($irow, '<a href="' . $g_root_path . '/adm_program/modules/inventory/item.php?item_id=' . $row['inv_id'] . '">' . $row['item_name'] . '</a>', '<a class="admidio-icon-link-popup" href="' . $roomLink . '">' . $room->getValue('room_name') . '</a>'); $columnValues[] = $timestampChange->format($gPreferences['system_date'] . ' ' . $gPreferences['system_time']); $itemAdministration = ''; // Link to modify Item $itemAdministration .= '<a class="admidio-icon-link" href="' . $g_root_path . '/adm_program/modules/inventory/item_new.php?item_id=' . $row['inv_id'] . '"><img src="' . THEME_PATH . '/icons/edit.png" alt="' . $gL10n->get('MEM_EDIT_USER') . '" title="' . $gL10n->get('MEM_EDIT_USER') . '" /></a>'; // remove Item if ($gCurrentUser->isWebmaster()) {
$membersAssignmentMenu->addItem('menu_item_create_user', $g_root_path . '/adm_program/modules/members/members_new.php', $gL10n->get('MEM_CREATE_USER'), 'add.png'); } $navbarForm = new HtmlForm('navbar_show_all_users_form', '', $page, array('type' => 'navbar', 'setFocus' => false)); $sql = 'SELECT rol_id, rol_name, cat_name FROM ' . TBL_ROLES . ', ' . TBL_CATEGORIES . ' WHERE rol_valid = 1 AND rol_visible = 1 AND rol_cat_id = cat_id AND ( cat_org_id = ' . $gCurrentOrganization->getValue('org_id') . ' OR cat_org_id IS NULL ) ORDER BY cat_sequence, rol_name'; $navbarForm->addSelectBoxFromSql('filter_rol_id', $gL10n->get('SYS_ROLE'), $gDb, $sql, array('defaultValue' => $getFilterRoleId, 'firstEntry' => $gL10n->get('SYS_ALL'))); $navbarForm->addCheckbox('mem_show_all', $gL10n->get('MEM_SHOW_ALL_USERS'), 0, array('helpTextIdLabel' => 'MEM_SHOW_USERS_DESC')); $membersAssignmentMenu->addForm($navbarForm->show(false)); // create table object $table = new HtmlTable('tbl_assign_role_membership', $page, true, true, 'table table-condensed'); $table->setMessageIfNoRowsFound('SYS_NO_ENTRIES_FOUND'); // create column header to assign role leaders $htmlLeaderColumn = $gL10n->get('SYS_LEADER'); // show icon that leaders have no additional rights if ($role->getValue('rol_leader_rights') == ROLE_LEADER_NO_RIGHTS) { $htmlLeaderColumn .= '<img class="admidio-icon-info" src="' . THEME_PATH . '/icons/info.png" alt="' . $gL10n->get('ROL_LEADER_NO_ADDITIONAL_RIGHTS') . '" title="' . $gL10n->get('ROL_LEADER_NO_ADDITIONAL_RIGHTS') . '" />'; } // show icon with edit user right if leader has this right if ($role->getValue('rol_leader_rights') == ROLE_LEADER_MEMBERS_EDIT || $role->getValue('rol_leader_rights') == ROLE_LEADER_MEMBERS_ASSIGN_EDIT) { $htmlLeaderColumn .= '<img class="admidio-icon-info" src="' . THEME_PATH . '/icons/profile_edit.png" alt="' . $gL10n->get('ROL_LEADER_EDIT_MEMBERS') . '" title="' . $gL10n->get('ROL_LEADER_EDIT_MEMBERS') . '" />'; } // show icon with assign role right if leader has this right if ($role->getValue('rol_leader_rights') == ROLE_LEADER_MEMBERS_ASSIGN || $role->getValue('rol_leader_rights') == ROLE_LEADER_MEMBERS_ASSIGN_EDIT) { $htmlLeaderColumn .= '<img class="admidio-icon-info" src="' . THEME_PATH . '/icons/roles.png"
// show back link $fieldsMenu->addItem('menu_item_back', $gNavigation->getPreviousUrl(), $gL10n->get('SYS_BACK'), 'back.png'); // define link to create new profile field $fieldsMenu->addItem('menu_item_new_field', $g_root_path . '/adm_program/modules/preferences/fields_new.php', $gL10n->get('ORG_CREATE_PROFILE_FIELD'), 'add.png'); // define link to maintain categories $fieldsMenu->addItem('menu_item_maintain_category', $g_root_path . '/adm_program/modules/categories/categories.php?type=USF', $gL10n->get('SYS_MAINTAIN_CATEGORIES'), 'application_double.png'); $sql = 'SELECT * FROM ' . TBL_CATEGORIES . ', ' . TBL_USER_FIELDS . ' WHERE cat_type = \'USF\' AND usf_cat_id = cat_id AND ( cat_org_id = ' . $gCurrentOrganization->getValue('org_id') . ' OR cat_org_id IS NULL ) ORDER BY cat_sequence ASC, usf_sequence ASC '; $statement = $gDb->query($sql); // Create table $table = new HtmlTable('tbl_profile_fields', $page, true); $table->setMessageIfNoRowsFound('ORG_NO_FIELD_CREATED'); // create array with all column heading values $columnHeading = array($gL10n->get('SYS_FIELD') . HtmlForm::getHelpTextIcon('ORG_FIELD_DESCRIPTION'), ' ', $gL10n->get('SYS_DESCRIPTION'), '<img class="admidio-icon-info" src="' . THEME_PATH . '/icons/eye.png" alt="' . $gL10n->get('ORG_FIELD_NOT_HIDDEN') . '" title="' . $gL10n->get('ORG_FIELD_NOT_HIDDEN') . '" />', '<img class="admidio-icon-info" data-html="true" src="' . THEME_PATH . '/icons/textfield_key.png" alt="' . $gL10n->get('ORG_FIELD_DISABLED', $gL10n->get('ROL_RIGHT_EDIT_USER')) . '" title="' . $gL10n->get('ORG_FIELD_DISABLED', $gL10n->get('ROL_RIGHT_EDIT_USER')) . '" />', '<img class="admidio-icon-info" src="' . THEME_PATH . '/icons/asterisk_yellow.png" alt="' . $gL10n->get('ORG_FIELD_REQUIRED') . '" title="' . $gL10n->get('ORG_FIELD_REQUIRED') . '" />', $gL10n->get('ORG_DATATYPE'), ' '); $table->addRowHeadingByArray($columnHeading); $categoryId = 0; $userField = new TableUserField($gDb); // Intialize variables $description = ''; $hidden = ''; $disable = ''; $mandatory = ''; $usfSystem = ''; while ($row = $statement->fetch()) { $userField->clear(); $userField->setArray($row); if ($categoryId != $userField->getValue('cat_id')) {
} if ($gCurrentUser->isWebmaster()) { // show link to system preferences of weblinks $DownloadsMenu->addItem('admMenuItemPreferencesLinks', $g_root_path . '/adm_program/modules/preferences/preferences.php?show_option=downloads', $gL10n->get('SYS_MODULE_PREFERENCES'), 'options.png', 'right'); } //Create table object $downloadOverview = new HtmlTable('tbl_downloads', $page, true, true); // create array with all column heading values $columnHeading = array($gL10n->get('SYS_TYPE'), '<img class="admidio-icon-info" src="' . THEME_PATH . '/icons/download.png" alt="' . $gL10n->get('SYS_FOLDER') . ' / ' . $gL10n->get('DOW_FILE_TYPE') . '" title="' . $gL10n->get('SYS_FOLDER') . ' / ' . $gL10n->get('DOW_FILE_TYPE') . '" />', $gL10n->get('SYS_NAME'), $gL10n->get('SYS_DATE_MODIFIED'), $gL10n->get('SYS_SIZE'), $gL10n->get('DOW_COUNTER')); if ($gCurrentUser->editDownloadRight()) { $columnHeading[] = $gL10n->get('SYS_FEATURES'); $downloadOverview->disableDatatablesColumnsSort(7); } $downloadOverview->setColumnAlignByArray(array('left', 'left', 'left', 'left', 'right', 'right', 'right')); $downloadOverview->addRowHeadingByArray($columnHeading); $downloadOverview->setMessageIfNoRowsFound('DOW_FOLDER_NO_FILES', 'warning'); // Get folder content if (isset($folderContent['folders'])) { // First get possible sub folders for ($i = 0; $i < count($folderContent['folders']); $i++) { $nextFolder = $folderContent['folders'][$i]; $folderDescription = ''; if ($nextFolder['fol_description'] != '') { $folderDescription = '<img class="admidio-icon-info" src="' . THEME_PATH . '/icons/info.png" alt="' . $nextFolder['fol_description'] . '" title="' . $nextFolder['fol_description'] . '" />'; } // create array with all column values $columnValues = array(1, '<a class="admidio-icon-link" href="' . $g_root_path . '/adm_program/modules/downloads/downloads.php?folder_id=' . $nextFolder['fol_id'] . '"> <img src="' . THEME_PATH . '/icons/download.png" alt="' . $gL10n->get('SYS_FOLDER') . '" title="' . $gL10n->get('SYS_FOLDER') . '" /></a>', '<a href="' . $g_root_path . '/adm_program/modules/downloads/downloads.php?folder_id=' . $nextFolder['fol_id'] . '">' . $nextFolder['fol_name'] . '</a>' . $folderDescription, '', '', ''); if ($gCurrentUser->editDownloadRight()) { //Links for change and delete $noteFolderNotExists = '';
$existingBackupFiles[] = $file; } catch (AdmException $e) { $temp = 1; } } closedir($handle); } // sort files (filename/date) sort($existingBackupFiles); // get module menu $backupMenu = $page->getMenu(); // show link to create new backup $backupMenu->addItem('admMenuItemNewBackup', $g_root_path . '/adm_program/modules/backup/backup.php?mode=create_backup', $gL10n->get('BAC_START_BACKUP'), 'database_save.png'); // Define table $table = new HtmlTable('tableList', $page, true); $table->setMessageIfNoRowsFound('BAC_NO_BACKUP_FILE_EXISTS'); // create array with all column heading values $columnHeading = array($gL10n->get('BAC_BACKUP_FILE'), $gL10n->get('BAC_CREATION_DATE'), $gL10n->get('SYS_SIZE'), $gL10n->get('SYS_DELETE')); $table->setColumnAlignByArray(array('left', 'left', 'right', 'center')); $table->addRowHeadingByArray($columnHeading); $backup_size_sum = 0; foreach ($existingBackupFiles as $key => $old_backup_file) { // create array with all column values $columnValues = array('<a href="' . $g_root_path . '/adm_program/modules/backup/backup_file_function.php?job=get_file&filename=' . $old_backup_file . '"><img src="' . THEME_PATH . '/icons/page_white_compressed.png" alt="' . $old_backup_file . '" title="' . $old_backup_file . '" />' . $old_backup_file . '</a>', date($gPreferences['system_date'] . ' ' . $gPreferences['system_time'], filemtime($backupabsolutepath . $old_backup_file)), round(filesize($backupabsolutepath . $old_backup_file) / 1024) . ' kB', '<a class="admidio-icon-link" data-toggle="modal" data-target="#admidio_modal" href="' . $g_root_path . '/adm_program/system/popup_message.php?type=bac&element_id=row_file_' . $key . '&name=' . urlencode($old_backup_file) . '&database_id=' . $old_backup_file . '"><img src="' . THEME_PATH . '/icons/delete.png" alt="' . $gL10n->get('SYS_DELETE') . '" title="' . $gL10n->get('SYS_DELETE') . '" /></a>'); $table->addRowByArray($columnValues, 'row_file_' . $key); $backup_size_sum = $backup_size_sum + round(filesize($backupabsolutepath . $old_backup_file) / 1024); } if (count($existingBackupFiles) > 0) {