本文整理汇总了PHP中formText函数的典型用法代码示例。如果您正苦于以下问题:PHP formText函数的具体用法?PHP formText怎么用?PHP formText使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了formText函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: mainElementHTML
/**
* The HTML representation of this element
*
* @return string
*/
protected function mainElementHTML()
{
if ($this->useInput) {
$this->prefillInput();
}
return '<textarea ' . buildAttributes($this->attrs()) . '>' . formText($this->val()) . '</textarea>';
}
示例2: showSearch
function showSearch()
{
printStyle();
generateGoods();
showSearchPrintOnLoad();
formText();
printGoodsTable();
}
示例3: valueEditor
/**
* Use a text area for input
*
* @param string $name
* @param string $rawvalue
* @return string
*/
public function valueEditor($name, $rawvalue)
{
$class = 'struct_' . strtolower($this->getClass());
$name = hsc($name);
$rawvalue = formText($rawvalue);
$html = "<textarea name=\"{$name}\" class=\"{$class}\">{$rawvalue}</textarea>";
return "{$html}";
}
示例4: html_attbuild
/**
* Helps building long attribute lists
*
* @deprecated Use buildAttributes instead
* @author Andreas Gohr <andi@splitbrain.org>
*/
function html_attbuild($attributes)
{
$ret = '';
foreach ($attributes as $key => $value) {
$ret .= $key . '="' . formText($value) . '" ';
}
return trim($ret);
}
示例5: html
/**
* Build html for label and input of setting
*
* @param DokuWiki_Plugin $plugin object of config plugin
* @param bool $echo true: show inputted value, when error occurred, otherwise the stored setting
* @return string[] with content array(string $label_html, string $input_html)
*/
public function html(&$plugin, $echo = false)
{
$disable = '';
if ($this->is_protected()) {
$value = $this->_protected;
$disable = 'disabled="disabled"';
} else {
if ($echo && $this->_error) {
$value = $this->_input;
} else {
$value = is_null($this->_local) ? $this->_default : $this->_local;
}
}
$key = htmlspecialchars($this->_key);
$value = formText($value);
$label = '<label for="config___' . $key . '">' . $this->prompt($plugin) . '</label>';
$input = '<textarea rows="3" cols="40" id="config___' . $key . '" name="config[' . $key . ']" class="edit" ' . $disable . '>' . $value . '</textarea>';
return array($label, $input);
}
示例6: toHTML
/**
* The HTML representation of the whole form
*
* @return string
*/
public function toHTML()
{
$this->balanceFieldsets();
$html = '<form ' . buildAttributes($this->attrs()) . '>';
foreach ($this->hidden as $name => $value) {
$html .= '<input type="hidden" name="' . $name . '" value="' . formText($value) . '" />';
}
foreach ($this->elements as $element) {
$html .= $element->toHTML();
}
$html .= '</form>';
return $html;
}
示例7: html
/**
* Build html for label and input of property
*
* @param DokuWiki_Plugin $plugin object of config plugin
* @param bool $echo true: show inputted value, when error occurred, otherwise the stored property
* @return string[] with content array(string $label_html, string $input_html)
*/
public function html(&$plugin, $echo = false)
{
$disable = '';
if ($echo && $this->_error) {
$value = $this->_input;
} else {
$value = $this->_metavalue;
}
$key = htmlspecialchars($this->_key);
$value = formText($value);
$label = '<label for="config___' . $key . '">' . $this->prompt($plugin) . '</label>';
$input = '<textarea rows="3" cols="40" id="config___' . $key . '" name="config[' . $key . ']" class="edit" ' . $disable . '>' . $value . '</textarea>';
return array($label, $input);
}
示例8: _form
//.........这里部分代码省略.........
?>
:</span>
<input type="text" class="edit" name="date" id="discussion__comment_date" size="50" />
</label>
</div>
<?php
}
// for saving a comment
} else {
?>
<input type="hidden" name="cid" value="<?php
echo $cid;
?>
" />
<?php
}
?>
<div class="comment_text">
<?php
echo $this->getLang('entercomment');
echo $this->getConf('wikisyntaxok') ? "" : ":";
if ($this->getConf('wikisyntaxok')) {
echo '. ' . $this->getLang('wikisyntax') . ':';
}
?>
<!-- Fix for disable the toolbar when wikisyntaxok is set to false. See discussion's script.jss -->
<?php
if ($this->getConf('wikisyntaxok')) {
?>
<div id="discussion__comment_toolbar">
<?php
} else {
?>
<div id="discussion__comment_toolbar_disabled">
<?php
}
?>
</div>
<textarea class="edit<?php
if ($_REQUEST['comment'] == 'add' && empty($_REQUEST['text'])) {
echo ' error';
}
?>
" name="text" cols="80" rows="10" id="discussion__comment_text" tabindex="5"><?php
if ($raw) {
echo formText($raw);
} else {
echo $_REQUEST['text'];
}
?>
</textarea>
</div>
<?php
//bad and dirty event insert hook
$evdata = array('writable' => true);
trigger_event('HTML_EDITFORM_INJECTION', $evdata);
?>
<input class="button comment_submit" id="discussion__btn_submit" type="submit" name="submit" accesskey="s" value="<?php
echo $lang['btn_save'];
?>
" title="<?php
echo $lang['btn_save'];
?>
[S]" tabindex="7" />
<input class="button comment_preview_button" id="discussion__btn_preview" type="button" name="preview" accesskey="p" value="<?php
echo $lang['btn_preview'];
?>
" title="<?php
echo $lang['btn_preview'];
?>
[P]" />
<?php
if ((!$_SERVER['REMOTE_USER'] || $_SERVER['REMOTE_USER'] && !$conf['subscribers']) && $this->getConf('subscribe')) {
?>
<div class="comment_subscribe">
<input type="checkbox" id="discussion__comment_subscribe" name="subscribe" tabindex="6" />
<label class="block" for="discussion__comment_subscribe">
<span><?php
echo $this->getLang('subscribe');
?>
</span>
</label>
</div>
<?php
}
?>
<div class="clearer"></div>
<div id="discussion__comment_preview"> </div>
</div>
</form>
</div>
<?php
if ($this->getConf('usecocomment')) {
echo $this->_coComment();
}
}
示例9: _htmlTemplateInput
/**
* Create html for selection of namespace templates
*
* @param array $newpagetemplates array of namespace templates
* @return string html of select or hidden input
*/
public function _htmlTemplateInput($newpagetemplates)
{
$cnt = count($newpagetemplates);
if ($cnt < 1 || $cnt == 1 && $newpagetemplates[0] == '') {
$input = '';
} else {
if ($cnt == 1) {
list($template, ) = $this->_parseNSTemplatePage($newpagetemplates[0]);
$input = '<input type="hidden" name="newpagetemplate" value="' . formText($template) . '" />';
} else {
$first = true;
$input = '<select name="newpagetemplate" tabindex="3">';
foreach ($newpagetemplates as $template) {
$p = $first ? ' selected="selected"' : '';
$first = false;
list($template, $name) = $this->_parseNSTemplatePage($template);
$p .= ' value="' . formText($template) . '"';
$input .= "<option {$p}>" . formText($name) . "</option>";
}
$input .= '</select>';
}
$input = DOKU_TAB . DOKU_TAB . $input . DOKU_LF;
}
return $input;
}
示例10: _print
/**
* function _print
* @author Myron Turner
*/
function _print()
{
global $INFO;
global $lang;
global $ckgedit_lang;
global $ID;
global $REV;
global $DATE;
global $PRE;
global $SUF;
global $SUM;
$wr = $INFO['writable'];
if ($wr) {
if ($REV) {
print p_locale_xhtml('editrev');
}
$ro = false;
} else {
// check pseudo action 'source'
if (!actionOK('source')) {
msg('Command disabled: source', -1);
return false;
}
print p_locale_xhtml('read');
$ro = 'readonly="readonly"';
}
if (!$DATE) {
$DATE = $INFO['lastmod'];
}
$guest_toolbar = $this->getConf('guest_toolbar');
$guest_media = $this->getConf('guest_media');
if (!isset($INFO['userinfo']) && !$guest_toolbar) {
$toolbar = "DokuwikiNoGuest";
} else {
if (!isset($INFO['userinfo']) && !$guest_media) {
$toolbar = "DokuwikiGuest";
} else {
$toolbar = 'Dokuwiki';
}
}
$height = isset($_COOKIE['ckgEdht']) && $_COOKIE['ckgEdht'] ? $_COOKIE['ckgEdht'] : 250;
$doku_url = rtrim(DOKU_URL, '/');
$ckeditor_replace = <<<CKEDITOR_REPLACE
\t\t ckgeditCKInstance = CKEDITOR.replace('wiki__text',
\t\t {
toolbar: '{$toolbar}' ,
height: {$height},
filebrowserImageBrowseUrl : '{$doku_url}/lib/plugins/ckgedit/fckeditor/editor/filemanager/browser/default/browser.html?Type=Image&Connector={$doku_url}/lib/plugins/ckgedit/fckeditor/editor/filemanager/connectors/php/connector.php',
filebrowserBrowseUrl: '{$doku_url}/lib/plugins/ckgedit/fckeditor/editor/filemanager/browser/default/browser.html?Type=File&Connector={$doku_url}/lib/plugins/ckgedit/fckeditor/editor/filemanager/connectors/php/connector.php',
}
\t\t );
FCKeditor_OnComplete(ckgeditCKInstance);
CKEDITOR_REPLACE;
echo $this->helper->registerOnLoad($ckeditor_replace);
global $skip_styling;
?>
<form id="dw__editform" method="post" action="<?php
echo script();
?>
" accept-charset="<?php
echo $lang['encoding'];
?>
">
<div class="no">
<input type="hidden" name="id" value="<?php
echo $ID;
?>
" />
<input type="hidden" name="rev" value="<?php
echo $REV;
?>
" />
<input type="hidden" name="date" value="<?php
echo $DATE;
?>
" />
<input type="hidden" name="prefix" value="<?php
echo formText($PRE);
?>
" />
<input type="hidden" name="suffix" value="<?php
echo formText($SUF);
?>
" />
<input type="hidden" id="ckgedit_mode_type" name="mode" value="" />
<input type="hidden" id="fck_preview_mode" name="fck_preview_mode" value="nil" />
<input type="hidden" id="fck_wikitext" name="fck_wikitext" value="__false__" />
<input type="hidden" id="styling" name="styling" value="styles" />
<?php
if (function_exists('formSecurityToken')) {
formSecurityToken();
//.........这里部分代码省略.........
示例11: formRadio
<td><?php
echo formRadio('ipcheck_bk', '0', $form['ipcheck_bk']);
?>
不使用 <?php
echo formRadio('ipcheck_bk', '1', $form['ipcheck_bk']);
?>
要使用 ,
IP: <?php
echo formText('webip_bk', 60, 70, $form['webip_bk']);
?>
<br> <font color=#ff0000>(先取得每筆交易的驗證檢核碼, 然後才一起送授權, 幕後授權一定要勾選)(多組IP請用逗點分隔,最多四組ip)</font></td>
</tr>
<tr>
<td bgcolor=#cccccc align=right>鎖定登入管理後台IP</td>
<td><?php
echo formText('rootIP', 20, 40, $form['rootIP']);
?>
<font color=#ff0000>(輸入即會馬上生效, 非此IP之電腦, 將無法登入後台, 不鎖定IP, 請清空)</font></td>
</tr>
<tr>
<td bgcolor=#cccccc align=right>連續盜刷保護</td>
<td>
<?php
echo formRadio('ipstop', '0', $form['ipstop']);
?>
開
<?php
echo formRadio('ipstop', '1', $form['ipstop']);
?>
關
</td>
示例12: media_metaform
/**
* Display the form to edit image meta data
*
* @author Andreas Gohr <andi@splitbrain.org>
*/
function media_metaform($id, $auth)
{
if ($auth < AUTH_UPLOAD) {
return false;
}
global $lang, $config_cascade;
// load the field descriptions
static $fields = null;
if (is_null($fields)) {
foreach (array('default', 'local') as $config_group) {
if (empty($config_cascade['mediameta'][$config_group])) {
continue;
}
foreach ($config_cascade['mediameta'][$config_group] as $config_file) {
if (@file_exists($config_file)) {
include $config_file;
}
}
}
}
$src = mediaFN($id);
// output
echo '<h1>' . hsc(noNS($id)) . '</h1>' . NL;
echo '<form action="' . DOKU_BASE . 'lib/exe/mediamanager.php" accept-charset="utf-8" method="post" class="meta">' . NL;
formSecurityToken();
foreach ($fields as $key => $field) {
// get current value
$tags = array($field[0]);
if (is_array($field[3])) {
$tags = array_merge($tags, $field[3]);
}
$value = tpl_img_getTag($tags, '', $src);
$value = cleanText($value);
// prepare attributes
$p = array();
$p['class'] = 'edit';
$p['id'] = 'meta__' . $key;
$p['name'] = 'meta[' . $field[0] . ']';
// put label
echo '<div class="metafield">';
echo '<label for="meta__' . $key . '">';
echo $lang[$field[1]] ? $lang[$field[1]] : $field[1];
echo ':</label>';
// put input field
if ($field[2] == 'text') {
$p['value'] = $value;
$p['type'] = 'text';
$att = buildAttributes($p);
echo "<input {$att}/>" . NL;
} else {
$att = buildAttributes($p);
echo "<textarea {$att} rows=\"6\" cols=\"50\">" . formText($value) . '</textarea>' . NL;
}
echo '</div>' . NL;
}
echo '<div class="buttons">' . NL;
echo '<input type="hidden" name="img" value="' . hsc($id) . '" />' . NL;
echo '<input name="do[save]" type="submit" value="' . $lang['btn_save'] . '" title="' . $lang['btn_save'] . ' [S]" accesskey="s" class="button" />' . NL;
echo '<input name="do[cancel]" type="submit" value="' . $lang['btn_cancel'] . '" title="' . $lang['btn_cancel'] . ' [C]" accesskey="c" class="button" />' . NL;
echo '</div>' . NL;
echo '</form>' . NL;
}
示例13: formRadio
( 對單一使用者有作交易次數的限制, 以免被盜刷集團作大量試卡 )
</td>
</tr>
<tr>
<td bgcolor=#cccccc align=right>鎖定幕前交易網站主機IP</td>
<td>' . formRadio('ipcheck', '0', $form['ipcheck']) . '不使用 ' . formRadio('ipcheck', '1', $form['ipcheck']) . '要使用 ,
IP: ' . formText('webip', 20, 40, $form['webip']) . ' <font color=#ff0000>(使用此一機制,交易全程都不會跳出中斷警告)</font></td>
</tr>
<tr>
<td bgcolor=#cccccc align=right>鎖定幕後驗證觸發主機IP</td>
<td>' . formRadio('ipcheck_bk', '0', $form['ipcheck_bk']) . '不使用 ' . formRadio('ipcheck_bk', '1', $form['ipcheck_bk']) . '要使用 ,
IP: ' . formText('webip_bk', 60, 60, $form['webip_bk']) . '<br> <font color=#ff0000>(先取得每筆交易的驗證檢核碼, 然後才一起送授權, 幕後授權一定要勾選)(多組IP請用逗點分隔,最多四組ip)</font></td>
</tr>
<tr>
<td bgcolor=#cccccc align=right>鎖定登入管理後台IP</td>
<td>' . formText('rootIP', 20, 40, $form['rootIP']) . ' <font color=#ff0000>(輸入即會馬上生效, 非此IP之電腦, 將無法登入後台, 不鎖定IP, 請清空)</font></td>
</tr>' . "\r\n";
if ($form['sps'] == 1) {
//非大特店 是聯信分期, 才秀出來
if (!$_SESSION['RootClientAllpayMID'] && ($form['bank'] == 4 || $form['bank'] == 10)) {
echo '<tr>
<td bgcolor=#cccccc align=right>聯信分期<br>銀行選擇</td>
<td><font color=#ff0000>【請依您實際簽約之銀行增減家數,勾選可交易之銀行】</font><br>' . "\r\n";
$bb = 0;
$vv = 0;
while (list($l, $r) = each($CardTitel)) {
$bb++;
$vv++;
if (substr_count($form['sebank'], $r)) {
echo '<input type="checkbox" name="sebank[' . $vv . ']" value="' . $r . '" checked>' . $r;
} else {
示例14: 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');
?>
<div class="centeralign">
<form id="dw__resendpwd" action="<?php
echo wl($ID);
?>
" accept-charset="<?php
echo $lang['encoding'];
?>
" method="post">
<fieldset>
<br />
<legend><?php
echo $lang['resendpwd'];
?>
</legend>
<input type="hidden" name="do" value="resendpwd" />
<input type="hidden" name="save" value="1" />
<label class="block">
<span><?php
echo $lang['user'];
?>
</span>
<input type="text" name="login" value="<?php
echo formText($_POST['login']);
?>
" class="edit" /><br /><br />
</label><br />
<input type="submit" value="<?php
echo $lang['btn_resendpwd'];
?>
" class="button" />
</fieldset>
</form>
</div>
<?php
}
示例15: _print
/**
* function _print
* @author Myron Turner
*/
function _print()
{
global $INFO;
global $lang;
global $fckg_lang;
global $ID;
global $REV;
global $DATE;
global $PRE;
global $SUF;
global $SUM;
$wr = $INFO['writable'];
if ($wr) {
if ($REV) {
print p_locale_xhtml('editrev');
}
$ro = false;
} else {
// check pseudo action 'source'
if (!actionOK('source')) {
msg('Command disabled: source', -1);
return false;
}
print p_locale_xhtml('read');
$ro = 'readonly="readonly"';
}
if (!$DATE) {
$DATE = $INFO['lastmod'];
}
$guest_toolbar = $this->getConf('guest_toolbar');
$guest_media = $this->getConf('guest_media');
if (!isset($INFO['userinfo']) && !$guest_toolbar) {
echo $this->helper->registerOnLoad(' fck = new FCKeditor("wiki__text", "100%", "600");
fck.BasePath = "' . DOKU_BASE . 'lib/plugins/fckg/' . $this->fck_location . '/";
fck.ToolbarSet = "DokuwikiNoGuest";
fck.ReplaceTextarea();');
} else {
if (!isset($INFO['userinfo']) && !$guest_media) {
echo $this->helper->registerOnLoad(' fck = new FCKeditor("wiki__text", "100%", "600");
fck.BasePath = "' . DOKU_BASE . 'lib/plugins/fckg/' . $this->fck_location . '/";
fck.ToolbarSet = "DokuwikiGuest";
fck.ReplaceTextarea();');
} else {
echo $this->helper->registerOnLoad(' fck = new FCKeditor("wiki__text", "100%", "600");
fck.BasePath = "' . DOKU_BASE . 'lib/plugins/fckg/' . $this->fck_location . '/";
fck.ToolbarSet = "Dokuwiki";
fck.ReplaceTextarea();');
}
}
?>
<form id="dw__editform" method="post" action="<?php
echo script();
?>
" accept-charset="<?php
echo $lang['encoding'];
?>
">
<div class="no">
<input type="hidden" name="id" value="<?php
echo $ID;
?>
" />
<input type="hidden" name="rev" value="<?php
echo $REV;
?>
" />
<input type="hidden" name="date" value="<?php
echo $DATE;
?>
" />
<input type="hidden" name="prefix" value="<?php
echo formText($PRE);
?>
" />
<input type="hidden" name="suffix" value="<?php
echo formText($SUF);
?>
" />
<input type="hidden" id="fckg_mode_type" name="mode" value="" />
<input type="hidden" id="fck_preview_mode" name="fck_preview_mode" value="nil" />
<input type="hidden" id="fck_wikitext" name="fck_wikitext" value="__false__" />
<?php
if (function_exists('formSecurityToken')) {
formSecurityToken();
}
?>
</div>
<textarea name="wikitext" id="wiki__text" <?php
echo $ro;
?>
cols="80" rows="10" class="edit" tabindex="1"><?php
echo "\n" . $this->xhtml;
?>
//.........这里部分代码省略.........