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


PHP form_hidden函数代码示例

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


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

示例1: form_open

 function form_open($action = '', $attributes = '', $hidden = array())
 {
     $CI =& get_instance();
     $charset = strtolower($CI->config->item('charset'));
     if ($attributes == '') {
         $attributes = 'method="post" accept-charset="' . $charset . '"';
     } else {
         if (is_string($attributes)) {
             if (strpos('accept-charset=', $attributes) === FALSE) {
                 $attributes .= ' accept-charset="' . $charset . '"';
             }
         } elseif (is_object($attributes) or is_array($attributes)) {
             $attributes = (array) $attributes;
             if (!in_array('accept-charset', $attributes)) {
                 $attributes['accept-charset'] = $charset;
             }
         }
     }
     $action = strpos($action, '://') === FALSE ? $CI->config->site_url($action) : $action;
     $form = '<form action="' . $action . '"';
     $form .= _attributes_to_string($attributes, TRUE);
     $form .= '>';
     if (is_array($hidden) and count($hidden) > 0) {
         $form .= form_hidden($hidden);
     }
     return $form;
 }
开发者ID:netfreak,项目名称:pyrocms,代码行数:27,代码来源:MY_form_helper.php

示例2: print_input_file_upload

function print_input_file_upload($input)
{
    $html = '';
    $data = array('name' => $input['name'], 'id' => isset($input['id']) ? $input['id'] : $input['name'], 'tabindex' => isset($input['tabindex']) ? $input['tabindex'] : '', 'value' => $input['value']);
    $html .= form_upload($data) . form_hidden($input['name'], $input['value']);
    return $html;
}
开发者ID:VeronaFabLabRepo,项目名称:comune-grezzana-app-backend,代码行数:7,代码来源:print_input_file_upload_helper.php

示例3: initialize

 public function initialize($cajero = NULL)
 {
     $CI =& get_instance();
     $CI->load->helper(array('form', 'bancofield'));
     $existeObjeto = $cajero != NULL ? 1 : 0;
     $this->id = form_hidden('id', $existeObjeto ? $cajero->id : $CI->input->post('id'));
     $this->banco_id = BancoField('banco_id', $existeObjeto ? $cajero->banco_id : $CI->input->post('banco_id'));
     $this->nombre = form_input('nombre', $existeObjeto ? $cajero->nombre : $CI->input->post('nombre'));
     $this->horario = form_input('horario', $existeObjeto ? $cajero->horario : $CI->input->post('horario'));
     $this->direccion = form_input('direccion', $existeObjeto ? $cajero->direccion : $CI->input->post('direccion'));
     $this->latitud = form_input('latitud', $existeObjeto ? $cajero->latitud : $CI->input->post('latitud'));
     $this->longitud = form_input('longitud', $existeObjeto ? $cajero->longitud : $CI->input->post('longitud'));
     $this->banred = form_checkbox('banred', '1', $existeObjeto ? $cajero->banred : $CI->input->post('banred'));
     $this->pacificard = form_checkbox('pacificard', '1', $existeObjeto ? $cajero->pacificard : $CI->input->post('pacificard'));
     $this->american_express = form_checkbox('american_express', '1', $existeObjeto ? $cajero->american_express : $CI->input->post('american_express'));
     $this->bankard = form_checkbox('bankard', '1', $existeObjeto ? $cajero->bankard : $CI->input->post('bankard'));
     $this->nexo = form_checkbox('nexo', '1', $existeObjeto ? $cajero->nexo : $CI->input->post('nexo'));
     $this->visa_debito = form_checkbox('visa_debito', '1', $existeObjeto ? $cajero->visa_debito : $CI->input->post('visa_debito'));
     $this->visa = form_checkbox('visa', '1', $existeObjeto ? $cajero->visa : $CI->input->post('visa'));
     $this->plus = form_checkbox('plus', '1', $existeObjeto ? $cajero->plus : $CI->input->post('plus'));
     $this->mastercard = form_checkbox('mastercard', '1', $existeObjeto ? $cajero->mastercard : $CI->input->post('mastercard'));
     $this->cirrus = form_checkbox('cirrus', '1', $existeObjeto ? $cajero->cirrus : $CI->input->post('cirrus'));
     $this->maestro = form_checkbox('maestro', '1', $existeObjeto ? $cajero->maestro : $CI->input->post('maestro'));
     $this->diners = form_checkbox('diners', '1', $existeObjeto ? $cajero->diners : $CI->input->post('diners'));
     $this->estado = form_dropdown('estado', array('AC' => 'Activo', 'IN' => 'Inactivo'), $existeObjeto ? $cajero->estado : $CI->input->post('estado'));
 }
