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


PHP form_makeOpenTag函数代码示例

本文整理汇总了PHP中form_makeOpenTag函数的典型用法代码示例。如果您正苦于以下问题:PHP form_makeOpenTag函数的具体用法?PHP form_makeOpenTag怎么用?PHP form_makeOpenTag使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: handle_html_editform_output

 public function handle_html_editform_output(Doku_Event &$event, $param)
 {
     $pos = $event->data->findElementByAttribute('type', 'submit');
     if (!$pos) {
         return;
     }
     // no submit button found, source view
     $pos -= 1;
     $event->data->insertElement($pos++, form_makeOpenTag('div', array()));
     $attrs = $_REQUEST['saveandedit'] ? array('checked' => 'checked') : array();
     $event->data->insertElement($pos++, form_makeCheckboxField('saveandedit', '1', $this->getLang('btn_saveandedit'), '', '', $attrs));
     $event->data->insertElement($pos++, form_makeCloseTag('div'));
 }
开发者ID:houshuang,项目名称:folders2web,代码行数:13,代码来源:action.php

示例2: html

 /**
  * output appropriate html
  */
 public function html()
 {
     global $lang;
     $helper = $this->loadHelper('loadskin', true);
     print '<div id="plugin__loadskin">';
     print $this->locale_xhtml('intro');
     $form = new Doku_Form(array());
     $form->startFieldSet('Add rule');
     $form->addHidden('id', $ID);
     $form->addHidden('do', 'admin');
     $form->addHidden('page', 'loadskin');
     $form->addHidden('act', 'add');
     $form->addElement(form_makeOpenTag('p'));
     $form->addElement(form_makeTextField('pattern', '', $this->getLang('pattern')));
     $form->addElement(form_makeCloseTag('p'));
     $form->addElement(form_makeOpenTag('p'));
     $form->addElement(form_makeListboxField('tpl', $helper->getTemplates(), '', $this->getLang('template')));
     $form->addElement(form_makeCloseTag('p'));
     $form->addElement(form_makeButton('submit', '', $lang['btn_save']));
     $form->endFieldSet();
     $form->printForm();
     if (@file_exists($this->config)) {
         $data = unserialize(io_readFile($this->config, false));
         if (!empty($data)) {
             echo '<table class="inline">' . DOKU_LF;
             echo '  <tr>' . DOKU_LF;
             echo '    <th>' . $this->getLang('pattern') . '</th>' . DOKU_LF;
             echo '    <th>' . $this->getLang('template') . '</th>' . DOKU_LF;
             echo '    <th>' . $this->getLang('action') . '</th>' . DOKU_LF;
             echo '  </tr>' . DOKU_LF;
             foreach ($data as $key => $value) {
                 echo '  <tr>' . DOKU_LF;
                 echo '    <td>' . $key . '</td>' . DOKU_LF;
                 echo '    <td>' . $value . '</td>' . DOKU_LF;
                 echo '    <td>' . DOKU_LF;
                 $form = new Doku_Form(array());
                 $form->addHidden('do', 'admin');
                 $form->addHidden('page', 'loadskin');
                 $form->addHidden('act', 'del');
                 $form->addHidden('id', $ID);
                 $form->addHidden('pattern', $key);
                 $form->addElement(form_makeButton('submit', '', $lang['btn_delete']));
                 $form->printForm();
                 echo '    </td>' . DOKU_LF;
                 echo '  </tr>' . DOKU_LF;
             }
             echo '</table>' . DOKU_LF;
         }
     }
     print '</div>';
 }
开发者ID:iiet,项目名称:dokuwiki-plugin-loadskin,代码行数:54,代码来源:admin.php

示例3: html_edit


//.........这里部分代码省略.........
            msg('Command disabled: source', -1);
            return;
        }
        print p_locale_xhtml('read');
    }
    if (!$DATE) {
        $DATE = $INFO['lastmod'];
    }
    ?>
  <div style="width:99%;">

   <div class="toolbar">
      <div id="draft__status"><?php 
    if (!empty($INFO['draft'])) {
        echo $lang['draftdate'] . ' ' . strftime($conf['dformat']);
    }
    ?>
</div>
      <div id="tool__bar"><?php 
    if ($wr) {
        ?>
<a href="<?php 
        echo DOKU_BASE;
        ?>
lib/exe/mediamanager.php?ns=<?php 
        echo $INFO['namespace'];
        ?>
"
      target="_blank"><?php 
        echo $lang['mediaselect'];
        ?>
</a><?php 
    }
    ?>
</div>

      <?php 
    if ($wr) {
        ?>
      <script type="text/javascript" charset="utf-8"><!--//--><![CDATA[//><!--
        <?php 
        /* sets changed to true when previewed */
        ?>
        textChanged = <?php 
        $mod ? print 'true' : (print 'false');
        ?>
;
      //--><!]]></script>
      <span id="spell__action"></span>
      <div id="spell__suggest"></div>
      <?php 
    }
    ?>
   </div>
   <div id="spell__result"></div>
