예제 #1
0
    if ($usf_id == 0 || $gCurrentUser->editUsers() || $gProfileFields->getPropertyById($usf_id, 'usf_hidden') == 0) {
        if ($getMode === 'csv') {
            $str_csv = $str_csv . $separator . $valueQuotes . $columnHeader . $valueQuotes;
        } elseif ($getMode === 'pdf') {
            $arrValidColumns[] = $columnHeader;
        } elseif ($getMode === 'html' || $getMode === 'print') {
            $columnValues[] = $columnHeader;
        }
    }
}
// End-For
if ($getMode === 'csv') {
    $str_csv = $str_csv . "\n";
} elseif ($getMode === 'html' || $getMode === 'print') {
    $table->setColumnAlignByArray($columnAlign);
    $table->addRowHeadingByArray($columnValues);
} elseif ($getMode === 'pdf') {
    $table->setColumnAlignByArray($columnAlign);
    $table->addTableHeader();
    $table->addRow();
    $table->addAttribute('align', 'center');
    $table->addColumn($headline, array('colspan' => count($arrValidColumns)));
    $table->addRow();
    // Write valid column headings
    for ($column = 0; $column < count($arrValidColumns); ++$column) {
        $table->addColumn($arrValidColumns[$column], array('style' => 'text-align: ' . $columnAlign[$column] . ';font-size:14;background-color:#C7C7C7;'), 'th');
    }
} else {
    $table->addTableBody();
}
$lastGroupHead = -1;
예제 #2
0
// get module menu
$itemsAdministrationMenu = $page->getMenu();
$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'), '&nbsp;');
$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&amp;message_title=DAT_ROOM_INFORMATIONS&amp;message_var1=' . $row['room_id'] . '&amp;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>';
예제 #3
0
// link to Chat
// @ptabaden: hide chat!
// if ($gPreferences['enable_chat_module'] == 1)
// {
//    $EmailMenu->addItem('admMenuItemNewChat', $g_root_path.'/adm_program/modules/messages/messages_chat.php', $gL10n->get('MSG_CHAT'), '/chat.png');
// }
if ($gCurrentUser->isWebmaster()) {
    // @ptabaden: Changed Icon & renamed to menu_item_preferences
    $EmailMenu->addItem('admMenuItemPreferences', $g_root_path . '/adm_program/modules/preferences/preferences.php?show_option=messages', '<i class="fa fa-cog" alt="' . $gL10n->get('SYS_MODULE_PREFERENCES') . '" title="' . $gL10n->get('SYS_MODULE_PREFERENCES') . '"></i><div class="iconDescription">' . $gL10n->get('SYS_MODULE_PREFERENCES') . '</div>', '', 'right');
}
$table = new HtmlTable('adm_lists_table', $page, true, true);
// @ptabaden deleted two cols #possibleError delete one left more?
$table->setColumnAlignByArray(array('left', 'left', 'right'));
// @ptabaden: deleted category row and changed order
// @ptabaden: deleted two cols
$table->addRowHeadingByArray(array($gL10n->get('MSG_OPPOSITE'), $gL10n->get('MAI_SUBJECT'), ''));
$table->disableDatatablesColumnsSort(5);
$key = 0;
$part1 = '<a class="admidio-icon-link" data-toggle="modal" data-target="#admidio_modal" href="' . $g_root_path . '/adm_program/system/popup_message.php?type=msg&amp;element_id=row_message_';
// @ptabaden: Changed Icon
$part2 = '"><i class="fa fa-times" alt="' . $gL10n->get('MSG_REMOVE') . '" title="' . $gL10n->get('MSG_REMOVE') . '" /></a>';
$href = 'href="' . $g_root_path . '/adm_program/modules/messages/messages_write.php?msg_id=';
// open some additonal functions for messages
$modulemessages = new ModuleMessages();
// find all own Email messages
$statement = $modulemessages->msgGetUserEmails($gCurrentUser->getValue('usr_id'));
if (isset($statement)) {
    while ($row = $statement->fetch()) {
        $receiverName = '';
        if (strpos($row['user'], '|') > 0) {
            $reciversplit = explode('|', $row['user']);
예제 #4
0
             $compactTable->disableDatatablesColumnsSort(5);
             $compactTable->setColumnWidth(4, '35%');
             break;
         case 'description':
             $columnHeading = array('&nbsp;', $gL10n->get('SYS_PERIOD'), $gL10n->get('DAT_DATE'), $gL10n->get('SYS_DESCRIPTION'));
             $columnAlign = array('center', 'left', 'left', 'left');
             $compactTable->disableDatatablesColumnsSort(5);
             $compactTable->setColumnWidth(4, '35%');
             break;
     }
     if ($getViewMode === 'html') {
         $columnHeading[] = '&nbsp;';
         $columnAlign[] = 'right';
     }
     $compactTable->setColumnAlignByArray($columnAlign);
     $compactTable->addRowHeadingByArray($columnHeading);
 }
 // create dummy date object
 $date = new TableDate($gDb);
 foreach ($datesResult['recordset'] as $row) {
     // write of current event data to date object
     $date->setArray($row);
     // initialize all output elements
     $outputEndDate = '';
     $outputButtonIcal = '';
     $outputButtonEdit = '';
     $outputButtonDelete = '';
     $outputButtonCopy = '';
     $outputButtonParticipation = '';
     $outputButtonParticipants = '';
     $outputButtonParticipantsEmail = '';
예제 #5
0
/**************************************************************************/
//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&amp;inline=true"><img 
                                        src="' . THEME_PATH . '/icons/help.png" alt="Help" /></a>            
                                </h2>';
        //Create table object
        $adminTable = new HtmlTable('tbl_downloads', $page, true);
        // create array with all column heading values
        $columnHeading = array('<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_FEATURES'));
        $adminTable->addRowHeadingByArray($columnHeading);
        // Get folders
        if (isset($folderContent['additionalFolders'])) {
            for ($i = 0; $i < count($folderContent['additionalFolders']); $i++) {
                $nextFolder = $folderContent['additionalFolders'][$i];
                $columnValues = array('<img src="' . THEME_PATH . '/icons/download.png" alt="' . $gL10n->get('SYS_FOLDER') . '" title="' . $gL10n->get('SYS_FOLDER') . '" />', $nextFolder['fol_name'], '<a class="admidio-icon-link" href="' . $g_root_path . '/adm_program/modules/downloads/download_function.php?mode=6&amp;folder_id=' . $getFolderId . '&amp;name=' . urlencode($nextFolder['fol_name']) . '">
                                          <img src="' . THEME_PATH . '/icons/database_in.png" alt="' . $gL10n->get('DOW_ADD_TO_DATABASE') . '" title="' . $gL10n->get('DOW_ADD_TO_DATABASE') . '" /></a>');
                $adminTable->addRowByArray($columnValues);
            }
        }
        // Get files
        if (isset($folderContent['additionalFiles'])) {
            for ($i = 0; $i < count($folderContent['additionalFiles']); $i++) {
                $nextFile = $folderContent['additionalFiles'][$i];
                // Get filetyp
                $fileExtension = admStrToLower(substr($nextFile['fil_name'], strrpos($nextFile['fil_name'], '.') + 1));
예제 #6
0
$htmlIconLoginUser = '******';
if ($getType !== 'USF') {
    $htmlIconLoginUser = '******' . THEME_PATH . '/icons/user_key.png" alt="' . $gL10n->get('SYS_VISIBLE_TO_USERS', $getTitle) . '" title="' . $gL10n->get('SYS_VISIBLE_TO_USERS', $getTitle) . '" />';
}
// get module menu
$categoriesMenu = $page->getMenu();
// show back link
$categoriesMenu->addItem('menu_item_back', $gNavigation->getPreviousUrl(), $gL10n->get('SYS_BACK'), 'back.png');
// define link to create new category
$categoriesMenu->addItem('admMenuItemNewCategory', $g_root_path . '/adm_program/modules/categories/categories_new.php?type=' . $getType . '&amp;title=' . $getTitle, $gL10n->get('SYS_CREATE_VAR', $addButtonText), 'add.png');
// Create table object
$categoriesOverview = new HtmlTable('tbl_categories', $page, true);
// create array with all column heading values
$columnHeading = array($gL10n->get('SYS_TITLE'), '&nbsp;', $htmlIconLoginUser, '<img class="admidio-icon-info" src="' . THEME_PATH . '/icons/star.png" alt="' . $gL10n->get('CAT_DEFAULT_VAR', $getTitle) . '" title="' . $gL10n->get('CAT_DEFAULT_VAR', $getTitle) . '" />', '&nbsp;');
$categoriesOverview->setColumnAlignByArray(array('left', 'left', 'left', 'left', 'right'));
$categoriesOverview->addRowHeadingByArray($columnHeading);
$sql = 'SELECT *
          FROM ' . TBL_CATEGORIES . '
         WHERE (  cat_org_id  = ' . $gCurrentOrganization->getValue('org_id') . '
               OR cat_org_id IS NULL )
           AND cat_type   = \'' . $getType . '\'
      ORDER BY cat_sequence ASC';
$categoryStatement = $gDb->query($sql);
$flagTbodyWritten = false;
$flagTbodyAllOrgasWritten = false;
$category = new TableCategory($gDb);
// Get data
while ($cat_row = $categoryStatement->fetch()) {
    $category->clear();
    $category->setArray($cat_row);
    if ($category->getValue('cat_system') == 1 && $getType === 'USF') {
예제 #7
0
    $EmailMenu->addItem('admMenuItemNewEmail', $g_root_path . '/adm_program/modules/messages/messages_write.php', $gL10n->get('MAI_SEND_EMAIL'), '/email.png');
}
// link to write new PM
if ($gPreferences['enable_pm_module'] == 1) {
    $EmailMenu->addItem('admMenuItemNewPm', $g_root_path . '/adm_program/modules/messages/messages_write.php?msg_type=PM', $gL10n->get('PMS_SEND_PM'), '/pm.png');
}
// link to Chat
if ($gPreferences['enable_chat_module'] == 1) {
    $EmailMenu->addItem('admMenuItemNewChat', $g_root_path . '/adm_program/modules/messages/messages_chat.php', $gL10n->get('MSG_CHAT'), '/chat.png');
}
if ($gCurrentUser->isWebmaster()) {
    $EmailMenu->addItem('admMenuItemPreferences', $g_root_path . '/adm_program/modules/preferences/preferences.php?show_option=messages', $gL10n->get('SYS_MODULE_PREFERENCES'), 'options.png', 'right');
}
$table = new HtmlTable('adm_lists_table', $page, true, true);
$table->setColumnAlignByArray(array('left', 'left', 'left', 'left', 'right'));
$table->addRowHeadingByArray(array('<img class="admidio-icon-info" src="' . THEME_PATH . '/icons/email.png" alt="' . $gL10n->get('SYS_CATEGORY') . '" title="' . $gL10n->get('SYS_CATEGORY') . '" />', $gL10n->get('MAI_SUBJECT'), $gL10n->get('MSG_OPPOSITE'), $gL10n->get('SYS_DATE'), ''));
$table->disableDatatablesColumnsSort(5);
$key = 0;
$part1 = '<a class="admidio-icon-link" data-toggle="modal" data-target="#admidio_modal" href="' . $g_root_path . '/adm_program/system/popup_message.php?type=msg&amp;element_id=row_message_';
$part2 = '"><img src="' . THEME_PATH . '/icons/delete.png" alt="' . $gL10n->get('MSG_REMOVE') . '" title="' . $gL10n->get('MSG_REMOVE') . '" /></a>';
$href = 'href="' . $g_root_path . '/adm_program/modules/messages/messages_write.php?msg_id=';
// open some additonal functions for messages
$modulemessages = new ModuleMessages();
// find all own Email messages
$statement = $modulemessages->msgGetUserEmails($gCurrentUser->getValue('usr_id'));
if (isset($result)) {
    while ($row = $statement->fetch()) {
        $ReceiverName = '';
        if (strpos($row['user'], '|') > 0) {
            $reciversplit = explode('|', $row['user']);
            foreach ($reciversplit as $value) {
예제 #8
0
파일: messages.php 프로젝트: bash-t/admidio
// link to write new PM
if ($gPreferences['enable_pm_module'] == 1) {
    $EmailMenu->addItem('admMenuItemNewPm', $g_root_path . '/adm_program/modules/messages/messages_write.php?msg_type=PM', $gL10n->get('PMS_SEND_PM'), '/pm.png');
}
// link to Chat
if ($gPreferences['enable_chat_module'] == 1) {
    $EmailMenu->addItem('admMenuItemNewChat', $g_root_path . '/adm_program/modules/messages/messages_chat.php', $gL10n->get('MSG_CHAT'), '/chat.png');
}
if ($gCurrentUser->isWebmaster()) {
    $EmailMenu->addItem('admMenuItemPreferences', $g_root_path . '/adm_program/modules/preferences/preferences.php?show_option=messages', $gL10n->get('SYS_MODULE_PREFERENCES'), 'options.png', 'right');
}
$table = new HtmlTable('adm_lists_table', $page, true, true);
$table->setColumnAlignByArray(array('left', 'left', 'left', 'left', 'right'));
$table->addAttribute('border', '0');
$table->addTableHeader();
$table->addRowHeadingByArray(array($gL10n->get('SYS_CATEGORY'), $gL10n->get('MAI_SUBJECT'), $gL10n->get('MSG_OPPOSITE'), $gL10n->get('SYS_DATE'), $gL10n->get('SYS_FEATURES')));
$key = 0;
$part1 = '<a class="admidio-icon-link" data-toggle="modal" data-target="#admidio_modal" href="' . $g_root_path . '/adm_program/system/popup_message.php?type=msg&amp;element_id=row_message_';
$part2 = '"><img src="' . THEME_PATH . '/icons/delete.png" alt="' . $gL10n->get('MSG_REMOVE') . '" title="' . $gL10n->get('MSG_REMOVE') . '" /></a>';
$href = 'href="' . $g_root_path . '/adm_program/modules/messages/messages_write.php?msg_id=';
// open some additonal functions for messages
$modulemessages = new ModuleMessages();
//find all own Email messages
$result = $modulemessages->msgGetUserEmails($gCurrentUser->getValue('usr_id'));
if (isset($result)) {
    while ($row = $gDb->fetch_array($result)) {
        $ReceiverName = "";
        if (strpos($row['user'], '|') == true) {
            $reciversplit = explode('|', $row['user']);
            foreach ($reciversplit as $value) {
                if (strpos($value, ':') == true) {
예제 #9
0
$membersAdministrationMenu->addItem('menu_item_import_users', $g_root_path . '/adm_program/modules/members/import.php', $gL10n->get('MEM_IMPORT_USERS'), 'database_in.png', 'right', 'menu_item_extras');
if ($gCurrentUser->isWebmaster()) {
    // show link to maintain profile fields
    $membersAdministrationMenu->addItem('menu_item_maintain_profile_fields', $g_root_path . '/adm_program/modules/preferences/fields.php', $gL10n->get('PRO_MAINTAIN_PROFILE_FIELDS'), 'application_form_edit.png', 'right', 'menu_item_extras');
    // show link to system preferences of weblinks
    $membersAdministrationMenu->addItem('menu_item_preferences_links', $g_root_path . '/adm_program/modules/preferences/preferences.php?show_option=user_management', $gL10n->get('SYS_MODULE_PREFERENCES'), 'options.png', 'right', 'menu_item_extras');
}
// Create table object
$membersTable = new HtmlTable('tbl_members', $page, true, true, 'table table-condensed');
// create array with all column heading values
$columnHeading = array($gL10n->get('SYS_ABR_NO'), '<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_NAME'), $gL10n->get('SYS_USER'), '<img class="admidio-icon-info" alt="' . $gL10n->get('SYS_GENDER') . '" title="" src="' . THEME_PATH . '/icons/gender.png" data-original-title="' . $gL10n->get('SYS_GENDER') . '">', $gL10n->get('SYS_BIRTHDAY'), $gL10n->get('MEM_UPDATED_ON'), '&nbsp;');
$membersTable->setColumnAlignByArray(array('left', 'left', 'left', 'left', 'left', 'left', 'left', 'right'));
$membersTable->disableDatatablesColumnsSort(8);
$membersTable->addRowHeadingByArray($columnHeading);
$membersTable->setDatatablesRowsPerPage($gPreferences['members_users_per_page']);
$membersTable->setMessageIfNoRowsFound('SYS_NO_ENTRIES');
$irow = 1;
// Zahler fuer die jeweilige Zeile
while ($row = $mglStatement->fetch()) {
    $timestampChange = new DateTimeExtended($row['timestamp'], 'Y-m-d H:i:s');
    // Icon fuer Orgamitglied und Nichtmitglied auswaehlen
    if ($row['member_this_orga'] > 0) {
        $icon = 'profile.png';
        $iconText = $gL10n->get('SYS_MEMBER_OF_ORGANIZATION', $gCurrentOrganization->getValue('org_longname'));
    } else {
        $icon = 'no_profile.png';
        $iconText = $gL10n->get('SYS_NOT_MEMBER_OF_ORGANIZATION', $gCurrentOrganization->getValue('org_longname'));
    }
    if ($row['member_this_orga'] > 0) {