• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP form_makeCheckboxField函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: renderProfileForm

 /**
  * This user will need to interact with the QR code in order to configure GA.
  */
 public function renderProfileForm()
 {
     global $conf, $USERINFO;
     $elements = array();
     $ga = new PHPGangsta_GoogleAuthenticator();
     if ($this->_settingExists("secret")) {
         // The user has a revokable GA secret.
         // Show the QR code so the user can add other devices.
         $mysecret = $this->_settingGet("secret");
         $data = $this->generateQRCodeData($USERINFO['name'] . '@' . $conf['title'], $mysecret);
         $elements[] = '<figure><figcaption>' . $this->getLang('directions') . '</figcaption>';
         $elements[] = '<img src="' . $data . '" alt="' . $this->getLang('directions') . '" />';
         $elements[] = '</figure>';
         // Check to see if the user needs to verify the code.
         if (!$this->_settingExists("verified")) {
             $elements[] = '<span>' . $this->getLang('verifynotice') . '</span>';
             $elements[] = form_makeTextField('googleauth_verify', '', $this->getLang('verifymodule'), '', 'block', array('size' => '50', 'autocomplete' => 'off'));
         }
         // Show the option to revoke the GA secret.
         $elements[] = form_makeCheckboxField('googleauth_disable', '1', $this->getLang('killmodule'), '', 'block');
     } else {
         // The user may opt in using GA.
         //Provide a checkbox to create a personal secret.
         $elements[] = form_makeCheckboxField('googleauth_enable', '1', $this->getLang('enablemodule'), '', 'block');
     }
     return $elements;
 }
开发者ID:wilminator,项目名称:dokuwiki-plugin-twofactorgoogleauth,代码行数:30,代码来源:helper.php


示例2: html

 public function html()
 {
     global $ID;
     echo $this->locale_xhtml('tree');
     echo '<noscript><div class="error">' . $this->getLang('noscript') . '</div></noscript>';
     echo '<div id="plugin_move__tree">';
     echo '<div class="tree_root tree_pages">';
     echo '<h3>' . $this->getLang('move_pages') . '</h3>';
     $this->htmlTree(self::TYPE_PAGES);
     echo '</div>';
     echo '<div class="tree_root tree_media">';
     echo '<h3>' . $this->getLang('move_media') . '</h3>';
     $this->htmlTree(self::TYPE_MEDIA);
     echo '</div>';
     /** @var helper_plugin_move_plan $plan */
     $plan = plugin_load('helper', 'move_plan');
     echo '<div class="controls">';
     if ($plan->isCommited()) {
         echo '<div class="error">' . $this->getLang('moveinprogress') . '</div>';
     } else {
         $form = new Doku_Form(array('action' => wl($ID), 'id' => 'plugin_move__tree_execute'));
         $form->addHidden('id', $ID);
         $form->addHidden('page', 'move_main');
         $form->addHidden('json', '');
         $form->addElement(form_makeCheckboxField('autoskip', '1', $this->getLang('autoskip'), '', '', $this->getConf('autoskip') ? array('checked' => 'checked') : array()));
         $form->addElement('<br />');
         $form->addElement(form_makeCheckboxField('autorewrite', '1', $this->getLang('autorewrite'), '', '', $this->getConf('autorewrite') ? array('checked' => 'checked') : array()));
         $form->addElement('<br />');
         $form->addElement('<br />');
         $form->addElement(form_makeButton('submit', 'admin', $this->getLang('btn_start')));
         $form->printForm();
     }
     echo '</div>';
     echo '</div>';
 }
开发者ID:kochichi,项目名称:dokuwiki-plugin-move,代码行数:35,代码来源:tree.php


示例3: 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