开发者ID:andresgomezbano,项目名称:CajerosWeb,代码行数:26,代码来源:FormCajero_Registrar.php

示例4: editar

 public function editar()
 {
     if (!($this->dados['infos'] = $this->curso_model->listar($this->id))) {
         redirect('../cursos/listar');
     }
     $dadosCurso = $this->dados['infos'][0];
     $form = form_open('#', array('class' => 'niceform'));
     $form .= '<table class="cadForm">';
     $form .= '<tr>';
     $form .= '<td>';
     $form .= form_label('Nome:', '', array('for' => 'email'));
     $form .= form_input('curso_nome', $dadosCurso['curso_nome'], array('size' => 30));
     $form .= form_hidden('curso_id', $dadosCurso['curso_id']);
     $form .= form_hidden('lixeira', $dadosCurso['lixeira']);
     $form .= '</td>';
     $form .= '<td>';
     $form .= form_label('Quantidade de aulas:', '', array('for' => 'email'));
     $form .= form_input('curso_qtd_aulas', $dadosCurso['curso_qtd_aulas'], array('size' => 20));
     $form .= '</td>';
     $form .= '</tr>';
     $form .= '<tr>';
     $form .= '<td></td>';
     $form .= '<td>';
     $form .= form_submit('cadastrar', 'Enviar', 'id="submit"');
     $form .= '</td>';
     $form .= '</tr>';
     $form .= '</table>';
     $form .= form_close();
     $form .= '<span class="obs">Todos os campos são obrigatórios.</span>';
     $this->dados['form'] = $form;
     $this->load->view('editar', $this->dados);
 }
开发者ID:adrisonluz,项目名称:syschool,代码行数:32,代码来源:Cursos.php

示例5: index

 public function index()
 {
     $table = ee('CP/Table', array('sortable' => FALSE, 'reorder' => TRUE));
     $rows = array();
     $data = array();
     // Default HTML buttons simply have a member ID of 0
     $buttons = ee('Model')->get("HTMLButton")->filter('member_id', 0)->order('tag_order', 'asc')->all();
     foreach ($buttons as $button) {
         $name = strpos($button->classname, 'html-') !== 0 ? $button->tag_name : '';
         $preview = array('toolbar_items' => array($button->classname => array('href' => ee('CP/URL')->make('settings/buttons/edit/' . $button->id), 'title' => $button->tag_name, 'content' => $name . form_hidden('order[]', $button->id))));
         $toolbar = array('toolbar_items' => array('edit' => array('href' => ee('CP/URL')->make('settings/buttons/edit/' . $button->id), 'title' => strtolower(lang('edit')))));
         $columns = array('preview' => $preview, 'tag_name' => $button->tag_name, 'accesskey' => $button->accesskey, $toolbar, array('name' => 'selection[]', 'value' => $button->id, 'data' => array('confirm' => lang('html_button') . ': <b>' . htmlentities($button->tag_name, ENT_QUOTES, 'UTF-8') . '</b>')));
         $attrs = array();
         if (ee()->session->flashdata('button_id') == $button->id) {
             $attrs = array('class' => 'selected');
         }
         $rows[] = array('attrs' => $attrs, 'columns' => $columns);
     }
     $table->setColumns(array('preview' => array('type' => Table::COL_TOOLBAR), 'tag_name', 'accesskey', 'manage' => array('type' => Table::COL_TOOLBAR), array('type' => Table::COL_CHECKBOX)));
     $table->setNoResultsText('no_search_results');
     $table->setData($rows);
     $data['table'] = $table->viewData($this->base_url);
     $data['new'] = ee('CP/URL')->make('settings/buttons/create');
     $data['form_url'] = ee('CP/URL')->make('settings/buttons/delete');
     $data['table']['action_content'] = $this->predefined();
     ee()->javascript->set_global('lang.remove_confirm', lang('html_buttons') . ': <b>### ' . lang('html_buttons') . '</b>');
     ee()->cp->add_js_script(array('file' => array('cp/confirm_remove', 'cp/members/html_button_reorder', 'cp/sort_helper'), 'plugin' => array('ee_table_reorder')));
     $reorder_ajax_fail = ee('CP/Alert')->makeBanner('reorder-ajax-fail')->asIssue()->canClose()->withTitle(lang('html_button_ajax_reorder_fail'))->addToBody(lang('html_button_ajax_reorder_fail_desc'));
     ee()->javascript->set_global('html_buttons.reorder_url', ee('CP/URL')->make('settings/buttons/order/')->compile());
     ee()->javascript->set_global('alert.reorder_ajax_fail', $reorder_ajax_fail->render());
     ee()->view->base_url = $this->base_url;
     ee()->view->ajax_validate = TRUE;
     ee()->view->cp_page_title = lang('html_buttons');
     ee()->cp->render('account/buttons', $data);
 }
