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


PHP HTML::h1方法代码示例

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


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

示例1: display

 /**
  * Display
  */
 public function display()
 {
     echo '<div class="panel-heading">';
     echo HTML::h1(__('Export your training'));
     echo '</div>';
     echo '<div class="panel-content">';
     if ($this->exporterIsChosen()) {
         $this->displayChosenExporter();
     } else {
         $this->displayExporterList();
     }
     echo '</div>';
 }
开发者ID:9x,项目名称:Runalyze,代码行数:16,代码来源:class.ExporterWindow.php

示例2: run

 function run($dbi, $argstr, &$request, $basepage)
 {
     $args = $this->getArgs($argstr, $request);
     extract($args);
     $output = HTML(HTML::h1("Group Info"));
     $group = WikiGroup::getGroup();
     $allGroups = $group->getAllGroupsIn();
     foreach ($allGroups as $g) {
         $members = $group->getMembersOf($g);
         $output->pushContent(HTML::h3($g . " - members: " . sizeof($members) . " - isMember: " . ($group->isMember($g) ? "yes" : "no")));
         foreach ($members as $m) {
             $output->pushContent($m);
             $output->pushContent(HTML::br());
         }
     }
     $output->pushContent(HTML::p("--- the end ---"));
     return $output;
 }
开发者ID:hugcoday,项目名称:wiki,代码行数:18,代码来源:_GroupInfo.php

示例3: displayPage