<?php 
    $form = new Doku_Form('dw__editform');
    $form->addHidden('id', $ID);
    $form->addHidden('rev', $REV);
    $form->addHidden('date', $DATE);
    $form->addHidden('prefix', $PRE);
    $form->addHidden('suffix', $SUF);
    $form->addHidden('changecheck', $check);
    $attr = array('tabindex' => '1');
    if (!$wr) {
        $attr['readonly'] = 'readonly';
    }
    $form->addElement(form_makeWikiText($text, $attr));
    $form->addElement(form_makeOpenTag('div', array('id' => 'wiki__editbar')));
    $form->addElement(form_makeOpenTag('div', array('id' => 'size__ctl')));
    $form->addElement(form_makeCloseTag('div'));
    if ($wr) {
        $form->addElement(form_makeOpenTag('div', array('class' => 'editButtons')));
        $form->addElement(form_makeButton('submit', 'save', $lang['btn_save'], array('id' => 'edbtn__save', 'accesskey' => 's', 'tabindex' => '4')));
        $form->addElement(form_makeButton('submit', 'preview', $lang['btn_preview'], array('id' => 'edbtn__preview', 'accesskey' => 'p', 'tabindex' => '5')));
        $form->addElement(form_makeButton('submit', 'draftdel', $lang['btn_cancel'], array('tabindex' => '6')));
        $form->addElement(form_makeCloseTag('div'));
        $form->addElement(form_makeOpenTag('div', array('class' => 'summary')));
        $form->addElement(form_makeTextField('summary', $SUM, $lang['summary'], 'edit__summary', 'nowrap', array('size' => '50', 'tabindex' => '2')));
        $elem = html_minoredit();
        if ($elem) {
            $form->addElement($elem);
        }
        $form->addElement(form_makeCloseTag('div'));
    }
    $form->addElement(form_makeCloseTag('div'));
    if ($conf['license']) {
        $form->addElement(form_makeOpenTag('div', array('class' => 'license')));
        $out = $lang['licenseok'];
        $out .= '<a href="' . $license[$conf['license']]['url'] . '" rel="license" class="urlextern"';
        if ($conf['target']['external']) {
            $out .= ' target="' . $conf['target']['external'] . '"';
        }
        $out .= '> ' . $license[$conf['license']]['name'] . '</a>';
        $form->addElement($out);
        $form->addElement(form_makeCloseTag('div'));
    }
    html_form('edit', $form);
    print '</div>' . NL;
}
开发者ID:jalemanyf,项目名称:wsnlocalizationscala,代码行数:101,代码来源:html.php

示例4: tpl_form

 /**
  * Prints the comment form
  *
  * FIXME
  *  allow comments only for registered users
  *  add toolbar
  */
 function tpl_form($page, $pid)
 {
     global $INFO;
     global $BLOGTNG;
     $form = new DOKU_Form('blogtng__comment_form', wl($page) . '#blogtng__comment_form');
     $form->addHidden('pid', $pid);
     $form->addHidden('id', $page);
     $form->addHidden('btng[comment][source]', 'comment');
     foreach (array('name', 'mail', 'web') as $field) {
         $attr = $BLOGTNG['comment_submit_errors'][$field] ? array('class' => 'edit error') : array();
         if ($field == 'web' && !$this->getConf('comments_allow_web')) {
             continue;
         } else {
             $form->addElement(form_makeTextField('btng[comment][' . $field . ']', $BLOGTNG['comment'][$field], $this->getLang('comment_' . $field), 'blogtng__comment_' . $field, 'edit block', $attr));
         }
     }
     $form->addElement(form_makeOpenTag('div', array('class' => 'blogtng__toolbar')));
     $form->addElement(form_makeCloseTag('div'));
     if ($BLOGTNG['comment_submit_errors']['text']) {
         $form->addElement(form_makeWikiText($BLOGTNG['comment']['text'], array('class' => 'edit error')));
     } else {
         $form->addElement(form_makeWikiText($BLOGTNG['comment']['text']));
     }
     //add captcha if available
     $helper = null;
     if (@is_dir(DOKU_PLUGIN . 'captcha')) {
         $helper = plugin_load('helper', 'captcha');
     }
     if (!is_null($helper) && $helper->isEnabled()) {
         $form->addElement($helper->getHTML());
     }
     $form->addElement(form_makeButton('submit', 'comment_preview', $this->getLang('comment_preview'), array('class' => 'button', 'id' => 'blogtng__preview_submit')));
     $form->addElement(form_makeButton('submit', 'comment_submit', $this->getLang('comment_submit'), array('class' => 'button', 'id' => 'blogtng__comment_submit')));
     if ($this->getConf('comments_subscription')) {
         $form->addElement(form_makeCheckboxField('blogtng[subscribe]', 1, $this->getLang('comment_subscribe')));
     }
     print '<div id="blogtng__comment_form_wrap">' . DOKU_LF;
     $form->printForm();
     if (isset($BLOGTNG['comment_action']) && $BLOGTNG['comment_action'] == 'preview' && empty($BLOGTNG['comment_submit_errors'])) {
         print '<div id="blogtng__comment_preview">' . DOKU_LF;
         $comment = new blogtng_comment();
         $comment->data = $BLOGTNG['comment'];
         $comment->data['cid'] = 'preview';
         $comment->output('default');
         print '</div>' . DOKU_LF;
     }
     print '</div>' . DOKU_LF;
 }
开发者ID:Narrator,项目名称:plugin-blogtng,代码行数:55,代码来源:comments.php

示例5: media_searchform

/**
 * Print the search field form
 *
 * @author Tobias Sarnowski <sarnowski@cosmocode.de>
 * @author Kate Arzamastseva <pshns@ukr.net>
 */