开发者ID:vigm,项目名称:advancedMD,代码行数:35,代码来源:Buttons.php

示例6: menu_child

    function menu_child($parent, $level = 1)
    {
        $query = $this->CI->db->get_where('menu_detail', array('menu_parent' => $parent))->result();
        if (!empty($query)) {
            foreach ($query as $row) {
                echo form_hidden('menuid[]', $row->id);
                ?>
			<tr>
				<td><?php 
                echo $row->menu_name;
                ?>
</td>
				<td><?php 
                if ($row->menu_type == "link") {
                    echo $row->menu_link;
                } else {
                    echo site_url() . '/' . $row->menu_link;
                }
                ?>
</td>
				<td><?php 
                echo form_input(array('value' => $row->menu_order, 'name' => 'menuorder[]', 'class' => 'form-control input-sm', 'style' => 'width:50px;'));
                ?>
</td>
				<td>
				<?php 
                echo anchor('adminmenu/deletedetail/' . $row->id, 'Delete', array('class' => 'btn btn-sm btn-danger'));
                ?>
				</td>
			</tr>
			<?php 
                $this->menu_child($row->id, $level + 1);
            }
        }
    }
开发者ID:dimasedu,项目名称:decms,代码行数:35,代码来源:decmslib.php

示例7: form_output

    /**
     * Output form input
     *
     * @param	array
     * @param	array
     * @return	string
     */
    public function form_output($params)
    {
        $count = isset($params['custom']['limit']) ? $params['custom']['limit'] : 1;
        $this->CI->load->config('files/files');
        $value = !empty($params['value']) ? explode('|', $params['value']) : null;
        $out = '';
        if ($value and count($value) > 0) {
            $out .= '<ul class="list-group">';
            foreach ($value as $file) {
                $out .= '<li class="list-group-item">';
                $out .= '<span class="image_remove" data-file="' . $file . '">X</span>
						<a class="image_link" href="' . site_url('files/large/' . $file) . '" target="_break">
							<img src="' . site_url('files/thumb/' . $file) . '" height="100" />
						</a><br />';
                $out .= '</li>';
            }
            $out .= '</ul>';
            $out .= form_hidden($params['form_slug'], $params['value']);
        } else {
            $out .= form_hidden($params['form_slug'], null);
        }
        $options['name'] = $params['form_slug'] . '_file[]';
        $options['multiple'] = 'multiple';
        $out .= form_upload($options);
        //}
        return $out;
    }
开发者ID:jacksun101,项目名称:PyroAddons,代码行数:34,代码来源:field.multiimage.php

示例8: generateConfirm

 function generateConfirm($edit)
 {
     $dataInvalid = $this->isDataInvalid($edit);
     if ($this->formbuilder) {
         $this->formbuilder->bulk_set_answers($_POST[$this->event->formkey()]);
         $dataInvalid .= $this->formbuilder->answers_invalid();
     }
     if ($dataInvalid) {
         error_exit($dataInvalid . '<br>Please use your back button to return to the form, fix these errors, and try again.');
     }
     $output = para('Please confirm that this data is correct and click the submit button to proceed to the payment information page.');
     $output .= form_hidden('edit[step]', 'submit');
     $fields = array('Registration Status' => 'payment', 'Notes' => 'notes');
     $rows = array();
     foreach ($fields as $display => $column) {
         array_push($rows, array($display, form_hidden("edit[{$column}]", $edit[$column]) . check_form($edit[$column])));
     }
     $output .= form_group('Registration details', "<div class='pairtable'>" . table(null, $rows) . '</div>');
     if ($this->formbuilder) {
         $form = $this->formbuilder->render_viewable();
         $form .= $this->formbuilder->render_hidden();
         $output .= form_group('Registration answers', $form);
     }
     $output .= para(form_submit('submit'));
     return form($output);
 }