示例4: renderProfileForm

 /**
  * This user will need to verify their email.
  */
 public function renderProfileForm()
 {
     $elements = array();
     // If email has not been verified, then do so here.
     if (!$this->attribute->exists("twofactoremail", "verified")) {
         // Render the HTML to prompt for the verification/activation OTP.
         $elements[] = '<span>' . $this->getLang('verifynotice') . '</span>';
         $elements[] = form_makeTextField('email_verify', '', $this->getLang('verifymodule'), '', 'block', array('size' => '50', 'autocomplete' => 'off'));
         $elements[] = form_makeCheckboxField('email_send', '1', $this->getLang('resendcode'), '', 'block');
     } else {
         // Render the element to remove email.
         $elements[] = form_makeCheckboxField('email_disable', '1', $this->getLang('killmodule'), '', 'block');
     }
     return $elements;
 }
开发者ID:wilminator,项目名称:dokuwiki-plugin-twofactoremail,代码行数:18,代码来源:helper.php


示例5: renderProfileForm

 /**
  * This user will need to supply a phone number and their cell provider.
  */
 public function renderProfileForm()
 {
     $elements = array();
     // Provide an input for the phone number.
     $phone = $this->_settingGet("phone", '');
     $elements[] = form_makeTextField('smsappliance_phone', $phone, $this->getLang('phone'), '', 'block', array('size' => '50'));
     // If the phone number has not been verified, then do so here.
     if ($phone) {
         if (!$this->_settingExists("verified")) {
             // Render the HTML to prompt for the verification/activation OTP.
             $elements[] = '<span>' . $this->getLang('verifynotice') . '</span>';
             $elements[] = form_makeTextField('smsappliance_verify', '', $this->getLang('verifymodule'), '', 'block', array('size' => '50', 'autocomplete' => 'off'));
             $elements[] = form_makeCheckboxField('smsappliance_send', '1', $this->getLang('resendcode'), '', 'block');
         }
         // Render the element to remove the phone since it exists.
         $elements[] = form_makeCheckboxField('smsappliance_disable', '1', $this->getLang('killmodule'), '', 'block');
     }
     return $elements;
 }
开发者ID:wilminator,项目名称:dokuwiki-plugin-twofactorsmsappliance,代码行数:22,代码来源:helper.php


示例6: renderProfileForm

 /**
  * This user will need to verify their email.
  */
 public function renderProfileForm()
 {
     $elements = array();
     // Prompt for an email address.
     $email = $this->_settingGet("email");
     $elements[] = form_makeTextField('altemail_email', $email, $this->getLang('email'), '', 'block', array('size' => '50', 'autocomplete' => 'off'));
     // If email has not been verified, then do so here.
     if (!$this->_settingExists("verified") && $email) {
         // Render the HTML to prompt for the verification/activation OTP.
         $elements[] = '<span>' . $this->getLang('verifynotice') . '</span>';
         $elements[] = form_makeTextField('altemail_verify', '', $this->getLang('verifymodule'), '', 'block', array('size' => '50', 'autocomplete' => 'off'));
         $elements[] = form_makeCheckboxField('altemail_send', '1', $this->getLang('resendcode'), '', 'block');
     }
     if ($this->_settingExists("email")) {
         // Render the element to remove email.
         $elements[] = form_makeCheckboxField('altemail_disable', '1', $this->getLang('killmodule'), '', 'block');
     }
     return $elements;
 }
开发者ID:wilminator,项目名称:dokuwiki-plugin-twofactoraltemail,代码行数:22,代码来源:helper.php


