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


PHP Xml::hidden方法代码示例

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


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

示例1: showRequestForm

 /**
  * Show a nice form for the user to request a confirmation mail
  */
 function showRequestForm()
 {
     global $wgOut, $wgUser, $wgLang, $wgRequest;
     if ($wgRequest->wasPosted() && $wgUser->matchEditToken($wgRequest->getText('token'))) {
         $ok = $wgUser->sendConfirmationMail();
         if (WikiError::isError($ok)) {
             $wgOut->addWikiMsg('confirmemail_sendfailed', $ok->toString());
         } else {
             $wgOut->addWikiMsg('confirmemail_sent');
         }
     } else {
         if ($wgUser->isEmailConfirmed()) {
             // date and time are separate parameters to facilitate localisation.
             // $time is kept for backward compat reasons.
             // 'emailauthenticated' is also used in SpecialPreferences.php
             $time = $wgLang->timeAndDate($wgUser->mEmailAuthenticated, true);
             $d = $wgLang->date($wgUser->mEmailAuthenticated, true);
             $t = $wgLang->time($wgUser->mEmailAuthenticated, true);
             $wgOut->addWikiMsg('emailauthenticated', $time, $d, $t);
         }
         if ($wgUser->isEmailConfirmationPending()) {
             $wgOut->wrapWikiMsg("<div class=\"error mw-confirmemail-pending\">\n\$1</div>", 'confirmemail_pending');
         }
         $wgOut->addWikiMsg('confirmemail_text');
         $form = Xml::openElement('form', array('method' => 'post', 'action' => $this->getTitle()->getLocalUrl()));
         $form .= Xml::hidden('token', $wgUser->editToken());
         $form .= Xml::submitButton(wfMsg('confirmemail_send'));
         $form .= Xml::closeElement('form');
         $wgOut->addHTML($form);
     }
 }
开发者ID:rocLv,项目名称:conference,代码行数:34,代码来源:SpecialConfirmemail.php

示例2: hiddenField

	/**
	 * Helper function to display a hidden field for different versions
	 * of MediaWiki.
	 */
	static function hiddenField( $name, $value ) {
		if ( class_exists( 'Html' ) ) {
			return "\t" . Html::hidden( $name, $value ) . "\n";
		} else {
			return "\t" . Xml::hidden( $name, $value ) . "\n";
		}
	}
开发者ID:realsoc,项目名称:mediawiki-extensions,代码行数:11,代码来源:SpecialReplaceText.php

示例3: showForm

 function showForm($err = '')
 {
     global $wgOut, $wgUser, $wgLang;
     $wgOut->setPagetitle(wfMsg("makesysoptitle"));
     $wgOut->addWikiText(wfMsg("makesysoptext"));
     $titleObj = Title::makeTitle(NS_SPECIAL, "Makesysop");
     $action = $titleObj->getLocalUrl("action=submit");
     if ($wgUser->isAllowed('userrights')) {
         $wgOut->addWikiText(wfMsg('makesysop-see-userrights'));
     }
     if ("" != $err) {
         $wgOut->setSubtitle(wfMsg("formerror"));
         $wgOut->addHTML("<p class='error'>{$err}</p>\n");
     }
     $namedesc = wfMsg("makesysopname");
     if (!is_null($this->mUser)) {
         $encUser = htmlspecialchars($this->mUser);
     } else {
         $encUser = "";
     }
     $reason = htmlspecialchars(wfMsg("userrights-reason"));
     $makebureaucrat = wfMsg("setbureaucratflag");
     $mss = wfMsg("set_user_rights");
     $wgOut->addHTML(Xml::openElement('form', array('method' => 'post', 'action' => $action, 'id' => 'makesysop')) . Xml::openElement('fieldset') . Xml::element('legend', array(), wfMsg('makesysoptitle')) . "<table border='0'>\n\t\t\t<tr>\n\t\t\t\t<td align='right'>{$namedesc}</td>\n\t\t\t\t<td align='left'>" . Xml::input('wpMakesysopUser', 40, $encUser) . "</td>\n\t\t\t</tr><tr>\n\t\t\t\t<td align='right'>{$reason}</td>\n\t\t\t\t<td align='left'>" . Xml::input('wpMakesysopReason', 40, $this->mReason, array('maxlength' => 255)) . "</td>\n\t\t\t</tr><tr>\n\t\t\t\t<td>&nbsp;</td>\n\t\t\t\t<td align='left'>" . Xml::checkLabel($makebureaucrat, 'wpSetBureaucrat', 'wpSetBureaucrat', $this->mSetBureaucrat) . "</td>\n\t\t\t</tr><tr>\n\t\t\t\t<td>&nbsp;</td>\n\t\t\t\t<td align='left'>" . Xml::submitButton($mss, array('name' => 'wpMakesysopSubmit')) . "</td>\n\t\t\t</tr>\n\t\t\t</table>" . Xml::hidden('wpEditToken', $wgUser->editToken()) . Xml::closeElement('fieldset') . Xml::closeElement('form') . "\n");
 }