function media_searchform($ns, $query = '', $fullscreen = false)
{
    global $lang;
    // The default HTML search form
    $params = array('id' => 'dw__mediasearch');
    if (!$fullscreen) {
        $params['action'] = DOKU_BASE . 'lib/exe/mediamanager.php';
    } else {
        $params['action'] = media_managerURL(array(), '&');
    }
    $form = new Doku_Form($params);
    $form->addHidden('ns', $ns);
    $form->addHidden($fullscreen ? 'mediado' : 'do', 'searchlist');
    if (!$fullscreen) {
        $form->addElement('<div class="upload">' . $lang['mediasearch'] . '</div>' . NL);
    }
    $form->addElement(form_makeOpenTag('p'));
    $form->addElement(form_makeTextField('q', $query, $lang['searchmedia'], '', '', array('title' => sprintf($lang['searchmedia_in'], hsc($ns) . ':*'))));
    $form->addElement(form_makeButton('submit', '', $lang['btn_search']));
    $form->addElement(form_makeCloseTag('p'));
    html_form('searchmedia', $form);
}
开发者ID:yjliugit,项目名称:dokuwiki,代码行数:28,代码来源:media.php

示例6: getForm

 /**
  * Return the search form for the namespace and the tag selection
  *
  * @return string the HTML code of the search form
  */
 private function getForm()
 {
     global $conf, $lang;
     // Get the list of all namespaces for the dropdown
     $namespaces = array();
     search($namespaces, $conf['datadir'], 'search_namespaces', array());
     // build the list in the form value => label from the namespace search result
     $ns_select = array('' => '');
     foreach ($namespaces as $ns) {
         // only display namespaces the user can access when sneaky index is on
         if ($ns['perm'] > 0 || $conf['sneaky_index'] == 0) {
             $ns_select[$ns['id']] = $ns['id'];
         }
     }
     $form = new Doku_Form(array('action' => '', 'method' => 'post', 'class' => 'plugin__tag_search'));
     // add a paragraph around the inputs in order to get some margin around the form elements
     $form->addElement(form_makeOpenTag('p'));
     // namespace select
     $form->addElement(form_makeMenuField('plugin__tag_search_namespace', $ns_select, $this->getNS(), $lang['namespaces']));
     // checkbox for AND
     $attr = array();
     if ($this->useAnd()) {
         $attr['checked'] = 'checked';
     }
     $form->addElement(form_makeCheckboxField('plugin__tag_search_and', 1, $this->getLang('use_and'), '', '', $attr));
     $form->addElement(form_makeCloseTag('p'));
     // load the tag list - only tags that actually have pages assigned that the current user can access are listed
     /* @var helper_plugin_tag $my */
     if ($my =& plugin_load('helper', 'tag')) {
         $tags = $my->tagOccurrences(array(), NULL, true);
     }
     // sort tags by name ($tags is in the form $tag => $count)
     ksort($tags);
     // display error message when no tags were found
     if (!isset($tags) || $tags == NULL) {
         $form->addElement(form_makeOpenTag('p'));
         $form->addElement($this->getLang('no_tags'));
         $form->addElement(form_makeCloseTag('p'));
     } else {
         // the tags table
         $form->addElement(form_makeOpenTag('div', array('class' => 'table')));
         $form->addElement(form_makeOpenTag('table', array('class' => 'inline')));
         // print table header
         $form->addElement(form_makeOpenTag('tr'));
         $form->addElement(form_makeOpenTag('th'));
         $form->addElement($this->getLang('include'));
         $form->addElement(form_makeCloseTag('th'));
         $form->addElement(form_makeOpenTag('th'));
         $form->addElement($this->getLang('exclude'));
         $form->addElement(form_makeCloseTag('th'));
         $form->addElement(form_makeOpenTag('th'));
         $form->addElement($this->getLang('tags'));
         $form->addElement(form_makeCloseTag('th'));
         $form->addElement(form_makeCloseTag('tr'));
         // print tag checkboxes
         foreach ($tags as $tag => $count) {
             $form->addElement(form_makeOpenTag('tr'));
             $form->addElement(form_makeOpenTag('td'));
             $attr = array();
             if ($this->isSelected($tag)) {
                 $attr['checked'] = 'checked';
             }
             $form->addElement(form_makeCheckboxField('plugin__tag_search_tags[]', $tag, '+', '', 'plus', $attr));
             $form->addElement(form_makeCloseTag('td'));
             $form->addElement(form_makeOpenTag('td'));
             $attr = array();
             if ($this->isSelected('-' . $tag)) {
                 $attr['checked'] = 'checked';
             }
             $form->addElement(form_makeCheckboxField('plugin__tag_search_tags[]', '-' . $tag, '-', '', 'minus', $attr));
             $form->addElement(form_makeCloseTag('td'));
             $form->addElement(form_makeOpenTag('td'));
             $form->addElement(hsc($tag) . ' [' . $count . ']');
             $form->addElement(form_makeCloseTag('td'));
             $form->addElement(form_makeCloseTag('tr'));
         }
         $form->addElement(form_makeCloseTag('table'));
         $form->addElement(form_makeCloseTag('div'));
         // submit button (doesn't use the button form element because it always submits an action which is not
         // recognized for $preact in inc/actions.php and thus always causes a redirect)
         $form->addElement(form_makeOpenTag('p'));
         $form->addElement(form_makeTag('input', array('type' => 'submit', 'value' => $lang['btn_search'])));
         $form->addElement(form_makeCloseTag('p'));
     }
     return $form->getForm();
 }
