当前位置: 首页>>代码示例>>PHP>>正文


PHP HtmlPage::getMenu方法代码示例

本文整理汇总了PHP中HtmlPage::getMenu方法的典型用法代码示例。如果您正苦于以下问题:PHP HtmlPage::getMenu方法的具体用法?PHP HtmlPage::getMenu怎么用?PHP HtmlPage::getMenu使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在HtmlPage的用法示例。


在下文中一共展示了HtmlPage::getMenu方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: AND

                secondSequence = actSequence - 1;
            }
        } else {
            if (nextNode !== null) {
                actRow.parentNode.insertBefore(nextNode, actRow);
                secondSequence = actSequence + 1;
            }
        }

        if (secondSequence > 0) {
            // Nun erst mal die neue Position von dem gewaehlten Feld aktualisieren
            $.get(gRootPath + "/adm_program/modules/preferences/fields_function.php?usf_id=" + usfID + "&mode=4&sequence=" + direction);
        }
    }');
// get module menu
$fieldsMenu = $page->getMenu();
// show back link
$fieldsMenu->addItem('menu_item_back', $gNavigation->getPreviousUrl(), $gL10n->get('SYS_BACK'), 'back.png');
// define link to create new profile field
$fieldsMenu->addItem('menu_item_new_field', $g_root_path . '/adm_program/modules/preferences/fields_new.php', $gL10n->get('ORG_CREATE_PROFILE_FIELD'), 'add.png');
// define link to maintain categories
$fieldsMenu->addItem('menu_item_maintain_category', $g_root_path . '/adm_program/modules/categories/categories.php?type=USF', $gL10n->get('SYS_MAINTAIN_CATEGORIES'), 'application_double.png');
$sql = 'SELECT * FROM ' . TBL_CATEGORIES . ', ' . TBL_USER_FIELDS . '
         WHERE cat_type   = \'USF\'
           AND usf_cat_id = cat_id
           AND (  cat_org_id = ' . $gCurrentOrganization->getValue('org_id') . '
               OR cat_org_id IS NULL )
         ORDER BY cat_sequence ASC, usf_sequence ASC ';
$statement = $gDb->query($sql);
// Create table
$table = new HtmlTable('tbl_profile_fields', $page, true);
开发者ID:sistlind,项目名称:admidio,代码行数:31,代码来源:fields.php

示例2: HtmlPage

    echo 'done';
    exit;
}
/*****************************Foto hochladen*************************************/
if ($getMode == 'choose') {
    // set headline
    if ($getItemId == $gCurrentUser->getValue('inv_id')) {
        $headline = $gL10n->get('PRO_EDIT_MY_PROFILE_PICTURE');
    } else {
        $headline = $gL10n->get('PRO_EDIT_PROFILE_PIC_FROM', $inventory->getValue('FIRST_NAME'), $inventory->getValue('LAST_NAME'));
    }
    $gNavigation->addUrl(CURRENT_URL, $headline);
    // create html page object
    $page = new HtmlPage($headline);
    // add back link to module menu
    $profilePhotoMenu = $page->getMenu();
    $profilePhotoMenu->addItem('menu_item_back', $gNavigation->getPreviousUrl(), $gL10n->get('SYS_BACK'), 'back.png');
    // show form
    $form = new HtmlForm('upload_files_form', $g_root_path . '/adm_program/modules/inventory/item_photo_edit.php?mode=upload&inv_id=' . $getItemId, $page, array('enableFileUpload' => true));
    $form->addCustomContent($gL10n->get('PRO_CURRENT_PICTURE'), '<img class="imageFrame" src="item_photo_show.php?inv_id=' . $getItemId . '" alt="' . $gL10n->get('PRO_CURRENT_PICTURE') . '" />');
    $form->addFileUpload('userfile', $gL10n->get('PRO_CHOOSE_PHOTO'), array('helpTextIdLabel' => 'profile_photo_up_help'));
    $form->addSubmitButton('btn_upload', $gL10n->get('PRO_UPLOAD_PHOTO'), array('icon' => THEME_PATH . '/icons/photo_upload.png', 'class' => ' col-sm-offset-3'));
    // add form to html page and show page
    $page->addHtml($form->show(false));
    $page->show();
} elseif ($getMode == 'upload') {
    /*****************************Foto zwischenspeichern bestaetigen***********************************/
    //Dateigroesse
    if ($_FILES['userfile']['error'][0] == 1) {
        $gMessage->show($gL10n->get('PRO_PHOTO_FILE_TO_LARGE', round(admFuncMaxUploadSize() / pow(1024, 2))));
    }
开发者ID:bash-t,项目名称:admidio,代码行数:31,代码来源:item_photo_edit.php

示例3: unset

    // nun die vorher eingegebenen Inhalte ins Objekt schreiben
    $link->setArray($_SESSION['links_request']);
    unset($_SESSION['links_request']);
}
// 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 . '&amp;headline=' . $getHeadline . '&amp;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')));
开发者ID:sistlind,项目名称:admidio,代码行数:31,代码来源:links_new.php