开发者ID:schwarer2006,项目名称:wikia,代码行数:25,代码来源:SpecialMakesysop_body.php

示例4: show

 function show()
 {
     global $wgOut, $wgUser, $wgRequest;
     AbuseFilter::disableConditionLimit();
     if (!$wgUser->isAllowed('abusefilter-modify')) {
         $wgOut->addWikiMsg('abusefilter-mustbeeditor');
         return;
     }
     $this->loadParameters();
     $wgOut->setPageTitle(wfMsg('abusefilter-test'));
     $wgOut->addWikiMsg('abusefilter-test-intro', self::$mChangeLimit);
     $output = '';
     $output .= AbuseFilter::buildEditBox($this->mFilter, 'wpTestFilter') . "\n";
     $output .= Xml::inputLabel(wfMsg('abusefilter-test-load-filter'), 'wpInsertFilter', 'mw-abusefilter-load-filter', 10, '') . '&nbsp;' . Xml::element('input', array('type' => 'button', 'value' => wfMsg('abusefilter-test-load'), 'id' => 'mw-abusefilter-load'));
     $output = Xml::tags('div', array('id' => 'mw-abusefilter-test-editor'), $output);
     $output .= Xml::tags('p', null, Xml::checkLabel(wfMsg('abusefilter-test-shownegative'), 'wpShowNegative', 'wpShowNegative', $this->mShowNegative));
     // Selectory stuff
     $selectFields = array();
     $selectFields['abusefilter-test-user'] = Xml::input('wpTestUser', 45, $this->mTestUser);
     $selectFields['abusefilter-test-period-start'] = Xml::input('wpTestPeriodStart', 45, $this->mTestPeriodStart);
     $selectFields['abusefilter-test-period-end'] = Xml::input('wpTestPeriodEnd', 45, $this->mTestPeriodEnd);
     $selectFields['abusefilter-test-page'] = Xml::input('wpTestPage', 45, $this->mTestPage);
     $output .= Xml::buildForm($selectFields, 'abusefilter-test-submit');
     $output .= Xml::hidden('title', $this->getTitle('test')->getPrefixedText());
     $output = Xml::tags('form', array('action' => $this->getTitle('test')->getLocalURL(), 'method' => 'POST'), $output);
     $output = Xml::fieldset(wfMsg('abusefilter-test-legend'), $output);
     $wgOut->addHTML($output);
     if ($wgRequest->wasPosted()) {
         $this->doTest();
     }
 }
开发者ID:ErdemA,项目名称:wikihow,代码行数:31,代码来源:AbuseFilterViewTestBatch.php

示例5: showUserForm

    /**
     * Show the form for retrieving a user's current avatar
     * @return HTML
     */
    private function showUserForm()
    {
        $output = '<form method="get" name="avatar" action="">' . Xml::hidden('title', $this->getTitle()) . '<b>' . wfMsg('username') . '</b>
				<input type="text" name="user" />
				<input type="submit" value="' . wfMsg('search') . '" />
			</form>';
        return $output;
    }
开发者ID:kghbln,项目名称:semantic-social-profile,代码行数:12,代码来源:SpecialRemoveAvatar.php