开发者ID:omusico,项目名称:isle-web-framework,代码行数:91,代码来源:searchtags.php

示例7: media_searchform

/**
 * Print the search field form
 *
 * @author Tobias Sarnowski <sarnowski@cosmocode.de>
 */
function media_searchform($ns, $query = '')
{
    global $lang;
    // The default HTML search form
    $form = new Doku_Form(array('id' => 'dw__mediasearch', 'action' => DOKU_BASE . 'lib/exe/mediamanager.php'));
    $form->addElement('<div class="upload">' . $lang['mediasearch'] . '</div>');
    $form->addElement(formSecurityToken());
    $form->addHidden('ns', $ns);
    $form->addHidden('do', 'searchlist');
    $form->addElement(form_makeOpenTag('p'));
    $form->addElement(form_makeTextField('q', $query, $lang['searchmedia'], '', '', array('title' => sprintf($lang['searchmedia_in'], hsc($ns) . ':*'))));
    $form->addElement(form_makeButton('submit', '', $lang['btn_search']));
    $form->addElement(form_makeCloseTag('p'));
    html_form('searchmedia', $form);
}
开发者ID:lorea,项目名称:Hydra-dev,代码行数:20,代码来源:media.php

示例8: __siteexport_addpage

 function __siteexport_addpage()
 {
     global $ID, $conf;
     $templateSwitching = false;
     $pdfExport = false;
     $usenumberedheading = false;
     $cronEnabled = false;
     $translationAvailable = false;
     $usenumberedheading = true;
     if (($functions =& plugin_load('preload', 'siteexport')) && $functions->__create_preload_function()) {
         $templateSwitching = true;
     }
     if ($functions =& plugin_load('action', 'dw2pdf')) {
         $pdfExport = true;
     }
     // if ( $functions =& plugin_load('renderer', 'nodetailsxhtml' ) ) {
     // }
     if ($functions =& plugin_load('cron', 'siteexport')) {
         $cronEnabled = $functions->canWriteSettings();
     }
     if ($functions =& plugin_load('helper', 'translation')) {
         $translationAvailable = true;
     }
     $regenerateScript = '';
     print $this->locale_xhtml('intro');
     $form = new Doku_Form('siteexport', null, 'post');
     $form->startFieldset($this->getLang('startingNamespace'));
     $form->addElement(form_makeTextField('ns', $ID, $this->getLang('ns') . ':', 'ns'));
     $form->addElement(form_makeTag('br'));
     $form->addElement(form_makeTextField('ens', $ID, $this->getLang('ens') . ':', 'ens'));
     $form->addElement(form_makeTag('br'));
     $form->addElement(form_makeListboxField('depthType', array("0.0" => $this->getLang('depth.pageOnly'), "1.0" => $this->getLang('depth.allSubNameSpaces'), "2.0" => $this->getLang('depth.specifiedDepth')), empty($_REQUEST['depthType']) ? $this->getLang('depth.allSubNameSpaces') : $_REQUEST['depthType'], $this->getLang('depthType') . ':', 'depthType', null, array_merge(array('class' => 'edit'))));
     $form->addElement(form_makeTag('br'));
     $form->addElement(form_makeOpenTag("div", array('style' => 'display:' . ($_REQUEST['depthType'] == "2" ? "block" : "none") . ';', 'id' => 'depthContainer')));
     $form->addElement(form_makeTextField('depth', $this->getConf('depth'), $this->getLang('depth') . ':', 'depth'));
     $form->addElement(form_makeCloseTag("div"));
     $form->addElement(form_makeTag('br'));
     $form->addElement(form_makeOpenTag("div", array('style' => 'display:none;', 'id' => 'depthContainer')));
     $form->addElement(form_makeCheckboxField('exportLinkedPages', 1, $this->getLang('exportLinkedPages') . ':', 'exportLinkedPages'));
     $form->addElement(form_makeCloseTag("div"));
     $form->endFieldset();
     $form->addElement(form_makeTag('br'));
     $form->startFieldset($this->getLang('selectYourOptions'));
     $form->addElement(form_makeCheckboxField('absolutePath', 1, $this->getLang('absolutePath') . ':', 'absolutePath'));
     $form->addElement(form_makeTag('br'));
     $form->addElement(form_makeCheckboxField('exportBody', 1, $this->getLang('exportBody') . ':', 'exportBody'));
     $form->addElement(form_makeTag('br'));
     $form->addElement(form_makeCheckboxField('disableCache', 1, $this->getLang('disableCache') . ':', 'disableCache'));
     $form->addElement(form_makeTag('br'));
     $form->addElement(form_makeCheckboxField('addParams', 1, $this->getLang('addParams') . ':', 'addParams', null, array_merge(array('checked' => $conf['userewrite'] != 1 ? 'checked' : ''))));
     $form->addElement(form_makeTag('br'));
     $form->addElement(form_makeTag('br'));
     $form->addElement(form_makeListboxField('renderer', array_merge(array('', 'xhtml'), plugin_list('renderer')), '', $this->getLang('renderer') . ':', 'renderer', null, array_merge(array('class' => 'edit'))));
     $form->addElement(form_makeTag('br'));
     if ($templateSwitching) {
         $form->addElement(form_makeListboxField('template', $this->__getTemplates(), $conf['template'], $this->getLang('template') . ':', 'template', null, array_merge(array('class' => 'edit'))));
         $form->addElement(form_makeTag('br'));
     } else {
         $form->addElement(form_makeTag('br'));
         $form->addElement(form_makeOpenTag('p', array('style' => 'color: #a00;')));
         $form->addElement('Can\'t create preload file in \'inc\' directory. Template switching is not available. Plugin disabling is not available.');
         $form->addElement(form_makeCloseTag('p'));
     }
     $form->addElement(form_makeTag('br'));
     $form->addElement(form_makeCheckboxField('pdfExport', 1, $this->getLang('pdfExport') . ':', 'pdfExport', null, $pdfExport ? array() : array_merge(array('disabled' => 'disabled'))));
     if (!$pdfExport) {
         $form->addElement(form_makeOpenTag('p', array('style' => 'color: #a00;')));
         $form->addElement('In order to use the PDF export, please ');
         $form->addElement(form_makeOpenTag('a', array('href' => 'http://www.dokuwiki.org/plugin:dw2pdf', 'alt' => 'install plugin', 'target' => '_blank')));
         $form->addElement('install the dw2pdf plugin.');
         $form->addElement(form_makeCloseTag('a'));
         $form->addElement(form_makeCloseTag('p'));
     }
     $form->addElement(form_makeTag('br'));
     $form->addElement(form_makeCheckboxField('usenumberedheading', 1, $this->getLang('usenumberedheading') . ':', 'usenumberedheading', null, $usenumberedheading && $pdfExport ? array() : array_merge(array('disabled' => 'disabled'))));
     $form->addElement(form_makeTag('br'));
     if (!$usenumberedheading) {
         $form->addElement(form_makeOpenTag('p', array('style' => 'color: #a00;')));
         $form->addElement('In order to use numbered headings, please ');
         $form->addElement(form_makeOpenTag('a', array('href' => 'http://www.dokuwiki.org/plugin:nodetailsxhtml', 'alt' => 'install plugin', 'target' => '_blank')));
         $form->addElement('install the nodetailsxhtml plugin.');
         $form->addElement(form_makeCloseTag('a'));
         $form->addElement(form_makeCloseTag('p'));
     }
     $form->endFieldset();
     $form->addElement(form_makeTag('br'));
     $form->startFieldset($this->getLang('helpCreationOptions'));
     $form->addElement(form_makeCheckboxField('eclipseDocZip', 1, $this->getLang('eclipseDocZip') . ':', 'eclipseDocZip'));
     $form->addElement(form_makeTag('br'));
     $form->addElement(form_makeCheckboxField('JavaHelpDocZip', 1, $this->getLang('JavaHelpDocZip') . ':', 'JavaHelpDocZip'));
     $form->addElement(form_makeTag('br'));
     $form->addElement(form_makeCheckboxField('useTocFile', 1, $this->getLang('useTocFile') . ':', 'useTocFile'));
     $form->addElement(form_makeTag('br'));
     $form->addElement(form_makeCheckboxField('emptyTocElem', 1, $this->getLang('emptyTocElem') . ':', 'emptyTocElem'));
     $form->addElement(form_makeTag('br'));
     if (!$translationAvailable) {
         $form->addElement(form_makeCheckboxField('TOCMapWithoutTranslation', 1, $this->getLang('TOCMapWithoutTranslation') . ':', 'TOCMapWithoutTranslation'));
         $form->addElement(form_makeTag('br'));
     }
     $form->endFieldset();
//.........这里部分代码省略.........
开发者ID:omusico,项目名称:isle-web-framework,代码行数:101,代码来源:helper.php

示例9: html_sizechange

/**
 * Display size change
 *
 * @param int $sizechange - size of change in Bytes
 * @param Doku_Form $form - form to add elements to
 */
function html_sizechange($sizechange, Doku_Form $form)
{
    if (isset($sizechange)) {
        $class = 'sizechange';
        $value = filesize_h(abs($sizechange));
        if ($sizechange > 0) {
            $class .= ' positive';
            $value = '+' . $value;
        } elseif ($sizechange < 0) {
            $class .= ' negative';
            $value = '-' . $value;
        } else {
            $value = '±' . $value;
        }
        $form->addElement(form_makeOpenTag('span', array('class' => $class)));
        $form->addElement($value);
        $form->addElement(form_makeCloseTag('span'));
    }
}
开发者ID:janzoner,项目名称:dokuwiki,代码行数:25,代码来源:html.php

示例10: media_uploadform

/**
 * Print the media upload form if permissions are correct
 *
 * @author Andreas Gohr <andi@splitbrain.org>
 */
function media_uploadform($ns, $auth)
{
    global $lang;
    if ($auth < AUTH_UPLOAD) {
        return;
    }
    //fixme print info on missing permissions?
    // The default HTML upload form
    $form = new Doku_Form('dw__upload', DOKU_BASE . 'lib/exe/mediamanager.php', false, 'multipart/form-data');
    $form->addElement('<div class="upload">' . $lang['mediaupload'] . '</div>');
    $form->addElement(formSecurityToken());
    $form->addHidden('ns', hsc($ns));
    $form->addElement(form_makeOpenTag('p'));
    $form->addElement(form_makeFileField('upload', $lang['txt_upload'] . ':', 'upload__file'));
    $form->addElement(form_makeCloseTag('p'));
    $form->addElement(form_makeOpenTag('p'));
    $form->addElement(form_makeTextField('id', '', $lang['txt_filename'] . ':', 'upload__name'));
    $form->addElement(form_makeButton('submit', '', $lang['btn_upload']));
    $form->addElement(form_makeCloseTag('p'));
    if ($auth >= AUTH_DELETE) {
        $form->addElement(form_makeOpenTag('p'));
        $form->addElement(form_makeCheckboxField('ow', 1, $lang['txt_overwrt'], 'dw__ow', 'check'));
        $form->addElement(form_makeCloseTag('p'));
    }
    html_form('upload', $form);
    // prepare flashvars for multiupload
    $opt = array('L_gridname' => $lang['mu_gridname'], 'L_gridsize' => $lang['mu_gridsize'], 'L_gridstat' => $lang['mu_gridstat'], 'L_namespace' => $lang['mu_namespace'], 'L_overwrite' => $lang['txt_overwrt'], 'L_browse' => $lang['mu_browse'], 'L_upload' => $lang['btn_upload'], 'L_toobig' => $lang['mu_toobig'], 'L_ready' => $lang['mu_ready'], 'L_done' => $lang['mu_done'], 'L_fail' => $lang['mu_fail'], 'L_authfail' => $lang['mu_authfail'], 'L_progress' => $lang['mu_progress'], 'L_filetypes' => $lang['mu_filetypes'], 'O_ns' => ":{$ns}", 'O_backend' => 'mediamanager.php?' . session_name() . '=' . session_id(), 'O_size' => php_to_byte(ini_get('upload_max_filesize')), 'O_extensions' => join('|', array_keys(getMimeTypes())), 'O_overwrite' => $auth >= AUTH_DELETE, 'O_sectok' => getSecurityToken(), 'O_authtok' => auth_createToken());
    $var = buildURLparams($opt);
    // output the flash uploader
    ?>
    <div id="dw__flashupload" style="display:none">
    <div class="upload"><?php 
    echo $lang['mu_intro'];
    ?>
</div>
    <?php 
    echo html_flashobject('multipleUpload.swf', '500', '190', null, $opt);
    ?>
    </div>
    <?php 
}
开发者ID:jalemanyf,项目名称:wsnlocalizationscala,代码行数:46,代码来源:media.php

示例11: xhtml_newform

 /**
  * Displays a form to create new entries
  */
 function xhtml_newform($conf)
 {
     global $ID;
     // allowed to create?
     if (!$this->toolshelper) {
         $this->toolshelper =& plugin_load('helper', 'blogtng_tools');
     }
     $new = $this->toolshelper->mkpostid($conf['format'], 'dummy');
     if (auth_quickaclcheck($new) < AUTH_CREATE) {
         return '';
     }
     $form = new Doku_Form($ID, wl($ID, array('do' => 'btngnew'), false, '&'));
     if ($conf['title']) {
         $form->addElement(form_makeOpenTag('h3'));
         $form->addElement(hsc($conf['title']));
         $form->addElement(form_makeCloseTag('h3'));
     }
     if (isset($conf['select'])) {
         $form->addElement(form_makeMenuField('btng[new][title]', array_filter(preg_split('/\\s*,\\s*/', $conf['select'])), '', $this->getLang('title'), 'btng__nt', 'edit'));
     } else {
         $form->addElement(form_makeTextField('btng[new][title]', '', $this->getLang('title'), 'btng__nt', 'edit'));
     }
     $form->addElement(form_makeButton('submit', null, $this->getLang('create')));
     $form->addHidden('btng[new][format]', hsc($conf['format']));
     $form->addHidden('btng[post][blog]', hsc($conf['blog'][0]));
     return '<div class="blogtng_newform">' . $form->getForm() . '</div>';
 }
开发者ID:speed47,项目名称:plugin-blogtng,代码行数:30,代码来源:entry.php

示例12: render


//.........这里部分代码省略.........
             echo "<td>";
             if ($file->is_target() && $perm > AUTH_READ) {
                 echo button_remake($project->id($name));
             }
             echo "</td>";
             echo "<td>";
             if ($perm >= AUTH_DELETE) {
                 echo button_delete($project->id($name));
             }
             echo "</td>";
             echo "<td>";
             echo html_wikilink($project->id($name));
             if ($project->error($name) != NULL) {
                 echo "<img src=\"" . DOKU_URL . "/lib/images/error.png\"></img>";
             }
             echo "</td>";
             echo "</tr>";
             $count++;
         }
         if ($count == 0) {
             echo "<tr><td></td><td></td><td>No {$type} files in this project</td></tr>";
         }
     }
     $files = $project->subprojects();
     if ($files) {
         sort($files);
         echo "<tr><td></td><td></td><td><h2>Subprojects</h2></td></tr>";
         foreach ($files as $file) {
             $id = $project->name() . ":{$file}";
             $link = DOKU_URL . "/doku.php?id={$id}:{$file}&do=manage_files";
             echo "<tr><td></td><td></td><td>";
             echo "<a href=\"{$link}\">{$file}</a>";
             echo "</td>";
             echo "</tr>";
         }
     }
     echo "</table>";
     $parent = $project->parent();
     if ($parent != NULL) {
         echo "<h1>Parent project</h1>";
         $name = $parent->name();
         $file = end(explode(":", $name));
         $link = DOKU_URL . "/doku.php?id={$name}:{$file}&do=manage_files";
         echo "<a href=\"{$link}\">{$name}</a>";
     }
     if ($perm <= AUTH_READ) {
         return;
     }
     echo "<p/><h1>Create Files</h1>";
     $create = new Doku_Form("Create");
     $create->addHidden("do", "create");
     $create->addHidden("page", "projects_manage_files");
     $create->addHidden("id", $ID);
     $create->startFieldSet('Create a new file');
     $create->addElement(form_makeOpenTag("p"));
     $create->addElement(form_makeField('text', 'File name'));
     $create->addElement(form_makeCloseTag("p"));
     $create->addElement(form_makeOpenTag("p"));
     $create->addElement(form_makeRadioField('Type', SOURCE, "Source", "", "", array('checked' => "true")));
     $create->addElement(form_makeRadioField('Type', TARGET, 'Generated'));
     $create->addElement(form_makeRadioField('Type', CROSSLINK, 'Crosslink'));
     $create->addElement(form_makeCloseTag("p"));
     $create->addElement(form_makeButton("submit", '', "Create"));
     $create->endFieldSet();
     echo $create->getForm();
     echo "<h1>Create subproject</h1>";
     $subproject = new Doku_Form("Subproject");
     $subproject->addHidden("do", "create_subproject");
     $subproject->addHidden("page", "projects_manage_files");
     $subproject->addHidden("id", $ID);
     $subproject->startFieldSet('Create a new subproject');
     $subproject->addElement(form_makeOpenTag("p"));
     $subproject->addElement(form_makeField('text', 'Project name'));
     $subproject->addElement(form_makeCloseTag("p"));
     $subproject->addElement(form_makeButton("submit", '', "Create sub-project"));
     $subproject->endFieldSet();
     echo $subproject->getForm();
     echo "<h1>Clean up</h1>";
     $clean = new Doku_Form("Clean");
     $clean->addHidden("do", "clean");
     $clean->addHidden("page", "projects_manage_files");
     $clean->addHidden("id", $ID);
     $clean->startFieldSet('Clean the project');
     $clean->addElement(form_makeCheckboxField("Recursive"));
     $clean->addElement(form_makeButton("submit", "", "Clean"));
     $clean->endFieldSet();
     echo $clean->getForm();
     if ($perm < AUTH_ADMIN) {
         return;
     }
     echo "<h1>Rebuild the project</h1>";
     $rebuild = new Doku_Form("rebuild");
     $rebuild->addHidden("do", "rebuild");
     $rebuild->addHidden("page", "projects_manage_files");
     $rebuild->addHidden("id", $ID);
     $rebuild->startFieldSet('Rebuild the project');
     $rebuild->addElement(form_makeButton("submit", '', "Rebuild"));
     $rebuild->endFieldSet();
     echo $rebuild->getForm();
 }