示例4:

                    $("#"+id+" .form-alert").html("<span class=\\"glyphicon glyphicon-ok\\"></span><strong>' . $gL10n->get('SYS_SAVE_DATA') . '</strong>");
                    $("#"+id+" .form-alert").fadeIn("slow");
                    $("#"+id+" .form-alert").animate({opacity: 1.0}, 2500);
                    $("#"+id+" .form-alert").fadeOut("slow");
                    $("#"+parentId).animate({opacity: 1.0}, 2500);
                    $("#"+parentId).fadeOut("slow");
                } else {
                    $("#"+id+" .form-alert").attr("class", "alert alert-danger form-alert");
                    $("#"+id+" .form-alert").fadeIn();
                    $("#"+id+" .form-alert").html("<span class=\\"glyphicon glyphicon-exclamation-sign\\"></span>"+data);
                }
            }
        });
    });', true);
// get module menu
$profileMenu = $page->getMenu();
// show back link
if ($gNavigation->count() > 1) {
    $profileMenu->addItem('menu_item_back', $gNavigation->getPreviousUrl(), $gL10n->get('SYS_BACK'), 'back.png');
}
// 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
开发者ID:martinbrylski,项目名称:admidio,代码行数:31,代码来源:item.php

示例5: alert

                                $("input[type=checkbox]#member_"+userid).prop("checked", false);
                            }
                        } else {
                            checkbox.prop("checked", true);
                        }

                        alert(data);
                        return false;
                    }
                    return true;
                }
            );
        });';
    $page->addJavascript($javascriptCode, true);
    // get module menu
    $membersAssignmentMenu = $page->getMenu();
    $membersAssignmentMenu->addItem('menu_item_back', $gNavigation->getPreviousUrl(), $gL10n->get('SYS_BACK'), 'back.png');
    if ($gCurrentUser->editUsers()) {
        $membersAssignmentMenu->addItem('menu_item_create_user', $g_root_path . '/adm_program/modules/members/members_new.php', $gL10n->get('MEM_CREATE_USER'), 'add.png');
    }
    $navbarForm = new HtmlForm('navbar_show_all_users_form', '', $page, array('type' => 'navbar', 'setFocus' => false));
    $sql = 'SELECT rol_id, rol_name, cat_name FROM ' . TBL_ROLES . ', ' . TBL_CATEGORIES . '
             WHERE rol_valid   = 1
               AND rol_visible = 1
               AND rol_cat_id  = cat_id
               AND (  cat_org_id  = ' . $gCurrentOrganization->getValue('org_id') . '
                   OR cat_org_id IS NULL )
             ORDER BY cat_sequence, rol_name';
    $navbarForm->addSelectBoxFromSql('filter_rol_id', $gL10n->get('SYS_ROLE'), $gDb, $sql, array('defaultValue' => $getFilterRoleId, 'firstEntry' => $gL10n->get('SYS_ALL')));
    $navbarForm->addCheckbox('mem_show_all', $gL10n->get('MEM_SHOW_ALL_USERS'), 0, array('helpTextIdLabel' => 'MEM_SHOW_USERS_DESC'));
    $membersAssignmentMenu->addForm($navbarForm->show(false));
开发者ID:sistlind,项目名称:admidio,代码行数:31,代码来源:members_assignment.php

示例6: TableRooms

