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


PHP form::hidden方法代码示例

本文整理汇总了PHP中form::hidden方法的典型用法代码示例。如果您正苦于以下问题:PHP form::hidden方法的具体用法?PHP form::hidden怎么用?PHP form::hidden使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在form的用法示例。


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

示例1: gui

 public function gui()
 {
     if ($this->status) {
         echo '<p class="message">' . __('Content successfully imported.') . '</p>';
     }
     echo '<h3>' . __('Import from a feed') . '</h3>' . '<p>' . sprintf(__('This will import a feed (RSS or Atom) a as new content in the current blog: %s.'), '<strong>' . html::escapeHTML($this->core->blog->name) . '</strong>') . '</p>' . '<form action="' . $this->getURL(true) . '" method="post">' . '<fieldset>' . $this->core->formNonce() . form::hidden(array('do'), 1) . '<p><label>' . __('Feed URL:') . ' ' . form::field('feed_url', 40, 300, html::escapeHTML($this->feed_url)) . '</label></p>' . '<p><input type="submit" value="' . __('Send') . '" /></p>' . '</fieldset>' . '</form>';
 }
开发者ID:HackerMajor,项目名称:root,代码行数:7,代码来源:class.dc.import.feed.php

示例2: gui

 public function gui()
 {
     if ($this->status) {
         dcPage::success(__('Content successfully imported.'));
     }
     echo '<form action="' . $this->getURL(true) . '" method="post">' . '<p>' . sprintf(__('Add a feed content to the current blog: <strong>%s</strong>.'), html::escapeHTML($this->core->blog->name)) . '</p>' . '<p><label for="feed_url">' . __('Feed URL:') . '</label>' . form::field('feed_url', 50, 300, html::escapeHTML($this->feed_url)) . '</p>' . '<p>' . $this->core->formNonce() . form::hidden(array('do'), 1) . '<input type="submit" value="' . __('Import') . '" /></p>' . '</form>';
 }
开发者ID:nikrou,项目名称:dotclear,代码行数:7,代码来源:class.dc.import.feed.php

示例3: open

 /**
  * Generates an opening HTML form tag.
  *
  * @param   string  form action attribute
  * @param   array   extra attributes
  * @param   array   hidden fields to be created immediately after the form tag
  * @return  string
  */
 public static function open($action = NULL, $attr = array(), $hidden = NULL)
 {
     // Make sure that the method is always set
     empty($attr['method']) and $attr['method'] = 'post';
     if ($attr['method'] !== 'post' and $attr['method'] !== 'get') {
         // If the method is invalid, use post
         $attr['method'] = 'post';
     }
     if ($action === NULL) {
         // Use the current URL as the default action
         $action = url::site(Router::$complete_uri);
     } elseif (strpos($action, '://') === FALSE) {
         // Make the action URI into a URL
         $action = url::site($action);
     }
     // Set action
     $attr['action'] = $action;
     // Only show the CSRF field when form method is POST
     $hidden_field = $attr['method'] === 'post' ? form::hidden('form_auth_token', csrf::token()) . "\n" : '';
     // Form opening tag
     $form = '<form' . form::attributes($attr) . '>' . "\n" . $hidden_field;
     // Add hidden fields immediate after opening tag
     empty($hidden) or $form .= form::hidden($hidden);
     return $form;
 }
开发者ID:Dirichi,项目名称:Ushahidi_Web,代码行数:33,代码来源:MY_form.php

示例4: adminPostAfterForm

 public static function adminPostAfterForm($post)
 {
     if ($post !== null) {
         $core =& $GLOBALS['core'];
         echo '<form action="' . $core->adminurl->get('admin.post.media') . '" id="attachment-remove-hide" method="post">' . '<div>' . form::hidden(array('post_id'), $post->post_id) . form::hidden(array('media_id'), '') . form::hidden(array('remove'), 1) . $core->formNonce() . '</div></form>';
     }
 }
开发者ID:nikrou,项目名称:dotclear,代码行数:7,代码来源:_admin.php