开发者ID:omusico,项目名称:isle-web-framework,代码行数:101,代码来源:action.php

示例13: handle_editform_output

 /**
  * Handles HTML_EDITFORM_OUTPUT event.
  */
 function handle_editform_output(&$event, $params)
 {
     global $ID;
     global $ACT;
     global $INFO;
     // Not in edit mode? Quit
     if ($ACT != 'edit' && $ACT != 'preview') {
         return;
     }
     // page not writable? Quit
     if (!$INFO['writable']) {
         return;
     }
     // if guests are not allowed to perform linkbacks, return
     if (!$this->getConf('allow_guests') && !$_SERVER['REMOTE_USER']) {
         return;
     }
     // get linkback meta file name
     $file = metaFN($ID, '.linkbacks');
     $data = array('send' => false, 'receive' => false, 'display' => false, 'sentpings' => array(), 'receivedpings' => array(), 'number' => 0);
     if (@file_exists($file)) {
         $data = unserialize(io_readFile($file, false));
     } else {
         $namespace_conf = $this->getConf('enabled_namespaces');
         if ($namespace_conf == '*') {
             $data['send'] = true;
         } else {
             $namespaces = explode(',', $namespace_conf);
             $ns = getNS($ID);
             foreach ($namespaces as $namespace) {
                 if ($namespace == '') {
                     continue;
                 } else {
                     if ($namespace == '*') {
                         $data['send'] = true;
                         break;
                     } else {
                         if (strstr($ns, $namespace) === $ns) {
                             $data['send'] = true;
                             break;
                         }
                     }
                 }
             }
         }
     }
     $form = $event->data;
     $pos = $form->findElementById('wiki__editbar');
     $form->insertElement($pos, form_makeOpenTag('div', array('id' => 'plugin__linkback_wrapper')));
     $form->insertElement($pos + 1, form_makeCheckboxField('plugin__linkback_toggle', '1', $this->getLang('linkback_enabledisable'), 'plugin__linkback_toggle', 'edit', $data['send'] ? array('checked' => 'checked') : array()));
     $form->insertElement($pos + 2, form_makeCloseTag('div'));
 }