$gNavigation->addUrl(CURRENT_URL, $headline);
// Create room object
$room = new TableRooms($gDb);
if ($getRoomId > 0) {
    $room->readDataById($getRoomId);
}
if (isset($_SESSION['rooms_request'])) {
    // durch fehlerhafte Eingabe ist der User zu diesem Formular zurueckgekehrt
    // nun die vorher eingegebenen Inhalte ins Objekt schreiben
    $room->setArray($_SESSION['rooms_request']);
    unset($_SESSION['rooms_request']);
}
// create html page object
$page = new HtmlPage($headline);
// add back link to module menu
$roomsMenu = $page->getMenu();
$roomsMenu->addItem('menu_item_back', $gNavigation->getPreviousUrl(), $gL10n->get('SYS_BACK'), 'back.png');
// show form
$form = new HtmlForm('rooms_edit_form', $g_root_path . '/adm_program/modules/rooms/rooms_function.php?room_id=' . $getRoomId . '&amp;mode=1', $page);
$form->openGroupBox('gb_name_properties', $gL10n->get('SYS_NAME') . ' &amp; ' . $gL10n->get('SYS_PROPERTIES'));
$form->addInput('room_name', $gL10n->get('SYS_ROOM'), $room->getValue('room_name'), array('maxLength' => 100, 'property' => FIELD_REQUIRED));
$form->addInput('room_capacity', $gL10n->get('ROO_CAPACITY') . ' (' . $gL10n->get('ROO_SEATING') . ')', $room->getValue('room_capacity'), array('type' => 'number', 'minNumber' => 0, 'maxNumber' => 99999, 'property' => FIELD_REQUIRED));
$form->addInput('room_overhang', $gL10n->get('ROO_OVERHANG'), $room->getValue('room_overhang'), array('type' => 'number', 'minNumber' => 0, 'maxNumber' => 99999, 'helpTextIdLabel' => 'DAT_ROOM_OVERHANG'));
$form->closeGroupBox();
$form->openGroupBox('gb_description', $gL10n->get('SYS_DESCRIPTION'), 'admidio-panel-editor');
$form->addEditor('room_description', null, $room->getValue('room_description'), array('height' => '150px'));
$form->closeGroupBox();
$form->addSubmitButton('btn_save', $gL10n->get('SYS_SAVE'), array('icon' => THEME_PATH . '/icons/disk.png'));
$form->addHtml(admFuncShowCreateChangeInfoById($room->getValue('room_usr_id_create'), $room->getValue('room_timestamp_create'), $room->getValue('dat_usr_id_change'), $room->getValue('room_timestamp_change')));
// add form to html page and show page
$page->addHtml($form->show(false));
开发者ID:bash-t,项目名称:admidio,代码行数:31,代码来源:rooms_new.php

示例7: TableFolder

        if ($form_values['new_description'] == null) {
            $form_values['new_description'] = $file->getValue('fil_description');
        }
    } else {
        // get recordset of current folder from databses
        $folder = new TableFolder($gDb);
        $folder->getFolderForDownload($getFolderId);
        $originalName = $folder->getValue('fol_name');
        if ($form_values['new_name'] == null) {
            $form_values['new_name'] = $originalName;
        }
        if ($form_values['new_description'] == null) {
            $form_values['new_description'] = $folder->getValue('fol_description');
        }
    }
} catch (AdmException $e) {
    $e->showHtml();
}
// create html page object
$page = new HtmlPage($headline);
// add back link to module menu
$downloadRenameMenu = $page->getMenu();
$downloadRenameMenu->addItem('menu_item_back', $gNavigation->getPreviousUrl(), $gL10n->get('SYS_BACK'), 'back.png');
// create html form
$form = new HtmlForm('edit_download_form', $g_root_path . '/adm_program/modules/downloads/download_function.php?mode=4&amp;folder_id=' . $getFolderId . '&amp;file_id=' . $getFileId, $page);
$form->addInput('previous_name', $gL10n->get('DOW_PREVIOUS_NAME'), $originalName, array('property' => FIELD_DISABLED));
$form->addInput('new_name', $gL10n->get('DOW_NEW_NAME'), $form_values['new_name'], array('maxLength' => 255, 'property' => FIELD_REQUIRED, 'helpTextIdLabel' => 'DOW_FILE_NAME_RULES'));
$form->addMultilineTextInput('new_description', $gL10n->get('SYS_DESCRIPTION'), $form_values['new_description'], 4, array('maxLength' => 255));
$form->addSubmitButton('btn_rename', $gL10n->get('SYS_SAVE'), array('icon' => THEME_PATH . '/icons/disk.png', 'class' => ' col-sm-offset-3'));
$page->addHtml($form->show(false));
$page->show();
开发者ID:bash-t,项目名称:admidio,代码行数:31,代码来源:rename.php