示例5: __toString

 public function __toString()
 {
     if ($this->args->value_exec != null) {
         $value = $this->field_value;
         eval("\$value = {$this->args->value_exec};");
         $this->field_value = $value;
     }
     return $this->field_value . form::hidden($this->field_name, $this->field_value);
 }
开发者ID:brojasmeneses,项目名称:floreriarosabel,代码行数:9,代码来源:AutoField.php

示例6: parse_array

function parse_array($arr)
{
    foreach ($arr as $key => $value) {
        $db = DB::select()->from('categories')->where('id', '=', $key)->execute();
        echo '<ul><li>';
        echo '<b>Название:</b> ' . form::input('name[]', $db[0]['name'], array('onkeyup' => 'translit(\'name[]\', \'url[]\');')) . form::hidden('cid[]', $db[0]['id']) . '&nbsp;';
        echo '<b>URL:</b> ' . form::input('url[]', $db[0]['url']) . '&nbsp;';
        echo '<b>Удалить?</b> ' . form::checkbox('delete[]', $db[0]['id']);
        echo '</li>';
        if (is_array($value)) {
            parse_array($value);
        }
        echo '</ul>';
    }
}
开发者ID:phpdude,项目名称:Purpled-Blog-Engine,代码行数:15,代码来源:categories.php

示例7: _DropDown

 private function _DropDown()
 {
     $tabla_conectora = substr($this->args->model, 4);
     if (@$_SESSION['PKID_OTM'] != "") {
         try {
             $arrOTMnew = array($this->FFirstM => $this->PkID, $this->FSecondM => $_SESSION['PKID_OTM']);
             $this->db->insert($tabla_conectora, $arrOTMnew);
             unset($_SESSION['PKID_OTM']);
         } catch (Exception $e) {
             echo 'Caught exception: ', $e->getMessage(), "\n";
         }
     }
     /* Construyendo el Query */
     $Model = "fpp_" . $this->secondM . '_Model';
     $input = null;
     $Model = new $Model();
     $list = $Model->Get_ListOfMeta();
     $key = $Model->_FirstPrimary;
     $this->args->db_table = $this->secondM;
     //compatibilidad para obtener el Link AJAX fpp_tdp #34
     $k1 = '`' . $tabla_conectora . "`.`" . $this->FFirstM . '`';
     $k2 = '`' . $tabla_conectora . "`.`" . $this->FSecondM . '`';
     $f2 = '`' . $this->secondM . "`.`" . $key . '`';
     $idfpp = $this->PkID;
     try {
         //       echo $k1;
         $one_to_one = $this->db->from($this->secondM, $tabla_conectora)->select($list)->where("{$k1} = {$idfpp} AND {$k2} = {$f2}")->get();
     } catch (Exception $e) {
         echo 'Caught exception: ', $e->getMessage(), "\n";
     }
     /* Construyendo el Array del Dropdown */
     $table = "<table>";
     foreach ($one_to_one as $row) {
         $table .= "<tr>";
         $input .= form::hidden($this->field_name . '[]', $row->{$key});
         foreach ($row as $kr => $kv) {
             $table .= "<td>{$kv}</td>";
         }
         $table .= "</tr>";
     }
     $table .= "</table>" . $input;
     $table = $this->AjaxConstruct("&nbsp;") . '<br/>' . $table;
     return $table;
 }
开发者ID:brojasmeneses,项目名称:floreriarosabel,代码行数:44,代码来源:TabularModel.php

示例8: many_to_many

 /**
  * Add a many to many select list
  * @developer Brandon Hansen
  * @date Oct 27, 2010
  */
 public static function many_to_many($primary_model, $secondary_models, $property, $display_field_name = 'name', $type = 'inline')
 {
     $return = '';
     $return .= form::hidden($property, 'NULL');
     if ($type == 'table') {
         $return .= '<table >';
     }
     foreach ($secondary_models as $secondary_model) {
         if ($type == 'table') {
             $return .= '<tr><td>';
         }
         $return .= form::checkbox($property . '[]', $secondary_model->id, in_array($secondary_model->id, $primary_model->{$property}->primary_key_array()));
         $return .= $secondary_model->{$display_field_name};
         if ($type == 'table') {
             $return .= '</td></tr>';
         }
     }
     if ($type == 'table') {
         $return .= '</table>';
     }
     return $return;
 }
