예제 #1
0
    } else {
        echo $str_csv;
    }
} elseif ($getMode === 'pdf') {
    // output the HTML content
    $pdf->writeHTML($table->getHtmlTable(), true, false, true, false, '');
    // Save PDF to file
    $pdf->Output(SERVER_PATH . '/adm_my_files/' . $filename, 'F');
    // Redirect
    header('Content-Type: application/pdf');
    readfile(SERVER_PATH . '/adm_my_files/' . $filename);
    ignore_user_abort(true);
    unlink(SERVER_PATH . '/adm_my_files/' . $filename);
} elseif ($getMode === 'html' || $getMode === 'print') {
    // add table list to the page
    $page->addHtml($table->show(false));
    // create a infobox for the role
    if ($getMode === 'html' && $numberRoles === 1) {
        $htmlBox = '';
        // only show infobox if additional role information fields are filled
        if ($role->getValue('rol_weekday') > 0 || strlen($role->getValue('rol_start_date')) > 0 || strlen($role->getValue('rol_start_time')) > 0 || strlen($role->getValue('rol_location')) > 0 || strlen($role->getValue('rol_cost')) > 0 || strlen($role->getValue('rol_max_members')) > 0) {
            $htmlBox = '
            <div class="panel panel-default" id="adm_lists_infobox">
                <div class="panel-heading">' . $gL10n->get('LST_INFOBOX') . ': ' . $role->getValue('rol_name') . '</div>
                <div class="panel-body">';
            $form = new HtmlForm('list_infobox_items', null);
            $form->addStaticControl('infobox_category', $gL10n->get('SYS_CATEGORY'), $role->getValue('cat_name'));
            // Description
            if (strlen($role->getValue('rol_description')) > 0) {
                $form->addStaticControl('infobox_description', $gL10n->get('SYS_DESCRIPTION'), $role->getValue('rol_description'));
            }
예제 #2
0
$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>';
    // remove Item
    if ($gCurrentUser->isWebmaster()) {
        $itemAdministration .= '<a class="admidio-icon-link" href="' . $g_root_path . '/adm_program/modules/inventory/items_function.php?item_id=' . $row['inv_id'] . '&amp;mode=6"><img
                                    src="' . THEME_PATH . '/icons/delete.png" alt="' . $gL10n->get('MEM_REMOVE_USER') . '" title="' . $gL10n->get('MEM_REMOVE_USER') . '" /></a>';
    } else {
        $itemAdministration .= '&nbsp;<img class="admidio-icon-link" src="' . THEME_PATH . '/icons/dummy.png" alt="dummy" />';
    }
    $columnValues[] = $itemAdministration;
    $itemsTable->addRowByArray($columnValues);
    ++$irow;
}
$page->addHtml($itemsTable->show(false));
// show html of complete page
$page->show();
예제 #3
0
                    $columnValues[] = $outputLinkLocation;
                } else {
                    $columnValues[] = '';
                }
            } elseif ($getView === 'participants') {
                $columnValue = '';
                if (is_array($participantsArray)) {
                    foreach ($participantsArray as $participant) {
                        $columnValue .= $participant['firstname'] . ' ' . $participant['surname'] . ', ';
                    }
                }
                $columnValues[] = substr($columnValue, 0, strlen($columnValue) - 2);
            } elseif ($getView === 'description') {
                $columnValues[] = $date->getValue('dat_description');
            }
            if ($getViewMode === 'html') {
                $columnValues[] = $outputButtonIcal . $outputButtonCopy . $outputButtonEdit . $outputButtonDelete;
            }
            $compactTable->addRowByArray($columnValues, null, array('class' => $cssClass));
        }
    }
    // End foreach
    // Output table bottom for compact view
    if ($getView === 'compact' || $getView === 'room' || $getView === 'participants' || $getView === 'description') {
        $page->addHtml($compactTable->show(false));
    }
}
// If necessary show links to navigate to next and previous recordsets of the query
$base_url = $g_root_path . '/adm_program/modules/dates/dates.php?view=' . $getView . '&mode=' . $getMode . '&headline=' . $getHeadline . '&cat_id=' . $getCatId . '&date_from=' . $dates->getParameter('dateStartFormatEnglish') . '&date_to=' . $dates->getParameter('dateEndFormatEnglish') . '&view_mode=' . $getViewMode;
$page->addHtml(admFuncGeneratePagination($base_url, $datesTotalCount, $datesResult['limit'], $getStart, true));
$page->show();
예제 #4
0
            }
        }
        // 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));
                // Choose icon for the file
                $iconFile = 'page_white_question.png';
                if (array_key_exists($fileExtension, $icon_file_extension)) {
                    $iconFile = $icon_file_extension[$fileExtension];
                }
                $columnValues = array('<img src="' . THEME_PATH . '/icons/' . $iconFile . '" alt="' . $gL10n->get('SYS_FILE') . '" title="' . $gL10n->get('SYS_FILE') . '" /></a>', $nextFile['fil_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($nextFile['fil_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);
            }
        }
        $htmlAdminTable = $adminTable->show(false);
    }
}
// Output module html to client
$page->addHtml($navigationBar);
$page->addHtml($htmlDownloadOverview);
// if user has admin download rights, then show admin table for undefined files in folders
if (isset($htmlAdminTable)) {
    $page->addHtml($htmlAdminTableHeadline);
    $page->addHtml($htmlAdminTable);
}
// show html of complete page
$page->show();
예제 #5
0
    }
    $htmlMoveRow = '&nbsp;';
    if ($category->getValue('cat_system') == 0 || $getType !== 'USF') {
        $htmlMoveRow = '<a class="admidio-icon-link" href="javascript:moveCategory(\'up\', ' . $category->getValue('cat_id') . ')"><img
                                src="' . THEME_PATH . '/icons/arrow_up.png" alt="' . $gL10n->get('CAT_MOVE_UP', $getTitle) . '" title="' . $gL10n->get('CAT_MOVE_UP', $getTitle) . '" /></a>
                           <a class="admidio-icon-link" href="javascript:moveCategory(\'down\', ' . $category->getValue('cat_id') . ')"><img
                                src="' . THEME_PATH . '/icons/arrow_down.png" alt="' . $gL10n->get('CAT_MOVE_DOWN', $getTitle) . '" title="' . $gL10n->get('CAT_MOVE_DOWN', $getTitle) . '" /></a>';
    }
    $htmlHideCategory = '&nbsp;';
    if ($category->getValue('cat_hidden') == 1) {
        $htmlHideCategory = '<img class="admidio-icon-info" src="' . THEME_PATH . '/icons/user_key.png" alt="' . $gL10n->get('SYS_VISIBLE_TO_USERS', $getTitle) . '" title="' . $gL10n->get('SYS_VISIBLE_TO_USERS', $getTitle) . '" />';
    }
    $htmlDefaultCategory = '&nbsp;';
    if ($category->getValue('cat_default') == 1) {
        $htmlDefaultCategory = '<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) . '" />';
    }
    $categoryAdministration = '<a class="admidio-icon-link" href="' . $g_root_path . '/adm_program/modules/categories/categories_new.php?cat_id=' . $category->getValue('cat_id') . '&amp;type=' . $getType . '&amp;title=' . $getTitle . '"><img
                                    src="' . THEME_PATH . '/icons/edit.png" alt="' . $gL10n->get('SYS_EDIT') . '" title="' . $gL10n->get('SYS_EDIT') . '" /></a>';
    if ($category->getValue('cat_system') == 1) {
        $categoryAdministration .= '<img class="admidio-icon-link" src="' . THEME_PATH . '/icons/dummy.png" alt="dummy" />';
    } else {
        $categoryAdministration .= '<a class="admidio-icon-link" data-toggle="modal" data-target="#admidio_modal"
                                        href="' . $g_root_path . '/adm_program/system/popup_message.php?type=cat&amp;element_id=row_' . $category->getValue('cat_id') . '&amp;name=' . urlencode($category->getValue('cat_name')) . '&amp;database_id=' . $category->getValue('cat_id') . '&amp;database_id_2=' . $getType . '"><img
                                           src="' . THEME_PATH . '/icons/delete.png" alt="' . $gL10n->get('SYS_DELETE') . '" title="' . $gL10n->get('SYS_DELETE') . '" /></a>';
    }
    // create array with all column values
    $columnValues = array('<a href="' . $g_root_path . '/adm_program/modules/categories/categories_new.php?cat_id=' . $category->getValue('cat_id') . '&amp;type=' . $getType . '&amp;title=' . $getTitle . '">' . $category->getValue('cat_name') . '</a>', $htmlMoveRow, $htmlHideCategory, $htmlDefaultCategory, $categoryAdministration);
    $categoriesOverview->addRowByArray($columnValues, 'row_' . $category->getValue('cat_id'));
}
$page->addHtml($categoriesOverview->show(false));
$page->show();
예제 #6
0
파일: roles.php 프로젝트: sistlind/admidio
                                     <img class="admidio-icon-link" src="' . THEME_PATH . '/icons/dummy.png" alt="dummy" />';
        }
        // 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) {
            $leaderRights .= '<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) {
            $leaderRights .= '<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') . '" />';
        }
        // show dummy icon if leader has not all rights
        if ($role->getValue('rol_leader_rights') != ROLE_LEADER_MEMBERS_ASSIGN_EDIT) {
            $leaderRights .= '<img class="admidio-icon-link" src="' . THEME_PATH . '/icons/dummy.png" alt="dummy" />';
        }
        $columnValues[] = $leaderRights;
        $table->addRowByArray($columnValues);
    }
}
$html .= $table->show(false);
$html .= '
    <button class="btn-primary btn" id="btn_save" type="submit"><img src="' . THEME_PATH . '/icons/disk.png" alt="' . $gL10n->get('SYS_SAVE') . '" />&nbsp;' . $gL10n->get('SYS_SAVE') . '</button>
    <div class="form-alert" style="display: none;">&nbsp;</div>