示例8: TableRoles

}
// Rollenobjekt anlegen
$role = new TableRoles($gDb);
if ($getRoleId > 0) {
    $role->readDataById($getRoleId);
    // Pruefung, ob die Rolle zur aktuellen Organisation gehoert
    if ($role->getValue('cat_org_id') != $gCurrentOrganization->getValue('org_id') && $role->getValue('cat_org_id') > 0) {
        $gMessage->show($gL10n->get('SYS_NO_RIGHTS'));
    }
}
$_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') . '" />&nbsp;' . $gL10n->get('ROL_INACTIV_ROLE') . '</button>
            &nbsp;&nbsp;&nbsp;&nbsp;
            <button id="btn_delete" type="button" class="btn btn-primary"
开发者ID:martinbrylski,项目名称:admidio,代码行数:31,代码来源:roles_function.php

示例9: HtmlPage

$page = new HtmlPage($headline);
$page->addJavascript('
    function setValueList() {
        if ($("#usf_type").val() === "DROPDOWN" || $("#usf_type").val() === "RADIO_BUTTON") {
            $("#usf_value_list_group").show("slow");
            $("#usf_value_list").attr("required", "required");
        } else {
            $("#usf_value_list").removeAttr("required");
            $("#usf_value_list_group").hide();
        }
    }

    setValueList();
    $("#usf_type").click(function() { setValueList(); });', true);
// add back link to module menu
$profileFieldsEditMenu = $page->getMenu();
$profileFieldsEditMenu->addItem('menu_item_back', $gNavigation->getPreviousUrl(), $gL10n->get('SYS_BACK'), 'back.png');
// show form
$form = new HtmlForm('profile_fields_edit_form', $g_root_path . '/adm_program/modules/preferences/fields_function.php?usf_id=' . $getUsfId . '&amp;mode=1', $page);
$form->openGroupBox('gb_designation', $gL10n->get('SYS_DESIGNATION'));
if ($userField->getValue('usf_system') == 1) {
    $form->addInput('usf_name', $gL10n->get('SYS_NAME'), $userField->getValue('usf_name', 'database'), array('maxLength' => 100, 'property' => FIELD_DISABLED));
} else {
    $form->addInput('usf_name', $gL10n->get('SYS_NAME'), $userField->getValue('usf_name', 'database'), array('maxLength' => 100, 'property' => FIELD_REQUIRED));
}
// show internal field name for information
if ($getUsfId > 0) {
    $form->addInput('usf_name_intern', $gL10n->get('SYS_INTERNAL_NAME'), $userField->getValue('usf_name_intern'), array('maxLength' => 100, 'property' => FIELD_DISABLED, 'helpTextIdLabel' => 'SYS_INTERNAL_NAME_DESC'));
}
if ($userField->getValue('usf_system') == 1) {
    $form->addInput('usf_cat_id', $gL10n->get('SYS_CATEGORY'), $userField->getValue('cat_name'), array('maxLength' => 100, 'property' => FIELD_DISABLED));
开发者ID:sistlind,项目名称:admidio,代码行数:31,代码来源:fields_new.php

示例10: HtmlPage

      ORDER BY usl_timestamp_create DESC';
$fieldHistoryStatement = $gDb->query($sql);
if ($fieldHistoryStatement->rowCount() === 0) {
    // message is shown, so delete this page from navigation stack
    $gNavigation->deleteLastUrl();
    // show message if there were no changes for users
    if ($getUserId > 0) {
        $gMessage->show($gL10n->get('MEM_NO_CHANGES_PROFIL', $user->getValue('FIRST_NAME') . ' ' . $user->getValue('LAST_NAME')));
    } else {
        $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 {
开发者ID:martinbrylski,项目名称:admidio,代码行数:31,代码来源:profile_field_history.php

示例11: AND

$sql = 'SELECT rol_id
          FROM ' . TBL_ROLES . '
    INNER JOIN ' . TBL_CATEGORIES . '
            ON cat_id = rol_cat_id
         WHERE rol_name LIKE \'' . $gL10n->get('SYS_WEBMASTER') . '\'
           AND rol_webmaster = 1
           AND (  cat_org_id = ' . $gCurrentOrganization->getValue('org_id') . '
               OR cat_org_id IS NULL )';
$pdoStatement = $gDb->query($sql);
$row = $pdoStatement->fetch();
// create role object for webmaster
$roleWebmaster = new TableRoles($gDb, $row['rol_id']);
// create html page object
$page = new HtmlPage($headline);
// add back link to module menu
$loginMenu = $page->getMenu();
$loginMenu->addItem('menu_item_back', $gNavigation->getPreviousUrl(), $gL10n->get('SYS_BACK'), 'back.png');
// show form
$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');
开发者ID:martinbrylski,项目名称:admidio,代码行数:31,代码来源:login.php

示例12: COUNT

    $sql = 'SELECT COUNT(*)
              FROM ' . TBL_GUESTBOOK . '
             WHERE unix_timestamp(gbo_timestamp_create) > unix_timestamp()-' . $gPreferences['flooding_protection_time'] . '
               AND gbo_org_id = ' . $gCurrentOrganization->getValue('org_id') . '
               AND gbo_ip_address = \'' . $guestbook->getValue('gbo_ip_address') . '\'';
    $statement = $gDb->query($sql);
    $row = $statement->fetch();
    if ($row[0] > 0) {
        // Wenn dies der Fall ist, gibt es natuerlich keinen Gaestebucheintrag...
        $gMessage->show($gL10n->get('GBO_FLOODING_PROTECTION', $gPreferences['flooding_protection_time']));
    }
}
// create html page object
$page = new HtmlPage($headline);
// add back link to module menu
$guestbookCreateMenu = $page->getMenu();
$guestbookCreateMenu->addItem('menu_item_back', $gNavigation->getPreviousUrl(), $gL10n->get('SYS_BACK'), 'back.png');
// Html des Modules ausgeben
if ($getGboId > 0) {
    $mode = '3';
} else {
    $mode = '1';
}
// show form
$form = new HtmlForm('guestbook_edit_form', $g_root_path . '/adm_program/modules/guestbook/guestbook_function.php?id=' . $getGboId . '&amp;headline=' . $getHeadline . '&amp;mode=' . $mode, $page);
if ($gCurrentUser->getValue('usr_id') > 0) {
    // registered users should not change their name
    $form->addInput('gbo_name', $gL10n->get('SYS_NAME'), $guestbook->getValue('gbo_name'), array('maxLength' => 60, 'property' => FIELD_DISABLED));
} else {
    $form->addInput('gbo_name', $gL10n->get('SYS_NAME'), $guestbook->getValue('gbo_name'), array('maxLength' => 60, 'property' => FIELD_REQUIRED));
}
开发者ID:martinbrylski,项目名称:admidio,代码行数:31,代码来源:guestbook_new.php

示例13: HtmlPage

$urlCurrentImage = $g_root_path . '/adm_program/modules/photos/photo_show.php?pho_id=' . $getPhotoId . '&amp;photo_nr=' . $getPhotoNr . '&amp;max_width=' . $gPreferences['photo_show_width'] . '&amp;max_height=' . $gPreferences['photo_show_height'];
if ($previousImage > 0) {
    $urlPreviousImage = $g_root_path . '/adm_program/modules/photos/photo_presenter.php?photo_nr=' . $previousImage . '&pho_id=' . $getPhotoId;
}
if ($nextImage <= $photoAlbum->getValue('pho_quantity')) {
    $urlNextImage = $g_root_path . '/adm_program/modules/photos/photo_presenter.php?photo_nr=' . $nextImage . '&pho_id=' . $getPhotoId;
}
// create html page object
$page = new HtmlPage($photoAlbum->getValue('pho_name'));
// wenn Popupmode oder Colorbox, dann normalen Kopf unterdruecken
if ($gPreferences['photo_show_mode'] == 0) {
    $page->hideThemeHtml();
}
if ($gPreferences['photo_show_mode'] == 2) {
    // get module menu
    $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>');
开发者ID:sistlind,项目名称:admidio,代码行数:31,代码来源:photo_presenter.php

示例14: HtmlTable

                actRow.parentNode.insertBefore(nextNode, actRow);
                secondSequence = actSequence + 1;
            }
        }

        if (secondSequence > 0) {
            // Nun erst mal die neue Position von der gewaehlten Kategorie aktualisieren
            $.get(gRootPath + "/adm_program/modules/categories/categories_function.php?cat_id=" + catID + "&type=' . $getType . '&mode=4&sequence=" + direction);
        }
    }');
$htmlIconLoginUser = '&nbsp;';
if ($getType !== 'USF') {
    $htmlIconLoginUser = '<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) . '" />';
}
// get module menu
$categoriesMenu = $page->getMenu();
// show back link
$categoriesMenu->addItem('menu_item_back', $gNavigation->getPreviousUrl(), $gL10n->get('SYS_BACK'), 'back.png');
// define link to create new category
$categoriesMenu->addItem('admMenuItemNewCategory', $g_root_path . '/adm_program/modules/categories/categories_new.php?type=' . $getType . '&amp;title=' . $getTitle, $gL10n->get('SYS_CREATE_VAR', $addButtonText), 'add.png');
// Create table object
$categoriesOverview = new HtmlTable('tbl_categories', $page, true);
// create array with all column heading values
$columnHeading = array($gL10n->get('SYS_TITLE'), '&nbsp;', $htmlIconLoginUser, '<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) . '" />', '&nbsp;');
$categoriesOverview->setColumnAlignByArray(array('left', 'left', 'left', 'left', 'right'));
$categoriesOverview->addRowHeadingByArray($columnHeading);
$sql = 'SELECT *
          FROM ' . TBL_CATEGORIES . '
         WHERE (  cat_org_id  = ' . $gCurrentOrganization->getValue('org_id') . '
               OR cat_org_id IS NULL )
           AND cat_type   = \'' . $getType . '\'
开发者ID:martinbrylski,项目名称:admidio,代码行数:31,代码来源:categories.php

示例15: function

        $("#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
            url: "ecard_preview.php", // the file to call
            success: function(response) { // on success..
                $(".modal-content").html(response);
                $("#admidio_modal").modal();
            }
        });

        return false;
    }); ', true);