示例6: showOptions

 /**
  * @param $namespace int
  * @param $type string
  * @param $level string
  * @param $minsize int
  * @private
  */
 function showOptions($namespace, $type = 'edit', $level, $sizetype, $size)
 {
     global $wgScript;
     $action = htmlspecialchars($wgScript);
     $title = SpecialPage::getTitleFor('ProtectedTitles');
     $special = htmlspecialchars($title->getPrefixedDBkey());
     return "<form action=\"{$action}\" method=\"get\">\n" . '<fieldset>' . Xml::element('legend', array(), wfMsg('protectedtitles')) . Xml::hidden('title', $special) . "&nbsp;\n" . $this->getNamespaceMenu($namespace) . "&nbsp;\n" . $this->getLevelMenu($level) . "&nbsp;\n" . "&nbsp;" . Xml::submitButton(wfMsg('allpagessubmit')) . "\n" . "</fieldset></form>";
 }
开发者ID:amjadtbssm,项目名称:website,代码行数:15,代码来源:SpecialProtectedtitles.php

示例7: showOptions

 /**
  * Show options for the log list
  * @param $type String
  * @param $user String
  * @param $page String
  * @param $pattern String
  * @param $year Integer: year
  * @param $month Integer: month
  * @param $filter Boolean
  */
 public function showOptions($type = '', $user = '', $page = '', $pattern = '', $year = '', $month = '', $filter = null)
 {
     global $wgScript, $wgMiserMode;
     $action = htmlspecialchars($wgScript);
     $title = SpecialPage::getTitleFor('Log');
     $special = htmlspecialchars($title->getPrefixedDBkey());
     $this->out->addHTML("<form action=\"{$action}\" method=\"get\"><fieldset>" . Xml::element('legend', array(), wfMsg('log')) . Xml::hidden('title', $special) . "\n" . $this->getTypeMenu($type) . "\n" . $this->getUserInput($user) . "\n" . $this->getTitleInput($page) . "\n" . (!$wgMiserMode ? $this->getTitlePattern($pattern) . "\n" : "") . "<p>" . $this->getDateMenu($year, $month) . "\n" . ($filter ? "</p><p>" . $this->getFilterLinks($type, $filter) . "\n" : "") . Xml::submitButton(wfMsg('allpagessubmit')) . "</p>\n" . "</fieldset></form>");
 }
开发者ID:amjadtbssm,项目名称:website,代码行数:18,代码来源:LogEventsList.php

示例8: getForm

 /** Produce a nice little form */
 function getForm()
 {
     list($sum, $answer) = $this->pickSum();
     $index = $this->storeCaptcha(array('answer' => $answer));
     $form = '<table><tr><td>' . $this->fetchMath($sum) . '</td>';
     $form .= '<td>' . Xml::input('wpCaptchaWord', false, false, array('tabindex' => '1')) . '</td></tr></table>';
     $form .= Xml::hidden('wpCaptchaId', $index);
     return $form;
 }
开发者ID:ErdemA,项目名称:wikihow,代码行数:10,代码来源:MathCaptcha.class.php

示例9: fooBarBaz

 public function fooBarBaz($par)
 {
     global $wgBarBarBar, $wgUser;
     if ($par) {
         return;
     }
     $wgBarBarBar->dobar(Xml::fieldset(wfMessage('importinterwiki')->text()) . Xml::openElement('form', array('method' => 'post', 'action' => $par, 'id' => 'mw-import-interwiki-form')) . wfMessage('import-interwiki-text')->parse() . Xml::hidden('action', 'submit') . Xml::hidden('source', 'interwiki') . Xml::hidden('editToken', $wgUser->editToken()), 'secondArgument');
     $foo = $par;
     return $foo + $wgBarBarBar + $this->foo;
 }
开发者ID:odorsey,项目名称:mediawiki-heroku,代码行数:10,代码来源:generic_pass.php

示例10: getPageHeader

 function getPageHeader()
 {
     global $wgScript, $wgMiserMode;
     # Do not show useless input form if wiki is running in misermode
     if ($wgMiserMode) {
         return '';
     }
     $prefix = $this->prefix;
     $t = SpecialPage::getTitleFor($this->getName());
     return Xml::openElement('form', array('method' => 'get', 'action' => $wgScript)) . Xml::openElement('fieldset') . Xml::element('legend', null, wfMsg('withoutinterwiki-legend')) . Xml::hidden('title', $t->getPrefixedText()) . Xml::inputLabel(wfMsg('allpagesprefix'), 'prefix', 'wiprefix', 20, $prefix) . ' ' . Xml::submitButton(wfMsg('withoutinterwiki-submit')) . Xml::closeElement('fieldset') . Xml::closeElement('form');
 }
