本文整理汇总了PHP中html_form函数的典型用法代码示例。如果您正苦于以下问题:PHP html_form函数的具体用法?PHP html_form怎么用?PHP html_form使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了html_form函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: main
function main($txt, $cmd)
{
global $SIDU;
$eng = $SIDU['eng'];
$txt = @strip($txt, 1, 0, 1);
if ($txt && $cmd) {
$err = @save_data($SIDU, $txt, $eng);
}
if (!$txt) {
$txt = "CREATE TABLE " . ($eng == 'my' ? "`{$SIDU['1']}`.`table_name`" : ($eng == 'pg' ? "\"{$SIDU['2']}\".\"table_name\"" : "table_name")) . "(\ncolname int" . ($eng == 'my' ? "(8)" : "") . ($eng == 'sl' ? "" : " NOT NULL DEFAULT 0") . " PRIMARY KEY,\n\n)";
}
echo "<div class='web'><p class='b dot'>", @lang(4101), " <span class='red'>", $eng == 'my' ? $SIDU[1] : "{$SIDU['1']}.{$SIDU['2']}", "</span></p>";
if ($err) {
echo "<p class='err'>{$err}</p>";
}
echo "<form action='tab-new.php?id={$SIDU['0']},{$SIDU['1']},{$SIDU['2']},{$SIDU['3']},{$SIDU['4']},{$SIDU['5']},{$SIDU['6']}' method='post' name='myform'>\n\t<table><tr><td valign='top'>" . @html_form("textarea", "txt", $txt, 420, 320, "spellcheck='false' class='box'") . "<br /><br />" . @html_form("submit", "cmd", @lang(4102)) . "</td><td valign='top' style='padding-left:10px'>";
$str = "9|0|smallint|smallint(5)\n0|1|32768|smallint(5) unsigned NOT NULL DEFAULT 0\n1|0|int|int(9)\n0|1|2,147,483,647|int(9) unsigned NOT NULL DEFAULT 0\n1|0|numeric|numeric(7,2)\n0|1|(7,2)|numeric(7,2) unsigned NOT NULL DEFAULT 0.00\n2|0|char|char(255)\n0|1|255|char(255) NOT NULL DEFAULT \\'\\'\n0|0|binary|char(255) binary NOT NULL DEFAULT \\'\\'\n1|0|varchar|varchar(255)\n0|1|255|varchar(255) NOT NULL DEFAULT \\'\\'\n0|0|binary|varchar(255) binary NOT NULL DEFAULT \\'\\'\n1|0|text|text\n0|1|65535|text NOT NULL DEFAULT \\'\\'\n2|0|date|date\n0|1|YYYY-MM-DD|date NOT NULL DEFAULT \\'0000-00-00\\'\n1|0|timestamp|timestamp\n0|1|YmdHis|timestamp NOT NULL DEFAULT \\'0000-00-00 00:00:00\\'\n0|0|now|timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP\n2|0|auto|auto_increment\n0|1|!null|NOT NULL\n0|0|PK|NOT NULL auto_increment PRIMARY KEY\n1|0|PK|PRIMARY KEY\n0|1|PK(a)|PRIMARY KEY (col1,col2)\n0|0|UK|UNIQUE uk (col1,col2)\n0|1|idx|INDEX idx (col1,col2)\n2|0|MyISAM|ENGINE = MyISAM\n0|1|InnoDB|ENGINE = InnoDB";
if ($eng == 'pg') {
$str = @strtr($str, @array("smallint(5)" => "smallint", "int(9)" => "int", " DEFAULT \\'0000-00-00\\'" => "", " DEFAULT \\'0000-00-00 00:00:00\\'" => "", "CURRENT_TIMESTAMP" => "now()", "auto|auto_increment" => "serial|serial", "NOT NULL auto_increment" => "serial NOT NULL", "0|0|binary|char(255) binary NOT NULL DEFAULT \\'\\'" => "", "0|0|binary|varchar(255) binary NOT NULL DEFAULT \\'\\'" => "", "MyISAM|ENGINE = MyISAM" => "With OID|WITH (OIDS=TRUE)", "0|1|InnoDB|ENGINE = InnoDB" => "", " unsigned" => "", "PRIMARY KEY (" => "CONSTRAINT pk PRIMARY KEY (", "UNIQUE uk (" => "CONSTRAINT uk UNIQUE (", "idx|INDEX idx (col1,col2)" => "FK|CONSTRAINT fk FOREINGN KEY (col) REFERENCES tab(pk) MATCH SIMPLE\\n\\tON UPDATE NO ACTION ON DELETE NO ACTION"));
} elseif ($eng == 'sl') {
$str = "9|0|int|int,\\n\n0|1|PK|int PRIMARY KEY\n1|0|text|text,\\n\n1|0|real|real,\\n";
}
$arr = @explode("\n", $str);
foreach ($arr as $v) {
@main_add_txt(@trim($v));
}
if ($eng == 'my') {
@main_add_txt("2|0|enum(Y,N)|enum(\\'Y\\',\\'N\\') NOT NULL DEFAULT \\'Y\\',\\n");
}
echo "</td></tr></table></form></div>";
}
示例2: html
/**
* output appropriate html
*/
function html()
{
print $this->locale_xhtml('intro');
$form = new Doku_Form(array('id' => 'start'));
$form->addHidden("page", $_REQUEST['page']);
$form->addHidden("fn", "start");
$form->addElement(form_makeButton('submit', 'admin', $this->getLang('start_btn')));
$form->addElement('<p>' . $this->getLang('start_desc') . '</p>');
html_form('', $form);
$form = new Doku_Form(array('id' => 'stop'));
$form->addHidden("page", $_REQUEST['page']);
$form->addHidden("fn", "stop");
$form->addElement(form_makeButton('submit', 'admin', $this->getLang('stop_btn')));
$form->addElement('<p>' . $this->getLang('stop_desc') . '</p>');
html_form('', $form);
$form = new Doku_Form(array('id' => 'lock'));
$form->addHidden("page", $_REQUEST['page']);
$form->addHidden("fn", "lock");
$form->addElement(form_makeButton('submit', 'admin', $this->getLang('lock_btn')));
$form->addElement('<p>' . $this->getLang('lock_desc') . '</p>');
html_form('', $form);
$form = new Doku_Form(array('id' => 'unlock'));
$form->addHidden("page", $_REQUEST['page']);
$form->addHidden("fn", "unlock");
$form->addElement(form_makeButton('submit', 'admin', $this->getLang('unlock_btn')));
$form->addElement('<p>' . $this->getLang('unlock_desc') . '</p>');
html_form('', $form);
}
示例3: override_html_register
protected function override_html_register()
{
global $lang;
global $conf;
global $INPUT;
$base_attrs = array('size' => 50, 'required' => 'required');
$email_attrs = $base_attrs + array('type' => 'email', 'class' => 'edit');
print $this->override_locale_xhtml('register');
print '<div class="centeralign">' . NL;
$form = new Doku_Form(array('id' => 'dw__register'));
$form->startFieldset($lang['btn_register']);
$form->addHidden('do', 'register');
$form->addHidden('save', '1');
$form->addElement(form_makeTextField('login', $INPUT->post->str('login'), $lang['user'], '', 'block', $base_attrs));
if (!$conf['autopasswd']) {
$form->addElement(form_makePasswordField('pass', $lang['pass'], '', 'block', $base_attrs));
$form->addElement(form_makePasswordField('passchk', $lang['passchk'], '', 'block', $base_attrs));
}
$form->addElement(form_makeTextField('fullname', $INPUT->post->str('fullname'), $lang['fullname'], '', 'block', $base_attrs));
$form->addElement(form_makeField('email', 'email', $INPUT->post->str('email'), $lang['email'], '', 'block', $email_attrs));
$form->addElement(form_makeButton('submit', '', $lang['btn_register']));
$form->endFieldset();
html_form('register', $form);
print '</div>' . NL;
}
示例4: main
function main()
{
global $SIDU;
if (@substr($_FILES['fsql']['type'], 0, 4) == 'text' && $_FILES['fsql']['size'] && !$_FILES['fsql']['error']) {
$file = @html8(@file_get_contents($_FILES['fsql']['tmp_name']));
} elseif ($SIDU['eng'] == 'sl') {
$file = "SELECT * FROM sqlite_master\nLIMIT 10;";
} else {
$file = "SELECT now();";
}
echo "<textarea id='sqltxt' style='width:100%;border:0;padding:0;margin:0' spellcheck='false' cols='30' rows='2'>{$file}</textarea>\n\t<form name='sqlrun' action='sql.php?id={$_GET['id']}' target='main' method='post'>" . @html_form("hidden", "sqlcur") . @html_form("hidden", "sqlmore") . "</form>\n<script type='text/javascript'>\nwindow.onresize=gridInit;window.onload=gridInit;\nfunction gridInit(){\n\tif (self.innerHeight) h=self.innerHeight;\n\telse if (document.documentElement && document.documentElement.clientHeight) h=document.documentElement.clientHeight;//ie6\n\telse if (document.body) h=document.body.clientHeight;//other ie\n\tdocument.getElementById('sqltxt').style.height=h-35+'px';\n}\nfunction getSelectedText(box){\n\tif (box.setSelectionRange) return box.value.substring(box.selectionStart,box.selectionEnd);// Mozilla and compatible\n\telse if (document.selection) return document.selection.createRange().text;// IE and compatible\n\telse return;// Other broswers can't do it\n}\nfunction sidu_sql(mode,id){\n\tvar sql;\n\tif (mode=='r' || mode=='m') sql=getSelectedText(document.getElementById('sqltxt'));\n\tif (!sql || mode=='a') sql=getv('sqltxt');\n\tif (sql){\n\t\tdocument.sqlrun.sqlcur.value=sql;\n\t\tif (mode=='m') document.sqlrun.sqlmore.value=1;\n\t\tdocument.sqlrun.submit();\n\t\tdocument.sqlrun.sqlmore.value=0;\n\t\tdocument.getElementById('sqltxt').focus();\n\t}\n}\n</script>\n<div id='openfile' class='blobDiv' style='display:none;top:32px'><div class='web box'>", @html_img("img/tool-close.gif", @lang(3435) . " - Fn+L", "class='right' onclick=\"showHide('openfile')\""), "\n<form action='sqls.php?id={$SIDU['0']}' method='post' enctype='multipart/form-data'>\n<p><b>", @lang(3432), ":</b></p>\n<input type='file' name='fsql'/> <input type='button' name='cmd' value='", @lang(3433), "' onclick=\"showHide('openfile')\"/> <input type='submit' name='cmd' value='", @lang(3434), "'/>\n</form></div></div>";
}
示例5: main
function main($imp, $cmd)
{
global $SIDU;
if (!$SIDU[1]) {
$err = @lang(2201);
} elseif ($SIDU['eng'] == 'pg' && !$SIDU[2]) {
$err = @lang(2202);
}
echo "<form action='imp.php?id={$SIDU['0']},{$SIDU['1']},{$SIDU['2']}' method='post' enctype='multipart/form-data'>\n\t<div class='web'><p class='dot'><b>", @lang(2203), ": <i class='red'>DB = {$SIDU['1']}", $SIDU[2] ? ".{$SIDU['2']}" : "", "</i></b></p>";
if ($err) {
echo "<p class='err'>{$err}</p></div></form>";
return;
}
if ($cmd) {
$SIDU[4] = $imp['tab'];
}
if ($SIDU[4]) {
$res = @tm("SQL", "SELECT * FROM " . @goodname($SIDU[4]) . " LIMIT 1");
$col = @get_sql_col($res, $SIDU['eng']);
foreach ($col as $v) {
$imp['cols'][] = $v[0];
}
}
if (!$imp['col']) {
$imp['col'] = @implode("\n", $imp['cols']);
}
if ($cmd) {
$err = @valid_data($SIDU, $imp);
if ($err) {
echo "<p class='err'>{$err}</p>";
} else {
return @save_data($SIDU, $imp);
}
}
if ($SIDU['eng'] == 'my') {
$sql = "SHOW TABLES from `{$SIDU['1']}`";
} elseif ($SIDU['eng'] == 'sl') {
$sql = "SELECT name FROM sqlite_master WHERE type='table' ORDER BY 1";
} else {
$sql = "SELECT relname FROM pg_class a,pg_namespace b\nWHERE a.relnamespace=b.oid AND b.nspname='public' AND a.relkind='r' ORDER BY 1";
}
$arr = @sql2arr($sql, 1);
$tabs[0] = @lang(2204);
foreach ($arr as $v) {
$tabs[$v] = $v;
}
echo "<table><tr><td>", @lang(2205), ":</td><td>", @html_form("select", "imp[tab]", $SIDU[4], "", "", "onchange=\"location='imp.php?id={$SIDU['0']},{$SIDU['1']},{$SIDU['2']},r,'+this.options[this.selectedIndex].value\"", $tabs), "</td></tr>";
if ($SIDU[4]) {
echo "<tr><td valign='top'>", @lang(2206), ":</td><td>", @html_form("textarea", "imp[col]", $imp['col'], 350, 90), "</td></tr>";
}
echo "<tr><td valign='top'>", @lang(2207), ":</td><td><input type='file' name='f'/> ", @lang(2208, '2MB'), "</td></tr></table>\n\t<p class='dot'><br/><b>", @lang(2209), ":</b></p>\n\t<p class='dot'>", @lang(2210), ": ", @html_form("text", "imp[sepC]", $imp['sepC'] ? $imp['sepC'] : ',', 50), " eg \\t , ; « | »\n\t<br/>", @lang(2211), " ", @html_form("text", "imp[cut1]", $imp['cut1'], 50), " ", @lang(2212), " ", @html_form("text", "imp[cut2]", $imp['cut2'], 50), " ", @lang(2213), "\n\t<br/>", @lang(2214), ": ", @html_form("text", "imp[pk]", $imp['pk'], 150), " eg. c1;c2\n\t<br/>", @html_form("checkbox", "imp[del]", $imp['del'], "", "", "", array(1 => '')), @lang(2215), "\n\t<br/>", @html_form("checkbox", "imp[merge]", $imp['merge'], "", "", "", array(1 => '')), @lang(2216), "\n\t<br/>", @html_form("checkbox", "imp[stop]", $imp['stop'], "", "", "", array(1 => '')), @lang(2217), "</p>\n\t<p>", @html_form("submit", "cmd", @lang(2218)), "</p></div></form>";
}
示例6: build_div
function build_div($title, $contents, $controls)
{
$output = '<!--// start: ' . $this->module_id . ' //-->' . chr(10);
$output .= '<div id="' . $this->module_id . '" class="modbox" style="position:relative;">' . chr(10);
$output .= '<table width="100%" class="mhdr" cellspacing="0" cellpadding="0">' . chr(10);
$output .= '<tr>' . chr(10);
// heading text
$output .= '<td width="90%" class="mttl">' . $title . ' </td>' . chr(10);
// edit/cancel image (text)
$output .= '<td class="medit">' . chr(10);
$output .= ' <a href="javascript:void(0)" class="el" onclick ="return box_edit(\'' . $this->module_id . '\');">';
$output .= html_icon('categories/preferences-system.png', TEXT_PROPERTIES, $size = 'small', '', '16', '16', $this->module_id . '_add');
// $output .= TEXT_EDIT;
$output .= ' </a>' . chr(10);
$output .= ' <a href="javascript:void(0)" class="csl" onclick ="return box_cancel(\'' . $this->module_id . '\');">';
// $output .= TEXT_CANCEL;
$output .= html_icon('status/dialog-error.png', TEXT_CANCEL, $size = 'small', '', '16', '16', $this->module_id . '_can');
$output .= ' </a>' . chr(10);
$output .= '</td>' . chr(10);
// minimize/maximize image
$output .= '<td class="mttlz">' . chr(10);
$output .= '<a href="javascript:void(0)" class="box minbox" id="' . $this->module_id . '_min" onclick="this.blur(); return min_box(\'' . $this->module_id . '\')">' . chr(10);
$output .= html_icon('actions/list-remove.png', TEXT_COLLAPSE, $size = 'small', '', '16', '16', $this->module_id . '_exp');
$output .= '</a></td>' . chr(10);
// delete image
$output .= '<td class="mttld">' . chr(10);
$output .= '<a href="javascript:void(0)" class="box delbox" id="' . $this->module_id . '_del" onclick="return del_box(\'' . $this->module_id . '\')">';
$output .= html_icon('emblems/emblem-unreadable.png', TEXT_REMOVE, $size = 'small');
$output .= '</a>' . chr(10);
$output .= '</td></tr></table>' . chr(10);
// box properties section
$output .= '<table class="mehdr" cellspacing="0" cellpadding="0">' . chr(10);
$output .= '<tr class="es">' . chr(10);
$output .= '<td class="meditbox">' . chr(10);
$output .= html_form($this->module_id . '_frm', FILENAME_DEFAULT, gen_get_all_get_params(array('action'))) . chr(10);
$output .= $this->build_move_buttons($this->column_id, $this->row_id);
$output .= $controls . chr(10);
$output .= '<input type="hidden" name="module_id" value="' . $this->module_id . '" />' . chr(10);
$output .= '<input type="hidden" name="column_id" value="' . $this->column_id . '" />' . chr(10);
$output .= '<input type="hidden" name="row_id" value="' . $this->row_id . '" />' . chr(10);
$output .= '<input type="hidden" name="action" id="' . $this->module_id . '_action" value="save" />' . chr(10);
$output .= '</form></td></tr></table>' . chr(10);
// box Contents
$output .= '<div class="row" id="' . $this->module_id . '_body" style="overflow:hidden;">' . chr(10);
$output .= $contents;
$output .= '</div>';
// finish it up
$output .= '</div>' . chr(10);
$output .= '<!--// end: ' . $this->module_id . ' //--><br />' . chr(10) . chr(10);
return $output;
}
示例7: main
function main()
{
global $SIDU;
$opt = $SIDU['page'];
$opt['pgSize'] = @ceil($opt['pgSize']);
if ($opt['pgSize'] < -1 || !$opt['pgSize']) {
$opt['pgSize'] = 15;
}
// $arr_lang = @array("cn"=>"中文","de"=>"Deutsch","en"=>"English","es"=>"Espanol","fr"=>"Francais","it"=>"Italiano");
$arr_lang = @array("cn" => "中文", "en" => "English");
echo "<div class='web'><h1 class='dot'>", @html_img("img/tool-option"), " ", @lang(2700), "</h1>";
if ($err) {
echo "<p class='err'>{$err}</p>";
}
echo "<form name='myform' action='option.php?id={$SIDU['0']}' method='post'><table>\n\t<tr class='bg'><td>", @lang(2701), ":</td><td>", @html_form("select", "opt[lang]", $opt['lang'], 0, "", "", $arr_lang), "</td></tr>\n\t<tr class='bg'><td>", @lang(2702), ":</td><td>", @html_form("text", "opt[pgSize]", $opt['pgSize'], 40, 3), " ", @lang(2703) . "</td></tr>\n\t<tr class='bg'><td>", @lang(2704), ":</td><td>", @html_form("text", "opt[tree]", $opt['tree'], 40, 1), " eg. _ 0...9</td></tr>\n\t<tr class='bg'><td>", @lang(2705), ":</td><td>" . @html_form("radio", "opt[sortObj]", $opt['sortObj'], "", "", "", @array(1 => @lang(2706), @lang(2707))), "</td></tr>\n\t<tr class='bg'><td>", @lang(2708), ":</td><td>" . @html_form("radio", "opt[sortData]", $opt['sortData'], "", "", "", @array(1 => @lang(2706), @lang(2707))), "</td></tr>\n\t<tr><td>", @lang(2709), ":</td><td>" . @html_form("radio", "opt[menuTextSQL]", $opt['menuTextSQL'], "", "", "", @array(@lang(2710), @lang(2711))), "</td></tr>\n\t<tr><td>", @lang(2712), ":</td><td>" . @html_form("radio", "opt[menuText]", $opt['menuText'], "", "", "", @array(@lang(2710), @lang(2711))), "</td></tr>\n\t<tr class='bg'><td>", @lang(2713), ":</td><td>" . @html_form("radio", "opt[his]", $opt['his'], "", "", "", @array(@lang(2710), @lang(2711))), "</td></tr>\n\t<tr class='bg'><td>", @lang(2714), ":</td><td>" . @html_form("radio", "opt[hisErr]", $opt['hisErr'], "", "", "", @array(@lang(2710), @lang(2711))), "</td></tr>\n\t<tr class='bg'><td>", @lang(2715), ":</td><td>" . @html_form("radio", "opt[hisSQL]", $opt['hisSQL'], "", "", "", @array(@lang(2710), @lang(2711))), "</td></tr>\n\t<tr class='bg'><td>", @lang(2716), ":</td><td>" . @html_form("radio", "opt[hisData]", $opt['hisData'], "", "", "", @array(@lang(2710), @lang(2711))), "</td></tr>\n\t<tr><td><br/>Postgres: ", @lang(2717), ":</td><td><br/>" . @html_form("radio", "opt[dataEasy]", $opt['dataEasy'], "", "", "", @array(@lang(2710), @lang(2711))), "</td></tr>\n\t<tr><td>Postgres: ", @lang(2718), ":</td><td>" . @html_form("radio", "opt[oid]", $opt['oid'], "", "", "", @array(@lang(2710), @lang(2711))), "</td></tr>\n\t<tr><td></td><td>", @html_form("submit", "cmd", @lang(2719)), "</td></tr>\n\t</table></form></div>";
}
示例8: html_form
// +-----------------------------------------------------------------+
// | Copyright(c) 2008-2014 PhreeSoft (www.PhreeSoft.com) |
// +-----------------------------------------------------------------+
// | This program is free software: you can redistribute it and/or |
// | modify it under the terms of the GNU General Public License as |
// | published by the Free Software Foundation, either version 3 of |
// | the License, or any later version. |
// | |
// | This program is distributed in the hope that it will be useful, |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
// | GNU General Public License for more details. |
// +-----------------------------------------------------------------+
// Path: /modules/phreebooks/pages/popup_orders/template_main.php
//
echo html_form('popup_orders', FILENAME_DEFAULT, gen_get_all_get_params(array('action', 'list'))) . chr(10);
// include hidden fields
echo html_hidden_field('action', '') . chr(10);
echo html_hidden_field('rowSeq', '') . chr(10);
// customize the toolbar actions
$toolbar->icon_list['cancel']['params'] = 'onclick="self.close()"';
$toolbar->icon_list['open']['show'] = false;
$toolbar->icon_list['save']['show'] = false;
$toolbar->icon_list['delete']['show'] = false;
$toolbar->icon_list['print']['show'] = false;
if (count($extra_toolbar_buttons) > 0) {
foreach ($extra_toolbar_buttons as $key => $value) {
$toolbar->icon_list[$key] = $value;
}
}
switch (JOURNAL_ID) {
示例9: tpl_subscribe
/**
* Display the subscribe form
*
* @author Adrian Lang <lang@cosmocode.de>
*/
function tpl_subscribe()
{
global $INFO;
global $ID;
global $lang;
global $conf;
$stime_days = $conf['subscribe_time'] / 60 / 60 / 24;
echo p_locale_xhtml('subscr_form');
echo '<h2>' . $lang['subscr_m_current_header'] . '</h2>';
echo '<div class="level2">';
if ($INFO['subscribed'] === false) {
echo '<p>' . $lang['subscr_m_not_subscribed'] . '</p>';
} else {
echo '<ul>';
foreach ($INFO['subscribed'] as $sub) {
echo '<li><div class="li">';
if ($sub['target'] !== $ID) {
echo '<code class="ns">' . hsc(prettyprint_id($sub['target'])) . '</code>';
} else {
echo '<code class="page">' . hsc(prettyprint_id($sub['target'])) . '</code>';
}
$sstl = sprintf($lang['subscr_style_' . $sub['style']], $stime_days);
if (!$sstl) {
$sstl = hsc($sub['style']);
}
echo ' (' . $sstl . ') ';
echo '<a href="' . wl($ID, array('do' => 'subscribe', 'sub_target' => $sub['target'], 'sub_style' => $sub['style'], 'sub_action' => 'unsubscribe', 'sectok' => getSecurityToken())) . '" class="unsubscribe">' . $lang['subscr_m_unsubscribe'] . '</a></div></li>';
}
echo '</ul>';
}
echo '</div>';
// Add new subscription form
echo '<h2>' . $lang['subscr_m_new_header'] . '</h2>';
echo '<div class="level2">';
$ns = getNS($ID) . ':';
$targets = array($ID => '<code class="page">' . prettyprint_id($ID) . '</code>', $ns => '<code class="ns">' . prettyprint_id($ns) . '</code>');
$styles = array('every' => $lang['subscr_style_every'], 'digest' => sprintf($lang['subscr_style_digest'], $stime_days), 'list' => sprintf($lang['subscr_style_list'], $stime_days));
$form = new Doku_Form(array('id' => 'subscribe__form'));
$form->startFieldset($lang['subscr_m_subscribe']);
$form->addRadioSet('sub_target', $targets);
$form->startFieldset($lang['subscr_m_receive']);
$form->addRadioSet('sub_style', $styles);
$form->addHidden('sub_action', 'subscribe');
$form->addHidden('do', 'subscribe');
$form->addHidden('id', $ID);
$form->endFieldset();
$form->addElement(form_makeButton('submit', 'subscribe', $lang['subscr_m_subscribe']));
html_form('SUBSCRIBE', $form);
echo '</div>';
}
示例10: html_form
// | modify it under the terms of the GNU General Public License as |
// | published by the Free Software Foundation, either version 3 of |
// | the License, or any later version. |
// | |
// | This program is distributed in the hope that it will be useful, |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
// | GNU General Public License for more details. |
// | |
// | The license that is bundled with this package is located in the |
// | file: /doc/manual/ch01-Introduction/license.html. |
// | If not, see http://www.gnu.org/licenses/ |
// +-----------------------------------------------------------------+
// Path: /modules/reportwriter/pages/rpt_gen/template_save.php
//
echo html_form('reportSaveAs', FILENAME_DEFAULT, gen_get_all_get_params(array('action')));
echo html_hidden_field('ReportID', $ReportID);
echo html_hidden_field('todo', '');
// customize the toolbar actions
$toolbar->icon_list['cancel']['params'] = 'onclick="self.close()"';
$toolbar->icon_list['open']['show'] = false;
$toolbar->icon_list['save']['params'] = 'onclick="submitToDo(\'save\');"';
$toolbar->icon_list['print']['show'] = false;
$toolbar->icon_list['delete']['show'] = false;
if ($ShowReplace) {
$toolbar->add_icon('rename', 'onclick="submitToDo(\'rename\')"', $order = 10);
}
$toolbar->add_help('11.02');
echo $toolbar->build_toolbar();
?>
<h2 align="center"><?php
示例11: html_resendpwd
/**
* Form to request a new password for an existing account
*
* @author Benoit Chesneau <benoit@bchesneau.info>
* @author Andreas Gohr <gohr@cosmocode.de>
*/
function html_resendpwd()
{
global $lang;
global $conf;
global $INPUT;
$token = preg_replace('/[^a-f0-9]+/', '', $INPUT->str('pwauth'));
if (!$conf['autopasswd'] && $token) {
print p_locale_xhtml('resetpwd');
print '<div class="centeralign">' . NL;
$form = new Doku_Form(array('id' => 'dw__resendpwd'));
$form->startFieldset($lang['btn_resendpwd']);
$form->addHidden('token', $token);
$form->addHidden('do', 'resendpwd');
$form->addElement(form_makePasswordField('pass', $lang['pass'], '', 'block', array('size' => '50')));
$form->addElement(form_makePasswordField('passchk', $lang['passchk'], '', 'block', array('size' => '50')));
$form->addElement(form_makeButton('submit', '', $lang['btn_resendpwd']));
$form->endFieldset();
html_form('resendpwd', $form);
print '</div>' . NL;
} else {
print p_locale_xhtml('resendpwd');
print '<div class="centeralign">' . NL;
$form = new Doku_Form(array('id' => 'dw__resendpwd'));
$form->startFieldset($lang['resendpwd']);
$form->addHidden('do', 'resendpwd');
$form->addHidden('save', '1');
$form->addElement(form_makeTag('br'));
$form->addElement(form_makeTextField('login', $INPUT->post->str('login'), $lang['user'], '', 'block'));
$form->addElement(form_makeTag('br'));
$form->addElement(form_makeTag('br'));
$form->addElement(form_makeButton('submit', '', $lang['btn_resendpwd']));
$form->endFieldset();
html_form('resendpwd', $form);
print '</div>' . NL;
}
}
示例12: html_form
// +-----------------------------------------------------------------+
// | Copyright(c) 2008-2014 PhreeSoft (www.PhreeSoft.com) |
// +-----------------------------------------------------------------+
// | This program is free software: you can redistribute it and/or |
// | modify it under the terms of the GNU General Public License as |
// | published by the Free Software Foundation, either version 3 of |
// | the License, or any later version. |
// | |
// | This program is distributed in the hope that it will be useful, |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
// | GNU General Public License for more details. |
// +-----------------------------------------------------------------+
// Path: /modules/phreedom/pages/popup_setup/template_main.php
//
echo html_form('popup_setup', FILENAME_DEFAULT, gen_get_all_get_params(array('action')));
// include hidden fields
echo html_hidden_field('action', '') . chr(10);
echo html_hidden_field('rowSeq', $sID) . chr(10);
// customize the toolbar actions
$toolbar->icon_list['cancel']['params'] = 'onclick="self.close()"';
$toolbar->icon_list['open']['show'] = false;
$toolbar->icon_list['save']['params'] = 'onclick="submitToDo(\'save\')"';
$toolbar->icon_list['delete']['show'] = false;
$toolbar->icon_list['print']['show'] = false;
if (count($extra_toolbar_buttons) > 0) {
foreach ($extra_toolbar_buttons as $key => $value) {
$toolbar->icon_list[$key] = $value;
}
}
if ($subject_module->help_path != '') {
示例13: html_form
// | published by the Free Software Foundation, either version 3 of |
// | the License, or any later version. |
// | |
// | This program is distributed in the hope that it will be useful, |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
// | GNU General Public License for more details. |
// | |
// | The license that is bundled with this package is located in the |
// | file: /doc/manual/ch01-Introduction/license.html. |
// | If not, see http://www.gnu.org/licenses/ |
// +-----------------------------------------------------------------+
// Path: /modules/assets/pages/assets_fields/template_detail.php
//
// start the form
echo html_form('assets_fields', FILENAME_DEFAULT, gen_get_all_get_params(array('action')));
// include hidden fields
echo html_hidden_field('todo', '') . chr(10);
echo html_hidden_field('rowSeq', $cInfo->id) . chr(10);
// customize the toolbar actions
$toolbar->icon_list['cancel']['params'] = 'onclick="location.href = \'' . html_href_link(FILENAME_DEFAULT, gen_get_all_get_params(array('action')), 'SSL') . '\'"';
$toolbar->icon_list['open']['show'] = false;
$toolbar->icon_list['delete']['show'] = false;
if (($action == 'edit' || $action == 'update') && $security_level > 2) {
$toolbar->icon_list['save']['params'] = 'onclick="submitToDo(\'update\')"';
} elseif ($security_level > 1) {
$toolbar->icon_list['save']['params'] = 'onclick="submitToDo(\'save\')"';
} else {
$toolbar->icon_list['save']['show'] = false;
}
$toolbar->icon_list['print']['show'] = false;
示例14: html_form
// | published by the Free Software Foundation, either version 3 of |
// | the License, or any later version. |
// | |
// | This program is distributed in the hope that it will be useful, |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
// | GNU General Public License for more details. |
// | |
// | The license that is bundled with this package is located in the |
// | file: /doc/manual/ch01-Introduction/license.html. |
// | If not, see http://www.gnu.org/licenses/ |
// +-----------------------------------------------------------------+
// Path: /modules/general/pages/crash/template_main.php
//
// start the form
echo html_form('crash', FILENAME_DEFAULT, gen_get_all_get_params(array('action'))) . chr(10);
// include hidden fields
echo html_hidden_field('todo', '') . chr(10);
// customize the toolbar actions
$toolbar->icon_list['cancel']['params'] = 'onclick="location.href = \'' . html_href_link(FILENAME_DEFAULT, '', 'SSL') . '\'"';
$toolbar->icon_list['open']['show'] = false;
$toolbar->icon_list['delete']['show'] = false;
$toolbar->icon_list['save']['show'] = false;
$toolbar->icon_list['print']['show'] = false;
// pull in extra toolbar overrides and additions
if (count($extra_toolbar_buttons) > 0) {
foreach ($extra_toolbar_buttons as $key => $value) {
$toolbar->icon_list[$key] = $value;
}
}
// add the help file index and build the toolbar
示例15: html_resendpwd
/**
* Form to request a new password for an existing account
*
* @author Benoit Chesneau <benoit@bchesneau.info>
*/
function html_resendpwd()
{
global $lang;
global $conf;
global $ID;
print p_locale_xhtml('resendpwd');
print '<div class="centeralign">' . NL;
$form = new Doku_Form(array('id' => 'dw__resendpwd'));
$form->startFieldset($lang['resendpwd']);
$form->addHidden('do', 'resendpwd');
$form->addHidden('save', '1');
$form->addElement(form_makeTag('br'));
$form->addElement(form_makeTextField('login', $_POST['login'], $lang['user'], '', 'block'));
$form->addElement(form_makeTag('br'));
$form->addElement(form_makeTag('br'));
$form->addElement(form_makeButton('submit', '', $lang['btn_resendpwd']));
$form->endFieldset();
html_form('resendpwd', $form);
print '</div>' . NL;
}