$photoAlbum = new TablePhotos($gDb, $getPhotoId); $_SESSION['photo_album'] =& $photoAlbum; } // check if album belongs to current organization if ($photoAlbum->getValue('pho_org_shortname') != $gCurrentOrganization->getValue('org_shortname')) { $gMessage->show($gL10n->get('SYS_INVALID_PAGE_VIEW')); } if ($getMode == 'choose_files') { // delete old stuff in upload folder $uploadFolder = new Folder(SERVER_PATH . '/adm_my_files/photos/upload'); $uploadFolder->delete('', true); // create html page object $page = new HtmlPage(); $page->hideThemeHtml(); $page->hideMenu(); $page->addCssFile($g_root_path . '/adm_program/libs/jquery-file-upload/css/jquery.fileupload.css'); $page->addJavascriptFile($g_root_path . '/adm_program/libs/jquery-file-upload/js/vendor/jquery.ui.widget.js'); $page->addJavascriptFile($g_root_path . '/adm_program/libs/jquery-file-upload/js/jquery.iframe-transport.js'); $page->addJavascriptFile($g_root_path . '/adm_program/libs/jquery-file-upload/js/jquery.fileupload.js'); $page->addJavascript(' var countErrorFiles = 0; $(function () { "use strict"; $("#fileupload").fileupload({ url: "photoupload.php?mode=upload_files&pho_id=' . $getPhotoId . '", sequentialUploads: true, dataType: "json", done: function (e, data) { $.each(data.result.files, function (index, file) { if(typeof file.error != "undefined") {
$html['label'] = $gInventoryFields->getProperty($fieldNameIntern, 'inf_name'); $html['value'] = $value; } return $html; } unset($_SESSION['profile_request']); // set headline $headline = $gL10n->get('PRO_PROFILE_FROM', $inventory->getValue('ITEM_NAME')); // if user id was not set and own profile should be shown then initialize navigation if (!isset($_GET['item_id'])) { $gNavigation->clear(); } $gNavigation->addUrl(CURRENT_URL, $headline); // create html page object $page = new HtmlPage($headline); $page->addCssFile($g_root_path . '/adm_program/libs/bootstrap-datepicker/css/datepicker3.css'); $page->addJavascriptFile($g_root_path . '/adm_program/modules/profile/profile.js'); $page->addJavascriptFile($g_root_path . '/adm_program/libs/bootstrap-datepicker/js/bootstrap-datepicker.js'); $page->addJavascriptFile($g_root_path . '/adm_program/libs/bootstrap-datepicker/js/locales/bootstrap-datepicker.' . $gPreferences['system_language'] . '.js'); $page->addJavascript(' var profileJS = new profileJSClass(); profileJS.deleteRole_ConfirmText = "' . $gL10n->get('ROL_MEMBERSHIP_DEL', '[rol_name]') . '"; profileJS.deleteFRole_ConfirmText = "' . $gL10n->get('ROL_LINK_MEMBERSHIP_DEL', '[rol_name]') . '"; profileJS.setBy_Text = "' . $gL10n->get('SYS_SET_BY') . '"; profileJS.inv_id = ' . $inventory->getValue('inv_id') . '; function showHideMembershipInformation(element) { id = "#" + element.attr("id") + "_Content"; if($(id).css("display") === "none") { $(id).show("fast");
unset($_SESSION['profile_request']); // set headline if ($user->getValue('usr_id') == $gCurrentUser->getValue('usr_id')) { $headline = $gL10n->get('PRO_MY_PROFILE'); } else { $headline = $gL10n->get('PRO_PROFILE_FROM', $user->getValue('FIRST_NAME'), $user->getValue('LAST_NAME')); } // if user id was not set and own profile should be shown then initialize navigation if (!isset($_GET['user_id'])) { $gNavigation->clear(); } $gNavigation->addUrl(CURRENT_URL, $headline); // create html page object $page = new HtmlPage($headline); $page->enableModal(); $page->addCssFile('adm_program/libs/bootstrap-datepicker/css/bootstrap-datepicker3.css'); $page->addJavascriptFile('adm_program/libs/bootstrap-datepicker/js/bootstrap-datepicker.js'); $page->addJavascriptFile('adm_program/libs/bootstrap-datepicker/locales/bootstrap-datepicker.' . $gL10n->getLanguageIsoCode() . '.min.js'); $page->addJavascriptFile('adm_program/modules/profile/profile.js'); $page->addJavascript(' var profileJS = new profileJSClass(); profileJS.deleteRole_ConfirmText = "' . $gL10n->get('ROL_MEMBERSHIP_DEL', '[rol_name]') . '"; profileJS.deleteFRole_ConfirmText = "' . $gL10n->get('ROL_LINK_MEMBERSHIP_DEL', '[rol_name]') . '"; profileJS.setBy_Text = "' . $gL10n->get('SYS_SET_BY') . '"; profileJS.usr_id = ' . $user->getValue('usr_id') . '; function showHideMembershipInformation(element) { id = "#" + element.attr("id") + "_Content"; if($(id).css("display") === "none") { $(id).show("fast");
$page->addRssFile($g_root_path . '/adm_program/modules/photos/rss_photos.php?headline=' . $getHeadline, $gL10n->get('SYS_RSS_FEED_FOR_VAR', $gCurrentOrganization->getValue('org_longname') . ' - ' . $getHeadline)); } if ($gCurrentUser->editPhotoRight()) { $page->addJavascript(' // rotate image function imgrotate(img, direction) { $.get("' . $g_root_path . '/adm_program/modules/photos/photo_function.php", {pho_id: ' . $getPhotoId . ', photo_nr: img, job: "rotate", direction: direction}, function(data) { // Anhängen der Zufallszahl ist nötig um den Browsercache zu überlisten $("#img_"+img).attr("src", "photo_show.php?pho_id=' . $getPhotoId . '&photo_nr="+img+"&thumb=1&rand="+Math.random()); return false; }); }'); } // integrate bootstrap ekko lightbox addon if ($gPreferences['photo_show_mode'] == 1) { $page->addCssFile('adm_program/libs/lightbox/ekko-lightbox.css'); $page->addJavascriptFile('adm_program/libs/lightbox/ekko-lightbox.js'); $page->addJavascript('$(document).delegate("*[data-toggle=\\"lightbox\\"]", "click", function(event) { event.preventDefault(); $(this).ekkoLightbox(); });', true); } $page->addJavascript(' $("body").on("hidden.bs.modal", ".modal", function () { $(this).removeData("bs.modal"); location.reload(); }); $("#menu_item_upload_photo").attr("data-toggle", "modal"); $("#menu_item_upload_photo").attr("data-target", "#admidio_modal"); $(".admidio-btn-album-upload").click(function(event) { $.get("' . $g_root_path . '/adm_program/system/file_upload.php?module=photos&id=" + $(this).attr("data-pho-id"), function(response) { $(".modal-content").html(response); $("#admidio_modal").modal(); } ); });
require_once '../../system/common.php'; // check for valid login if (!$gValidLogin) { $gMessage->show($gL10n->get('SYS_INVALID_PAGE_VIEW')); } // check if the call of the page was allowed by settings if ($gPreferences['enable_chat_module'] != 1) { // message if the Chat is not allowed $gMessage->show($gL10n->get('SYS_MODULE_DISABLED')); } $headline = 'Admidio Chat'; // add current url to navigation stack $gNavigation->addUrl(CURRENT_URL, $headline); // create html page object $page = new HtmlPage($headline); $page->addCssFile(THEME_PATH . '/css/chat.css'); $page->addJavascriptFile('adm_program/modules/messages/chat.js'); $page->addJavascript(' // kick off chat var chat = new Chat(); chat.getState(); $(function() { // watch textarea for release of key press [enter] $("#sendie").keyup(function(e) { if (e.keyCode === 13) { var text = $(this).val().trim(); if (text.length > 0) { chat.send(text);
} if ($gCurrentUser->editPhotoRight()) { $page->addJavascript(' // rotate image function imgrotate(img, direction) { $.get("' . $g_root_path . '/adm_program/modules/photos/photo_function.php", {pho_id: ' . $getPhotoId . ', photo_nr: img, job: "rotate", direction: direction}, function(data){ //Anhängen der Zufallszahl ist nötig um den Browsercache zu überlisten $("#img_"+img).attr("src", "photo_show.php?pho_id=' . $getPhotoId . '&photo_nr="+img+"&thumb=1&rand="+Math.random()); return false; }); }'); } // integrate bootstrap ekko lightbox addon if ($gPreferences['photo_show_mode'] == 1) { if ($gDebug) { $page->addCssFile($g_root_path . '/adm_program/libs/lightbox/ekko-lightbox.css'); $page->addJavascriptFile($g_root_path . '/adm_program/libs/lightbox/ekko-lightbox.js'); } else { $page->addCssFile($g_root_path . '/adm_program/libs/lightbox/ekko-lightbox.min.css'); $page->addJavascriptFile($g_root_path . '/adm_program/libs/lightbox/ekko-lightbox.min.js'); } $page->addJavascript('$(document).delegate("*[data-toggle=\\"lightbox\\"]", "click", function(event) { event.preventDefault(); $(this).ekkoLightbox(); });', true); } $page->addJavascript(' $("body").on("hidden.bs.modal", ".modal", function () { $(this).removeData("bs.modal"); location.reload(); }); $("#menu_item_upload_photo").attr("data-toggle", "modal"); $("#menu_item_upload_photo").attr("data-target", "#admidio_modal"); $(".admidio-btn-album-upload").click(function(event){ $.get("' . $g_root_path . '/adm_program/modules/photos/photoupload.php?pho_id=" + $(this).attr("data-pho-id"), function(response) { $(".modal-content").html(response);
$textSelectFiles = $gL10n->get('DOW_SELECT_FILES'); $iconUploadPath = THEME_PATH . '/icons/page_white_upload.png'; } // check if the server allow file uploads if (ini_get('file_uploads') !== '1') { $gMessage->show($gL10n->get('SYS_SERVER_NO_UPLOAD')); } if ($getMode === 'choose_files') { // delete old stuff in upload folder $uploadFolder = new Folder(SERVER_PATH . '/adm_my_files/photos/upload'); $uploadFolder->delete('', true); // create html page object $page = new HtmlPage(); $page->hideThemeHtml(); $page->hideMenu(); $page->addCssFile('adm_program/libs/jquery-file-upload/css/jquery.fileupload.css'); $page->addJavascriptFile('adm_program/libs/jquery-file-upload/js/vendor/jquery.ui.widget.js'); $page->addJavascriptFile('adm_program/libs/jquery-file-upload/js/jquery.iframe-transport.js'); $page->addJavascriptFile('adm_program/libs/jquery-file-upload/js/jquery.fileupload.js'); $page->addJavascript(' var countErrorFiles = 0; var countFiles = 0; $(function () { "use strict"; $("#fileupload").fileupload({ url: "../../system/file_upload.php?module=' . $getModule . '&mode=upload_files&id=' . $getId . '", sequentialUploads: true, dataType: "json", add: function (e, data) { $("#files").html("");