// add back link to module menu
$ecardMenu = $page->getMenu();
$ecardMenu->addItem('menu_item_back', $gNavigation->getPreviousUrl(), $gL10n->get('SYS_BACK'), 'back.png');
if ($gCurrentUser->isWebmaster()) {
    // show link to system preferences of announcements
    $ecardMenu->addItem('menu_item_preferences', $g_root_path . '/adm_program/modules/preferences/preferences.php?show_option=ecards', $gL10n->get('SYS_MODULE_PREFERENCES'), 'options.png', 'right');
}
// show form
$form = new HtmlForm('ecard_form', 'ecard_send.php', $page);
$form->addInput('submit_action', null, '', array('type' => 'hidden'));
$form->addInput('photo_id', null, $getPhotoId, array('type' => 'hidden'));
$form->addInput('photo_nr', null, $getPhotoNr, array('type' => 'hidden'));
$form->openGroupBox('gb_layout', $gL10n->get('ECA_LAYOUT'));
$form->addCustomContent($gL10n->get('SYS_PHOTO'), '
        <a data-toggle="lightbox" data-type="image" data-title="' . $gL10n->get('SYS_PREVIEW') . '"
            href="' . $g_root_path . '/adm_program/modules/photos/photo_show.php?pho_id=' . $getPhotoId . '&amp;photo_nr=' . $getPhotoNr . '&amp;max_width=' . $gPreferences['photo_show_width'] . '&amp;max_height=' . $gPreferences['photo_show_height'] . '"><img
            src="' . $g_root_path . '/adm_program/modules/photos/photo_show.php?pho_id=' . $getPhotoId . '&amp;photo_nr=' . $getPhotoNr . '&amp;max_width=' . $gPreferences['ecard_thumbs_scale'] . '&amp;max_height=' . $gPreferences['ecard_thumbs_scale'] . '"
开发者ID:martinbrylski,项目名称:admidio,代码行数:31,代码来源:ecards.php


注:本文中的HtmlPage::getMenu方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。