Exemple #1
0
        $(".admidio-icon-link-popup").colorbox({rel:\'nofollow\', scrolling:false, onComplete:function() { $("#admButtonNo").focus(); }});
        ', true);
// 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'), ' ');
$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
Exemple #2
0
    // show hidden fields only for user with rights
    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();
}
 // 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
 $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 = '&nbsp;';
     $htmlBirthday = '&nbsp;';
     if ($user['member_this_orga'] > 0) {
         $memberOfThisOrganization = '1';
     } else {
         $memberOfThisOrganization = '0';
     }
     // create string with user address
     if (strlen($user['country']) > 0) {
Exemple #4
0
             $columnAlign = array('center', 'left', 'left', 'left');
             $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 = '';
Exemple #5
0
    }
    $DownloadsMenu->addItem('admMenuItemConfigFolder', $g_root_path . '/adm_program/modules/downloads/folder_config.php?folder_id=' . $getFolderId, $gL10n->get('SYS_AUTHORIZATION'), 'lock.png');
}
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()) {
Exemple #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);