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" alt="' . $gL10n->get('ROL_LEADER_ASSIGN_MEMBERS') . '" title="' . $gL10n->get('ROL_LEADER_ASSIGN_MEMBERS') . '" />'; } // create array with all column heading values $columnHeading = array('<img class="admidio-icon-info" src="' . THEME_PATH . '/icons/profile.png" alt="' . $gL10n->get('SYS_MEMBER_OF_ORGANIZATION', $gCurrentOrganization->getValue('org_longname')) . '" title="' . $gL10n->get('SYS_MEMBER_OF_ORGANIZATION', $gCurrentOrganization->getValue('org_longname')) . '" />', $gL10n->get('SYS_MEMBER'), $gL10n->get('SYS_LASTNAME'), $gL10n->get('SYS_FIRSTNAME'), '<img class="admidio-icon-info" src="' . THEME_PATH . '/icons/map.png" alt="' . $gL10n->get('SYS_ADDRESS') . '" title="' . $gL10n->get('SYS_ADDRESS') . '" />', $gL10n->get('SYS_BIRTHDAY'), $htmlLeaderColumn); $table->setColumnAlignByArray(array('left', 'center', 'left', 'left', 'left', 'left', 'left', 'center')); $table->setDatatablesOrderColumns(array(3, 4)); $table->addRowHeadingByArray($columnHeading); $table->disableDatatablesColumnsSort(array(2, 7)); // show rows with all organization users while ($user = $userStatement->fetch()) { $addressText = ' '; $htmlAddress = ' '; $htmlBirthday = ' '; if ($user['member_this_orga'] > 0) { $memberOfThisOrganization = '1'; } else { $memberOfThisOrganization = '0'; } // create string with user address if (strlen($user['country']) > 0) { $addressText .= $gL10n->getCountryByCode($user['country']);
$receiverName = $user->getValue('FIRST_NAME') . ' ' . $user->getValue('LAST_NAME'); $message = new TableMessage($gDb, $row['msg_id']); ++$key; $messageAdministration = $part1 . $key . '&name=' . urlencode($message->getValue('msg_subject')) . '&database_id=' . $message->getValue('msg_id') . $part2; $table->addRowByArray(array('<a class="admidio-icon-link" ' . $href . $message->getValue('msg_id') . '"> <img class="admidio-icon-info" src="' . THEME_PATH . '/icons/pm.png" alt="' . $gL10n->get('PMS_MESSAGE') . '" title="' . $gL10n->get('PMS_MESSAGE') . '" />', '<a ' . $href . $message->getValue('msg_id') . '">' . $message->getValue('msg_subject') . '</a>', $receiverName, $message->getValue('msg_timestamp'), $messageAdministration), 'row_message_' . $key, array('style' => 'font-weight: bold')); } } // find all read or own PM messages $statement = $modulemessages->msgGetUser($gCurrentUser->getValue('usr_id')); if (isset($statement)) { while ($row = $statement->fetch()) { if ($row['msg_usr_id_sender'] == $gCurrentUser->getValue('usr_id')) { $user = new User($gDb, $gProfileFields, $row['msg_usr_id_receiver']); } else { $user = new User($gDb, $gProfileFields, $row['msg_usr_id_sender']); } $receiverName = $user->getValue('FIRST_NAME') . ' ' . $user->getValue('LAST_NAME'); $message = new TableMessage($gDb, $row['msg_id']); ++$key; $messageAdministration = $part1 . $key . '&name=' . urlencode($message->getValue('msg_subject')) . '&database_id=' . $message->getValue('msg_id') . $part2; $table->addRowByArray(array('<a class="admidio-icon-link" ' . $href . $message->getValue('msg_id') . '"> <img class="admidio-icon-info" src="' . THEME_PATH . '/icons/pm.png" alt="' . $gL10n->get('PMS_MESSAGE') . '" title="' . $gL10n->get('PMS_MESSAGE') . '" />', '<a ' . $href . $message->getValue('msg_id') . '">' . $message->getValue('msg_subject') . '</a>', $receiverName, $message->getValue('msg_timestamp'), $messageAdministration), 'row_message_' . $key); } } // special settings for the table $table->setDatatablesOrderColumns(array(array(4, 'desc'))); // add table to the form $page->addHtml($table->show(false)); // add form to html page and show page $page->show();
href="' . $g_root_path . '/adm_program/system/msg_window.php?message_id=DOW_FILE_NOT_EXISTS&inline=true"><img src="' . THEME_PATH . '/icons/warning.png" alt="' . $gL10n->get('SYS_WARNING') . '" /></a>'; } $columnValues[] = ' <a class="admidio-icon-link" href="' . $g_root_path . '/adm_program/modules/downloads/rename.php?file_id=' . $nextFile['fil_id'] . '"> <img src="' . THEME_PATH . '/icons/edit.png" alt="' . $gL10n->get('SYS_EDIT') . '" title="' . $gL10n->get('SYS_EDIT') . '" /></a> <a class="admidio-icon-link" data-toggle="modal" data-target="#admidio_modal" href="' . $g_root_path . '/adm_program/system/popup_message.php?type=fil&element_id=row_file_' . $nextFile['fil_id'] . '&name=' . urlencode($nextFile['fil_name']) . '&database_id=' . $nextFile['fil_id'] . '"><img src="' . THEME_PATH . '/icons/delete.png" alt="' . $gL10n->get('SYS_DELETE') . '" title="' . $gL10n->get('SYS_DELETE') . '" /></a>' . $noteFileNotExists; } $downloadOverview->addRowByArray($columnValues, 'row_file_' . $nextFile['fil_id']); } } //Create download table $downloadOverview->setDatatablesColumnsHide(array(1)); $downloadOverview->setDatatablesOrderColumns(array(1, 3)); $htmlDownloadOverview = $downloadOverview->show(false); /**************************************************************************/ // Add Admin table to html page /**************************************************************************/ //If user is download Admin show further files contained in this folder. if ($gCurrentUser->editDownloadRight()) { // Check whether additional content was found in the folder if (isset($folderContent['additionalFolders']) || isset($folderContent['additionalFiles'])) { $htmlAdminTableHeadline = '<h2> ' . $gL10n->get('DOW_UNMANAGED_FILES') . ' <a class="admidio-icon-link" data-toggle="modal" data-target="#admidio_modal" href="' . $g_root_path . '/adm_program/system/msg_window.php?message_id=DOW_ADDITIONAL_FILES&inline=true"><img src="' . THEME_PATH . '/icons/help.png" alt="Help" /></a> </h2>'; //Create table object
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" alt="' . $gL10n->get('ROL_LEADER_ASSIGN_MEMBERS') . '" title="' . $gL10n->get('ROL_LEADER_ASSIGN_MEMBERS') . '" />'; } // create array with all column heading values $columnHeading = array('<img class="admidio-icon-info" src="' . THEME_PATH . '/icons/profile.png" alt="' . $gL10n->get('SYS_MEMBER_OF_ORGANIZATION', $gCurrentOrganization->getValue('org_longname')) . '" title="' . $gL10n->get('SYS_MEMBER_OF_ORGANIZATION', $gCurrentOrganization->getValue('org_longname')) . '" />', $gL10n->get('SYS_STATUS'), $gL10n->get('SYS_MEMBER'), $gL10n->get('SYS_LASTNAME'), $gL10n->get('SYS_FIRSTNAME'), '<img class="admidio-icon-info" src="' . THEME_PATH . '/icons/map.png" alt="' . $gL10n->get('SYS_ADDRESS') . '" title="' . $gL10n->get('SYS_ADDRESS') . '" />', $gL10n->get('SYS_ADDRESS'), $gL10n->get('SYS_BIRTHDAY'), $htmlLeaderColumn); $table->setColumnAlignByArray(array('left', 'left', 'center', 'left', 'left', 'left', 'left', 'left', 'center')); $table->setDatatablesOrderColumns(array(4, 5)); $table->addRowHeadingByArray($columnHeading); $table->disableDatatablesColumnsSort(array(3, 9)); // set alternative order column for member status icons $table->setDatatablesAlternativOrderColumns(1, 2); $table->setDatatablesColumnsHide(2); // set alternative order column for address icons $table->setDatatablesAlternativOrderColumns(6, 7); $table->setDatatablesColumnsHide(7); // show rows with all organization users while ($user = $gDb->fetch_array($resultUser)) { $addressText = ' '; $htmlAddress = ' '; $htmlBirthday = ' '; if ($user['member_this_orga'] > 0) { $memberOfThisOrganization = '1';
$gMessage->show($gL10n->get('NWU_NO_REGISTRATIONS'), $gL10n->get('SYS_REGISTRATION')); } // create html page object $page = new HtmlPage($headline); $page->enableModal(); if ($gCurrentUser->isWebmaster()) { // get module menu $registrationMenu = $page->getMenu(); // show link to system preferences of announcements $registrationMenu->addItem('menu_item_preferences', $g_root_path . '/adm_program/modules/preferences/preferences.php?show_option=registration', $gL10n->get('SYS_MODULE_PREFERENCES'), 'options.png', 'right'); } $table = new HtmlTable('new_user_table', $page, true); // create array with all column heading values $columnHeading = array($gL10n->get('SYS_NAME'), $gL10n->get('SYS_REGISTRATION'), $gL10n->get('SYS_USERNAME'), $gL10n->get('SYS_EMAIL'), ' '); $table->setColumnAlignByArray(array('left', 'left', 'left', 'left', 'right')); $table->setDatatablesOrderColumns(1); $table->addRowHeadingByArray($columnHeading); while ($row = $usrStatement->fetch()) { $timestampCreate = new DateTimeExtended($row['reg_timestamp'], 'Y-m-d H:i:s'); $datetimeCreate = $timestampCreate->format($gPreferences['system_date'] . ' ' . $gPreferences['system_time']); if ($gPreferences['enable_mail_module'] == 1) { $mailLink = '<a href="' . $g_root_path . '/adm_program/modules/messages/messages_write.php?usr_id=' . $row['usr_id'] . '">' . $row['email'] . '</a>'; } else { $mailLink = '<a href="mailto:' . $row['email'] . '">' . $row['email'] . '</a>'; } // create array with all column values $columnValues = array('<a href="' . $g_root_path . '/adm_program/modules/profile/profile.php?user_id=' . $row['usr_id'] . '">' . $row['last_name'] . ', ' . $row['first_name'] . '</a>', $datetimeCreate, $row['usr_login_name'], $mailLink, '<a class="admidio-icon-link" href="' . $g_root_path . '/adm_program/modules/registration/registration_assign.php?new_user_id=' . $row['usr_id'] . '"><img src="' . THEME_PATH . '/icons/new_registrations.png" alt="' . $gL10n->get('NWU_ASSIGN_REGISTRATION') . '" title="' . $gL10n->get('NWU_ASSIGN_REGISTRATION') . '" /></a> <a class="admidio-icon-link" data-toggle="modal" data-target="#admidio_modal" href="' . $g_root_path . '/adm_program/system/popup_message.php?type=nwu&element_id=row_user_' . $row['usr_id'] . '&name=' . urlencode($row['first_name'] . ' ' . $row['last_name']) . '&database_id=' . $row['usr_id'] . '"><img src="' . THEME_PATH . '/icons/delete.png" alt="' . $gL10n->get('SYS_DELETE') . '" title="' . $gL10n->get('SYS_DELETE') . '" /></a>');
// 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" alt="' . $gL10n->get('ROL_LEADER_ASSIGN_MEMBERS') . '" title="' . $gL10n->get('ROL_LEADER_ASSIGN_MEMBERS') . '" />'; } // create array with all column heading values // @ptabaden: removed first row, removed firstname, moved both checkboxes to end, added pfadiname, added sys_participant value $columnHeading = array('', $gL10n->get('SYS_LASTNAME'), $gL10n->get('SYS_VULGO'), $gL10n->get('SYS_BIRTHDAY'), $gL10n->get('SYS_PARTICIPANT'), $htmlLeaderColumn); // @ptabaden: removed first row, and firstname, changed sortvalue and disable sort $table->setColumnAlignByArray(array('left', 'left', 'left', 'left', 'center', 'center')); $table->setDatatablesOrderColumns(array(2, 3)); $table->addRowHeadingByArray($columnHeading); $table->disableDatatablesColumnsSort(array(5, 6)); $irow = 1; // @ptabaden: Zahler fuer die jeweilige Zeile // show rows with all organization users while ($user = $userStatement->fetch()) { $addressText = ' '; $htmlAddress = ' '; $htmlBirthday = ' '; // @ptabaden: Added htmlpfadiname $htmlPfadiname = ' '; if ($user['member_this_orga'] > 0) { $memberOfThisOrganization = '1'; } else { $memberOfThisOrganization = '0';