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


PHP XML::submitButton方法代码示例

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


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

示例1: execute

 /**
  * Main function for special page. At the current time only produces html for the blacklist.
  * Should support updating the blacklist.
  * 
  * @global $wgOut object
  * @global $wgRequest object
  * @param $par
  */
 public function execute($par)
 {
     global $wgOut, $wgRequest;
     $this->setHeaders();
     //$this->outputHeader();
     $wgOut->addWikiMsg('archivelinks-modify-blacklist-desc');
     $wgOut->addHTML(HTML::openElement('form', array('method' => 'post', 'action' => SpecialPage::getTitleFor('ModifyBlacklist')->getLocalUrl())) . HTML::openElement('fieldset') . HTML::element('legend', null, wfMsg('ModifyArchiveBlacklist')) . HTML::openElement('table') . HTML::openElement('tr') . HTML::openElement('td') . wfMsg('archivelinks-modify-blacklist-blacklist-or-whitelist-field-label') . HTML::closeElement('td') . HTML::openElement('td') . HTML::element('input', array('name' => 'bl_blacklist-whitelist', 'type' => 'radio', 'value' => 'blacklist')) . ' ' . wfMsg('archivelinks-modify-blacklist-blacklist-field-label') . HTML::closeElement('td') . HTML::closeElement('tr') . HTML::openElement('tr') . HTML::openElement('td') . HTML::closeElement('td') . HTML::openElement('td') . HTML::element('input', array('name' => 'bl_blacklist-whitelist', 'type' => 'radio', 'value' => 'whitelist')) . ' ' . wfMsg('archivelinks-modify-blacklist-whitelist-field-label') . HTML::closeElement('td') . HTML::closeElement('tr') . HTML::openElement('tr') . HTML::openElement('td') . wfMsg('archivelinks-modify-blacklist-add-or-remove-field-label') . HTML::closeElement('td') . HTML::openElement('td') . HTML::element('input', array('name' => 'bl_add-remove', 'type' => 'radio', 'value' => 'add')) . ' ' . wfMsg('archivelinks-modify-blacklist-add-field-label') . HTML::closeElement('td') . HTML::closeElement('tr') . HTML::openElement('tr') . HTML::openElement('td') . HTML::closeElement('td') . HTML::openElement('td') . HTML::element('input', array('name' => 'bl_add-remove', 'type' => 'radio', 'value' => 'remove')) . ' ' . wfMsg('archivelinks-modify-blacklist-remove-field-label') . HTML::closeElement('td') . HTML::closeElement('tr') . HTML::openElement('tr') . HTML::openElement('td') . HTML::element('label', array('for' => 'bl_url'), wfMsg('archivelinks-modify-blacklist-url-field-label')) . HTML::closeElement('td') . HTML::openElement('td') . HTML::element('input', array('name' => 'bl_url', 'type' => 'text', 'size' => '110')) . HTML::closeElement('td') . HTML::closeElement('tr') . HTML::openElement('tr') . HTML::openElement('td') . HTML::element('label', array('for' => 'bl_duration'), wfMsg('archivelinks-modify-blacklist-duration-field-label')) . HTML::closeElement('td') . HTML::openElement('td') . HTML::element('input', array('name' => 'bl_duration', 'type' => 'text', 'size' => '60')) . HTML::closeElement('td') . HTML::closeElement('tr') . HTML::openElement('tr') . HTML::openElement('td') . HTML::element('label', array('for' => 'bl_reason'), wfMsg('archivelinks-modify-blacklist-reason-field-label')) . HTML::closeElement('td') . HTML::openElement('td') . HTML::element('input', array('name' => 'bl_reason', 'type' => 'text', 'size' => '60')) . HTML::closeElement('td') . HTML::closeElement('tr') . HTML::closeElement('table') . XML::submitButton('Blacklist URL') . HTML::closeElement('fieldset') . HTML::closeElement('form'));
 }
开发者ID:realsoc,项目名称:mediawiki-extensions,代码行数:16,代码来源:SpecialModifyArchiveBlacklist.php

