Esempio n. 1
0
    $_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") {
                        $("<p/>").html("<div class=\\"alert alert-danger\\"><span class=\\"glyphicon glyphicon-exclamation-sign\\"></span>"
Esempio n. 2
0
        $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");
        } else {
    }
    // check if a registration to this event is possible
    if ($date->getValue('dat_rol_id') > 0) {
        $dateRegistrationPossible = 1;
    }
    // check if current user is assigned to this date
    $dateCurrentUserAssigned = $gCurrentUser->isLeaderOfRole($date->getValue('dat_rol_id'));
}
if ($date->getValue('dat_rol_id') > 0) {
    $dateRoleID = $date->getValue('dat_rol_id');
} else {
    $dateRoleID = '0';
}
// create html page object
$page = new HtmlPage($headline);
$page->addJavascriptFile('adm_program/system/js/date-functions.js');
$page->addJavascript('
    // Funktion blendet Zeitfelder ein/aus
    function setAllDay() {
        if ($("#dat_all_day:checked").val() !== undefined) {
            $("#date_from_time").hide();
            $("#date_to_time").hide();
        } else {
            $("#date_from_time").show("slow");
            $("#date_to_time").show("slow");
        }
    }

    function setDateParticipation() {
        if ($("#date_registration_possible:checked").val() !== undefined) {
            $("#date_current_user_assigned_group").show("slow");
Esempio n. 4
0
}
if (isset($_SESSION['ecard_request'])) {
    // if user is returned to this form after he submit it,
    // then try to restore all values that he has entered before
    $template = $_SESSION['ecard_request']['ecard_template'];
    $recipients = $_SESSION['ecard_request']['ecard_recipients'];
    $message = $_SESSION['ecard_request']['ecard_message'];
} else {
    $template = $gPreferences['ecard_template'];
    $recipients = null;
    $message = '';
}
// create html page object
$page = new HtmlPage($headline);
$page->enableModal();
$page->addJavascriptFile('adm_program/libs/lightbox/ekko-lightbox.min.js');
$page->addJavascript('
    $(document).delegate("*[data-toggle=\\"lightbox\\"]", "click", function(event) { event.preventDefault(); $(this).ekkoLightbox(); });

    $("#admidio_modal").on("show.bs.modal", function () {
        $(this).find(".modal-dialog").css({width: "800px"});
    });

    $("#btn_ecard_preview").click(function(event) {
        event.preventDefault();
        $("#ecard_form input[id=\'submit_action\']").val("preview");
        $("#ecard_form textarea[name=\'ecard_message\']").text( CKEDITOR.instances.ecard_message.getData() );

        $.ajax({ // create an AJAX call...
            data: $("#ecard_form").serialize(), // get the form data
            type: "POST", // GET or POST
Esempio n. 5
0
                    }
                }
            });
        });
    });
    --></script>

    <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title">' . $headline . '</h4>
    </div>
    <div class="modal-body">';
} else {
    // create html page object
    $page = new HtmlPage($headline);
    $page->addJavascriptFile($g_root_path . '/adm_program/modules/profile/profile.js');
    $page->addJavascript('var profileJS = new profileJSClass();');
    // add back link to module menu
    $rolesMenu = $page->getMenu();
    $rolesMenu->addItem('menu_item_back', $gNavigation->getPreviousUrl(), $gL10n->get('SYS_BACK'), 'back.png');
}
// show headline of module
$html .= '<form id="roles_assignment_form" action="' . $g_root_path . '/adm_program/modules/profile/roles_save.php?usr_id=' . $getUserId . '&amp;new_user='******'&amp;inline=' . $getInline . '" method="post">';
// Create table
$table = new HtmlTable('role_assignment_table');
$columnHeading = array('&nbsp;', $gL10n->get('ROL_ROLE'), $gL10n->get('SYS_DESCRIPTION'), $gL10n->get('SYS_LEADER'));
$table->addRowHeadingByArray($columnHeading);
$table->setColumnAlignByArray(array('center', 'left', 'left', 'left'));
if ($gCurrentUser->manageRoles()) {
    // Benutzer mit Rollenrechten darf ALLE Rollen zuordnen
    $sql = 'SELECT cat_id, cat_name, rol_name, rol_description, rol_id, rol_visible, rol_leader_rights,
Esempio n. 6
0
// 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");
        } else {
Esempio n. 7
0
}
if (isset($_SESSION['ecard_request'])) {
    // if user is returned to this form after he submit it,
    // then try to restore all values that he has entered before
    $template = $_SESSION['ecard_request']['ecard_template'];
    $recipients = $_SESSION['ecard_request']['ecard_recipients'];
    $message = $_SESSION['ecard_request']['ecard_message'];
} else {
    $template = $gPreferences['ecard_template'];
    $recipients = null;
    $message = '';
}
// create html page object
$page = new HtmlPage($headline);
$page->enableModal();
$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(); });

    $("#admidio_modal").on("show.bs.modal", function () {
        $(this).find(".modal-dialog").css({width: "800px"});
    });

    $("#btn_ecard_preview").click(function(event) {
        event.preventDefault();
        $("#ecard_form input[id=\'submit_action\']").val("preview");
        $("#ecard_form textarea[name=\'ecard_message\']").text( CKEDITOR.instances.ecard_message.getData() );

        $.ajax({ // create an AJAX call...
            data: $("#ecard_form").serialize(), // get the form data
            type: "POST", // GET or POST
Esempio n. 8
0
                    }
                }
            });
        });
    });
    --></script>

    <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title">' . $headline . '</h4>
    </div>
    <div class="modal-body">';
} else {
    // create html page object
    $page = new HtmlPage($headline);
    $page->addJavascriptFile('adm_program/modules/profile/profile.js');
    $page->addJavascript('var profileJS = new profileJSClass();');
    // add back link to module menu
    $rolesMenu = $page->getMenu();
    $rolesMenu->addItem('menu_item_back', $gNavigation->getPreviousUrl(), $gL10n->get('SYS_BACK'), 'back.png');
}
// show headline of module
$html .= '<form id="roles_assignment_form" action="' . $g_root_path . '/adm_program/modules/profile/roles_save.php?usr_id=' . $getUserId . '&amp;new_user='******'&amp;inline=' . $getInline . '" method="post">';
// Create table
$table = new HtmlTable('role_assignment_table');
$columnHeading = array('&nbsp;', $gL10n->get('SYS_ROLE'), $gL10n->get('SYS_DESCRIPTION'), $gL10n->get('SYS_LEADER'));
$table->addRowHeadingByArray($columnHeading);
$table->setColumnAlignByArray(array('center', 'left', 'left', 'left'));
$table->setColumnsWidth(array('10%', '30%', '45%', '15%'));
if ($gCurrentUser->manageRoles()) {
    // Benutzer mit Rollenrechten darf ALLE Rollen zuordnen
Esempio n. 9
0
// 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);
                }
Esempio n. 10
0
// 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($g_root_path . '/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);
                }
Esempio n. 11
0
    }
    // check if a registration to this event is possible
    if ($date->getValue('dat_rol_id') > 0) {
        $dateRegistrationPossible = 1;
    }
    // check if current user is assigned to this date
    $dateCurrentUserAssigned = $gCurrentUser->isLeaderOfRole($date->getValue('dat_rol_id'));
}
if ($date->getValue('dat_rol_id') > 0) {
    $dateRoleID = $date->getValue('dat_rol_id');
} else {
    $dateRoleID = '0';
}
// create html page object
$page = new HtmlPage($headline);
$page->addJavascriptFile($g_root_path . '/adm_program/system/js/date-functions.js');
$page->addJavascript('
    // Funktion blendet Zeitfelder ein/aus
    function setAllDay() {
        if ($("#dat_all_day:checked").val() !== undefined) {
            $("#date_from_time").hide();
            $("#date_to_time").hide();
        }
        else {
            $("#date_from_time").show("slow");
            $("#date_to_time").show("slow");
        }
    }

    function setDateParticipation() {
        if ($("#date_registration_possible:checked").val() !== undefined) {