开发者ID:ready4god2513,项目名称:scs,代码行数:27,代码来源:MY_form.php

示例9: render

 public function render(&$render_variables, $errors = array())
 {
     // Load base template and attributes
     $result = parent::render($render_variables, $errors);
     // Discover the type
     switch ($this->type) {
         case 'input':
             $result['template']->element = form::input($result['attributes'], $this->value);
             break;
         case 'password':
             $result['template']->element = form::password($result['attributes'], $this->value);
             break;
         case 'submit':
             $result['template']->element = form::submit($result['attributes'], $this->value);
             $render_variables['submit'] = TRUE;
             break;
         case 'radio':
             $result['template']->element = form::radio($result['attributes'], $this->value);
             break;
         case 'checkbox':
             $result['attributes']['value'] = $this->value;
             if ($this->value = Input::instance()->post($this->name)) {
                 $result['template']->element = form::checkbox($result['attributes'], $this->value, TRUE);
             } else {
                 $result['template']->element = form::checkbox($result['attributes'], $this->value);
             }
             break;
         case 'hidden':
             $result['template']->element = form::hidden($this->name, $this->value);
             break;
         case 'file':
             $result['template']->element = form::upload($result['attributes'], $this->value);
             $render_variables['enctype'] = 'multipart/form-data';
             break;
     }
     // Return the resulting output
     return (string) $result['template']->render();
 }
开发者ID:samsoir,项目名称:morf,代码行数:38,代码来源:Morf_Input.php

示例10: open

 /**
  * Generates an opening HTML form tag.
  *
  * @param   string  form action attribute
  * @param   array   extra attributes
  * @param   array   hidden fields to be created immediately after the form tag
  * @param   string  non-default protocol, eg: https
  * @return  string
  */
 public static function open($action = NULL, $attr = array(), $hidden = NULL, $protocol = NULL)
 {
     // Make sure that the method is always set
     empty($attr['method']) and $attr['method'] = 'post';
     if ($attr['method'] !== 'post' and $attr['method'] !== 'get') {
         // If the method is invalid, use post
         $attr['method'] = 'post';
     }
     if ($action === NULL) {
         // Use the current URL as the default action
         $action = url::site(Router::$complete_uri, $protocol);
     } elseif (strpos($action, '://') === FALSE) {
         // Make the action URI into a URL
         $action = url::site($action, $protocol);
     }
     // Set action
     $attr['action'] = $action;
     // Form opening tag
     $form = '<form' . form::attributes($attr) . '>' . "\n";
     // Add hidden fields immediate after opening tag
     empty($hidden) or $form .= form::hidden($hidden);
     return $form;
 }
开发者ID:JasonWiki,项目名称:docs,代码行数:32,代码来源:form.php

示例11: __

</td>
			<td class="<?php 
        echo $td_class;
        ?>
"><?php 
        echo $f->hasGUI() ? '<a href="' . html::escapeHTML($f->guiURL()) . '">' . __('m_antispam_Filter_configuration') . '</a>' : '&nbsp;';
        ?>
</td>
		</tr>
	<?php 
        $i++;
    }
    ?>

	</tbody></table>
	<p><?php 
    echo form::hidden('filters_order', '') . form::hidden('m', 'antispam') . adminPage::formtoken();
    ?>
	<input type="submit" name="filters_upd" value="<?php 
    _e('c_c_action_Save');
    ?>
" /></p>
	</fieldset></form>

<?php 
}
?>

<?php 
# Pied-de-page
require OKT_ADMIN_FOOTER_FILE;
开发者ID:jewelhuq,项目名称:okatea,代码行数:31,代码来源:admin.php

