/** Display the error code and error message to the user if a database error occurred. * The error must be read by the child method. This method will call a backtrace so * you see the script and specific line in which the error occurred. * @param $code The database error code that will be displayed. * @param $message The database error message that will be displayed. * @return Will exit the script and returns a html output with the error informations. */ public function db_error($code = 0, $message = '') { global $g_root_path, $gMessage, $gPreferences, $gCurrentOrganization, $gDebug, $gL10n; $htmlOutput = ''; $backtrace = $this->getBacktrace(); // Rollback on open transaction if ($this->transactions > 0) { $this->rollback(); } if (!headers_sent() && isset($gPreferences) && defined('THEME_SERVER_PATH')) { // create html page object $page = new HtmlPage($gL10n->get('SYS_DATABASE_ERROR')); } // transform the database error to html $error_string = '<div style="font-family: monospace;"> <p><b>S Q L - E R R O R</b></p> <p><b>CODE:</b> ' . $code . '</p> ' . $message . '<br /><br /> <b>B A C K T R A C E</b><br /> ' . $backtrace . ' </div>'; $htmlOutput = $error_string; // in debug mode show error in log file if ($gDebug === 1) { error_log($code . ': ' . $message); } // display database error to user if (!headers_sent() && isset($gPreferences) && defined('THEME_SERVER_PATH')) { $page->addHtml($htmlOutput); $page->show(); } else { echo $htmlOutput; } exit; }
$form_values = $_SESSION['import_csv_request']; unset($_SESSION['import_csv_request']); if (!isset($form['first_row'])) { $form_values['first_row'] = 0; } } else { $form_values['first_row'] = 1; $form_values['import_coding'] = 'iso-8859-1'; $form_values['import_role_id'] = 0; } // create html page object $page = new HtmlPage($headline); // add back link to module menu $importCsvConfigMenu = $page->getMenu(); $importCsvConfigMenu->addItem('menu_item_back', $gNavigation->getPreviousUrl(), $gL10n->get('SYS_BACK'), 'back.png'); $page->addHtml('<p class="lead">' . $gL10n->get('MEM_ASSIGN_FIELDS_DESC') . '</p>'); // show form $form = new HtmlForm('import_assign_fields_form', $g_root_path . '/adm_program/modules/members/import_csv.php', $page, array('type' => 'vertical')); $form->addCheckbox('first_row', $gL10n->get('MEM_FIRST_LINE_COLUMN_NAME'), $form_values['first_row']); $htmlFieldTable = ' <table class="table table-condensed"> <thead> <tr> <th>' . $gL10n->get('MEM_PROFILE_FIELD') . '</th> <th>' . $gL10n->get('MEM_FILE_COLUMN') . '</th> </tr> </thead>'; $line = reset($_SESSION['file_lines']); $arrayCsvColumns = explode($_SESSION['value_separator'], $line); $category = ''; // jedes Benutzerfeld aus der Datenbank auflisten
} // Html-Kopf ausgeben if ($getLinkId > 0) { $headline = $gL10n->get('SYS_EDIT_VAR', $getHeadline); } else { $headline = $gL10n->get('SYS_CREATE_VAR', $getHeadline); } // add current url to navigation stack $gNavigation->addUrl(CURRENT_URL, $headline); // create html page object $page = new HtmlPage($headline); // add back link to module menu $linksCreateMenu = $page->getMenu(); $linksCreateMenu->addItem('menu_item_back', $gNavigation->getPreviousUrl(), $gL10n->get('SYS_BACK'), 'back.png'); // Html des Modules ausgeben if ($getLinkId > 0) { $modeEditOrCreate = '3'; } else { $modeEditOrCreate = '1'; } // show form $form = new HtmlForm('weblinks_edit_form', $g_root_path . '/adm_program/modules/links/links_function.php?lnk_id=' . $getLinkId . '&headline=' . $getHeadline . '&mode=' . $modeEditOrCreate, $page); $form->addInput('lnk_name', $gL10n->get('LNK_LINK_NAME'), $link->getValue('lnk_name'), array('maxLength' => 250, 'property' => FIELD_REQUIRED)); $form->addInput('lnk_url', $gL10n->get('LNK_LINK_ADDRESS'), $link->getValue('lnk_url'), array('maxLength' => 2000, 'property' => FIELD_REQUIRED)); $form->addSelectBoxForCategories('lnk_cat_id', $gL10n->get('SYS_CATEGORY'), $gDb, 'LNK', 'EDIT_CATEGORIES', array('property' => FIELD_REQUIRED, 'defaultValue' => $link->getValue('lnk_cat_id'))); $form->addEditor('lnk_description', $gL10n->get('SYS_DESCRIPTION'), $link->getValue('lnk_description'), array('height' => '150px')); $form->addSubmitButton('btn_save', $gL10n->get('SYS_SAVE'), array('icon' => THEME_PATH . '/icons/disk.png')); $form->addHtml(admFuncShowCreateChangeInfoById($link->getValue('lnk_usr_id_create'), $link->getValue('lnk_timestamp_create'), $link->getValue('lnk_usr_id_change'), $link->getValue('lnk_timestamp_change'))); // add form to html page and show page $page->addHtml($form->show(false)); $page->show();
} $page->setTitle($title); $page->setHeadline($headline); // Only for active members of a role if ($getShowMembers === 0) { // create filter menu with elements for start-/enddate $filterNavbar = new HtmlNavbar('menu_list_filter', null, null, 'filter'); $form = new HtmlForm('navbar_filter_form', $g_root_path . '/adm_program/modules/lists/lists_show.php', $page, array('type' => 'navbar', 'setFocus' => false)); $form->addInput('date_from', $gL10n->get('LST_ROLE_MEMBERSHIP_IN_PERIOD'), $dateFrom, array('type' => 'date', 'maxLength' => 10)); $form->addInput('date_to', $gL10n->get('LST_ROLE_MEMBERSHIP_TO'), $dateTo, array('type' => 'date', 'maxLength' => 10)); $form->addInput('lst_id', '', $getListId, array('property' => FIELD_HIDDEN)); $form->addInput('rol_ids', '', $getRoleIds, array('property' => FIELD_HIDDEN)); $form->addInput('show_members', '', $getShowMembers, array('property' => FIELD_HIDDEN)); $form->addSubmitButton('btn_send', $gL10n->get('SYS_OK')); $filterNavbar->addForm($form->show(false)); $page->addHtml($filterNavbar->show(false)); } $page->addHtml('<h5>' . $htmlSubHeadline . '</h5>'); $page->addJavascript(' $("#export_list_to").change(function () { if($(this).val().length > 1) { var result = $(this).val(); $(this).prop("selectedIndex",0); self.location.href = "' . $g_root_path . '/adm_program/modules/lists/lists_show.php?" + "lst_id=' . $getListId . '&rol_ids=' . $getRoleIds . '&mode=" + result + "&show_members=' . $getShowMembers . '&date_from=' . $getDateFrom . '&date_to=' . $getDateTo . '"; } }); $("#menu_item_print_view").click(function () { window.open("' . $g_root_path . '/adm_program/modules/lists/lists_show.php?lst_id=' . $getListId . '&rol_ids=' . $getRoleIds . '&mode=print&show_members=' . $getShowMembers . '&date_from=' . $getDateFrom . '&date_to=' . $getDateTo . '", "_blank"); });', true);
$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(); }
} // show link to edit profile $profileMenu->addItem('menu_item_new_entry', $g_root_path . '/adm_program/modules/inventory/item_new.php?item_id=' . $inventory->getValue('inv_id'), $gL10n->get('MEM_EDIT_USER'), 'edit.png'); $profileMenu->addItem('menu_item_extras', null, $gL10n->get('SYS_MORE_FEATURES'), null, 'right'); if ($gCurrentUser->isWebmaster()) { // show link to maintain profile fields $profileMenu->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 $profileMenu->addItem('menu_item_preferences_links', $g_root_path . '/adm_program/modules/preferences/preferences.php?show_option=profile', $gL10n->get('SYS_MODULE_PREFERENCES'), 'options.png', 'right', 'menu_item_extras'); } // ******************************************************************************* // User data block // ******************************************************************************* $page->addHtml(' <div class="panel panel-default" id="user_data_panel"> <div class="panel-heading">' . $gL10n->get('SYS_MASTER_DATA') . '</div> <div class="panel-body row"> <div class="col-sm-8">'); // create a static form $form = new HtmlForm('profile_user_data_form', null); $bAddressOutput = false; // Merker, ob die Adresse schon angezeigt wurde // Schleife ueber alle Felder der Stammdaten foreach ($gInventoryFields->mInventoryFields as $field) { // nur Felder der Stammdaten anzeigen if ($field->getValue('cat_name_intern') === 'MASTER_DATA' && $field->getValue('inv_hidden') == 0) { switch ($field->getValue('inf_name_intern')) { case 'ROOM_ID': $field = getFieldCode($field->getValue('inf_name_intern'), $getItemId); if ($gDbType === 'mysql') { $sql = 'SELECT CONCAT(room_name, \' (\', room_capacity, \'+\', IFNULL(room_overhang, \'0\'), \')\') as name
else { $("<p/>").html("<div class=\\"alert alert-danger\\"><span class=\\"glyphicon glyphicon-exclamation-sign\\"></span>' . $gL10n->get('PHO_PHOTO_UPLOAD_NOT_SUCCESSFUL') . '</div>").appendTo("#files"); } } }).prop("disabled", !$.support.fileInput) .parent().addClass($.support.fileInput ? undefined : "disabled"); });', true); $page->addHtml(' <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> <h4 class="modal-title">' . $headline . '</h4> </div> <div class="modal-body"> <p class="lead">' . $gL10n->get('PHO_PHOTO_UPLOAD_DESC', $photoAlbum->getValue('pho_name')) . '</p> <span class="btn btn-primary fileinput-button"><img src="' . THEME_PATH . '/icons/photo_upload.png" alt="' . $gL10n->get('PHO_UPLOAD_PHOTOS') . '" />' . $gL10n->get('PHO_SELECT_FOTOS') . ' <input id="fileupload" type="file" name="files[]" multiple> </span> <br> <br> <div id="progress" class="progress"> <div class="progress-bar progress-bar-success"></div> </div> <div id="files" class="files"></div> </div>'); $page->show(); } elseif ($getMode == 'upload_files') { // upload files to temp upload folder $uploadHandler = new UploadHandlerPhoto(array('upload_dir' => SERVER_PATH . '/adm_my_files/photos/upload/', 'upload_url' => $g_root_path . '/adm_my_files/photos/upload/', 'image_versions' => array(), 'accept_file_types' => '/\\.(jpe?g|png)$/i'), true, array('accept_file_types' => $gL10n->get('PHO_PHOTO_FORMAT_INVALID'))); }
$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();
$gMessage->show($gL10n->get('MEM_NO_CHANGES')); } } // create html page object $page = new HtmlPage($headline); // add back link to module menu $profileFieldHistoryMenu = $page->getMenu(); $profileFieldHistoryMenu->addItem('menu_item_back', $gNavigation->getPreviousUrl(), $gL10n->get('SYS_BACK'), 'back.png'); // create filter menu with input elements for Startdate and Enddate $FilterNavbar = new HtmlNavbar('menu_profile_field_history_filter', null, null, 'filter'); $form = new HtmlForm('navbar_filter_form', $g_root_path . '/adm_program/modules/members/profile_field_history.php?usr_id=' . $getUserId, $page, array('type' => 'navbar', 'setFocus' => false)); $form->addInput('filter_date_from', $gL10n->get('SYS_START'), $dateFromHtml, array('type' => 'date', 'maxLength' => 10)); $form->addInput('filter_date_to', $gL10n->get('SYS_END'), $dateToHtml, array('type' => 'date', 'maxLength' => 10)); $form->addSubmitButton('btn_send', $gL10n->get('SYS_OK')); $FilterNavbar->addForm($form->show(false)); $page->addHtml($FilterNavbar->show(false)); $table = new HtmlTable('profile_field_history_table', $page, true, true); $columnHeading = array(); if ($getUserId === 0) { $table->setDatatablesOrderColumns(array(array(6, 'desc'))); $columnHeading[] = $gL10n->get('SYS_NAME'); } else { $table->setDatatablesOrderColumns(array(array(5, 'desc'))); } $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()) {
$weblink = new TableWeblink($gDb, $getLinkId); // Wenn kein Link gefunden wurde Fehler ausgeben if (strlen($weblink->getValue('lnk_url')) === 0 || !$gValidLogin && $weblink->getValue('cat_hidden') == 1) { $gMessage->show($gL10n->get('SYS_INVALID_PAGE_VIEW')); } // Wenn Link gültig ist, Counter um eine Position erhöhen $weblink->setValue('lnk_counter', $weblink->getValue('lnk_counter') + 1); $weblink->save(); // MR: Neue Prüfung für direkte Weiterleitung oder mit Anzeige if ($gPreferences['weblinks_redirect_seconds'] > 0) { // create html page object $page = new HtmlPage($gL10n->get('LNK_REDIRECT')); // add special header for automatic redirection after x seconds $page->addHeader('<meta http-equiv="refresh" content="' . $gPreferences['weblinks_redirect_seconds'] . '; url=' . $weblink->getValue('lnk_url') . '">'); // Counter zählt die sekunden bis zur Weiterleitung runter $page->addJavascript(' function countDown(init) { if (init || --document.getElementById("counter").firstChild.nodeValue > 0 ) { window.setTimeout( "countDown()" , 1000 ); } }; countDown(true);'); // Html des Modules ausgeben $page->addHtml(' <p class="lead">' . $gL10n->get('LNK_REDIRECT_DESC', $gCurrentOrganization->getValue('org_longname'), '<span id="counter">' . $gPreferences['weblinks_redirect_seconds'] . '</span>', '<strong>' . $weblink->getValue('lnk_name') . '</strong> (' . $weblink->getValue('lnk_url') . ')', '<a href="' . $weblink->getValue('lnk_url') . '" target="_self">hier</a>') . ' </p>'); // show html of complete page $page->show(); } else { header('Location:' . $weblink->getValue('lnk_url')); }
$("#btn_show_list").click(function() {send("show");}); for(var counter = 0; counter < ' . $default_column_rows . '; counter++) { addColumn(); } });', true); // if mylist was not called directly then show link to navigate to previous page if ($gNavigation->count() > 1) { // add back link to module menu $myListMenu = $page->getMenu(); $myListMenu->addItem('menu_item_back', $gNavigation->getPreviousUrl(), $gL10n->get('SYS_BACK'), 'back.png'); } $page->addHtml(' <form id="form_mylist" class="form-horizontal" action="' . $g_root_path . '/adm_program/modules/lists/mylist_prepare.php" method="post"> <p><b>1.</b> ' . $gL10n->get('LST_CHANGE_LIST') . '</p> <div class="form-group"> <label class="col-sm-3 control-label" for="lists_config">' . $gL10n->get('LST_CONFIGURATION_LIST') . '</label> <div class="col-sm-9"> <select class="form-control" size="1" id="lists_config" name="lists_config" onchange="loadList()"> <option '); if ($getListId == 0) { $selected = ' selected="selected" '; } else { $selected = ''; } $page->addHtml($selected . ' value="0">' . $gL10n->get('LST_CREATE_NEW_CONFIGURATION') . '</option>'); // alle relevanten Konfigurationen fuer den User suchen $sql = 'SELECT * FROM ' . TBL_LISTS . ' WHERE lst_org_id = ' . $gCurrentOrganization->getValue('org_id') . ' AND ( lst_usr_id = ' . $gCurrentUser->getValue('usr_id') . ' OR lst_global = 1) ORDER BY lst_global ASC, lst_name ASC, lst_timestamp DESC ';
$photoPresenterMenu = $page->getMenu(); // if you have no popup or colorbox then show a button back to the album if ($gPreferences['photo_show_mode'] == 2) { $photoPresenterMenu->addItem('menu_item_back_to_album', $g_root_path . '/adm_program/modules/photos/photos.php?pho_id=' . $getPhotoId, $gL10n->get('PHO_BACK_TO_ALBUM'), 'application_view_tile.png'); } // show link to navigate to next and previous photos if ($previousImage > 0) { $photoPresenterMenu->addItem('menu_item_previous_photo', $urlPreviousImage, $gL10n->get('PHO_PREVIOUS_PHOTO'), 'back.png'); } if ($nextImage <= $photoAlbum->getValue('pho_quantity')) { $photoPresenterMenu->addItem('menu_item_next_photo', $urlNextImage, $gL10n->get('PHO_NEXT_PHOTO'), 'forward.png'); } } // Show photo with link to next photo if ($nextImage <= $photoAlbum->getValue('pho_quantity')) { $page->addHtml('<div class="admidio-img-presenter"><a href="' . $urlNextImage . '"><img src="' . $urlCurrentImage . '" alt="Foto"></a></div>'); } else { $page->addHtml('<div class="admidio-img-presenter"><img src="' . $urlCurrentImage . '" alt="' . $gL10n->get('SYS_PHOTO') . '" /></div>'); } if ($gPreferences['photo_show_mode'] == 0) { // in popup mode show buttons for prev, next and close $page->addHtml(' <div class="btn-group"> <button class="btn btn-default" onclick="window.location.href=\'' . $urlPreviousImage . '\'"><img src="' . THEME_PATH . '/icons/back.png" alt="' . $gL10n->get('PHO_PREVIOUS_PHOTO') . '" />' . $gL10n->get('PHO_PREVIOUS_PHOTO') . '</button> <button class="btn btn-default" onclick="parent.window.close()"><img src="' . THEME_PATH . '/icons/door_in.png" alt="' . $gL10n->get('SYS_CLOSE_WINDOW') . '" />' . $gL10n->get('SYS_CLOSE_WINDOW') . '</button> <button class="btn btn-default" onclick="window.location.href=\'' . $urlNextImage . '\'"><img src="' . THEME_PATH . '/icons/forward.png" alt="' . $gL10n->get('PHO_NEXT_PHOTO') . '" />' . $gL10n->get('PHO_NEXT_PHOTO') . '</button> </div>'); } elseif ($gPreferences['photo_show_mode'] == 2) {
} $htmlMoveRow = ' '; 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 = ' '; 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 = ' '; 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') . '&type=' . $getType . '&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&element_id=row_' . $category->getValue('cat_id') . '&name=' . urlencode($category->getValue('cat_name')) . '&database_id=' . $category->getValue('cat_id') . '&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') . '&type=' . $getType . '&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();
// show link to system preferences of weblinks $DatesMenu->addItem('admMenuItemPreferencesLinks', $g_root_path . '/adm_program/modules/preferences/preferences.php?show_option=events', $gL10n->get('SYS_MODULE_PREFERENCES'), 'options.png', 'right'); } elseif ($gCurrentUser->editDates()) { // if no calendar selectbox is shown, then show link to edit calendars $DatesMenu->addItem('admMenuItemCategories', '/adm_program/modules/categories/categories.php?type=DAT&title=' . $gL10n->get('DAT_CALENDAR'), $gL10n->get('DAT_MANAGE_CALENDARS'), 'application_view_tile.png'); } } // create filter menu with elements for calendar and start-/enddate $FilterNavbar = new HtmlNavbar('menu_dates_filter', null, null, 'filter'); $form = new HtmlForm('navbar_filter_form', $g_root_path . '/adm_program/modules/dates/dates.php?headline=' . $getHeadline, $page, array('type' => 'navbar', 'setFocus' => false)); $form->addSelectBoxForCategories('cat_id', $gL10n->get('DAT_CALENDAR'), $gDb, 'DAT', 'FILTER_CATEGORIES', array('defaultValue' => $dates->getParameter('cat_id'))); $form->addInput('date_from', $gL10n->get('SYS_START'), $dates->getParameter('dateStartFormatAdmidio'), array('type' => 'date', 'maxLength' => 10)); $form->addInput('date_to', $gL10n->get('SYS_END'), $dates->getParameter('dateEndFormatAdmidio'), array('type' => 'date', 'maxLength' => 10)); $form->addSubmitButton('btn_send', $gL10n->get('SYS_OK')); $FilterNavbar->addForm($form->show(false)); $page->addHtml($FilterNavbar->show(false)); } if ($datesTotalCount == 0) { // No events found if ($getId > 0) { $page->addHtml('<p>' . $gL10n->get('SYS_NO_ENTRY') . '</p>'); } else { $page->addHtml('<p>' . $gL10n->get('SYS_NO_ENTRIES') . '</p>'); } } else { // Output table header for compact view if ($getViewMode === 'compact') { $compactTable = new HtmlTable('events_compact_table', $page, true, true); $columnHeading = array(' ', $gL10n->get('SYS_START'), $gL10n->get('DAT_DATE'), $gL10n->get('SYS_PARTICIPANTS'), $gL10n->get('DAT_LOCATION')); $compactTable->addRowHeadingByArray($columnHeading); }
} if ($getMode === 1) { // create html page object $page = new HtmlPage($gL10n->get('MEM_REMOVE_USER')); // add back link to module menu $messageMenu = $page->getMenu(); $messageMenu->addItem('menu_item_back', $gNavigation->getPreviousUrl(), $gL10n->get('SYS_BACK'), 'back.png'); $page->addHtml(' <div class="message"> <p class="lead"> <img src="' . THEME_PATH . '/icons/profile.png" alt="' . $gL10n->get('SYS_FORMER') . '" /> ' . $gL10n->get('MEM_MAKE_FORMER') . '<br /><br /> <img src="' . THEME_PATH . '/icons/delete.png" alt="' . $gL10n->get('MEM_REMOVE_USER') . '" /> ' . $gL10n->get('MEM_REMOVE_USER_DESC', $gL10n->get('SYS_DELETE')) . ' </p> <button id="btnFormer" type="button" class="btn btn-primary" onclick="self.location.href=\'' . $g_root_path . '/adm_program/modules/members/members_function.php?usr_id=' . $getUserId . '&mode=2\'"><img src="' . THEME_PATH . '/icons/profile.png" alt="' . $gL10n->get('SYS_FORMER') . '" /> ' . $gL10n->get('SYS_FORMER') . '</button> <button id="btnDelete" type="button" class="btn btn-primary" onclick="self.location.href=\'' . $g_root_path . '/adm_program/modules/members/members_function.php?usr_id=' . $getUserId . '&mode=3\'"><img src="' . THEME_PATH . '/icons/delete.png" alt="' . $gL10n->get('SYS_DELETE') . '" /> ' . $gL10n->get('SYS_DELETE') . '</button> </div>'); $page->show(); exit; } elseif ($getMode === 2) { // User NUR aus der aktuellen Organisation entfernen // Es duerfen keine Webmaster entfernt werden if (!$gCurrentUser->isWebmaster() && $user->isWebmaster()) { $gMessage->show($gL10n->get('SYS_NO_RIGHTS'));
// Jede Rolle wird nun dem Array hinzugefuegt $parentRoleSet[] = array($row_roles->rol_id, $row_roles->rol_name, $row_roles->cat_name); } } else { // create new array with numeric keys for logic of method addSelectBox $newParentRoleSet = array(); foreach ($parentRoleSet as $role) { $newParentRoleSet[] = array($role['rol_id'], $role['rol_name'], null); } $parentRoleSet = $newParentRoleSet; } // get assigned roles of this folder $roleSet = $folder->getRoleArrayOfFolder(); // if no roles are assigned then set "all users" as default if (count($roleSet) === 0) { $roleSet[] = 0; } // create html page object $page = new HtmlPage($headline); // add back link to module menu // @ptabaden: Changed Icon $folderConfigMenu = $page->getMenu(); $folderConfigMenu->addItem('menu_item_back', $gNavigation->getPreviousUrl(), '<i class="fa fa-arrow-left" alt="' . $gL10n->get('SYS_BACK') . '" title="' . $gL10n->get('SYS_BACK') . '"></i><div class="iconDescription">' . $gL10n->get('SYS_BACK') . '</div>', ''); $page->addHtml('<p class="lead">' . $gL10n->get('DOW_ROLE_ACCESS_PERMISSIONS_DESC', $folder->getValue('fol_name')) . '</p>'); // show form $form = new HtmlForm('folder_rights_form', $g_root_path . '/adm_program/modules/downloads/download_function.php?mode=7&folder_id=' . $getFolderId, $page); $form->addSelectBox('adm_allowed_roles', $gL10n->get('DAT_VISIBLE_TO'), $parentRoleSet, array('property' => FIELD_REQUIRED, 'defaultValue' => $roleSet, 'multiselect' => true)); $form->addSubmitButton('btn_save', $gL10n->get('SYS_SAVE'), array('icon' => THEME_PATH . '/icons/disk.png', 'class' => ' col-sm-offset-3')); // add form to html page and show page $page->addHtml($form->show(false)); $page->show();
} } // 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&folder_id=' . $getFolderId . '&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();
/** * Create a html page if necessary and show the message with the configured buttons. * @param string $content The message text that should be shown. The content could have html. * @param string $headline Optional a headline for the message. Default will be SYS_NOTE. */ public function show($content, $headline = '') { // noetig, da dies bei den includes benoetigt wird global $gDb, $gL10n, $page; $html = ''; // first perform a rollback in database if there is an open transaction $gDb->rollback(); // Ueberschrift setzen, falls diese vorher nicht explizit gesetzt wurde if ($headline === '') { $headline = $gL10n->get('SYS_NOTE'); } // Variablen angeben if (!$this->inline) { // nur pruefen, wenn vorher nicht schon auf true gesetzt wurde $this->inline = headers_sent(); } if (!$this->inline) { // create html page object $page = new HtmlPage($headline); $page->hideMenu(); if (!$this->includeThemeBody) { // don't show custom html of the current theme $page->hideThemeHtml(); } // forward to next page after x seconds if ($this->timer > 0) { $page->addJavascript('window.setTimeout("window.location.href=\'' . $this->forwardUrl . '\'", ' . $this->timer . ');'); } } elseif (!$this->modalWindowMode) { header('Content-type: text/html; charset=utf-8'); $html .= '<h1>' . $headline . '</h1>'; } // create html for buttons $htmlButtons = ''; if ($this->showButtons) { if ($this->forwardUrl !== '') { if ($this->showYesNoButtons) { $htmlButtons .= ' <button id="admButtonYes" class="btn" type="button" onclick="self.location.href=\'' . $this->forwardUrl . '\'"> <img src="' . THEME_PATH . '/icons/ok.png" alt="' . $gL10n->get('SYS_YES') . '" /> ' . $gL10n->get('SYS_YES') . ' </button> <button id="admButtonNo" class="btn" type="button" onclick="history.back()"> <img src="' . THEME_PATH . '/icons/error.png" alt="' . $gL10n->get('SYS_NO') . '" /> ' . $gL10n->get('SYS_NO') . ' </button>'; } else { // Wenn weitergeleitet wird, dann auch immer einen Weiter-Button anzeigen $htmlButtons .= ' <a class="btn" href="' . $this->forwardUrl . '">' . $gL10n->get('SYS_NEXT') . ' <img src="' . THEME_PATH . '/icons/forward.png" alt="' . $gL10n->get('SYS_NEXT') . '" title="' . $gL10n->get('SYS_NEXT') . '" /> </a>'; } } else { // Wenn nicht weitergeleitet wird, dann immer einen Zurueck-Button anzeigen // bzw. ggf. einen Fenster-Schließen-Button if (!$this->modalWindowMode) { $htmlButtons .= ' <a class="btn" href="javascript:history.back()"> <img src="' . THEME_PATH . '/icons/back.png" alt="' . $gL10n->get('SYS_BACK') . '" title="' . $gL10n->get('SYS_BACK') . '" />' . $gL10n->get('SYS_BACK') . '</a>'; } } } if ($this->modalWindowMode) { $html .= ' <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span> </button> <h4 class="modal-title">' . $headline . '</h4> </div> <div class="modal-body">' . $content . '</div> <div class="modal-footer">' . $htmlButtons . '</div>'; } else { $html .= ' <div class="message"> <p class="lead">' . $content . '</p> ' . $htmlButtons . ' </div>'; } if ($this->showTextOnly) { // show the pure message text without any html echo strip_tags($content); } elseif ($this->showHtmlTextOnly) { // show the pure message text with their html echo $content; } elseif ($this->inline) { // show the message in html but without the theme specific header and body echo $html; } else { // show a Admidio html page with complete theme header and body $page->addHtml($html); $page->show(); } exit; }
if ($gPreferences['enable_guestbook_module'] == 1 || $gPreferences['enable_guestbook_module'] == 2 && $gValidLogin) { $moduleMenu->addItem('guestbk', '/adm_program/modules/guestbook/guestbook.php', $gL10n->get('GBO_GUESTBOOK'), '/icons/guestbook_big.png', $gL10n->get('GBO_GUESTBOOK_DESC')); } $moduleMenu->addItem('lists', '/adm_program/modules/lists/lists.php', $gL10n->get('LST_LISTS'), '/icons/lists_big.png', $gL10n->get('LST_LISTS_DESC')); if ($gValidLogin) { $moduleMenu->addSubItem('lists', 'mylist', '/adm_program/modules/lists/mylist.php', $gL10n->get('LST_MY_LIST')); $moduleMenu->addSubItem('lists', 'rolinac', '/adm_program/modules/lists/lists.php?active_role=0', $gL10n->get('ROL_INACTIV_ROLE')); } if ($gPreferences['enable_dates_module'] == 1 || $gPreferences['enable_dates_module'] == 2 && $gValidLogin) { $moduleMenu->addItem('dates', $g_root_path . '/adm_program/modules/dates/dates.php', $gL10n->get('DAT_DATES'), '/icons/dates_big.png', $gL10n->get('DAT_DATES_DESC')); $moduleMenu->addSubItem('dates', 'olddates', '/adm_program/modules/dates/dates.php?mode=old', $gL10n->get('DAT_PREVIOUS_DATES', $gL10n->get('DAT_DATES'))); } if ($gPreferences['enable_weblinks_module'] == 1 || $gPreferences['enable_weblinks_module'] == 2 && $gValidLogin) { $moduleMenu->addItem('links', $g_root_path . '/adm_program/modules/links/links.php', $gL10n->get('LNK_WEBLINKS'), '/icons/weblinks_big.png', $gL10n->get('LNK_WEBLINKS_DESC')); } $page->addHtml($moduleMenu->show(true)); // menu with links to all administration pages of Admidio if the user has the right to administrate if ($gCurrentUser->isWebmaster() || $gCurrentUser->manageRoles() || $gCurrentUser->approveUsers() || $gCurrentUser->editUsers()) { $adminMenu = new Menu('index_administration', $gL10n->get('SYS_ADMINISTRATION')); if ($gCurrentUser->approveUsers() && $gPreferences['registration_mode'] > 0) { $adminMenu->addItem('newreg', '/adm_program/modules/registration/registration.php', $gL10n->get('NWU_NEW_REGISTRATIONS'), '/icons/new_registrations_big.png', $gL10n->get('NWU_MANAGE_NEW_REGISTRATIONS_DESC')); } if ($gCurrentUser->editUsers()) { $adminMenu->addItem('usrmgt', '/adm_program/modules/members/members.php', $gL10n->get('MEM_USER_MANAGEMENT'), '/icons/user_administration_big.png', $gL10n->get('MEM_USER_MANAGEMENT_DESC')); } if ($gCurrentUser->manageRoles()) { $adminMenu->addItem('roladm', '/adm_program/modules/roles/roles.php', $gL10n->get('ROL_ROLE_ADMINISTRATION'), '/icons/roles_big.png', $gL10n->get('ROL_ROLE_ADMINISTRATION_DESC')); } if ($gCurrentUser->isWebmaster()) { $adminMenu->addItem('dbback', '/adm_program/modules/backup/backup.php', $gL10n->get('BAC_DATABASE_BACKUP'), '/icons/backup_big.png', $gL10n->get('BAC_DATABASE_BACKUP_DESC')); $adminMenu->addItem('orgprop', '/adm_program/modules/preferences/preferences.php', $gL10n->get('SYS_SETTINGS'), '/icons/options_big.png', $gL10n->get('ORG_ORGANIZATION_PROPERTIES_DESC'));
$form = new HtmlForm('login_form', $g_root_path . '/adm_program/system/login_check.php', $page, array('showRequiredFields' => false)); $form->addInput('usr_login_name', $gL10n->get('SYS_USERNAME'), null, array('maxLength' => 35, 'property' => FIELD_REQUIRED, 'class' => 'form-control-small')); // TODO Future: 'minLength' => 8 $form->addInput('usr_password', $gL10n->get('SYS_PASSWORD'), null, array('type' => 'password', 'property' => FIELD_REQUIRED, 'class' => 'form-control-small')); // show selectbox with all organizations of database if ($gPreferences['system_organization_select'] == 1) { $sql = 'SELECT org_id, org_longname FROM ' . TBL_ORGANIZATIONS . ' ORDER BY org_longname ASC, org_shortname ASC'; $form->addSelectBoxFromSql('org_id', $gL10n->get('SYS_ORGANIZATION'), $gDb, $sql, array('property' => FIELD_REQUIRED, 'defaultValue' => $gCurrentOrganization->getValue('org_id'))); } if ($gPreferences['enable_auto_login'] == 1) { $form->addCheckbox('auto_login', $gL10n->get('SYS_REMEMBER_ME'), '0'); } $form->addSubmitButton('btn_login', $gL10n->get('SYS_LOGIN'), array('icon' => THEME_PATH . '/icons/key.png')); $page->addHtml($form->show(false)); if ($gPreferences['registration_mode'] > 0) { $page->addHtml(' <div id="login_registration_link"> <small><a href="' . $g_root_path . '/adm_program/modules/registration/registration.php">' . $gL10n->get('SYS_WANT_REGISTER') . '</a></small> </div>'); } // Link bei Loginproblemen if ($gPreferences['enable_password_recovery'] == 1 && $gPreferences['enable_system_mails'] == 1) { // neues Passwort zusenden $mail_link = $g_root_path . '/adm_program/system/lost_password.php'; } elseif ($gPreferences['enable_mail_module'] == 1 && $roleWebmaster->getValue('rol_mail_this_role') == 3) { // Mailmodul aufrufen mit Webmaster als Ansprechpartner $mail_link = $g_root_path . '/adm_program/modules/messages/messages_write.php?rol_id=' . $roleWebmaster->getValue('rol_id') . '&subject=' . $gL10n->get('SYS_LOGIN_PROBLEMS'); } else { // direkte Mail an den Webmaster ueber einen externen Mailclient
$DatesMenu->addItem('admMenuItemPreferencesLinks', $g_root_path . '/adm_program/modules/preferences/preferences.php?show_option=events', $gL10n->get('SYS_MODULE_PREFERENCES'), 'options.png', 'right', 'menu_item_extras'); } elseif ($gCurrentUser->editDates()) { // if no calendar selectbox is shown, then show link to edit calendars $DatesMenu->addItem('admMenuItemCategories', '/adm_program/modules/categories/categories.php?type=DAT&title=' . $gL10n->get('DAT_CALENDAR'), $gL10n->get('DAT_MANAGE_CALENDARS'), 'application_view_tile.png', 'right', 'menu_item_extras'); } } // create filter menu with elements for calendar and start-/enddate $FilterNavbar = new HtmlNavbar('menu_dates_filter', null, null, 'filter'); $form = new HtmlForm('navbar_filter_form', $g_root_path . '/adm_program/modules/dates/dates.php?headline=' . $getHeadline . '&view=' . $getView, $page, array('type' => 'navbar', 'setFocus' => false)); $form->addSelectBoxForCategories('cat_id', $gL10n->get('DAT_CALENDAR'), $gDb, 'DAT', 'FILTER_CATEGORIES', array('defaultValue' => $dates->getParameter('cat_id'))); $form->addInput('date_from', $gL10n->get('SYS_START'), $dates->getParameter('dateStartFormatAdmidio'), array('type' => 'date', 'maxLength' => 10)); $form->addInput('date_to', $gL10n->get('SYS_END'), $dates->getParameter('dateEndFormatAdmidio'), array('type' => 'date', 'maxLength' => 10)); $form->addInput('view', '', $getView, array('property' => FIELD_HIDDEN)); $form->addSubmitButton('btn_send', $gL10n->get('SYS_OK')); $FilterNavbar->addForm($form->show(false)); $page->addHtml($FilterNavbar->show(false)); } elseif ($getViewMode === 'print') { $datatable = false; $hoverRows = false; $classTable = 'table table-condensed table-striped'; // create html page object without the custom theme files $page->hideThemeHtml(); $page->hideMenu(); $page->setPrintMode(); $page->addHtml('<h3>' . $gL10n->get('DAT_PERIOD_FROM_TO', $dates->getParameter('dateStartFormatAdmidio'), $dates->getParameter('dateEndFormatAdmidio')) . '</h3>'); } if ($datesTotalCount == 0) { // No events found if ($getId > 0) { $page->addHtml('<p>' . $gL10n->get('SYS_NO_ENTRY') . '</p>'); } else {
$_SESSION['roles_request'] = $_POST; if ($getMode === 1) { // create html page object $page = new HtmlPage($gL10n->get('ROL_ROLE_DELETE')); // add back link to module menu $messageMenu = $page->getMenu(); $messageMenu->addItem('menu_item_back', $gNavigation->getPreviousUrl(), $gL10n->get('SYS_BACK'), 'back.png'); $page->addHtml(' <div class="message"> <p class="lead"> <img src="' . THEME_PATH . '/icons/roles_gray.png" alt="' . $gL10n->get('ROL_INACTIV_ROLE') . '" /> ' . $gL10n->get('ROL_INACTIV_ROLE_DESC') . '<br /><br /> <img src="' . THEME_PATH . '/icons/delete.png" alt="' . $gL10n->get('ROL_ROLE_DELETE') . '" /> ' . $gL10n->get('ROL_HINT_DELETE_ROLE', $gL10n->get('SYS_DELETE')) . ' </p> <button id="btn_inactive" type="button" class="btn btn-primary" onclick="self.location.href=\'' . $g_root_path . '/adm_program/modules/roles/roles_function.php?rol_id=' . $getRoleId . '&mode=3\'"><img src="' . THEME_PATH . '/icons/roles_gray.png" alt="' . $gL10n->get('ROL_INACTIV_ROLE') . '" /> ' . $gL10n->get('ROL_INACTIV_ROLE') . '</button> <button id="btn_delete" type="button" class="btn btn-primary" onclick="self.location.href=\'' . $g_root_path . '/adm_program/modules/roles/roles_function.php?rol_id=' . $getRoleId . '&mode=4\'"><img src="' . THEME_PATH . '/icons/delete.png" alt="' . $gL10n->get('SYS_DELETE') . '" /> ' . $gL10n->get('SYS_DELETE') . '</button> </div>'); $page->show(); exit; } elseif ($getMode === 2) { // Rolle anlegen oder updaten if (!array_key_exists('rol_name', $_POST) || $_POST['rol_name'] === '') { // es sind nicht alle Felder gefuellt $gMessage->show($gL10n->get('SYS_FIELD_EMPTY', $gL10n->get('SYS_NAME')));
$urlCreateNewUser = $g_root_path . '/adm_program/modules/registration/registration_function.php?mode=5&new_user_id=' . $getNewUserId; } if ($members_found === 0) { // if user doesn't exists than show profile or auto assign roles header('Location: ' . $urlCreateNewUser); exit; } $gNavigation->addUrl(CURRENT_URL, $headline); // create html page object $page = new HtmlPage($headline); // add back link to module menu $registrationAssignMenu = $page->getMenu(); $registrationAssignMenu->addItem('menu_item_back', $gNavigation->getPreviousUrl(), $gL10n->get('SYS_BACK'), 'back.png'); $page->addHtml(' <p class="lead">' . $gL10n->get('SYS_SIMILAR_USERS_FOUND', $new_user->getValue('FIRST_NAME') . ' ' . $new_user->getValue('LAST_NAME')) . '</p> <div class="panel panel-default"> <div class="panel-heading">' . $gL10n->get('SYS_USERS_FOUND') . '</div> <div class="panel-body">'); // show all found users with their address who have a similar name and show link for further handling $i = 0; while ($row = $usrStatement->fetchObject()) { if ($i > 0) { $page->addHtml('<hr />'); } $page->addHtml('<p> <a class="btn" href="' . $g_root_path . '/adm_program/modules/profile/profile.php?user_id=' . $row->usr_id . '"><img src="' . THEME_PATH . '/icons/profile.png" alt="' . $gL10n->get('SYS_SHOW_PROFILE') . '" />' . $row->first_name . ' ' . $row->last_name . '</a><br />'); if ($row->address !== '') { $page->addHtml($row->address . '<br />'); } if ($row->zip_code !== '' || $row->city !== '') {
$preferencesMenu = $page->getMenu(); $preferencesMenu->addItem('menu_item_back', $gNavigation->getPreviousUrl(), $gL10n->get('SYS_BACK'), 'back.png'); } else { // Navigation of the module starts here $gNavigation->addStartUrl(CURRENT_URL, $headline); } $page->addHtml(' <ul class="nav nav-tabs" id="preferences_tabs"> <li id="tabs_nav_common"><a href="#tabs-common" data-toggle="tab">' . $gL10n->get('SYS_COMMON') . '</a></li> <li id="tabs_nav_modules"><a href="#tabs-modules" data-toggle="tab">' . $gL10n->get('SYS_MODULES') . '</a></li> </ul> <div class="tab-content"> <div class="tab-pane" id="tabs-common"> <div class="panel-group" id="accordion_common"> <div class="panel panel-default" id="panel_common"> <div class="panel-heading"> <h4 class="panel-title"> <a data-toggle="collapse" data-parent="#accordion_common" href="#collapse_common"> <img class="admidio-panel-heading-icon" src="' . THEME_PATH . '/icons/options.png" alt="' . $gL10n->get('SYS_COMMON') . '" />' . $gL10n->get('SYS_COMMON') . ' </a> </h4> </div> <div id="collapse_common" class="panel-collapse collapse"> <div class="panel-body">'); // show form $form = new HtmlForm('common_preferences_form', $g_root_path . '/adm_program/modules/preferences/preferences_function.php?form=common', $page, array('class' => 'form-preferences')); // search all available themes in theme folder $themes = admFuncGetDirectoryEntries(SERVER_PATH . '/adm_themes', 'dir'); $form->addSelectBox('theme', $gL10n->get('ORG_ADMIDIO_THEME'), $themes, array('property' => FIELD_REQUIRED, 'defaultValue' => $form_values['theme'], 'helpTextIdInline' => 'ORG_ADMIDIO_THEME_DESC')); $form->addInput('homepage_logout', $gL10n->get('SYS_HOMEPAGE') . '<br />(' . $gL10n->get('SYS_VISITORS') . ')', $form_values['homepage_logout'], array('maxLength' => 250, 'property' => FIELD_REQUIRED, 'helpTextIdInline' => 'ORG_HOMEPAGE_VISITORS'));
$gNavigation->addUrl(CURRENT_URL, $headline); if (isset($_SESSION['download_request'])) { $form_values = strStripSlashesDeep($_SESSION['download_request']); unset($_SESSION['download_request']); } else { $form_values['new_folder'] = null; $form_values['new_description'] = null; } try { // get recordset of current folder from database $folder = new TableFolder($gDb); $folder->getFolderForDownload($getFolderId); } catch (AdmException $e) { $e->showHtml(); } $parentFolderName = $folder->getValue('fol_name'); // create html page object $page = new HtmlPage($headline); // add back link to module menu // @ptabaden: Changed icon of back button $folderNewMenu = $page->getMenu(); $folderNewMenu->addItem('menu_item_back', $gNavigation->getPreviousUrl(), '<i class="fa fa-arrow-left" alt="' . $gL10n->get('SYS_BACK') . '" title="' . $gL10n->get('SYS_BACK') . '"></i><div class="iconDescription">' . $gL10n->get('SYS_BACK') . '</div>', ''); $page->addHtml('<p class="lead">' . $gL10n->get('DOW_CREATE_FOLDER_DESC', $parentFolderName) . '</p>'); // show form $form = new HtmlForm('new_folder_form', $g_root_path . '/adm_program/modules/downloads/download_function.php?mode=3&folder_id=' . $getFolderId, $page); $form->addInput('new_folder', $gL10n->get('SYS_NAME'), $form_values['new_folder'], array('maxLength' => 255, 'property' => FIELD_REQUIRED)); $form->addMultilineTextInput('new_description', $gL10n->get('SYS_DESCRIPTION'), $form_values['new_description'], 4, array('maxLength' => 4000)); $form->addSubmitButton('btn_create', $gL10n->get('DOW_CREATE_FOLDER'), array('icon' => THEME_PATH . '/icons/folder_create.png', 'class' => ' col-sm-offset-3')); // add form to html page and show page $page->addHtml($form->show(false)); $page->show();
cha_username.usr_login_name as change_name '; $additionalTables = ' LEFT JOIN ' . TBL_USERS . ' cre_username ON cre_username.usr_id = room_usr_id_create LEFT JOIN ' . TBL_USERS . ' cha_username ON cha_username.usr_id = room_usr_id_change '; } //read rooms from database $sql = 'SELECT room.*, ' . $additionalFields . ' FROM ' . TBL_ROOMS . ' room ' . $additionalTables . ' ORDER BY room_name'; $rooms_result = $gDb->query($sql); if ($gDb->num_rows($rooms_result) == 0) { // Keine Räume gefunden $page->addHtml('<p>' . $gL10n->get('SYS_NO_ENTRIES') . '</p>'); } else { $room = new TableRooms($gDb); //Räume auflisten while ($row = $gDb->fetch_array($rooms_result)) { // GB-Objekt initialisieren und neuen DS uebergeben $room->clear(); $room->setArray($row); $page->addHtml(' <div class="panel panel-primary" id="room_' . $room->getValue('room_id') . '"> <div class="panel-heading"> <div class="pull-left"> <img class="admidio-panel-heading-icon" src="' . THEME_PATH . '/icons/home.png" alt="' . $room->getValue('room_name') . '" />' . $room->getValue('room_name') . ' </div> <div class="pull-right text-right"> <a class="admidio-icon-link" href="' . $g_root_path . '/adm_program/modules/rooms/rooms_new.php?room_id=' . $room->getValue('room_id') . '&headline=' . $textRoom . '"><img
$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'] . '&mode=6"><img src="' . THEME_PATH . '/icons/delete.png" alt="' . $gL10n->get('MEM_REMOVE_USER') . '" title="' . $gL10n->get('MEM_REMOVE_USER') . '" /></a>'; } else { $itemAdministration .= ' <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();
$guestbookMenu->addItem('admMenuItemPreferencesGuestbook', $g_root_path . '/adm_program/modules/preferences/preferences.php?show_option=guestbook', $gL10n->get('SYS_MODULE_PREFERENCES'), 'options.png', 'right'); } $guestbook = new TableGuestbook($gDb); // Alle Gaestebucheintraege fuer die aktuelle Seite ermitteln $sql = 'SELECT * FROM ' . TBL_GUESTBOOK . ' gbo WHERE gbo_org_id = ' . $gCurrentOrganization->getValue('org_id') . ' ' . $conditions . ' ORDER BY gbo_timestamp_create DESC LIMIT ' . $guestbook_entries_per_page . ' OFFSET ' . $getStart; $guestbookStatement = $gDb->query($sql); $countGuestbookEntries = $guestbookStatement->rowCount(); if ($countGuestbookEntries === 0) { // Keine Gaestebucheintraege gefunden if ($getGboId > 0) { $page->addHtml('<p>' . $gL10n->get('SYS_NO_ENTRY') . '</p>'); } else { $page->addHtml('<p>' . $gL10n->get('SYS_NO_ENTRIES') . '</p>'); } } else { // Gaestebucheintraege auflisten while ($row = $guestbookStatement->fetch()) { // GB-Objekt initialisieren und neuen DS uebergeben $guestbook->clear(); $guestbook->setArray($row); $page->addHtml(' <div class="panel panel-primary" id="gbo_' . $guestbook->getValue('gbo_id') . '"> <div class="panel-heading"> <div class="pull-left"> <img class="admidio-panel-heading-icon" src="' . THEME_PATH . '/icons/guestbook.png" alt="' . $guestbook->getValue('gbo_name') . '" />' . $guestbook->getValue('gbo_name')); // Falls eine Homepage des Users angegeben wurde, soll der Link angezeigt werden...
require_once '../../installation/db_scripts/preferences.php'; // set some specific preferences whose values came from user input of the installation wizard $orga_preferences['email_administrator'] = $_POST['orgaEmail']; $orga_preferences['system_language'] = $gPreferences['system_language']; // create all necessary data for this organization $newOrganization->setPreferences($orga_preferences, false); $newOrganization->createBasicData($gCurrentUser->getValue('usr_id')); // if installation of second organization than show organization select at login if ($gCurrentOrganization->countAllRecords() === 2) { $sql = 'UPDATE ' . TBL_PREFERENCES . ' SET prf_value = 1 WHERE prf_name = \'system_organization_select\' '; $gDb->query($sql); } $gDb->endTransaction(); // create html page object $page = new HtmlPage($gL10n->get('INS_SETUP_WAS_SUCCESSFUL')); $page->addHtml('<p class="lead">' . $gL10n->get('ORG_ORGANIZATION_SUCCESSFULL_ADDED', $_POST['orgaLongName']) . '</p>'); // show form $form = new HtmlForm('add_new_organization_form', $g_root_path . '/adm_program/modules/preferences/preferences.php', $page); $form->addSubmitButton('btn_foward', $gL10n->get('SYS_NEXT'), array('icon' => THEME_PATH . '/icons/forward.png')); // add form to html page and show page $page->addHtml($form->show(false)); $page->show(); // clean up unset($_SESSION['add_organization_request']); break; case 4: // show php info page echo phpinfo(); break; }
$sysmail->addRecipient($user->getValue('EMAIL'), $user->getValue('FIRST_NAME', 'database') . ' ' . $user->getValue('LAST_NAME', 'database')); $sysmail->setVariable(1, $newPassword); $sysmail->setVariable(2, $g_root_path . '/adm_program/system/password_activation.php?usr_id=' . $user->getValue('usr_id') . '&aid=' . $activationId); $sysmail->sendSystemMail('SYSMAIL_ACTIVATION_LINK', $user); $user->saveChangesWithoutRights(); $user->save(); $gMessage->setForwardUrl($g_root_path . '/adm_program/system/login.php'); $gMessage->show($gL10n->get('SYS_LOSTPW_SEND', $_POST['recipient_email'])); } catch (AdmException $e) { $e->showHtml(); } } else { /*********************HTML_PART*******************************/ // create html page object $page = new HtmlPage($headline); // add back link to module menu $lostPasswordMenu = $page->getMenu(); $lostPasswordMenu->addItem('menu_item_back', $gNavigation->getPreviousUrl(), $gL10n->get('SYS_BACK'), 'back.png'); $page->addHtml('<p class="lead">' . $gL10n->get('SYS_PASSWORD_FORGOTTEN_DESCRIPTION') . '</p>'); // show form $form = new HtmlForm('lost_password_form', $g_root_path . '/adm_program/system/lost_password.php', $page); $form->addInput('recipient_email', $gL10n->get('SYS_EMAIL'), null, array('maxLength' => 50, 'property' => FIELD_REQUIRED)); // if captchas are enabled then visitors of the website must resolve this if (!$gValidLogin && $gPreferences['enable_mail_captcha'] == 1) { $form->addCaptcha('captcha', $gPreferences['captcha_type']); } $form->addSubmitButton('btn_send', $gL10n->get('SYS_SEND'), array('icon' => THEME_PATH . '/icons/email.png')); // add form to html page and show page $page->addHtml($form->show(false)); $page->show(); }