示例2: execute

 function execute($par)
 {
     global $wgOut, $wgUser;
     $this->setHeaders();
     if (!$wgUser->isAllowed('stafflog')) {
         throw new PermissionsError('stafflog');
     }
     $pager = new StaffLoggerPager("");
     $sTypesDropDown = XML::openElement('select', array('name' => 'type', 'id' => 'StaffLogFilterType'));
     foreach ($this->aTypes as $k => $v) {
         $sTypesDropDown .= XML::option($v, $k, $k == $this->request->getText('type', ''));
     }
     $sTypesDropDown .= XML::closeElement('select');
     $wgOut->addHTML(XML::openElement('form', array('method' => 'get', 'action' => $this->getTitle()->getLocalURL())) . XML::openElement('fieldset') . XML::element('legend', null, wfMsg('stafflog-filter-label'), false) . XML::inputLabel(wfMsg('stafflog-filter-user'), 'user', 'StaffLogFilterUser', false, htmlspecialchars($this->request->getText('user', ''), ENT_QUOTES, 'UTF-8')) . XML::label(wfMsg('stafflog-filter-type'), 'StaffLogFilterType') . ' ' . $sTypesDropDown . ' ' . XML::submitButton(wfMsg('stafflog-filter-apply')) . XML::closeElement('fieldset') . XML::closeElement('form') . XML::openElement('div', array('class' => 'mw-spcontent')) . $pager->getNavigationBar() . '<ul>' . $pager->getBody() . '</ul>' . $pager->getNavigationBar() . XML::closeElement('div'));
 }
开发者ID:schwarer2006,项目名称:wikia,代码行数:15,代码来源:StaffLog_body.php

示例3: getNewPages

 function getNewPages($user)
 {
     global $wgOut, $wgUser;
     $wgOut->addHTML(Xml::openElement('form', array('action' => $this->getTitle()->getLocalURL('action=delete'), 'method' => 'post')) . HTML::hidden('wpEditToken', $wgUser->getEditToken()) . '<ul>');
     $pages = BanPests::getBannablePages($user);
     $ips = BanPests::getBannableIP($user);
     if (count($pages)) {
         $wgOut->addHTML("<h2>" . wfMsg("blockandnuke-pages") . "</h2>");
         $wgOut->addHtml("<ul>");
         foreach ($pages as $title) {
             $wgOut->addHtml("<li>" . Linker::link($title));
             $wgOut->addHtml(HTML::hidden('pages[]', $title));
         }
         $wgOut->addHtml("</ul>\n");
     }
     if (count($user)) {
         $wgOut->addHTML("<h2>" . wfMsg("blockandnuke-users") . "</h2>");
         foreach ($user as $users) {
             $dbr = wfGetDB(DB_SLAVE);
             $result = $dbr->select('recentchanges', array('rc_user', 'rc_user_text'), array('rc_user_text' => $users), __METHOD__, array('ORDER BY' => 'rc_user ASC'));
             $name = array();
             while ($row = $dbr->fetchObject($result)) {
                 $name[] = array($row->rc_user_text, $row->rc_user);
             }
             $wgOut->addHtml("<ul>");
             $seen = array();
             foreach ($name as $infos) {
                 list($user_2, $user_id) = $infos;
                 if (!isset($seen[$user_2])) {
                     $seen[$user_2] = true;
                     $wgOut->addHtml("<li>" . Linker::link(Title::newFromText($user_2, NS_USER)));
                     $wgOut->addHTML(HTML::hidden('names_2[]', $user_2) . HTML::hidden('userid[]', $user_id));
                 }
             }
             $wgOut->addHtml("</ul>\n");
         }
     }
     if ($ips) {
         $wgOut->addHTML("<h2>" . wfMsg("blockandnuke-ip-addresses") . "</h2>");
         foreach ($ips as $ip) {
             $wgOut->addHtml("<ul>");
             $seen = array();
             if (!isset($seen[$ip])) {
                 $seen[$ip] = true;
                 $wgOut->addHtml("<li>" . Linker::link(Title::newFromText($ip, NS_USER)));
                 $wgOut->addHTML(HTML::hidden('ip[]', $ip));
             }
             $wgOut->addHtml("</ul>\n");
         }
     }
     $wgOut->addHTML("</ul>\n" . XML::submitButton(wfMsg('blockandnuke')) . "</form>");
 }
开发者ID:brandonphuong,项目名称:mediawiki,代码行数:52,代码来源:BlockandNuke.body.php

示例4: output_form

 /**
  * Uses the HTML functions to output the appropiate form for the special page if no archived version
  * exists or if no query has been specified by the user yet.
  *
  * @global $wgOut object
  */
 private function output_form()
 {
     global $wgOut;
     $this->setHeaders();
     $wgOut->addWikiMsg('archivelinks-view-archive-desc');
     $wgOut->addHTML(HTML::openElement('form', array('method' => 'get', 'action' => SpecialPage::getTitleFor('ViewArchive')->getLocalUrl())) . HTML::openElement('fieldset') . HTML::element('legend', null, wfMsg('ViewArchive')) . XML::inputLabel(wfMsg('archivelinks-view-archive-url-field'), 'archive_url', 'archive-links-archive-url', 120) . HTML::element('br') . XML::submitButton(wfMsg('archivelinks-view-archive-submit-button')) . HTML::closeElement('fieldset') . HTML::closeElement('form'));
 }
开发者ID:realsoc,项目名称:mediawiki-extensions,代码行数:13,代码来源:SpecialViewArchive.php


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