开发者ID:amjadtbssm,项目名称:website,代码行数:11,代码来源:SpecialWithoutinterwiki.php

示例11: wfSpecialMIMEsearch

/**
 * Output the HTML search form, and constructs the MIMEsearchPage object.
 */
function wfSpecialMIMEsearch($par = null)
{
    global $wgRequest, $wgOut;
    $mime = isset($par) ? $par : $wgRequest->getText('mime');
    $wgOut->addHTML(Xml::openElement('form', array('id' => 'specialmimesearch', 'method' => 'get', 'action' => SpecialPage::getTitleFor('MIMEsearch')->getLocalUrl())) . Xml::openElement('fieldset') . Xml::hidden('title', SpecialPage::getTitleFor('MIMEsearch')->getPrefixedText()) . Xml::element('legend', null, wfMsg('mimesearch')) . Xml::inputLabel(wfMsg('mimetype'), 'mime', 'mime', 20, $mime) . ' ' . Xml::submitButton(wfMsg('ilsubmit')) . Xml::closeElement('fieldset') . Xml::closeElement('form'));
    list($major, $minor) = wfSpecialMIMEsearchParse($mime);
    if ($major == '' or $minor == '' or !wfSpecialMIMEsearchValidType($major)) {
        return;
    }
    $wpp = new MIMEsearchPage($major, $minor);
    list($limit, $offset) = wfCheckLimits();
    $wpp->doQuery($offset, $limit);
}
开发者ID:rocLv,项目名称:conference,代码行数:16,代码来源:SpecialMIMEsearch.php

示例12: makeForm

 /**
  * Generate a form to allow users to enter an ISBN
  *
  * @return string
  */
 private function makeForm()
 {
     global $wgScript;
     $title = self::getTitleFor('Booksources');
     $form = '<fieldset><legend>' . wfMsgHtml('booksources-search-legend') . '</legend>';
     $form .= Xml::openElement('form', array('method' => 'get', 'action' => $wgScript));
     $form .= Xml::hidden('title', $title->getPrefixedText());
     $form .= '<p>' . Xml::inputLabel(wfMsg('booksources-isbn'), 'isbn', 'isbn', 20, $this->isbn);
     $form .= '&nbsp;' . Xml::submitButton(wfMsg('booksources-go')) . '</p>';
     $form .= Xml::closeElement('form');
     $form .= '</fieldset>';
     return $form;
 }
开发者ID:negabaro,项目名称:alfresco,代码行数:18,代码来源:SpecialBooksources.php

示例13: buildForm

    function buildForm()
    {
        global $wgScript;
        $languages = Language::getLanguageNames(false);
        ksort($languages);
        $out = Xml::openElement('form', array('method' => 'get', 'action' => $wgScript, 'id' => 'mw-allmessages-form')) . Xml::fieldset(wfMsg('allmessages-filter-legend')) . Xml::hidden('title', $this->getTitle()) . Xml::openElement('table', array('class' => 'mw-allmessages-table')) . "\n" . '<tr>
				<td class="mw-label">' . Xml::label(wfMsg('allmessages-prefix'), 'mw-allmessages-form-prefix') . "</td>\n\n\t\t\t\t<td class=\"mw-input\">" . Xml::input('prefix', 20, str_replace('_', ' ', $this->prefix), array('id' => 'mw-allmessages-form-prefix')) . "</td>\n\n\t\t\t</tr>\n\t\t\t<tr>\n\n\t\t\t\t<td class='mw-label'>" . wfMsg('allmessages-filter') . "</td>\n\n\t\t\t\t<td class='mw-input'>" . Xml::radioLabel(wfMsg('allmessages-filter-unmodified'), 'filter', 'unmodified', 'mw-allmessages-form-filter-unmodified', $this->filter == 'unmodified' ? true : false) . Xml::radioLabel(wfMsg('allmessages-filter-all'), 'filter', 'all', 'mw-allmessages-form-filter-all', $this->filter == 'all' ? true : false) . Xml::radioLabel(wfMsg('allmessages-filter-modified'), 'filter', 'modified', 'mw-allmessages-form-filter-modified', $this->filter == 'modified' ? true : false) . "</td>\n\n\t\t\t</tr>\n\t\t\t<tr>\n\n\t\t\t\t<td class=\"mw-label\">" . Xml::label(wfMsg('allmessages-language'), 'mw-allmessages-form-lang') . "</td>\n\n\t\t\t\t<td class=\"mw-input\">" . Xml::openElement('select', array('id' => 'mw-allmessages-form-lang', 'name' => 'lang'));
        foreach ($languages as $lang => $name) {
            $selected = $lang == $this->langCode ? true : false;
            $out .= Xml::option($lang . ' - ' . $name, $lang, $selected) . "\n";
        }
        $out .= Xml::closeElement('select') . "</td>\n\n\t\t\t</tr>\n\t\t\t<tr>\n\n\t\t\t\t<td></td>\n\t\t\t\t<td>" . Xml::submitButton(wfMsg('allmessages-filter-submit')) . "</td>\n\n\t\t\t</tr>" . Xml::closeElement('table') . $this->table->getHiddenFields(array('title', 'prefix', 'filter', 'lang')) . Xml::closeElement('fieldset') . Xml::closeElement('form');
        return $out;
    }