开发者ID:omusico,项目名称:isle-web-framework,代码行数:55,代码来源:send.php

示例14: html_edit_form

/**
 * Display the default edit form
 *
 * Is the default action for HTML_EDIT_FORMSELECTION.
 *
 * @triggers HTML_EDITFORM_OUTPUT
 */
function html_edit_form($param)
{
    extract($param);
    global $conf;
    global $license;
    global $lang;
    global $REV;
    global $DATE;
    global $PRE;
    global $SUF;
    global $INFO;
    global $SUM;
    global $ID;
    ?>
            <?php 
    if ($wr) {
        ?>
                <script type="text/javascript" charset="utf-8"><!--//--><![CDATA[//><!--
                    <?php 
        /* sets changed to true when previewed */
        ?>
                    textChanged = <?php 
        $mod ? print 'true' : (print 'false');
        ?>
;
                //--><!]]></script>
            <?php 
    }
    ?>
        <div style="width:99%;">

        <div class="toolbar">
        <div id="draft__status"><?php 
    if (!empty($INFO['draft'])) {
        echo $lang['draftdate'] . ' ' . dformat();
    }
    ?>
</div>
        <div id="tool__bar"><?php 
    if ($wr) {
        ?>
<a href="<?php 
        echo DOKU_BASE;
        ?>
lib/exe/mediamanager.php?ns=<?php 
        echo $INFO['namespace'];
        ?>
"
            target="_blank"><?php 
        echo $lang['mediaselect'];
        ?>
</a><?php 
    }
    ?>
</div>

        </div>
        <?php 
    $form = new Doku_Form(array('id' => 'dw__editform'));
    $form->addHidden('id', $ID);
    $form->addHidden('rev', $REV);
    $form->addHidden('date', $DATE);
    $form->addHidden('prefix', $PRE);
    $form->addHidden('suffix', $SUF);
    $form->addHidden('changecheck', $check);
    $attr = array('tabindex' => '1');
    if (!$wr) {
        $attr['readonly'] = 'readonly';
    }
    $form->addElement(form_makeWikiText($text, $attr));
    $form->addElement(form_makeOpenTag('div', array('id' => 'wiki__editbar')));
    $form->addElement(form_makeOpenTag('div', array('id' => 'size__ctl')));
    $form->addElement(form_makeCloseTag('div'));
    if ($wr) {
        $form->addElement(form_makeOpenTag('div', array('class' => 'editButtons')));
        $form->addElement(form_makeButton('submit', 'save', $lang['btn_save'], array('id' => 'edbtn__save', 'accesskey' => 's', 'tabindex' => '4')));
        $form->addElement(form_makeButton('submit', 'preview', $lang['btn_preview'], array('id' => 'edbtn__preview', 'accesskey' => 'p', 'tabindex' => '5')));
        $form->addElement(form_makeButton('submit', 'draftdel', $lang['btn_cancel'], array('tabindex' => '6')));
        $form->addElement(form_makeCloseTag('div'));
        $form->addElement(form_makeOpenTag('div', array('class' => 'summary')));
        $form->addElement(form_makeTextField('summary', $SUM, $lang['summary'], 'edit__summary', 'nowrap', array('size' => '50', 'tabindex' => '2')));
        $elem = html_minoredit();
        if ($elem) {
            $form->addElement($elem);
        }
        $form->addElement(form_makeCloseTag('div'));
    }
    $form->addElement(form_makeCloseTag('div'));
    if ($wr && $conf['license']) {
        $form->addElement(form_makeOpenTag('div', array('class' => 'license')));
        $out = $lang['licenseok'];
        $out .= '<a href="' . $license[$conf['license']]['url'] . '" rel="license" class="urlextern"';
        if (isset($conf['target']['external'])) {
//.........这里部分代码省略.........
开发者ID:JeromeS,项目名称:dokuwiki,代码行数:101,代码来源:html.php

示例15: media_uploadform

/**
 * Print the media upload form if permissions are correct
 *
 * @author Andreas Gohr <andi@splitbrain.org>
 */
function media_uploadform($ns, $auth)
{
    global $lang;
    if ($auth < AUTH_UPLOAD) {
        return;
    }
    //fixme print info on missing permissions?
    print '<div class="upload">' . $lang['mediaupload'] . '</div>';
    $form = new Doku_Form('dw__upload', DOKU_BASE . 'lib/exe/mediamanager.php', false, 'multipart/form-data');
    $form->addElement(formSecurityToken());
    $form->addHidden('ns', hsc($ns));
    $form->addElement(form_makeOpenTag('p'));
    $form->addElement(form_makeFileField('upload', $lang['txt_upload'] . ':', 'upload__file'));
    $form->addElement(form_makeCloseTag('p'));
    $form->addElement(form_makeOpenTag('p'));
    $form->addElement(form_makeTextField('id', '', $lang['txt_filename'] . ':', 'upload__name'));
    $form->addElement(form_makeButton('submit', '', $lang['btn_upload']));
    $form->addElement(form_makeCloseTag('p'));
    if ($auth >= AUTH_DELETE) {
        $form->addElement(form_makeOpenTag('p'));
        $form->addElement(form_makeCheckboxField('ow', 1, $lang['txt_overwrt'], 'dw__ow', 'check'));
        $form->addElement(form_makeCloseTag('p'));
    }
    html_form('upload', $form);
}
开发者ID:JVS-IS,项目名称:ICONITO-EcoleNumerique,代码行数:30,代码来源:media.php


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