예제 #1
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&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()) {
        $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();
예제 #2
0
            $iconText = $gL10n->get('SYS_NOT_MEMBER_OF_ORGANIZATION', $gCurrentOrganization->getValue('org_longname'));
        }
        // Haekchen setzen ob jemand Mitglied ist oder nicht
        if ($user['member_this_role']) {
            $htmlMemberStatus = '<input type="checkbox" id="member_' . $user['usr_id'] . '" name="member_' . $user['usr_id'] . '" checked="checked" class="memlist_checkbox memlist_member" /><b id="loadindicator_member_' . $user['usr_id'] . '"></b>';
        } else {
            $htmlMemberStatus = '<input type="checkbox" id="member_' . $user['usr_id'] . '" name="member_' . $user['usr_id'] . '" class="memlist_checkbox memlist_member" /><b id="loadindicator_member_' . $user['usr_id'] . '"></b>';
        }
        if (strlen($addressText) > 1) {
            $htmlAddress = '<img class="admidio-icon-info" src="' . THEME_PATH . '/icons/map.png" alt="' . $addressText . '" title="' . $addressText . '" />';
        }
        // Haekchen setzen ob jemand Leiter ist oder nicht
        if ($user['leader_this_role']) {
            $htmlRoleLeader = '<input type="checkbox" id="leader_' . $user['usr_id'] . '" name="leader_' . $user['usr_id'] . '" checked="checked" class="memlist_checkbox memlist_leader" />';
        } else {
            $htmlRoleLeader = '<input type="checkbox" id="leader_' . $user['usr_id'] . '" name="leader_' . $user['usr_id'] . '" class="memlist_checkbox memlist_leader" />';
        }
        // Geburtstag nur ausgeben wenn bekannt
        if (strlen($user['birthday']) > 0) {
            $birthdayDate = new DateTimeExtended($user['birthday'], 'Y-m-d');
            $htmlBirthday = $birthdayDate->format($gPreferences['system_date']);
        }
        // create array with all column values
        $columnValues = array(array('value' => '<img class="admidio-icon-info" src="' . THEME_PATH . '/icons/' . $icon . '" alt="' . $iconText . '" title="' . $iconText . '" />', 'order' => $memberOfThisOrganization), $htmlMemberStatus, '<a href="' . $g_root_path . '/adm_program/modules/profile/profile.php?user_id=' . $user['usr_id'] . '">' . $user['last_name'] . '</a>', '<a href="' . $g_root_path . '/adm_program/modules/profile/profile.php?user_id=' . $user['usr_id'] . '">' . $user['first_name'] . '</a>', array('value' => $htmlAddress, 'order' => $addressText), $htmlBirthday, $htmlRoleLeader . '<b id="loadindicator_leader_' . $user['usr_id'] . '"></b>');
        $table->addRowByArray($columnValues, 'userid_' . $user['usr_id']);
    }
    //End While
    $page->addHtml($table->show(false));
    $page->addHtml('<p>' . $gL10n->get('SYS_CHECKBOX_AUTOSAVE') . '</p>');
    $page->show();
}
예제 #3
0
// Mark for change between leader and member
$listRowNumber = 1;
foreach ($membersList as $member) {
    if ($getMode !== 'csv') {
        // in print preview and pdf we group the role leaders and the members and
        // add a specific header for them
        if ($lastGroupHead != $member['mem_leader'] && ($member['mem_leader'] != 0 || $lastGroupHead != -1)) {
            if ($member['mem_leader'] == 1) {
                $title = $gL10n->get('SYS_LEADERS');
            } else {
                // if list has leaders then initialize row number for members
                $listRowNumber = 1;
                $title = $gL10n->get('SYS_PARTICIPANTS');
            }
            if ($getMode === 'print' || $getMode === 'pdf') {
                $table->addRowByArray(array($title), null, array('class' => 'admidio-group-heading'), 1, $list->countColumns() + 1);
            }
            $lastGroupHead = $member['mem_leader'];
        }
    }
    // if html mode and the role has leaders then group all data between leaders and members
    if ($getMode === 'html') {
        if ($member['mem_leader'] != 0) {
            $table->setDatatablesGroupColumn(2);
        } else {
            $table->setDatatablesColumnsHide(2);
        }
    }
    $columnValues = array();
    // Fields of recordset
    for ($columnNumber = 1; $columnNumber <= $list->countColumns(); ++$columnNumber) {
예제 #4
0
                }
            }
        } else {
            if (strpos($row['user'], ':') > 0) {
                $receiverName .= '; ' . $modulemessages->msgGroupNameSplit($row['user']);
            } else {
                $user = new User($gDb, $gProfileFields, $row['user']);
                $receiverName .= '; ' . $user->getValue('FIRST_NAME') . ' ' . $user->getValue('LAST_NAME');
            }
        }
        $receiverName = substr($receiverName, 2);
        $message = new TableMessage($gDb, $row['msg_id']);
        ++$key;
        $messageAdministration = $part1 . $key . '&amp;name=' . urlencode($message->getValue('msg_subject')) . '&amp;database_id=' . $message->getValue('msg_id') . $part2;
        // @ptabaden: changed order and icons, changed order, delted two cols
        $table->addRowByArray(array('<h4 id="mail_timestamp">' . $message->getValue('msg_timestamp') . '</h4><div id="mail" class="table_group"><h4 id="mail_receiver">' . $gL10n->get('MSG_OPPOSITE') . ': ' . $receiverName . '</h4><h3 id="event_title"><a ' . $href . $message->getValue('msg_id') . '">' . $message->getValue('msg_subject') . '</a></h3></div>', $messageAdministration), 'row_message_' . $key);
    }
}
// find all unread PM messages
$statement = $modulemessages->msgGetUserUnread($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 . '&amp;name=' . urlencode($message->getValue('msg_subject')) . '&amp;database_id=' . $message->getValue('msg_id') . $part2;
예제 #5
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();
$columnHeading[] = $gL10n->get('SYS_FIELD');
$columnHeading[] = $gL10n->get('SYS_NEW_VALUE');
$columnHeading[] = $gL10n->get('SYS_PREVIOUS_VALUE');
$columnHeading[] = $gL10n->get('SYS_EDITED_BY');
$columnHeading[] = $gL10n->get('SYS_CHANGED_AT');
$table->addRowHeadingByArray($columnHeading);
while ($row = $fieldHistoryStatement->fetch()) {
    $timestampCreate = new DateTimeExtended($row['usl_timestamp_create'], 'Y-m-d H:i:s');
    $columnValues = array();
    if ($getUserId === 0) {
        $columnValues[] = '<a href="' . $g_root_path . '/adm_program/modules/profile/profile.php?user_id=' . $row['usl_usr_id'] . '">' . $row['last_name'] . ', ' . $row['first_name'] . '</a>';
    }
    $columnValues[] = $gProfileFields->getPropertyById($row['usl_usf_id'], 'usf_name');
    $uslValueNew = $gProfileFields->getHtmlValue($gProfileFields->getPropertyById($row['usl_usf_id'], 'usf_name_intern'), $row['usl_value_new']);
    if ($uslValueNew !== '') {
        $columnValues[] = $uslValueNew;
    } else {
        $columnValues[] = '&nbsp;';
    }
    $uslValueOld = $gProfileFields->getHtmlValue($gProfileFields->getPropertyById($row['usl_usf_id'], 'usf_name_intern'), $row['usl_value_old']);
    if ($uslValueOld !== '') {
        $columnValues[] = $uslValueOld;
    } else {
        $columnValues[] = '&nbsp;';
    }
    $columnValues[] = '<a href="' . $g_root_path . '/adm_program/modules/profile/profile.php?user_id=' . $row['usl_usr_id_create'] . '">' . $row['create_last_name'] . ', ' . $row['create_first_name'] . '</a>';
    $columnValues[] = $timestampCreate->format($gPreferences['system_date'] . ' ' . $gPreferences['system_time']);
    $table->addRowByArray($columnValues);
}
$page->addHtml($table->show(false));
$page->show();
예제 #7
0
                             <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));
         // 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>');
