本文整理汇总了PHP中formSecurityToken函数的典型用法代码示例。如果您正苦于以下问题:PHP formSecurityToken函数的具体用法?PHP formSecurityToken怎么用?PHP formSecurityToken使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了formSecurityToken函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: html
function html()
{
ptln($this->locale_xhtml('admin_header'));
$cache = $this->cache;
$current_books = $this->cache['current_books'];
unset($cache['current_books']);
//ptln('<form action="'.wl($ID).'" method="post" onsubmit="return epub_admin_confirm(this);" id="epub_admin" name="epub_admin">' );
ptln('<form action="' . wl($ID) . '" method="post" id="epub_admin" name="epub_admin">');
echo "<ul>\n";
foreach ($cache as $md5 => $id) {
$id = trim($id);
if (!$id) {
$id = '<undefined>';
}
ptln('<li style="list-style-type:none; color: #333;"><input name="book_id[' . $md5 . ']" type="checkbox" value="' . $id . '"> ' . $id);
ptln(' <ul><li style="color:#333">' . $current_books[$md5]['title'] . "\n" . ' <li style="color:#333">' . $current_books[$md5]['epub']);
ptln(" <!--input type = 'hidden' name='{$md5}' value='" . $current_books[$md5]['epub'] . "'/ -->\n </ul>");
}
echo " </ul>\n";
ptln(' <input type="hidden" name="do" value="admin" />');
ptln(' <input type="hidden" name="page" value="' . $this->getPluginName() . '" />');
formSecurityToken();
ptln(' <input type="submit" name="cmd[cache]" onclick="return epub_admin_confirm(\'cache\');" id="epub_cache_btn" value="' . $this->getLang('btn_submit') . '" />');
ptln(' <input type="submit" onclick="return epub_admin_confirm(\'media\');" name="cmd[media]" id="epub_media_btn" value="' . $this->getLang('btn_del') . '" />');
ptln('</form>');
if ($this->dbg) {
echo $this->req . "<br />";
}
if ($this->results) {
ptln('<p><br />' . $this->results . '</p>');
}
}
示例2: html
/** output appropriate html */
function html()
{
$this->handleAction();
ptln('<form action="' . wl($ID) . '" method="post">');
// output hidden values to ensure dokuwiki will return back to this plugin
ptln(' <input type="hidden" name="do" value="admin" />');
ptln(' <input type="hidden" name="page" value="' . $this->getPluginName() . '" />');
formSecurityToken();
ptln($this->formOutput);
ptln('</form><br>');
ptln($this->htmlOutput);
}
示例3: html
/**
* output appropriate html
*/
function html()
{
ptln('<a href="javascript:prereg_Inf.toggle();void 0"><span style="line-height: 175%">Toggle info</span></a><br />');
ptln('<div id="prereg_info" style="border: 1px solid silver; padding:4px;">' . $this->locale_xhtml('info') . '</div><br>');
ptln('<form action="' . wl($ID) . '" method="post">');
// output hidden values to ensure dokuwiki will return back to this plugin
ptln(' <input type="hidden" name="do" value="admin" />');
ptln(' <input type="hidden" name="page" value="' . $this->getPluginName() . '" />');
formSecurityToken();
ptln(' <input type="submit" name="cmd[confirm]" value="' . $this->getLang('btn_confirm') . '" /> ');
ptln(' <input type="submit" name="cmd[secure]" value="' . $this->getLang('btn_secure') . '" />');
ptln('<br /><br /><div>');
echo $this->getConfirmList();
ptln('</div>');
ptln('</form>');
$this->js();
}
示例4: html
/**
* output appropriate html
*/
function html()
{
global $ID, $auth;
$filter['grps'] = "user";
if ($auth->canDo('getUsers')) {
// is this feature available?
$users = $auth->retrieveUsers(0, 0);
}
$html = '<p>' . $this->getLang("intro_message") . '</p>
<form class="admin-form" action="' . wl($ID) . '" method="post">
<label class="block">' . $this->getLang("question_name") . ': <input name="problem_name" type="text" /></label>
<label class="block">' . $this->getLang("sender") . ':
<select name="user">
<option value="">' . $this->getLang("all_users") . '</option>';
while ($user = current($users)) {
$html .= '<option value="' . key($users) . '">' . $user["name"] . '</option>';
next($users);
}
$html .= '
</select>
</label>
<label class="block">
<input type="radio" name="type" value="test-case"> ' . $this->getLang('programming_questions') . '<br />
<input type="radio" name="type" value="output-only"> ' . $this->getLang('outputonly_questions') . '
</label>';
// output hidden values to ensure dokuwiki will return back to this plugin
$html .= '<input type="hidden" name="do" value="admin" />' . '<input type="hidden" name="page" value="' . $this->getPluginName() . '" />';
ptln($html);
formSecurityToken();
$html = '
<input type="submit" name="cmd[get]" value="' . $this->getLang('btn_get_submissions') . '" />
<input type="submit" name="cmd[delete]" value="' . $this->getLang('btn_delete_submissions') . '" />
</form><h1 class="sectionedit1"></h1>
';
$html .= $this->output;
ptln($html);
}
示例5: html_menu
function html_menu($listPlugins = true)
{
global $ID;
ptln('<div class="pm_menu">');
ptln('<div class="common">');
ptln(' <h2>' . $this->lang['download'] . '</h2>');
ptln(' <form action="' . wl($ID) . '" method="post">');
ptln(' <fieldset class="hidden">', 4);
ptln(' <input type="hidden" name="do" value="admin" />');
ptln(' <input type="hidden" name="page" value="plugin" />');
formSecurityToken();
ptln(' </fieldset>');
ptln(' <fieldset>');
ptln(' <legend>' . $this->lang['download'] . '</legend>');
ptln(' <label for="dw__url">' . $this->lang['url'] . '<input name="url" id="dw__url" class="edit" type="text" maxlength="200" /></label>');
ptln(' <input type="submit" class="button" name="fn[download]" value="' . $this->lang['btn_download'] . '" />');
ptln(' </fieldset>');
ptln(' </form>');
ptln('</div>');
if ($listPlugins) {
ptln('<h2>' . $this->lang['manage'] . '</h2>');
ptln('<form action="' . wl($ID) . '" method="post" class="plugins">');
ptln(' <fieldset class="hidden">');
ptln(' <input type="hidden" name="do" value="admin" />');
ptln(' <input type="hidden" name="page" value="plugin" />');
formSecurityToken();
ptln(' </fieldset>');
$this->html_pluginlist();
ptln(' <fieldset class="buttons">');
ptln(' <input type="submit" class="button" name="fn[enable]" value="' . $this->lang['btn_enable'] . '" />');
ptln(' </fieldset>');
// ptln(' </div>');
ptln('</form>');
}
ptln('</div>');
}
示例6: html
/**
* output appropriate html
*/
function html()
{
ptln('<div style="width:90%;margin:auto;display:none;" class="news_info"><p>' . $this->getLang('instructions') . '</p></div>');
ptln('<form action="' . wl($ID) . '" method="post" name="news_data" onsubmit="newshandler(this);">');
ptln(' <input type="hidden" name="do" value="admin" />');
ptln(' <input type="hidden" name="page" value="' . $this->getPluginName() . '" />');
ptln(' <input type="hidden" name="prev_del" id ="prev_del" value="' . $this->prev_deleted . '" />');
ptln(' <input type="hidden" name="subfeed_inx" id ="subfeed_inx" value="0" />');
ptln(' <input type="hidden" name="subfeed_dir" id ="subfeed_dir" value="" />');
formSecurityToken();
ptln(' <input type="submit" name="cmd[prune]" value="' . $this->getLang('btn_prune') . '" />');
ptln(' <input type="submit" name="cmd[restore]" value="' . $this->getLang('btn_restore') . '" />');
ptln(' <input type="submit" name="cmd[confirm]" onclick="return confirm_del();" value="' . $this->getLang('btn_confirm') . '" />');
ptln(' <input type="submit" name="cmd[generate]" value="' . $this->getLang('btn_generate') . '" />');
ptln(' <select id="subfeeds" name="subfeeds" onchange="subfeedshandler()" ><option value="NotSet">' . $this->getLang('select_feed') . '</option>');
$this->subfeed_options();
ptln('</select>');
ptln(' <input type="submit" id = "subfeedbtn" name="cmd[subfeed]" value="' . $this->getLang('btn_confirmfeed') . '" />');
ptln(' <input type="button" id = "news_infobtn" value="' . $this->getLang('btn_info') . '" />');
ptln('<div id="pagedata_news"><br />');
$this->table_header();
foreach ($this->pagedata as $md5 => $pageinfo) {
$this->pagedata_row($md5, $pageinfo);
}
$this->table_footer();
ptln('</div>');
ptln('</form>');
if ($this->output) {
ptln('<p><pre>');
echo print_r($this->output, true);
echo $this->subfeed_name;
ptln('</pre></p>');
}
}
示例7: html
/**
* output appropriate html
*/
function html() {
//print current message and namespace
global $lang;
global $conf;
print "<h1>".$this->getLang('mess_titre')."</h1>";
print $this->getLang('mess_texte');
print "<br /><br />";
ptln('<form action="'.wl($ID).'" method="post">');
// output hidden values to ensure dokuwiki will return back to this plugin
ptln(' <input type="hidden" name="do" value="admin" />');
ptln(' <input type="hidden" name="page" value="'.$this->getPluginName().'" />');
formSecurityToken();
//check for previous messages
$filename = $conf['cachedir']."/nsmsg.xml";
$idx=0;
$total_msg =0;
if (file_exists($filename)) {
try {
$xml=simplexml_load_file($filename);
//print existing messages
echo "<strong>".$this->getLang('cur_title')."</strong><br>";
$total_msg = $xml->count();
foreach ($xml as $message) {
print $this->getLang('mess_label')."<textarea name='msg$idx' style=\"width:100%; background-color: lightblue\">";
print $message->body."</textarea><br>";
print $this->getLang('link_label')."<textarea name='link$idx' style=\"width:100%; background-color: lightblue\">";
print $message->link."</textarea><br>";
print $this->getLang('ns_label')."<textarea name='ns$idx' style=\"width:100%; background-color: lightblue\">";
print $message->namespace."</textarea><br>";
print $this->getLang('type_label')."<br>";
$this->_printmsgbar($message->type, $idx);
echo '<br><br>';
echo ("<input type='checkbox' name='del$idx'>".$this->getLang('btn_del')."<br><br>");
$idx++;
}
} catch (Exception $e) {
echo $this->getLang('error_c');
}
}
ptln('<input type="hidden" name="total" value="'.$total_msg.'" />'); //get number of existing messages
echo "<hr><strong>".$this->getLang('add_title')."</strong><br>";
//msg, link and namespace input field
print $this->getLang('mess_label')."<textarea name='msg$idx' style=\"width:100%; background-color: lightgray\">";
print "</textarea>";
print "<br>";
print $this->getLang('link_label')."<textarea name='link$idx' style=\"width:100%; background-color: lightgray\">";
print "</textarea>";
print $this->getLang('ns_label')."<textarea name='ns$idx' style=\"width:100%; background-color: lightgray\">";
print "</textarea>";
print "<br><br>";
$this->_printmsgbar('-1', $idx);
print "<br><br>";
ptln(' <input type="submit" name="cmd[change]" value="'.$this->getLang('btn_change').'" />');
ptln('</form>');
}
示例8: render
//.........这里部分代码省略.........
}
}
// Pagine selezionate
// Pagine escluse dal libro
if (isset($fav)) {
$i = 0;
foreach ($fav as $page => $cpt) {
list($cpt, $date) = explode(";", $cpt);
if ($cpt == 0) {
if (!$i) {
$renderer->header($this->getLang('bookcreator_removed'), 2, 0);
$renderer->listu_open();
}
$lien = $this->createLink($page);
$i++;
$renderer->doc .= "<div id=\"ex__{$page}\">";
$renderer->listitem_open(1);
$renderer->doc .= '<a href="javascript:book_changePage(\'bookcreator[' . $page . ']\', 1, new Date(\'July 21, 2099 00:00:00\'), \'/\'); book_recharge();"><img src="' . DOKU_URL . 'lib/plugins/bookcreator/images/include.png" title="' . $this->getLang('bookcreator_include') . '" border="0" style="vertical-align:middle;" name="ctrl" /></a> ';
$renderer->doc .= $lien;
$renderer->doc .= "</div>";
$renderer->listitem_close();
}
}
if ($i) {
$renderer->listu_close();
}
}
// azzera selezione
$renderer->doc .= "<div align='center'>";
$onclick = "javascript:if(confirm('" . $this->getLang('bookcreator_reserconfirm') . "')) {book_removeAllPages('bookcreator'); document.reset.submit();}";
$renderer->doc .= '<form name="reset" class="button" method="get" action="' . wl($ID) . '">';
$renderer->doc .= "<input type='button' value='" . $this->getLang('bookcreator_reset') . "' class='button' onclick=\"" . $onclick . "\">";
$renderer->doc .= "<input type='hidden' name='id' value='{$ID}'/>";
$renderer->doc .= formSecurityToken(false);
$renderer->doc .= '</form>';
$renderer->doc .= '</div>';
// azzera selezione
$renderer->doc .= "</td>";
$renderer->doc .= "<td width='40%' valign='top' >";
$renderer->doc .= "<div align='center'>";
//Esportazione PDF
$renderer->doc .= '<form class="button" method="get" action="' . wl($ID) . '" accept-charset="' . $lang['encoding'] . '">';
$renderer->doc .= "<fieldset style=\"text-align:left;\"><legend><b>" . $this->getLang('bookcreator_export') . "</b></legend>";
$renderer->doc .= $this->getLang('bookcreator_title') . " ";
$renderer->doc .= '<input type="text" class="edit" value="' . $title . '" name="pdfbook_title" size="40" />';
$renderer->doc .= '<select name="do" size="1">';
$renderer->doc .= '<option value="export_html" selected="selected">' . $this->getLang('bookcreator_exportprint') . '</option>';
if (file_exists(DOKU_PLUGIN . "text/renderer.php") && !plugin_isdisabled("text")) {
$renderer->doc .= '<option value="export_text">' . $this->getLang('bookcreator_exporttext') . '</option>';
}
if (file_exists(DOKU_PLUGIN . "dw2pdf/action.php") && !plugin_isdisabled("dw2pdf")) {
$renderer->doc .= '<option value="export_pdfbook" selected="selected">' . $this->getLang('bookcreator_exportpdf') . '</option>';
}
$renderer->doc .= '</select>';
$renderer->doc .= '<input type="submit" value="' . $this->getLang('bookcreator_create') . '" class="button"/>
<input type="hidden" name="id" value="' . $ID . '" />';
$renderer->doc .= '</fieldset>';
$renderer->doc .= formSecurityToken(false);
$renderer->doc .= '</form>';
//Esportazione PDF
if ($this->usercansave) {
//Salva selezione
$renderer->doc .= '<form class="button" method="post" action="' . wl($ID) . '" accept-charset="' . $lang['encoding'] . '">';
$renderer->doc .= "<fieldset style=\"text-align:left;\"><legend><b>" . $this->getLang('bookcreator_saveselection') . "</b></legend>";
$renderer->doc .= '<input type="text" class="edit" value="' . $title . '" name="bookcreator_title" />';
$renderer->doc .= '<input type="submit" value="' . $this->getLang('bookcreator_save') . '" class="button"/>';
示例9: media_uploadform
/**
* Print the media upload form if permissions are correct
*
* @author Andreas Gohr <andi@splitbrain.org>
* @author Kate Arzamastseva <pshns@ukr.net>
*/
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;
}
示例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?
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);
}
示例11: _list
/**
* List recent edits matching the given filter
*/
function _list($filter)
{
global $conf;
global $lang;
echo '<hr /><br />';
echo '<form action="" method="post"><div class="no">';
echo '<input type="hidden" name="filter" value="' . hsc($filter) . '" />';
formSecurityToken();
$recents = getRecents(0, $this->max_lines);
echo '<ul>';
$cnt = 0;
foreach ($recents as $recent) {
if ($filter) {
if (strpos(rawWiki($recent['id']), $filter) === false) {
continue;
}
}
$cnt++;
$date = strftime($conf['dformat'], $recent['date']);
echo $recent['type'] === DOKU_CHANGE_TYPE_MINOR_EDIT ? '<li class="minor">' : '<li>';
echo '<div class="li">';
echo '<input type="checkbox" name="revert[]" value="' . hsc($recent['id']) . '" checked="checked" id="revert__' . $cnt . '" />';
echo '<label for="revert__' . $cnt . '">' . $date . '</label> ';
echo '<a href="' . wl($recent['id'], "do=diff") . '">';
$p = array();
$p['src'] = DOKU_BASE . 'lib/images/diff.png';
$p['width'] = 15;
$p['height'] = 11;
$p['title'] = $lang['diff'];
$p['alt'] = $lang['diff'];
$att = buildAttributes($p);
echo "<img {$att} />";
echo '</a> ';
echo '<a href="' . wl($recent['id'], "do=revisions") . '">';
$p = array();
$p['src'] = DOKU_BASE . 'lib/images/history.png';
$p['width'] = 12;
$p['height'] = 14;
$p['title'] = $lang['btn_revs'];
$p['alt'] = $lang['btn_revs'];
$att = buildAttributes($p);
echo "<img {$att} />";
echo '</a> ';
echo html_wikilink(':' . $recent['id'], useHeading('navigation') ? NULL : $recent['id']);
echo ' – ' . htmlspecialchars($recent['sum']);
echo ' <span class="user">';
echo $recent['user'] . ' ' . $recent['ip'];
echo '</span>';
echo '</div>';
echo '</li>';
@set_time_limit(10);
flush();
}
echo '</ul>';
echo '<p>';
echo '<input type="submit" class="button" value="' . $this->getLang('revert') . '" /> ';
printf($this->getLang('note2'), hsc($filter));
echo '</p>';
echo '</div></form>';
}
示例12: html
/**
* output appropriate html
*/
function html()
{
$allow_debug = $GLOBALS['conf']['allowdebug'];
// avoid global $conf; here.
global $lang;
global $ID;
if (is_null($this->_config)) {
$this->_config = new configuration($this->_file);
}
$this->setupLocale(true);
print $this->locale_xhtml('intro');
ptln('<div id="config__manager">');
if ($this->_config->locked) {
ptln('<div class="info">' . $this->getLang('locked') . '</div>');
} elseif ($this->_error) {
ptln('<div class="error">' . $this->getLang('error') . '</div>');
} elseif ($this->_changed) {
ptln('<div class="success">' . $this->getLang('updated') . '</div>');
}
ptln('<form action="' . wl($ID) . '" method="post">');
formSecurityToken();
$this->_print_h1('dokuwiki_settings', $this->getLang('_header_dokuwiki'));
$undefined_settings = array();
$in_fieldset = false;
$first_plugin_fieldset = true;
$first_template_fieldset = true;
foreach ($this->_config->setting as $setting) {
if (is_a($setting, 'setting_hidden')) {
// skip hidden (and undefined) settings
if ($allow_debug && is_a($setting, 'setting_undefined')) {
$undefined_settings[] = $setting;
} else {
continue;
}
} else {
if (is_a($setting, 'setting_fieldset')) {
// config setting group
if ($in_fieldset) {
ptln(' </table>');
ptln(' </fieldset>');
} else {
$in_fieldset = true;
}
if ($first_plugin_fieldset && substr($setting->_key, 0, 10) == 'plugin' . CM_KEYMARKER) {
$this->_print_h1('plugin_settings', $this->getLang('_header_plugin'));
$first_plugin_fieldset = false;
} else {
if ($first_template_fieldset && substr($setting->_key, 0, 7) == 'tpl' . CM_KEYMARKER) {
$this->_print_h1('template_settings', $this->getLang('_header_template'));
$first_template_fieldset = false;
}
}
ptln(' <fieldset id="' . $setting->_key . '">');
ptln(' <legend>' . $setting->prompt($this) . '</legend>');
ptln(' <table class="inline">');
} else {
// config settings
list($label, $input) = $setting->html($this, $this->_error);
$class = $setting->is_default() ? ' class="default"' : ($setting->is_protected() ? ' class="protected"' : '');
$error = $setting->error() ? ' class="value error"' : ' class="value"';
ptln(' <tr' . $class . '>');
ptln(' <td class="label">');
ptln(' <span class="outkey">' . $setting->_out_key(true) . '</span>');
ptln(' ' . $label);
ptln(' </td>');
ptln(' <td' . $error . '>' . $input . '</td>');
ptln(' </tr>');
}
}
}
ptln(' </table>');
if ($in_fieldset) {
ptln(' </fieldset>');
}
// show undefined settings list
if ($allow_debug && !empty($undefined_settings)) {
function _setting_natural_comparison($a, $b)
{
return strnatcmp($a->_key, $b->_key);
}
usort($undefined_settings, '_setting_natural_comparison');
$this->_print_h1('undefined_settings', $this->getLang('_header_undefined'));
ptln('<fieldset>');
ptln('<table class="inline">');
$undefined_setting_match = array();
foreach ($undefined_settings as $setting) {
if (preg_match('/^(?:plugin|tpl)' . CM_KEYMARKER . '.*?' . CM_KEYMARKER . '(.*)$/', $setting->_key, $undefined_setting_match)) {
$undefined_setting_key = $undefined_setting_match[1];
} else {
$undefined_setting_key = $setting->_key;
}
ptln(' <tr>');
ptln(' <td class="label"><span title="$meta[\'' . $undefined_setting_key . '\']">$' . $this->_config->_name . '[\'' . $setting->_out_key() . '\']</span></td>');
ptln(' <td>' . $this->getLang('_msg_' . get_class($setting)) . '</td>');
ptln(' </tr>');
}
ptln('</table>');
//.........这里部分代码省略.........
示例13: 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
}
示例14: html
public function html()
{
global $ID;
$conf = $this->loadCBData();
ptln('<h3>' . $this->getLang('btnslist') . '</h3>');
ptln('<form action="' . wl($ID) . '" method="post">');
ptln(' <input type="hidden" name="do" value="admin" />');
ptln(' <input type="hidden" name="page" value="' . $this->getPluginName() . '" />');
formSecurityToken();
ptln(' <table class="inline">');
ptln(' <tr><th>' . $this->getLang('btnslist_label') . '</th><th>' . $this->getLang('btnslist_code') . '</th><th>' . $this->getLang('btnslist_delete') . '</th></tr>');
if ($conf) {
foreach ($conf as $key => $button) {
if (!$button["type"]) {
ptln(' <tr>');
ptln(' <td>' . hsc($button["label"]) . '</td>');
ptln(' <td>' . hsc($button["code"]) . '</td>');
ptln(' <td><center><input type="radio" name="delete" value="' . $key . '"/></center></td>');
# FIXME Del image
ptln(' </tr>');
} else {
$icon = '';
if ($button['icon']) {
$icon = '<img src="' . DOKU_BASE . 'lib/plugins/custombuttons/ico/' . hsc($button['icon']) . '"> ';
}
ptln(' <tr>');
ptln(' <td>' . $icon . hsc($button["label"]) . '</td>');
ptln(' <td>' . hsc($button["pretag"]) . hsc($button["code"]) . hsc($button["posttag"]) . '</td>');
ptln(' <td><center><input type="radio" name="delete" value="' . $key . '"/></center></td>');
# FIXME Del image
ptln(' </tr>');
}
}
}
ptln(' </table>');
ptln('<input type="submit" class="button" value="' . $this->getLang('btn_delete') . '"/>');
ptln('</form>');
ptln('<br /><br />');
ptln('<h3>' . $this->getLang('addbtn') . '</h3>');
ptln('<form action="' . wl($ID) . '" method="post">');
ptln(' <input type="hidden" name="do" value="admin" />');
ptln(' <input type="hidden" name="add" value="1" />');
ptln(' <input type="hidden" name="page" value="' . $this->getPluginName() . '" />');
formSecurityToken();
ptln(' <table>');
ptln(' <tr><th>' . $this->getLang('addbtn_icon') . '</th><td>');
ptln('<select name="icon" class="custombutton_iconpicker">');
ptln('<option value="">' . $this->getLang('addbtn_textonly') . '</option>');
$files = glob(dirname(__FILE__) . '/ico/*.png');
foreach ($files as $file) {
$file = hsc(basename($file));
ptln('<option value="' . $file . '" style="padding-left: 18px; background: #fff url(' . DOKU_BASE . 'lib/plugins/custombuttons/ico/' . $file . ') left center no-repeat">' . $file . '</option>');
}
ptln('</select>');
ptln(' </td></tr>');
ptln(' <tr><th>' . $this->getLang('addbtn_label') . '</th><td><input type="text" name="label" /></td></tr>');
ptln(' <tr><th>' . $this->getLang('addbtn_pretag') . '</th><td><input type="text" name="pretag" /><b> *</b></td></tr>');
ptln(' <tr><th>' . $this->getLang('addbtn_posttag') . '</th><td><input type="text" name="posttag" /><b> *</b></td></tr>');
ptln(' <tr><th>' . $this->getLang('addbtn_code') . '</th><td><input type="text" name="code" /></td></tr>');
ptln(' </table>');
ptln(' <input type="submit" class="button" value="' . $this->getLang('btn_add') . '" />');
ptln('</form>');
ptln('<br><br>');
ptln('<div>' . $this->getLang('txt_comment') . '</div>');
}
示例15: xhtml_search_form
/**
* Displays the search form
*
* @author Michael Klier <chi@chimeric.de>
*/
function xhtml_search_form()
{
global $lang;
ptln('<div class="level1">');
$blogs = $this->entryhelper->get_blogs();
$form = new Doku_Form(array('id' => 'blogtng__search_form'));
$form->startFieldset($lang['btn_search']);
$form->addHidden('page', 'blogtng');
$form->addHidden('btng[admin]', 'search');
$form->addElement(formSecurityToken());
$form->addElement(form_makeListBoxField('btng[query][blog]', $blogs, $_REQUEST['btng']['query']['blog'], $this->getLang('blog')));
$form->addElement(form_makeListBoxField('btng[query][filter]', array('entry_title', 'entry_author', 'comment', 'comment_ip', 'tags'), $_REQUEST['btng']['query']['filter'], $this->getLang('filter')));
$form->addElement(form_makeTextField('btng[query][string]', $_REQUEST['btng']['query']['string'], ''));
$form->addElement(form_makeButton('submit', 'admin', $lang['btn_search']));
$form->endFieldset();
html_form('blogtng__search_form', $form);
ptln('</div>');
}