示例7: renderProfileForm

 /**
  * This user will need to supply a phone number and their cell provider.
  */
 public function renderProfileForm()
 {
     $elements = array();
     // Provide an input for the phone number.
     $phone = $this->attribute->exists("twofactor", "phone") ? $this->attribute->get("twofactor", "phone") : '';
     $elements['phone'] = form_makeTextField('phone', $phone, $this->_getSharedLang('phone'), '', 'block', array('size' => '50'));
     $providers = array_keys($this->_getProviders());
     $provider = $this->attribute->exists("twofactorsmsgateway", "provider") ? $this->attribute->get("twofactorsmsgateway", "provider") : $providers[0];
     $elements[] = form_makeListboxField('smsgateway_provider', $providers, $provider, $this->getLang('provider'), '', 'block');
     // If the phone number has not been verified, then do so here.
     if ($phone) {
         if (!$this->attribute->exists("twofactorsmsgateway", "verified")) {
             // Render the HTML to prompt for the verification/activation OTP.
             $elements[] = '<span>' . $this->getLang('verifynotice') . '</span>';
             $elements[] = form_makeTextField('smsgateway_verify', '', $this->getLang('verifymodule'), '', 'block', array('size' => '50', 'autocomplete' => 'off'));
             $elements[] = form_makeCheckboxField('smsgateway_send', '1', $this->getLang('resendcode'), '', 'block');
         }
         // Render the element to remove the phone since it exists.
         $elements[] = form_makeCheckboxField('smsgateway_disable', '1', $this->getLang('killmodule'), '', 'block');
     }
     return $elements;
 }
开发者ID:wilminator,项目名称:dokuwiki-plugin-twofactorsmsgateway,代码行数:25,代码来源:helper.php


示例8: getBackupForm

 protected function getBackupForm()
 {
     $form = new \Doku_Form(['id' => 'mybackup_form']);
     $form->startFieldset('Folders to Backup');
     foreach (Backup::allowedDirectories() as $dir => $desc) {
         $form->addElement(form_makeCheckboxField('dirs[]', $dir, "<b>{$dir}</b> {$desc}", null, null, ['checked' => 'checked']));
     }
     $form->endFieldset();
     $form->startFieldset('Options');
     $form->addElement('<b>Logging Output</b>');
     $form->addElement(form_makeCheckboxField('verbose', 1, 'verbose (it can be very long)'));
     $form->addElement('<br /><b>Archive Format</b>');
     foreach (Backup::supportedFormats() as $ext => $enabled) {
         $disabled = $enabled ? [] : ['disabled' => 'disabled'];
         $selected = $ext != 'zip' ? [] : ['checked' => 'checked'];
         $form->addElement(form_makeRadioField('archive_format', $ext, strtoupper($ext), 'archive_format', '', array_merge([], $selected, $disabled)));
     }
     $form->endFieldset();
     $form->addElement('<br />');
     //$form->addElement(form_makeButton('button', null, 'check size'));
     $form->addElement(form_makeButton('submit', null, 'backup now'));
     return $form;
 }
开发者ID:yurii-github,项目名称:dokuwiki-plugin-yktools,代码行数:23,代码来源:main.php


示例9: oauthConfirm

 /**
  *
  */
 public function oauthConfirm($opt)
 {
     global $lang;
     global $conf;
     print '<h1>OAuth - Authorize Token</h1>' . NL;
     print '<div class="leftalign">' . NL;
     print '<p>A Consumer wants to make one or more requests on your behalf which requires your consent.<p>' . NL;
     print '</div>' . NL;
     print '<div class="centeralign">' . NL;
     $form = new Doku_Form('dw__oauth');
     $form->startFieldset('Authorize Request Token');
     #   $form->addHidden('id', $ID);
     $form->addElement('<p>Your Username: ' . $_SERVER['REMOTE_USER'] . '</p>');
     $form->addHidden('dwoauthnonce', $opt['secpass']);
     $form->addElement('<div class="leftalign"><ul>');
     $form->addElement('<li>Consumer-Key: ' . $opt['consumer_key'] . '</li>');
     $form->addElement('<li><a href="?do[oauth]=cinfo&dwoauthnonce=' . rawurlencode($opt['secpass']) . '" alt="consumer info">Consumer Info</a></li>');
     $form->addElement('<li>Token-Key: ' . $opt['token_key'] . '</li>');
     $form->addElement('<li>Callback URL: ' . $opt['callback_url'] . '</li>');
     $form->addElement('</ul></div>');
     $form->addElement(form_makeCheckboxField('userconfirmed', '1', 'allow request', 'allow_this', 'simple'));
     $form->addElement(form_makeCheckboxField('trustconsumer', '1', 'always trust this consumer from now on', 'remember__me', 'simple'));
     $form->addElement(form_makeButton('submit', 'oauth', 'resume', array('title' => 'authorize')));
     #   $form->addElement(form_makeButton('submit', '', 'cancel'));
     $form->addElement(form_makeButton('submit', 'oauth', 'cancel'));
     $form->endFieldset();
     // TODO: change-user/re-login button.. (go to logout, keep special $ID='OAUTHPLUGIN:'.$opt['secpass']
     html_form('confirm', $form);
     print '</div>' . NL;
     print '<div class="leftalign">' . NL;
     print '<p><b>small print</b></p>' . NL;
     print '<p>At this stage of prototying the dokuwiki OAuth plugin is not able to assure the Consumer’s true identity.</p>' . NL;
     print '<p>The request token you are about to authorize is valid only once: to get an access-token, the latter can be used to perform (multiple) requests using your account until it expires or you revoke it.<br/>' . NL;
     print 'A consumer may also forget the access-token and come back here every once in a while. Once consumer-verification is implemented and you have validated the consumer-information you may opt in to trust this consumer when you are logged in to dokuwiki to bypass this step by checking the "trust consumer" checkbox.</p>' . NL;
     print '</div>' . NL;
 }