function displayPage(&$request, $template = false)
{
    global $WikiTheme, $pv;
    $pagename = $request->getArg('pagename');
    $version = $request->getArg('version');
    $page = $request->getPage();
    if ($version) {
        $revision = $page->getRevision($version);
        if (!$revision) {
            NoSuchRevision($request, $page, $version);
        }
    } else {
        $revision = $page->getCurrentRevision();
    }
    if (isSubPage($pagename)) {
        $pages = explode(SUBPAGE_SEPARATOR, $pagename);
        $last_page = array_pop($pages);
        // deletes last element from array as side-effect
        $pageheader = HTML::span(HTML::a(array('href' => WikiURL($pages[0]), 'class' => 'pagetitle'), $WikiTheme->maybeSplitWikiWord($pages[0] . SUBPAGE_SEPARATOR)));
        $first_pages = $pages[0] . SUBPAGE_SEPARATOR;
        array_shift($pages);
        foreach ($pages as $p) {
            if ($pv != 2) {
                //Add the Backlink in page title
                $pageheader->pushContent(HTML::a(array('href' => WikiURL($first_pages . $p), 'class' => 'backlinks'), $WikiTheme->maybeSplitWikiWord($p . SUBPAGE_SEPARATOR)));
            } else {
                // Remove Backlinks
                $pageheader->pushContent(HTML::h1($pagename));
            }
            $first_pages .= $p . SUBPAGE_SEPARATOR;
        }
        if ($pv != 2) {
            $backlink = HTML::a(array('href' => WikiURL($pagename, array('action' => _("BackLinks"))), 'class' => 'backlinks'), $WikiTheme->maybeSplitWikiWord($last_page));
            $backlink->addTooltip(sprintf(_("BackLinks for %s"), $pagename));
        } else {
            $backlink = HTML::h1($pagename);
        }
        $pageheader->pushContent($backlink);
    } else {
        if ($pv != 2) {
            $pageheader = HTML::a(array('href' => WikiURL($pagename, array('action' => _("BackLinks"))), 'class' => 'backlinks'), $WikiTheme->maybeSplitWikiWord($pagename));
            $pageheader->addTooltip(sprintf(_("BackLinks for %s"), $pagename));
        } else {
            $pageheader = HTML::h1($pagename);
            //Remove Backlinks
        }
        if ($request->getArg('frame')) {
            $pageheader->setAttr('target', '_top');
        }
    }
    // {{{ Codendi hook to insert stuff between navbar and header
    $eM =& EventManager::instance();
    $ref_html = '';
    $crossref_fact = new CrossReferenceFactory($pagename, ReferenceManager::REFERENCE_NATURE_WIKIPAGE, GROUP_ID);
    $crossref_fact->fetchDatas();
    if ($crossref_fact->getNbReferences() > 0) {
        $ref_html .= '<h3>' . $GLOBALS['Language']->getText('cross_ref_fact_include', 'references') . '</h3>';
        $ref_html .= $crossref_fact->getHTMLDisplayCrossRefs();
    }
    $additional_html = false;
    $eM->processEvent('wiki_before_content', array('html' => &$additional_html, 'group_id' => GROUP_ID, 'wiki_page' => $pagename));
    if ($additional_html) {
        $beforeHeader = HTML();
        $beforeHeader->pushContent($additional_html);
        $beforeHeader->pushContent(HTML::raw($ref_html));
        $toks['BEFORE_HEADER'] = $beforeHeader;
    } else {
        $beforeHeader = HTML();
        $beforeHeader->pushContent(HTML::raw($ref_html));
        $toks['BEFORE_HEADER'] = $beforeHeader;
    }
    // }}} /Codendi hook
    $pagetitle = SplitPagename($pagename);
    if ($redirect_from = $request->getArg('redirectfrom')) {
        $redirect_message = HTML::span(array('class' => 'redirectfrom'), fmt("(Redirected from %s)", RedirectorLink($redirect_from)));
        // abuse the $redirected template var for some status update notice
    } elseif ($request->getArg('errormsg')) {
        $redirect_message = $request->getArg('errormsg');
        $request->setArg('errormsg', false);
    }
    $request->appendValidators(array('pagerev' => $revision->getVersion(), '%mtime' => $revision->get('mtime')));
    /*
        // FIXME: This is also in the template...
        if ($request->getArg('action') != 'pdf' and !headers_sent()) {
          // FIXME: enable MathML/SVG/... support
          if (ENABLE_XHTML_XML
                 and (!isBrowserIE()
                      and strstr($request->get('HTTP_ACCEPT'),'application/xhtml+xml')))
                header("Content-Type: application/xhtml+xml; charset=" . $GLOBALS['charset']);
            else
                header("Content-Type: text/html; charset=" . $GLOBALS['charset']);
        }
    */
    $page_content = $revision->getTransformedContent();
    // if external searchengine (google) referrer, highlight the searchterm
    // FIXME: move that to the transformer?
    // OR: add the searchhightplugin line to the content?
    if ($result = isExternalReferrer($request)) {
        if (DEBUG and !empty($result['query'])) {
            //$GLOBALS['SearchHighlightQuery'] = $result['query'];
//.........这里部分代码省略.........
开发者ID:pombredanne,项目名称:tuleap,代码行数:101,代码来源:display.php

示例4: Frontend

<?php

/**
* Delete Account
* Call:   call/window.delete.php
*/
require '../inc/class.Frontend.php';
$Frontend = new Frontend();
$Errors = array();
AccountHandler::setAndSendDeletionKeyFor($Errors);
echo HTML::h1(__('Delete your account.'));
if (!empty($Errors)) {
    foreach ($Errors as $Error) {
        echo HTML::error($Error);
    }
} else {
    echo HTML::info(__('<em>A confirmation has been sent via mail.</em><br>' . 'How sad, that you\'ve decided to delete your account.<br>' . 'Your account will be deleted as soon as you click on the confirmation link in your mail.'));
}
开发者ID:guancio,项目名称:Runalyze,代码行数:18,代码来源:window.delete.php

示例5: checkEmailConfirmation

 function checkEmailConfirmation()
 {
     global $request;
     $wikidb = $request->getDbh();
     $data = $wikidb->get('ConfirmEmail');
     $id = $request->getArg('id');
     if (empty($data[$id])) {
         // id not found
         return HTML(HTML::h1("Confirm E-mail address"), HTML::h1("Sorry! Wrong URL"));
     }
     // upgrade the user
     $userid = $data['userid'];
     $email = $data['email'];
     $u = $request->getUser();
     if ($u->UserName() == $userid) {
         // lucky: current user (session)
         $prefs = $u->getPreferences();
         $request->_user->_level = WIKIAUTH_USER;
         $request->_prefs->set('emailVerified', true);
     } else {
         // not current user
         if (ENABLE_USER_NEW) {
             $u = WikiUser($userid);
             $u->getPreferences();
             $prefs =& $u->_prefs;
         } else {
             $u = new WikiUser($request, $userid);
             $prefs = $u->getPreferences();
         }
         $u->_level = WIKIAUTH_USER;
         $request->setUser($u);
         $request->_prefs->set('emailVerified', true);
     }
     unset($data[$id]);
     $wikidb->set('ConfirmEmail', $data);
     return HTML(HTML::h1("Confirm E-mail address"), HTML::p("Your e-mail address has now been confirmed."));
 }
开发者ID:hugcoday,项目名称:wiki,代码行数:37,代码来源:MailNotify.php

示例6: displayHeading

 /**
  * Display heading
  */
 protected function displayHeading()
 {
     echo HTML::h1(__('Prognosis calculator'));
 }
开发者ID:n0rthface,项目名称:Runalyze,代码行数:7,代码来源:class.Prognose_PrognosisWindow.php

示例7: throwErrorForPrivateTraining

 /**
  * Throw error: This training is private
  */
 protected function throwErrorForPrivateTraining()
 {
     echo HTML::h1(__('Error'));
     echo HTML::error(sprintf('<strong>%s</strong>', __('Private activity')) . '<br><br>' . __('This activity is private. The user does not allow you to see it.'));
     $this->displayLinkToRunalyze();
 }
开发者ID:9x,项目名称:Runalyze,代码行数:9,代码来源:class.FrontendShared.php

示例8: displayHeader

 /**
  * Display header
  */
 private function displayHeader()
 {
     echo '<div class="panel-heading">';
     echo '<div class="panel-menu">';
     echo $this->getNavigationMenu();
     echo '</div>';
     echo HTML::h1($this->getTitle() . ' ' . $this->getTitleAppendix());
     echo '</div>';
 }
开发者ID:schoch,项目名称:Runalyze,代码行数:12,代码来源:class.PlotSumData.php

示例9: editPage

 function editPage()
 {
     global $WikiTheme;
     $saveFailed = false;
     $tokens =& $this->tokens;
     $tokens['PAGE_LOCKED_MESSAGE'] = '';
     $tokens['CONCURRENT_UPDATE_MESSAGE'] = '';
     $r =& $this->request;
     if (isset($r->args['pref']['editWidth']) and $r->getPref('editWidth') != $r->args['pref']['editWidth']) {
         $r->_prefs->set('editWidth', $r->args['pref']['editWidth']);
     }
     if (isset($r->args['pref']['editHeight']) and $r->getPref('editHeight') != $r->args['pref']['editHeight']) {
         $r->_prefs->set('editHeight', $r->args['pref']['editHeight']);
     }
     if (!$this->canEdit()) {
         if ($this->isInitialEdit()) {
             return $this->viewSource();
         }
         $tokens['PAGE_LOCKED_MESSAGE'] = $this->getLockedMessage();
     } elseif ($r->getArg('save_and_redirect_to') != "") {
         if (ENABLE_CAPTCHA && $this->Captcha->Failed()) {
             $this->tokens['PAGE_LOCKED_MESSAGE'] = HTML::p(HTML::h1($this->Captcha->failed_msg));
         } elseif ($this->savePage()) {
             // noreturn
             $r->redirect(WikiURL($r->getArg('save_and_redirect_to')));
             return true;
             // Page saved.
         }
         $saveFailed = true;
     } elseif ($this->editaction == 'save') {
         if (ENABLE_CAPTCHA && $this->Captcha->Failed()) {
             $this->tokens['PAGE_LOCKED_MESSAGE'] = HTML::p(HTML::h1($this->Captcha->failed_msg));
         } elseif ($this->savePage()) {
             return true;
             // Page saved.
         } else {
             $saveFailed = true;
         }
     }
     if ($saveFailed and $this->isConcurrentUpdate()) {
         // Get the text of the original page, and the two conflicting edits
         // The diff3 class takes arrays as input.  So retrieve content as
         // an array, or convert it as necesary.
         $orig = $this->page->getRevision($this->_currentVersion);
         // FIXME: what if _currentVersion has be deleted?
         $orig_content = $orig->getContent();
         $this_content = explode("\n", $this->_content);
         $other_content = $this->current->getContent();
         include_once "lib/diff3.php";
         $diff = new diff3($orig_content, $this_content, $other_content);
         $output = $diff->merged_output(_("Your version"), _("Other version"));
         // Set the content of the textarea to the merged diff
         // output, and update the version
         $this->_content = implode("\n", $output);
         $this->_currentVersion = $this->current->getVersion();
         $this->version = $this->_currentVersion;
         $unresolved = $diff->ConflictingBlocks;
         $tokens['CONCURRENT_UPDATE_MESSAGE'] = $this->getConflictMessage($unresolved);
     } elseif ($saveFailed && !$this->_isSpam) {
         $tokens['CONCURRENT_UPDATE_MESSAGE'] = HTML(HTML::h2(_("Some internal editing error")), HTML::p(_("Your are probably trying to edit/create an invalid version of this page.")), HTML::p(HTML::em(_("&version=-1 might help."))));
     }
     if ($this->editaction == 'edit_convert') {
         $tokens['PREVIEW_CONTENT'] = $this->getConvertedPreview();
     }
     if ($this->editaction == 'preview') {
         $tokens['PREVIEW_CONTENT'] = $this->getPreview();
     }
     // FIXME: convert to _MESSAGE?
     // FIXME: NOT_CURRENT_MESSAGE?
     $tokens = array_merge($tokens, $this->getFormElements());
     if (ENABLE_EDIT_TOOLBAR) {
         include_once "lib/EditToolbar.php";
         $toolbar = new EditToolbar();
         $tokens = array_merge($tokens, $toolbar->getTokens());
     }
     return $this->output('editpage', _("Edit: %s"));
 }
开发者ID:nterray,项目名称:tuleap,代码行数:77,代码来源:editpage.php

示例10: run

 function run($dbi, $argstr, &$request, $basepage)
 {
     extract($this->getArgs($argstr, $request));
     $page = $dbi->getPage($pagename);
     $current = $page->getCurrentRevision();
     $source = $current->getPackedContent();
     if (empty($source)) {
         return $this->error(fmt("empty source"));
     }
     if ($basepage == _("SpellCheck")) {
         return $this->error(fmt("Cannot SpellCheck myself"));
     }
     $lang = $page->get('lang');
     if (empty($lang)) {
         $lang = $GLOBALS['LANG'];
     }
     $html = HTML();
     if (!function_exists('pspell_new_config')) {
         // use the aspell commandline interface
         include_once "lib/WikiPluginCached.php";
         $args = "";
         $source = preg_replace("/^/m", "^", $source);
         if (ASPELL_DATA_DIR) {
             $args .= " --data-dir=" . ASPELL_DATA_DIR;
         }
         // MAYBE TODO: do we have the language dictionary?
         $args .= " --lang=" . $lang;
         // use -C or autosplit wikiwords in the text
         $commandLine = ASPELL_EXE . " -a -C {$args} ";
         $cache = new WikiPluginCached();
         $code = $cache->filterThroughCmd($source, $commandLine);
         if (empty($code)) {
             return $this->error(fmt("Couldn't start commandline '%s'", $commandLine));
         }
         $sugg = array();
         foreach (preg_split("/\n/", $code) as $line) {
             if (preg_match("/^& (\\w+) \\d+ \\d+: (.+)\$/", $line, $m)) {
                 $sugg[$m[1]] = preg_split("/, /", $m[2]);
             }
         }
         /*$pre = HTML::pre(HTML::raw($code));
           $html->pushContent($pre);*/
     } else {
         $sugg = pspell_check($source, $lang);
     }
     //$html->pushContent(HTML::hr(),HTML::h1(_("Spellcheck")));
     $page = $request->getPage();
     if ($version) {
         $revision = $page->getRevision($version);
         if (!$revision) {
             NoSuchRevision($request, $page, $version);
         }
     } else {
         $revision = $page->getCurrentRevision();
     }
     $GLOBALS['request']->setArg('suggestions', $sugg);
     include_once "lib/BlockParser.php";
     $ori_html = TransformText($revision, $revision->get('markup'), $page);
     $GLOBALS['request']->setArg('suggestions', false);
     $html->pushContent($ori_html, HTML::hr(), HTML::h1(_("SpellCheck result")));
     $list = HTML::ul();
     foreach ($sugg as $word => $suggs) {
         $w = HTML::span(array('class' => 'spell-wrong'), $word);
         // TODO: optional replace-link. jscript or request button with word replace.
         $r = HTML();
         foreach ($suggs as $s) {
             $r->pushContent(HTML::a(array('class' => 'spell-sugg', 'href' => "javascript:do_replace('{$word}','{$s}')"), $s), ", ");
         }
         $list->pushContent(HTML::li($w, ": ", $r));
     }
     $html->pushContent($list);
     return $html;
 }
开发者ID:hugcoday,项目名称:wiki,代码行数:73,代码来源:SpellCheck.php

示例11: displayHeader

 /**
  * Display header
  */
 protected function displayHeader()
 {
     echo HTML::h1(sprintf(__('VDOT calculation for: %s'), $this->Context->dataview()->titleWithComment()));
 }
开发者ID:n0rthface,项目名称:Runalyze,代码行数:7,代码来源:class.VDOTinfo.php

示例12: run

 function run($dbi, $argstr, &$request, $basepage)
 {
     /* ignore fatal on loading */
     /*
     global $ErrorManager;
     $ErrorManager->pushErrorHandler(new WikiMethodCb($this,'_error_handler'));
     */
     // Require the XML_FOAF_Parser class. This is a pear library not included with phpwiki.
     // see doc/README.foaf
     if (findFile('XML/FOAF/Parser.php', 'missing_ok')) {
         require_once 'XML/FOAF/Parser.php';
     }
     //$ErrorManager->popErrorHandler();
     if (!class_exists('XML_FOAF_Parser')) {
         return $this->error(_("required pear library XML/FOAF/Parser.php not found in include_path"));
     }
     extract($this->getArgs($argstr, $request));
     // Get our FOAF File from the foaf plugin argument or $_GET['foaf']
     if (empty($foaf)) {
         $foaf = $request->getArg('foaf');
     }
     $chooser = HTML::form(array('method' => 'get', 'action' => $request->getURLtoSelf()), HTML::h4(_("FOAF File URI")), HTML::input(array('id' => 'foaf', 'name' => 'foaf', 'type' => 'text', 'size' => '80', 'value' => $foaf)), HTML::br(), HTML::input(array('id' => 'pretty', 'name' => 'pretty', 'type' => 'radio', 'checked' => 'checked'), _("Pretty HTML")), HTML::input(array('id' => 'original', 'name' => 'original', 'type' => 'radio'), _("Original URL (Redirect)")), HTML::br(), HTML::input(array('type' => 'submit', 'value' => _("Parse FOAF"))));
     if (empty($foaf)) {
         return $chooser;
     } else {
         //Error Checking
         if (substr($foaf, 0, 7) != "http://") {
             return $this->error(_("foaf must be a URI starting with http://"));
         }
         // Start of output
         if (!empty($original)) {
             $request->redirect($foaf);
         } else {
             $foaffile = url_get_contents($foaf);
             if (!$foaffile) {
                 //TODO: get errormsg
                 return HTML(HTML::p("Resource isn't available: Something went wrong, probably a 404!"));
             }
             // Create new Parser object
             $parser = new XML_FOAF_Parser();
             // Parser FOAF into $foaffile
             $parser->parseFromMem($foaffile);
             $a = $parser->toArray();
             $html = HTML(HTML::h1(@$a[0]["name"]), HTML::table(HTML::thead(), HTML::tbody(@$a[0]["title"] ? HTML::tr(HTML::td(_("Title")), HTML::td($a[0]["title"])) : null, @$a[0]["homepage"][0] ? $this->iterateHTML($a[0], "homepage", $a["dc"]) : null, @$a[0]["weblog"][0] ? $this->iterateHTML($a[0], "weblog", $a["dc"]) : null, HTML::tr(HTML::td("Full Name"), @$a[0]["name"][0] ? HTML::td(@$a[0]["name"]) : null), @$a[0]["nick"][0] ? $this->iterateHTML($a[0], "nick", $a["dc"]) : null, @$a[0]["mboxsha1sum"][0] ? $this->iterateHTML($a[0], "mboxsha1sum", $a["dc"]) : null, @$a[0]["depiction"][0] ? $this->iterateHTML($a[0], "depiction", $a["dc"]) : null, @$a[0]["seealso"][0] ? $this->iterateHTML($a[0], "seealso", $a["dc"]) : null, HTML::tr(HTML::td("Source"), HTML::td(HTML::a(array('href' => @$foaf), "RDF"))))));
             if (DEBUG) {
                 $html->pushContent(HTML::hr(), $chooser);
             }
             return $html;
         }
     }
 }
开发者ID:neymanna,项目名称:fusionforge,代码行数:51,代码来源:FoafViewer.php

示例13: throwErrorForPrivateList

 /**
  * Throw error: This training is private 
  */
 protected function throwErrorForPrivateList()
 {
     echo HTML::h1(__('Error'));
     echo HTML::error(sprintf('<strong>%s</strong>', __('This list is private')) . '<br><br>' . __('The user does not share his activity list.'));
     $this->displayLinkToRunalyze();
 }
开发者ID:n0rthface,项目名称:Runalyze,代码行数:9,代码来源:class.FrontendSharedList.php

示例14: run

 function run($dbi, $argstr, &$request, $basepage)
 {
     // flag that the output may not be cached - i.e. it is dynamic
     $request->setArg('nocache', 1);
     if (!$request->_user->isAdmin()) {
         return HTML::p(_("The requested information is available only to Administrators."));
     }
     if (!ACCESS_LOG_SQL) {
         // need read access
         return HTML::p(_("The SQL_ACCESS_LOG is not enabled."));
     }
     // set aside a place for the table headers, see _setHeaders()
     $this->_theadrow = HTML::tr();
     $this->_headerSet = false;
     $args = $this->getArgs($argstr, $request);
     $query = $this->_getQueryString($args);
     if ($query == '') {
         return HTML::p(sprintf(_("Unrecognised parameter 'mode=%s'"), $args['mode']));
     }
     // get the data back.
     // Note that this must be done before the final generation ofthe table,
     // otherwise the headers will not be ready
     $tbody = $this->_getQueryResults($query, $dbi);
     return HTML::table(array('border' => 1, 'cellspacing' => 1, 'cellpadding' => 1), HTML::caption(HTML::h1(HTML::br(), $this->_getCaption($args))), HTML::thead($this->_theadrow), $tbody);
 }
开发者ID:hugcoday,项目名称:wiki,代码行数:25,代码来源:AnalyseAccessLogSql.php

示例15: table_output

 function table_output()
 {
     $query = $this->_getQueryString($args);
     if ($query == '') {
         return HTML::p(sprintf(_("Unrecognised parameter 'mode=%s'"), $args['mode']));
     }
     // get the data back.
     // Note that this must be done before the final generation ofthe table,
     // otherwise the headers will not be ready
     $tbody = $this->_getQueryResults($query, $dbi);
     return HTML::table(array('border' => 1, 'cellspacing' => 1, 'cellpadding' => 1), HTML::caption(HTML::h1(HTML::br(), $this->_getCaption($args))), HTML::thead($this->_theadrow), $tbody);
 }
开发者ID:hugcoday,项目名称:wiki,代码行数:12,代码来源:AccessLog.php


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