开发者ID:roboshed,项目名称:leaguerunner,代码行数:26,代码来源:edit.php

示例9: display_field

    function display_field($data)
    {
        $this->_field_includes();
        $this->EE->lang->loadfile('category_field');
        $group_id = $this->get_settings_prop('category_field_category_group_id');
        $display_type = $this->get_settings_prop('category_field_display_type');
        $hide_filter = $this->get_settings_prop('category_field_hide_filter', 'n');
        $hide_edit = $this->get_settings_prop('category_field_hide_edit', 'n');
        // If no group id select, exit and return message
        if ($group_id == '') {
            return lang('no_group_id');
        }
        $this->EE->cp->add_to_foot('
			<script>
				$(document).ready(function() {
					$("#sub_hold_field_' . $this->field_id . '").categoryField({
						fieldId			: ' . $this->field_id . ',
						categoryGroupId	: ' . $group_id . ',
						editText		: "' . lang('edit') . '",
						themesFolder	: "' . URL_THIRD_THEMES . '../cp_themes/",
						displayType		: ' . $display_type . ',
						hideEdit		: "' . $hide_edit . '",
						fieldName		: "' . $this->field_name . '"
					});
				});
			</script>');
        $html = form_hidden($this->field_name);
        if ($hide_filter != 'y') {
            $html .= '<input type="text" value="" id="cat_filter_group_' . $group_id . '" class="filter_input" placeholder="' . lang('filter_input_placeholder') . '"/>';
        }
        return $html;
    }
开发者ID:grimsmath,项目名称:lavillafdn,代码行数:32,代码来源:ft.category_field.php

示例10: comments

function comments($comments, $object_id, $object, $usernames, $format, $return = 'agilan/index')
{
    $string = "";
    $string .= "<ol class='comments'>";
    if (isset($comments[$object_id]) && count($comments[$object_id]) > 0) {
        foreach ($comments[$object_id] as $kk => $ll) {
            $CID = $ll->user_id;
            $CU = $usernames[$ll->user_id];
            $stamp = mysql_to_unix($ll->created);
            $string .= "<li><b>" . $CU . ":</b> <small>" . $ll->comment . "<br/>" . mdate($format, $stamp) . "</small></li>";
        }
    } else {
        $string .= nbs();
    }
    $string .= "<li class='last'>";
    $string .= form_open('comments/index');
    $input = array('name' => 'comment', 'id' => 'comment', 'size' => 35);
    $string .= form_input($input);
    $string .= form_hidden('object', $object);
    $string .= form_hidden('object_id', $object_id);
    $string .= form_hidden('return_url', $return);
    $string .= form_submit('add comment', 'comment');
    $string .= form_close();
    $string .= "</li>";
    $string .= "</ol>";
    echo $string;
}
开发者ID:Ahmad-Hilali,项目名称:agilan,代码行数:27,代码来源:social_pi.php

示例11: form_open

function form_open($action = '', $attributes = '', $hidden = array())
{
	$_ci = & get_instance();
	$_ci->load->library('form_validation');

	if ($attributes == '')
	{
		$attributes = 'method="post"';
	}

	$action = ( strpos($action, '://') === FALSE) ? $_ci->config->site_url($action) : $action;

	$form = '<form action="' . $action . '"';
	$form .= _attributes_to_string($attributes, TRUE);
	$form .= '>';

	if ($_ci->form_validation->has_nonce())
	{
		$value = set_value('nonce');
		if ($value == '')
		{
			$value = $_ci->form_validation->create_nonce();
		}

		$hidden['nonce'] = set_value('nonce', $value);
	}

	if (is_array($hidden) && count($hidden) > 0)
	{
		$form .= form_hidden($hidden);
	}

	return $form;
}
开发者ID:prolabs,项目名称:pyrocms,代码行数:34,代码来源:MY_form_helper.php

示例12: form_output

 /**
  * Output form input
  *
  * @param	array
  * @param	array
  * @return	string
  */
 public function form_output($params)
 {
     $this->CI->load->config('files/files');
     // Get the file
     if ($params['value']) {
         $current_file = $this->CI->db->where('id', $params['value'])->limit(1)->get('files')->row();
     } else {
         $current_file = null;
     }
     $out = '';
     if ($current_file) {
         $out .= '<div class="file_info"><span href="#" class="file_remove">X</span><a href="' . base_url('files/download/' . $current_file->id) . '">' . $current_file->name . '</a></div>';
     }
     // Output the actual used value
     if ($params['value']) {
         $out .= form_hidden($params['form_slug'], $params['value']);
     } else {
         $out .= form_hidden($params['form_slug'], 'dummy');
     }
     $options['name'] = $params['form_slug'];
     $options['name'] = $params['form_slug'] . '_file';
     $this->CI->type->add_js('file', 'filefield.js');
     $this->CI->type->add_css('file', 'filefield.css');
     return $out .= form_upload($options);
 }
开发者ID:rishikeshwalawalkar,项目名称:GetARide,代码行数:32,代码来源:field.file.php

示例13: form_open

 function form_open($action = '', $attributes = array(), $hidden = array())
 {
     $CI =& get_instance();
     $action = strpos($action, '://') === FALSE ? BASE . AMP . $action : $action;
     $form = '<form action="' . $action . '"';
     if (is_array($attributes)) {
         if (!isset($attributes['method'])) {
             $form .= ' method="post"';
         }
         foreach ($attributes as $key => $val) {
             $form .= ' ' . $key . '="' . $val . '"';
         }
     } else {
         $form .= ' method="post" ' . $attributes;
     }
     $form .= ">\n";
     if ($CI->config->item('secure_forms') == 'y') {
         if (!is_array($hidden)) {
             $hidden = array();
         }
         $hidden['XID'] = XID_SECURE_HASH;
     }
     if (is_array($hidden) and count($hidden > 0)) {
         $form .= form_hidden($hidden) . "\n";
     }
     return $form;
 }
开发者ID:rmdort,项目名称:adiee,代码行数:27,代码来源:EE_form_helper.php

示例14: form_open

 function form_open($action = '', $attributes = array(), $hidden = array())
 {
     $CI =& get_instance();
     if (strpos($action, '://') === FALSE && strpos($action, BASE) !== 0) {
         $action = BASE . AMP . $action;
     }
     $action = ee()->uri->reformat($action);
     $form = '<form action="' . $action . '"';
     if (is_array($attributes)) {
         if (!isset($attributes['method'])) {
             $form .= ' method="post"';
         }
         foreach ($attributes as $key => $val) {
             $form .= ' ' . $key . '="' . $val . '"';
         }
     } else {
         $form .= ' method="post" ' . $attributes;
     }
     $form .= ">\n";
     if (!bool_config_item('disable_csrf_protection')) {
         if (!is_array($hidden)) {
             $hidden = array();
         }
         $hidden['csrf_token'] = CSRF_TOKEN;
     }
     if (is_array($hidden) and count($hidden > 0)) {
         $form .= form_hidden($hidden) . "\n";
     }
     return $form;
 }
开发者ID:ayuinc,项目名称:laboratoria-v2,代码行数:30,代码来源:EE_form_helper.php

示例15: form_output

 /**
  * Output form input
  *
  * @param	array
  * @param	array
  * @return	string
  */
 public function form_output($params)
 {
     $this->CI->load->config('files/files');
     // Get the file
     $this->CI->db->limit(1);
     $this->CI->db->where('id', $params['value']);
     $db_obj = $this->CI->db->get('files');
     $out = '';
     if ($db_obj->num_rows() != 0) {
         // Div for the PyroCMS admin
         /*if( $this->CI->uri->segment(1) == 'admin' ):
         		
         			$out .= '<div style="float: left;">';
         			
         		endif;*/
         $out .= $this->_output_thumb($db_obj->row(), true) . br();
     } else {
         $out .= '';
     }
     // Output the actual used value
     if (is_numeric($params['value'])) {
         $out .= form_hidden($params['form_slug'], $params['value']);
     } else {
         $out .= form_hidden($params['form_slug'], 'dummy');
     }
     $options['name'] = $params['form_slug'];
     $options['name'] = $params['form_slug'] . '_file';
     //if( $this->CI->uri->segment(1) == 'admin' ): $out .= '</div>'; endif;
     return $out .= form_upload($options);
 }
开发者ID:gamchantoi,项目名称:sisfo-ft,代码行数:37,代码来源:field.image.php


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