예제 #8
0
파일: fields.php 프로젝트: sistlind/admidio
        $hidden = '<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') . '" />';
    }
    if ($userField->getValue('usf_disabled') == 1) {
        $disable = '<img class="admidio-icon-info" 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')) . '" />';
    } else {
        $disable = '<img class="admidio-icon-info" src="' . THEME_PATH . '/icons/textfield.png" alt="' . $gL10n->get('ORG_FIELD_NOT_DISABLED') . '" title="' . $gL10n->get('ORG_FIELD_NOT_DISABLED') . '" />';
    }
    if ($userField->getValue('usf_mandatory') == 1) {
        $mandatory = '<img class="admidio-icon-info" src="' . THEME_PATH . '/icons/asterisk_yellow.png" alt="' . $gL10n->get('ORG_FIELD_REQUIRED') . '" title="' . $gL10n->get('ORG_FIELD_REQUIRED') . '" />';
    } else {
        $mandatory = '<img class="admidio-icon-info" src="' . THEME_PATH . '/icons/asterisk_gray.png" alt="' . $gL10n->get('ORG_FIELD_NOT_MANDATORY') . '" title="' . $gL10n->get('ORG_FIELD_NOT_MANDATORY') . '" />';
    }
    $userFieldText = array('CHECKBOX' => $gL10n->get('SYS_CHECKBOX'), 'DATE' => $gL10n->get('SYS_DATE'), 'DROPDOWN' => $gL10n->get('SYS_DROPDOWN_LISTBOX'), 'EMAIL' => $gL10n->get('SYS_EMAIL'), 'RADIO_BUTTON' => $gL10n->get('SYS_RADIO_BUTTON'), 'PHONE' => $gL10n->get('SYS_PHONE'), 'TEXT' => $gL10n->get('SYS_TEXT') . ' (100)', 'TEXT_BIG' => $gL10n->get('SYS_TEXT') . ' (4000)', 'URL' => $gL10n->get('ORG_URL'), 'NUMBER' => $gL10n->get('SYS_NUMBER'), 'DECIMAL' => $gL10n->get('SYS_DECIMAL_NUMBER'));
    $usfSystem = '<a class="admidio-icon-link" href="' . $g_root_path . '/adm_program/modules/preferences/fields_new.php?usf_id=' . $userField->getValue('usf_id') . '"><img
                    src="' . THEME_PATH . '/icons/edit.png" alt="' . $gL10n->get('SYS_EDIT') . '" title="' . $gL10n->get('SYS_EDIT') . '" /></a>';
    if ($userField->getValue('usf_system') == 1) {
        $usfSystem .= '<img class="admidio-icon-link" src="' . THEME_PATH . '/icons/dummy.png" alt="dummy" />';
    } else {
        $usfSystem .= '<a class="admidio-icon-link" data-toggle="modal" data-target="#admidio_modal"
                        href="' . $g_root_path . '/adm_program/system/popup_message.php?type=usf&amp;element_id=row_usf_' . $userField->getValue('usf_id') . '&amp;name=' . urlencode($userField->getValue('usf_name')) . '&amp;database_id=' . $userField->getValue('usf_id') . '"><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/preferences/fields_new.php?usf_id=' . $userField->getValue('usf_id') . '">' . $userField->getValue('usf_name') . '</a>', '<a class="admidio-icon-link" href="javascript:moveCategory(\'up\', ' . $userField->getValue('usf_id') . ')"><img
            src="' . THEME_PATH . '/icons/arrow_up.png" alt="' . $gL10n->get('ORG_FIELD_UP') . '" title="' . $gL10n->get('ORG_FIELD_UP') . '" /></a>
        <a class="admidio-icon-link" href="javascript:moveCategory(\'down\', ' . $userField->getValue('usf_id') . ')"><img
            src="' . THEME_PATH . '/icons/arrow_down.png" alt="' . $gL10n->get('ORG_FIELD_DOWN') . '" title="' . $gL10n->get('ORG_FIELD_DOWN') . '" /></a>', $description, $hidden, $disable, $mandatory, $userFieldText[$userField->getValue('usf_type')], $usfSystem);
    $table->addRowByArray($columnValues, 'row_usf_' . $userField->getValue('usf_id'));
}
$page->addHtml($table->show(false));
$page->show();
예제 #9
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();
예제 #10
0
$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'), '&nbsp;');
$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&amp;element_id=row_user_' . $row['usr_id'] . '&amp;name=' . urlencode($row['first_name'] . ' ' . $row['last_name']) . '&amp;database_id=' . $row['usr_id'] . '"><img
            src="' . THEME_PATH . '/icons/delete.png" alt="' . $gL10n->get('SYS_DELETE') . '" title="' . $gL10n->get('SYS_DELETE') . '" /></a>');
    $table->addRowByArray($columnValues, 'row_user_' . $row['usr_id']);
}
$page->addHtml($table->show(false));
$page->show();
예제 #11
0
                    $ReceiverName .= '; ' . $user->getValue('FIRST_NAME') . ' ' . $user->getValue('LAST_NAME');
                }
            }
        } else {
            if (strpos($row['user'], ':') > 0) {
                $ReceiverName .= '; ' . $modulemessages->msgGroupNameSplit($row['user']);
            } else {
                $user = new User($gDb, $gProfileFields, $row['user']);
                $ReceiverName .= '; ' . $user->getValue('FIRST_NAME') . ' ' . $user->getValue('LAST_NAME');
            }
        }
        $ReceiverName = substr($ReceiverName, 2);
        $message = new TableMessage($gDb, $row['msg_id']);
        ++$key;
        $messageAdministration = $part1 . $key . '&amp;name=' . urlencode($message->getValue('msg_subject')) . '&amp;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/email.png" alt="' . $gL10n->get('SYS_EMAIL') . '" title="' . $gL10n->get('SYS_EMAIL') . '" />', '<a ' . $href . $message->getValue('msg_id') . '">' . $message->getValue('msg_subject') . '</a>', $ReceiverName, $message->getValue('msg_timestamp'), $messageAdministration), 'row_message_' . $key);
    }
}
// find all unread PM messages
$statement = $modulemessages->msgGetUserUnread($gCurrentUser->getValue('usr_id'));
if (isset($result)) {
    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 . '&amp;name=' . urlencode($message->getValue('msg_subject')) . '&amp;database_id=' . $message->getValue('msg_id') . $part2;
예제 #12
0
    $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&amp;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&amp;element_id=row_file_' . $key . '&amp;name=' . urlencode($old_backup_file) . '&amp;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) {
        $columnValues = array('&nbsp;', $gL10n->get('BAC_SUM'), $backup_size_sum . ' kB', '&nbsp;');
        $table->addRowByArray($columnValues);
    }
    $page->addHtml($table->show(false));
} elseif ($getMode === 'create_backup') {
    ob_start();
    include SERVER_PATH . '/adm_program/modules/backup/backup_script.php';
    $page->addHtml(ob_get_contents());
    ob_end_clean();
    // show button with link to backup list
    $form = new HtmlForm('show_backup_list_form', $g_root_path . '/adm_program/modules/backup/backup.php', $page);
    $form->addSubmitButton('btn_update_overview', $gL10n->get('BAC_BACK_TO_BACKUP_PAGE'), array('icon' => THEME_PATH . '/icons/back.png'));
예제 #13
0
    $gMessage->show($gL10n->get('SYS_INVALID_PAGE_VIEW'));
}
for ($j = 0; $j + $getStart < $numMembers; $j++) {
    if ($row = $gDb->fetch_array($resultList)) {
        if ($getMode == 'print' || $getMode == 'pdf') {
            // in print preview and pdf we group the role leaders and the members and
            // add a specific header for them
            if ($lastGroupHead != $row['mem_leader'] && ($row['mem_leader'] != 0 || $lastGroupHead != -1)) {
                if ($row['mem_leader'] == 1) {
                    $title = $gL10n->get('SYS_LEADER');
                } else {
                    // if list has leaders then initialize row number for members
                    $listRowNumber = 1;
                    $title = $gL10n->get('SYS_PARTICIPANTS');
                }
                $table->addRowByArray(array($title), null, array('class' => 'admidio-group-heading'), 1, $list->countColumns() + 1);
                $lastGroupHead = $row['mem_leader'];
            }
        }
        // if html mode and the role has leaders then group all data between leaders and members
        if ($getMode == 'html') {
            if ($row['mem_leader'] != 0) {
                $table->setDatatablesGroupColumn(2);
            } else {
                $table->setDatatablesColumnsHide(2);
            }
        }
        $columnValues = array();
        // Felder zu Datensatz
        for ($columnNumber = 1; $columnNumber <= $list->countColumns(); $columnNumber++) {
            $column = $list->getColumnObject($columnNumber);
예제 #14
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();