示例12: array

 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see http://www.gnu.org/licenses/gpl.html.
 *
 * @package	Core
 * @subpackage Views
 * @author	Indicia Team
 * @license	http://www.gnu.org/licenses/gpl.html GPL
 * @link 	http://code.google.com/p/indicia/
 */
if (function_exists('dbase_open') && function_exists('zip_open')) {
    print form::open($controllerpath . '/upload_shp', array('ENCTYPE' => 'multipart/form-data'));
    if ($staticFields != null) {
        foreach ($staticFields as $a => $b) {
            print form::hidden($a, $b);
        }
    }
    ?>
<fieldset>
<label for="zip_upload" class="auto">Upload a Zipped up SHP fileset into this list:</label>
<input type="file" name="zip_upload" id="zip_upload" size="40" />
<input type="submit" value="Upload ZIP File" />
</fieldset>
</form>
<?php 
} else {
    print "<p><i>";
    if (!function_exists('dbase_open')) {
        print "PHP dBase Library is not loaded. ";
    }
开发者ID:BirenRathod,项目名称:indicia-code,代码行数:31,代码来源:upload_shp.php

示例13: defined

<?php

defined("SYSPATH") or die("No direct script access.");
?>
<html>
  <body>
    <?php 
echo form::open("http://www.digibug.com/dapi/order.php");
?>
    <?php 
foreach ($order_params as $key => $value) {
    ?>
    <?php 
    echo form::hidden($key, $value);
    ?>
    <?php 
}
?>
    </form>
    <script type="text/javascript">
     document.forms[0].submit();
    </script>
  </body>
</html>
开发者ID:JasonWiki,项目名称:docs,代码行数:24,代码来源:digibug_form.html.php

示例14: strtoupper

?>
</a></li>
								<?php 
if ($id) {
    echo "<li><a href=\"#\" class=\"btn_delete btns_red\">" . strtoupper(Kohana::lang('ui_main.delete_report')) . "</a></li>";
}
?>
								<li><a href="<?php 
echo url::site() . 'admin/reports/';
?>
" class="btns_red"><?php 
echo strtoupper(Kohana::lang('ui_main.cancel'));
?>
</a></li>
							</ul>
						</div>						
					</div>
				<?php 
print form::close();
?>
				<?php 
if ($id) {
    // Hidden Form to Perform the Delete function
    print form::open(url::site() . 'admin/reports/', array('id' => 'reportMain', 'name' => 'reportMain'));
    $array = array('action' => 'd', 'incident_id[]' => $id);
    print form::hidden($array);
    print form::close();
}
?>
			</div>
开发者ID:hagaeru3sei,项目名称:Ushahidi_Web,代码行数:30,代码来源:reports_edit.php

示例15: Copyright

<?php

/**************************************************
  Coppermine 1.5.x Plugin - forum
  *************************************************
  Copyright (c) 2010 foulu (Le Hoai Phuong), eenemeenemuu
  *************************************************
  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
  (at your option) any later version.
  ********************************************
  $HeadURL$
  $Revision$
  $LastChangedBy$
  $Date$
  **************************************************/
pageheader($fr_title ? $fr_title : Config::item('fr_title'));
print html::spacer();
print table::open(0);
print table::tds(array(array('text' => $fr_title ? $fr_title : Config::item('fr_title')), array('align' => 'right', 'text' => ($authorizer->is_user() ? html::button('forum.php?c=profile', Lang::item('home.fr_profile')) : '') . NBSP . html::button('forum.php?c=search', Lang::item('home.search')))));
print table::close();
print html::spacer();
print table::open();
print form::hidden('c', 'search');
print table::tds(array(array('class' => 'tableb', 'text' => html::span(forum::nagavitor($nagavitor)))));
print table::close();
print html::spacer();
print $fr_contents;
pagefooter();
开发者ID:phill104,项目名称:branches,代码行数:30,代码来源:admin.php


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