本文整理汇总了PHP中HtmlPage类的典型用法代码示例。如果您正苦于以下问题:PHP HtmlPage类的具体用法?PHP HtmlPage怎么用?PHP HtmlPage使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了HtmlPage类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: db_error
/** 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;
}
示例2: Generate_Picker
function Generate_Picker($channel)
{
$html = "<div class=filter>\n";
$html .= " <b>Filter:</b><br>\n";
$html .= " <form>\n";
$StartDate = date("m/d/Y");
if (isset($_GET["start"])) {
$StartDate = $_GET["start"];
}
$FinishDate = date("m/d/Y");
if (isset($_GET["end"])) {
$FinishDate = $_GET["end"];
}
$picker = new HtmlTable();
$picker->InsertRow(array("Start date", "<input id='datepicker' value=\"{$StartDate}\" name='start'>"));
$picker->BorderSize = 0;
$picker->InsertRow(array("End date", "<input id='datepicker2' value=\"{$FinishDate}\" name='end'>"));
$show = "";
if (isset($_GET['data'])) {
$show = "checked=on ";
}
$checked = "";
if (isset($_GET['wiki'])) {
$checked = "checked=on ";
}
$picker->InsertRow(array("", "<label><input " . $checked . "type='checkbox' value='true' name='wiki'>Convert to wiki text</label>"));
$picker->InsertRow(array("", "<label><input " . $show . "type='checkbox' value='true' name='data'>Show part / join / quit / kick / nick</label>"));
$html .= HtmlPage::IndentText($picker->ToHtml(), 4);
$html .= "<input type='submit' value='Display'><input type='hidden' name='display' value=\"{$channel}\"></form>\n</div>\n";
return $html;
}
示例3: generateUserMenu
function generateUserMenu()
{
$menu = HtmlPage::generateSubMenu();
$menu .= '
<li ' . ($this->startswith($this->id, 'exercises/my_propose_list') ? 'class= "active"' : '') . '><a href="' . RessourceManager::getInnerUrl('exercises/my_propose_list') . '/">' . _('My proposed exercises') . '</a></li>
';
return $menu;
}
示例4: generateSubMenu
function generateSubMenu()
{
$menu = HtmlPage::generateSubMenu();
$menu .= '
<li ' . ($this->startswith($this->id, 'documentation/installation') ? 'class= "active"' : '') . '><a href="' . RessourceManager::getInnerUrl('documentation/installation/index') . '/">' . _('Installation') . '</a></li>
<li ' . ($this->startswith($this->id, 'documentation/use') ? 'class= "active"' : '') . '><a href="' . RessourceManager::getInnerUrl('documentation/use/index') . '/">' . _('Use perroquet') . '</a></li>
<li ' . ($this->startswith($this->id, 'documentation/help') ? 'class= "active"' : '') . '><a href="' . RessourceManager::getInnerUrl('documentation/help/index') . '/">' . _('Help tools') . '</a></li>
<li ' . ($this->startswith($this->id, 'documentation/repositories') ? 'class= "active"' : '') . '><a href="' . RessourceManager::getInnerUrl('documentation/repositories/index') . '/">' . _('Reporitories') . '</a></li>
<li ' . ($this->startswith($this->id, 'documentation/exercise_creation') ? 'class= "active"' : '') . '><a href="' . RessourceManager::getInnerUrl('documentation/exercise_creation/index') . '/">' . _('Exercise creation') . '</a></li>
<li ' . ($this->startswith($this->id, 'documentation/development') ? 'class= "active"' : '') . '><a href="' . RessourceManager::getInnerUrl('documentation/development/index') . '/">' . _('Development') . '</a></li>
';
return $menu;
}
示例5: TablePhotos
$photoAlbum =& $_SESSION['photo_album'];
$photoAlbum->db =& $gDb;
} else {
$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",
示例6: 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&folder_id=' . $getFolderId . '&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();
示例7: Locale
*/
require "auth.php";
if (!defined("LOCALE_LIBRARY")) {
include LIBRARY_PATH . "locale.library";
}
if (!defined("OOPHTML_LIBRARY")) {
include LIBRARY_PATH . "oophtml.library";
}
if (!defined("ADMINGUI_LIBRARY")) {
include LIBRARY_PATH . "admingui.library";
}
if (!defined("MODULES_LIBRARY")) {
include LIBRARY_PATH . "modules.library";
}
$adloc = new Locale("xmlrpcgateway", AMP_LOCALE);
$page = new HtmlPage($adloc->GetStr("title"));
$page->add(pagecaption($adloc->GetStr("title")));
$modcfg = new moduleconfig($env["ampdb"], "xmlrpcgateway");
switch ($env["disp"]["pass"]) {
case "setcfg":
$modcfg->setkey("DEST_HOST", $env["disp"]["desthost"]);
$modcfg->setkey("DEST_PORT", $env["disp"]["destport"]);
$modcfg->setkey("DEST_CGI", $env["disp"]["destcgi"]);
break;
}
switch ($env["disp"]["act"]) {
case "def":
$table[0][0] = new htmltext($adloc->GetStr("hostdesc"));
$table[1][0] = new htmlformtext("", "desthost", $modcfg->getkey("DEST_HOST"), "", 20);
$table[0][1] = new htmltext($adloc->GetStr("hostnote"));
$table[0][1]->colspan = 2;
示例8: HtmlPage
LEFT JOIN ' . TBL_USER_DATA . ' as country
ON country.usd_usr_id = usr_id
AND country.usd_usf_id = ' . $gProfileFields->getProperty('COUNTRY', 'usf_id') . '
LEFT JOIN ' . TBL_ROLES . ' rol
ON rol.rol_valid = 1
AND rol.rol_id = ' . $getRoleId . '
LEFT JOIN ' . TBL_MEMBERS . ' mem
ON mem.mem_rol_id = rol.rol_id
AND mem.mem_begin <= \'' . DATE_NOW . '\'
AND mem.mem_end > \'' . DATE_NOW . '\'
AND mem.mem_usr_id = usr_id
WHERE ' . $memberCondition . '
ORDER BY last_name, first_name ';
$userStatement = $gDb->query($sql);
// create html page object
$page = new HtmlPage($headline);
$page->enableModal();
$javascriptCode = '';
if ($getMembersShowAll == 1) {
$javascriptCode .= '$("#mem_show_all").prop("checked", true);';
}
$javascriptCode .= '
$("#menu_item_create_user").attr("data-toggle", "modal");
$("#menu_item_create_user").attr("data-target", "#admidio_modal");
// change mode of users that should be shown
$("#filter_rol_id").change(function() {
window.location.replace("' . $g_root_path . '/adm_program/modules/lists/members_assignment.php?rol_id=' . $getRoleId . '&filter_rol_id=" + $("#filter_rol_id").val() + "&mem_show_all=0");
});
// change mode of users that should be shown
示例9: unset
* License : GNU Public License 2 http://www.gnu.org/licenses/gpl-2.0.html
*
****************************************************************************/
require_once '../../system/common.php';
require_once '../../system/login_valid.php';
// only webmasters are allowed to manage rooms
if (!$gCurrentUser->isWebmaster()) {
$gMessage->show($gL10n->get('SYS_NO_RIGHTS'));
}
unset($_SESSION['rooms_request']);
$headline = $gL10n->get('ROO_ROOM_MANAGEMENT');
$textRoom = $gL10n->get('SYS_ROOM');
// Navigation weiterfuehren
$gNavigation->addUrl(CURRENT_URL, $headline);
// create html page object
$page = new HtmlPage($headline);
// get module menu
$roomsMenu = $page->getMenu();
// show back link
$roomsMenu->addItem('menu_item_back', $gNavigation->getPreviousUrl(), $gL10n->get('SYS_BACK'), 'back.png');
// show link to create new room
$roomsMenu->addItem('menu_item_new_room', $g_root_path . '/adm_program/modules/rooms/rooms_new.php?headline=' . $textRoom, $gL10n->get('SYS_CREATE_VAR', $textRoom), 'add.png');
if ($gPreferences['system_show_create_edit'] == 1) {
// show firstname and lastname of create and last change user
$additionalFields = '
cre_firstname.usd_value || \' \' || cre_surname.usd_value as create_name,
cha_firstname.usd_value || \' \' || cha_surname.usd_value as change_name ';
$additionalTables = '
LEFT JOIN ' . TBL_USER_DATA . ' cre_surname
ON cre_surname.usd_usr_id = room_usr_id_create
AND cre_surname.usd_usf_id = ' . $gProfileFields->getProperty('LAST_NAME', 'usf_id') . '
示例10: HtmlPage
}
// set headline of the script
if ($currentFolder->getValue('fol_fol_id_parent') == null) {
$headline = $gL10n->get('DOW_DOWNLOADS');
} else {
$headline = $gL10n->get('DOW_DOWNLOADS') . ' - ' . $currentFolder->getValue('fol_name');
}
// Navigation of the module starts here
$gNavigation->addStartUrl(CURRENT_URL, $headline);
$getFolderId = $currentFolder->getValue('fol_id');
// Get folder content for style
$folderContent = $currentFolder->getFolderContentsForDownload();
// Keep navigation link
$navigationBar = $currentFolder->getNavigationForDownload();
// create html page object
$page = new HtmlPage($headline);
// get module menu
$DownloadsMenu = $page->getMenu();
if ($gCurrentUser->editDownloadRight()) {
// upload only possible if upload filesize > 0
if ($gPreferences['max_file_upload_size'] > 0) {
// show links for upload, create folder and folder configuration
$DownloadsMenu->addItem('admMenuItemCreateFolder', $g_root_path . '/adm_program/modules/downloads/folder_new.php?folder_id=' . $getFolderId, $gL10n->get('DOW_CREATE_FOLDER'), 'folder_create.png');
$DownloadsMenu->addItem('admMenuItemAddFile', $g_root_path . '/adm_program/modules/downloads/upload.php?folder_id=' . $getFolderId, $gL10n->get('DOW_UPLOAD_FILE'), 'page_white_upload.png');
}
$DownloadsMenu->addItem('admMenuItemConfigFolder', $g_root_path . '/adm_program/modules/downloads/folder_config.php?folder_id=' . $getFolderId, $gL10n->get('SYS_AUTHORIZATION'), 'lock.png');
}
if ($gCurrentUser->isWebmaster()) {
// show link to system preferences of weblinks
$DownloadsMenu->addItem('admMenuItemPreferencesLinks', $g_root_path . '/adm_program/modules/preferences/preferences.php?show_option=downloads', $gL10n->get('SYS_MODULE_PREFERENCES'), 'options.png', 'right');
}
示例11: unset
if (strlen($inventory->getValue($fieldNameIntern)) > 0 || $gInventoryFields->getProperty($fieldNameIntern, 'inf_type') === 'CHECKBOX') {
$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") {
示例12: array
// 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();
示例13: header
* @copyright 2004-2016 The Admidio Team
* @see http://www.admidio.org/
* @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License v2.0 only
***********************************************************************************************
*/
// if config file doesn't exists, than show installation dialog
if (!file_exists('../adm_my_files/config.php')) {
header('Location: installation/index.php');
exit;
}
require_once 'system/common.php';
$headline = 'Platzhalter Startseite';
// Navigation of the module starts here
$gNavigation->addStartUrl(CURRENT_URL, $headline);
// create html page object
$page = new HtmlPage($headline);
// main menu of the page
$mainMenu = $page->getMenu();
if ($gValidLogin) {
// show link to own profile
$mainMenu->addItem('adm_menu_item_my_profile', $g_root_path . '/adm_program/modules/profile/profile.php', $gL10n->get('PRO_MY_PROFILE'), 'profile.png');
// show logout link
$mainMenu->addItem('adm_menu_item_logout', $g_root_path . '/adm_program/system/logout.php', $gL10n->get('SYS_LOGOUT'), 'door_in.png');
} else {
// show login link
$mainMenu->addItem('adm_menu_item_login', $g_root_path . '/adm_program/system/login.php', $gL10n->get('SYS_LOGIN'), 'key.png');
if ($gPreferences['registration_mode'] > 0) {
// show registration link
$mainMenu->addItem('adm_menu_item_registration', $g_root_path . '/adm_program/modules/registration/registration.php', $gL10n->get('SYS_REGISTRATION'), 'new_registrations.png');
}
}
示例14: HtmlPage
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
require_once '/data/project/hgztools/public_html/general.php';
// create new page object
$page = new HtmlPage('Wikidata-Auszeichnungs-Abgleich');
// create new database object
$db = new Database();
// create new request validator
$rq = new RequestValidator();
// get parameters
$rq->addAllowed('GET', 'mode', '', '/^(lesenswert|exzellent|informativ|portal)$/', true);
$par = $rq->getParams();
$page->openBlock('div', 'iw-content');
$page->addInline('p', 'Mit diesem Werkzeug lassen sich Unterschiede zwischen den lokalen Auszeichnungsvorlagen und den Daten auf Wikidata feststellen.');
$page->addInline('h2', 'Optionen');
$optionForm = new HtmlForm('index.php', 'GET');
$optionForm->addHTML('<table class="iw-nostyle">');
$optionForm->addHTML('<tr><td>');
$optionForm->addLabel('mode', 'Kategorie');
$optionForm->addHTML('</td><td>');
示例15: HtmlPage
<?php
$HtmlPage = new HtmlPage();
$HtmlPage->PrintHeaderExt();
?>
<html>
<head>
<link rel="stylesheet" type="text/css" href="src/static/css/messages.css">
</head>
<body>
<div class="error">Was not able to get the Project ID. Please contact your REDCap Administrator.</div>
</body>
</html>
<?php
$HtmlPage->PrintFooterExt();
ob_end_flush();
exit;