开发者ID:rocLv,项目名称:conference,代码行数:14,代码来源:SpecialAllmessages.php

示例14: showForm

 /**
  * Show the confirmation form
  */
 protected function showForm()
 {
     global $wgOut, $wgUser, $wgRequest, $wgLang, $wgContLang;
     $timestamp = $this->getTimestamp();
     $form = Xml::openElement('form', array('method' => 'post', 'action' => $this->getAction()));
     $form .= Xml::hidden('wpEditToken', $wgUser->editToken($this->archiveName));
     $form .= '<fieldset><legend>' . wfMsgHtml('filerevert-legend') . '</legend>';
     $form .= wfMsgExt('filerevert-intro', 'parse', $this->title->getText(), $wgLang->date($timestamp, true), $wgLang->time($timestamp, true), wfExpandUrl($this->file->getArchiveUrl($this->archiveName)));
     $form .= '<p>' . Xml::inputLabel(wfMsg('filerevert-comment'), 'wpComment', 'wpComment', 60, wfMsgForContent('filerevert-defaultcomment', $wgContLang->date($timestamp, false, false), $wgContLang->time($timestamp, false, false))) . '</p>';
     $form .= '<p>' . Xml::submitButton(wfMsg('filerevert-submit')) . '</p>';
     $form .= '</fieldset>';
     $form .= '</form>';
     $wgOut->addHTML($form);
 }
开发者ID:rocLv,项目名称:conference,代码行数:17,代码来源:FileRevertForm.php

示例15: namespaceForm

 /**
  * HTML for the top form
  * @param integer $namespace A namespace constant (default NS_MAIN).
  * @param string $from Article name we are starting listing at.
  */
 function namespaceForm($namespace = NS_MAIN, $from = '')
 {
     global $wgScript, $wgContLang;
     $t = SpecialPage::getTitleFor($this->name);
     $align = $wgContLang->isRtl() ? 'left' : 'right';
     $out = Xml::openElement('div', array('class' => 'namespaceoptions'));
     $out .= Xml::openElement('form', array('method' => 'get', 'action' => $wgScript));
     $out .= Xml::hidden('title', $t->getPrefixedText());
     $out .= Xml::openElement('table', array('id' => 'nsselect', 'class' => 'allpages'));
     $out .= "<tr>\n\t\t\t<td align='{$align}'>" . Xml::label(wfMsg($this->nsfromMsg), 'nsfrom') . "</td>\n\t\t\t<td>" . Xml::input('from', 20, $from, array('id' => 'nsfrom')) . "</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td align='{$align}'>" . Xml::label(wfMsg('namespace'), 'namespace') . "</td>\n\t\t\t<td>" . Xml::namespaceSelector($namespace, null) . Xml::submitButton(wfMsg('allpagessubmit')) . "</td>\n\t\t\t</tr>";
     $out .= Xml::closeElement('table');
     $out .= Xml::closeElement('form');
     $out .= Xml::closeElement('div');
     return $out;
 }
开发者ID:BackupTheBerlios,项目名称:shoutwiki-svn,代码行数:20,代码来源:SpecialAllpages.php


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