开发者ID:x42,项目名称:dokuoauth,代码行数:39,代码来源:helper.php


示例10: _renderReviews

 function _renderReviews($id, $meta, $parid)
 {
     # Check for permission to write reviews
     $mod = canReview($id, $meta, $parid);
     # No reviews and no moderator privileges => no review block
     if (!$mod && empty($meta[$parid]['reviews'])) {
         return '';
     }
     $ret = "<div class=\"dokutranslate_review\">\n";
     $ret .= '<h5>' . $this->getLang('review_header') . "</h5>\n";
     $ret .= "<table>\n";
     $listbox = array(array('0', $this->getLang('trans_wrong')), array('1', $this->getLang('trans_rephrase')), array('2', $this->getLang('trans_accepted')));
     # Prepare review form for current user
     if ($mod) {
         if (isset($meta[$parid]['reviews'][$_SERVER['REMOTE_USER']])) {
             $myReview = $meta[$parid]['reviews'][$_SERVER['REMOTE_USER']];
         } else {
             $myReview = array('message' => '', 'quality' => 0, 'incomplete' => false);
         }
         $form = new Doku_Form(array());
         $form->addHidden('parid', strval($parid));
         $form->addHidden('do', 'dokutranslate_review');
         $form->addElement(form_makeTextField('review', $myReview['message'], $this->getLang('trans_message'), '', 'nowrap', array('size' => '50')));
         $form->addElement(form_makeMenuField('quality', $listbox, strval($myReview['quality']), $this->getLang('trans_quality'), '', 'nowrap'));
         $args = array();
         if ($myReview['incomplete']) {
             $args['checked'] = 'checked';
         }
         $form->addElement(form_makeCheckboxField('incomplete', '1', $this->getLang('trans_incomplete'), '', 'nowrap', $args));
         $form->addElement(form_makeButton('submit', '', $this->getLang('add_review')));
     }
     # Display all reviews for this paragraph
     while (list($key, $value) = each($meta[$parid]['reviews'])) {
         $ret .= '<tr><td>' . hsc($key) . '</td><td>';
         # Moderators can modify their own review
         if ($mod && $key == $_SERVER['REMOTE_USER']) {
             $ret .= $form->getForm();
         } else {
             $ret .= '(' . $listbox[$value['quality']][1];
             if ($value['incomplete']) {
                 $ret .= ', ' . $this->getLang('rend_incomplete');
             }
             $ret .= ') ';
             $ret .= hsc($value['message']);
         }
         $ret .= "</td></tr>\n";
     }
     # Current user is a moderator who didn't write a review yet,
     # display the review form at the end
     if ($mod && !isset($meta[$parid]['reviews'][$_SERVER['REMOTE_USER']])) {
         if (empty($meta[$parid]['reviews'])) {
             $ret .= '<tr><td>';
         } else {
             $ret .= '<tr><td colspan="2">';
         }
         $ret .= $form->getForm();
         $ret .= "</td></tr>\n";
     }
     $ret .= "</table></div>\n";
     return $ret;
 }