</form>';
if ($getInline == true) {
    echo $html . '</div>';
} else {
    $page->addHtml($html);
    $page->show();
}
예제 #7
0
            <a class="admidio-icon-link" data-toggle="modal" data-target="#admidio_modal" href="' . $g_root_path . '/adm_program/modules/profile/password.php?usr_id=' . $row['usr_id'] . '"><img
                src="' . THEME_PATH . '/icons/key.png" alt="' . $gL10n->get('SYS_CHANGE_PASSWORD') . '" title="' . $gL10n->get('SYS_CHANGE_PASSWORD') . '" /></a>';
        }
    }
    if (strlen($row['email']) > 0) {
        if ($gPreferences['enable_mail_module'] != 1) {
            $mail_link = 'mailto:' . $row['email'];
        } else {
            $mail_link = $g_root_path . '/adm_program/modules/messages/messages_write.php?usr_id=' . $row['usr_id'];
        }
        $userAdministration .= '<a class="admidio-icon-link" href="' . $mail_link . '"><img src="' . THEME_PATH . '/icons/email.png"
                                alt="' . $gL10n->get('SYS_SEND_EMAIL_TO', $row['email']) . '" title="' . $gL10n->get('SYS_SEND_EMAIL_TO', $row['email']) . '" /></a>';
    }
    // Link um User zu editieren
    // es duerfen keine Nicht-Mitglieder editiert werden, die Mitglied in einer anderen Orga sind
    if ($row['member_this_orga'] > 0 || $row['member_other_orga'] == 0) {
        $userAdministration .= '<a class="admidio-icon-link" href="' . $g_root_path . '/adm_program/modules/profile/profile_new.php?user_id=' . $row['usr_id'] . '"><img
                                    src="' . THEME_PATH . '/icons/edit.png" alt="' . $gL10n->get('MEM_EDIT_USER') . '" title="' . $gL10n->get('MEM_EDIT_USER') . '" /></a>';
    }
    // Mitglieder entfernen
    if (($row['member_other_orga'] == 0 && $gCurrentUser->isWebmaster() || $row['member_this_orga'] > 0) && $row['usr_id'] != $gCurrentUser->getValue('usr_id')) {
        $userAdministration .= '<a class="admidio-icon-link" href="' . $g_root_path . '/adm_program/modules/members/members_function.php?usr_id=' . $row['usr_id'] . '&amp;mode=6"><img
                                    src="' . THEME_PATH . '/icons/delete.png" alt="' . $gL10n->get('MEM_REMOVE_USER') . '" title="' . $gL10n->get('MEM_REMOVE_USER') . '" /></a>';
    }
    $columnValues[] = $userAdministration;
    $membersTable->addRowByArray($columnValues);
    ++$irow;
}
$page->addHtml($membersTable->show(false));
// show html of complete page
$page->show();