开发者ID:nextghost,项目名称:Dokutranslate,代码行数:61,代码来源:syntax.php


示例11: test_close_fieldset

 function test_close_fieldset()
 {
     $form = new Doku_Form(array('id' => 'dw__testform', 'action' => '/test'));
     $form->startFieldset('Test');
     $form->addHidden('summary', 'changes &c');
     $form->addElement(form_makeTextField('t', 'v', 'Text', 'text__id', 'block'));
     $form->addElement(form_makeCheckboxField('r', '1', 'Check', 'check__id', 'simple'));
     $form->addElement(form_makeButton('submit', 'save', 'Save', array('accesskey' => 's')));
     $form->addElement(form_makeButton('submit', 'cancel', 'Cancel'));
     ob_start();
     $form->printForm();
     $output = ob_get_contents();
     ob_end_clean();
     $this->assertEquals($this->_ignoreTagWS($output), $this->_ignoreTagWS($this->_realoutput()));
 }
开发者ID:kbuildsyourdotcom,项目名称:Door43,代码行数:15,代码来源:form_form.test.php


示例12: 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


示例13: media_uploadform

/**
 * Print the media upload form if permissions are correct
 *
 * @author Andreas Gohr <[email protected]>
 */
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(array('id' => 'dw__upload', 'action' => DOKU_BASE . 'lib/exe/mediamanager.php', 'enctype' => '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'], 'L_info' => $lang['mu_info'], 'L_lasterr' => $lang['mu_lasterr'], 'O_ns' => ":{$ns}", 'O_backend' => 'mediamanager.php?' . session_name() . '=' . session_id(), 'O_maxsize' => 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:lorea,项目名称:Hydra-dev,代码行数:46,代码来源:media.php


示例14: media_uploadform

/**
 * Print the media upload form if permissions are correct
 *
 * @author Andreas Gohr <[email protected]>
 */
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


示例15: html_minoredit

/**
 * Adds a checkbox for minor edits for logged in users
 *
 * @author Andreas Gohr <[email protected]>
 */
function html_minoredit()
{
    global $conf;
    global $lang;
    // minor edits are for logged in users only
    if (!$conf['useacl'] || !$_SERVER['REMOTE_USER']) {
        return false;
    }
    $p = array();
    $p['tabindex'] = 3;
    if (!empty($_REQUEST['minor'])) {
        $p['checked'] = 'checked';
    }
    return form_makeCheckboxField('minor', '1', $lang['minoredit'], 'minoredit', 'nowrap', $p);
}
开发者ID:nefercheprure,项目名称:dokuwiki,代码行数:20,代码来源:html.php


示例16: media_uploadform

/**
 * Print the media upload form if permissions are correct
 *
 * @author Andreas Gohr <[email protected]>
 * @author Kate Arzamastseva <[email protected]>
 */
function media_uploadform($ns, $auth, $fullscreen = false)
{
    global $lang;
    global $conf;
    global $INPUT;
    if ($auth < AUTH_UPLOAD) {
        echo '<div class="nothing">' . $lang['media_perm_upload'] . '</div>' . NL;
        return;
    }
    $auth_ow = $conf['mediarevisions'] ? AUTH_UPLOAD : AUTH_DELETE;
    $update = false;
    $id = '';
    if ($auth >= $auth_ow && $fullscreen && $INPUT->str('mediado') == 'update') {
        $update = true;
        $id = cleanID($INPUT->str('image'));
    }
    // The default HTML upload form
    $params = array('id' => 'dw__upload', 'enctype' => 'multipart/form-data');
    if (!$fullscreen) {
        $params['action'] = DOKU_BASE . 'lib/exe/mediamanager.php';
    } else {
        $params['action'] = media_managerURL(array('tab_files' => 'files', 'tab_details' => 'view'), '&');
    }
    $form = new Doku_Form($params);
    if (!$fullscreen) {
        echo '<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('mediaid', noNS($id), $lang['txt_filename'], 'upload__name'));
    $form->addElement(form_makeButton('submit', '', $lang['btn_upload']));
    $form->addElement(form_makeCloseTag('p'));
    if ($auth >= $auth_ow) {
        $form->addElement(form_makeOpenTag('p'));
        $attrs = array();
        if ($update) {
            $attrs['checked'] = 'checked';
        }
        $form->addElement(form_makeCheckboxField('ow', 1, $lang['txt_overwrt'], 'dw__ow', 'check', $attrs));
        $form->addElement(form_makeCloseTag('p'));
    }
    echo NL . '<div id="mediamanager__uploader">' . NL;
    html_form('upload', $form);
    echo '</div>' . NL;
    echo '<p class="maxsize">';
    printf($lang['maxuploadsize'], filesize_h(media_getuploadsize()));
    echo '</p>' . NL;
}
开发者ID:yjliugit,项目名称:dokuwiki,代码行数:58,代码来源:media.php


示例17: handle_profileform

 /**
  * Add service selection to user profile
  *
  * @param Doku_Event $event  event object by reference
  * @param mixed      $param  [the parameters passed as fifth argument to register_hook() when this
  *                           handler was registered]
  * @return void
  */
 public function handle_profileform(Doku_Event &$event, $param)
 {
     global $USERINFO;
     /** @var auth_plugin_authplain $auth */
     global $auth;
     /** @var helper_plugin_oauth $hlp */
     $hlp = plugin_load('helper', 'oauth');
     /** @var Doku_Form $form */
     $form =& $event->data;
     $pos = $form->findElementByAttribute('type', 'submit');
     $services = $hlp->listServices();
     if (!$services) {
         return;
     }
     $form->insertElement($pos, form_closefieldset());
     $form->insertElement(++$pos, form_openfieldset(array('_legend' => $this->getLang('loginwith'), 'class' => 'plugin_oauth')));
     foreach ($services as $service) {
         $group = $auth->cleanGroup($service);
         $elem = form_makeCheckboxField('oauth_group[' . $group . ']', 1, $service, '', 'simple', array('checked' => in_array($group, $USERINFO['grps']) ? 'checked' : ''));
         $form->insertElement(++$pos, $elem);
     }
     $form->insertElement(++$pos, form_closefieldset());
     $form->insertElement(++$pos, form_openfieldset(array()));
 }
开发者ID:ZeusWPI,项目名称:dokuwiki-plugin-oauth,代码行数:32,代码来源:action.php


示例18: _editData

 /**
  * The custom editor for editing data entries
  *
  * Gets called from action_plugin_data::_editform() where also the form member is attached
  *
  * @param array                          $data
  * @param Doku_Renderer_plugin_data_edit $renderer
  */
 function _editData($data, &$renderer)
 {
     $renderer->form->startFieldset($this->getLang('dataentry'));
     $renderer->form->_content[count($renderer->form->_content) - 1]['class'] = 'plugin__data';
     $renderer->form->addHidden('range', '0-0');
     // Adora Belle bugfix
     if ($this->getConf('edit_content_only')) {
         $renderer->form->addHidden('data_edit[classes]', $data['classes']);
         $columns = array('title', 'value', 'comment');
         $class = 'edit_content_only';
     } else {
         $renderer->form->addElement(form_makeField('text', 'data_edit[classes]', $data['classes'], $this->getLang('class'), 'data__classes'));
         $columns = array('title', 'type', 'multi', 'value', 'comment');
         $class = 'edit_all_content';
         // New line
         $data['data'][''] = '';
         $data['cols'][''] = array('type' => '', 'multi' => false);
     }
     $renderer->form->addElement("<table class=\"{$class}\">");
     //header
     $header = '<tr>';
     foreach ($columns as $column) {
         $header .= '<th class="' . $column . '">' . $this->getLang($column) . '</th>';
     }
     $header .= '</tr>';
     $renderer->form->addElement($header);
     //rows
     $n = 0;
     foreach ($data['cols'] as $key => $vals) {
         $fieldid = 'data_edit[data][' . $n++ . ']';
         $content = $vals['multi'] ? implode(', ', $data['data'][$key]) : $data['data'][$key];
         if (is_array($vals['type'])) {
             $vals['basetype'] = $vals['type']['type'];
             if (isset($vals['type']['enum'])) {
                 $vals['enum'] = $vals['type']['enum'];
             }
             $vals['type'] = $vals['origtype'];
         } else {
             $vals['basetype'] = $vals['type'];
         }
         if ($vals['type'] === 'hidden') {
             $renderer->form->addElement('<tr class="hidden">');
         } else {
             $renderer->form->addElement('<tr>');
         }
         if ($this->getConf('edit_content_only')) {
             if (isset($vals['enum'])) {
                 $values = preg_split('/\\s*,\\s*/', $vals['enum']);
                 if (!$vals['multi']) {
                     array_unshift($values, '');
                 }
                 $content = form_makeListboxField($fieldid . '[value][]', $values, $data['data'][$key], $vals['title'], '', '', $vals['multi'] ? array('multiple' => 'multiple') : array());
             } else {
                 $classes = 'data_type_' . $vals['type'] . ($vals['multi'] ? 's' : '') . ' ' . 'data_type_' . $vals['basetype'] . ($vals['multi'] ? 's' : '');
                 $attr = array();
                 if ($vals['basetype'] == 'date' && !$vals['multi']) {
                     $attr['class'] = 'datepicker';
                 }
                 $content = form_makeField('text', $fieldid . '[value]', $content, $vals['title'], '', $classes, $attr);
             }
             $cells = array(hsc($vals['title']) . ':', $content, '<span title="' . hsc($vals['comment']) . '">' . hsc($vals['comment']) . '</span>');
             foreach (array('multi', 'comment', 'type') as $field) {
                 $renderer->form->addHidden($fieldid . "[{$field}]", $vals[$field]);
             }
             $renderer->form->addHidden($fieldid . "[title]", $vals['origkey']);
             //keep key as key, even if title is translated
         } else {
             $check_data = $vals['multi'] ? array('checked' => 'checked') : array();
             $cells = array(form_makeField('text', $fieldid . '[title]', $vals['origkey'], $this->getLang('title')), form_makeMenuField($fieldid . '[type]', array_merge(array('', 'page', 'nspage', 'title', 'img', 'mail', 'url', 'tag', 'wiki', 'dt', 'hidden'), array_keys($this->dthlp->_aliases())), $vals['type'], $this->getLang('type')), form_makeCheckboxField($fieldid . '[multi]', array('1', ''), $this->getLang('multi'), '', '', $check_data), form_makeField('text', $fieldid . '[value]', $content, $this->getLang('value')), form_makeField('text', $fieldid . '[comment]', $vals['comment'], $this->getLang('comment'), '', 'data_comment', array('readonly' => 1, 'title' => $vals['comment'])));
         }
         foreach ($cells as $index => $cell) {
             $renderer->form->addElement("<td class=\"{$columns[$index]}\">");
             $renderer->form->addElement($cell);
             $renderer->form->addElement('</td>');
         }
         $renderer->form->addElement('</tr>');
     }
     $renderer->form->addElement('</table>');
     $renderer->form->endFieldset();
 }
开发者ID:RnBConsulting,项目名称:dokuwiki-plugin-data,代码行数:88,代码来源:entry.php


示例19: 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();
   

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP form_makeCloseTag函数代码示例发布时间:2022-05-15
下一篇:
PHP form_makeButton函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap