• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP form_checkbox函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: display_settings

 /**
  * Display settings sub-form for this variable type
  *
  * @param	mixed	$var_id			The id of the variable: 'new' or numeric
  * @param	array	$var_settings	The settings of the variable
  * @return	array	
  */
 function display_settings($var_id, $var_settings)
 {
     // -------------------------------------
     //  Init return value
     // -------------------------------------
     $r = array();
     // -------------------------------------
     //  Build setting: options
     // -------------------------------------
     $options = $this->get_setting('options', $var_settings);
     $r[] = array($this->setting_label(lang('variable_options'), lang('variable_options_help')), form_textarea(array('name' => $this->input_name('options'), 'value' => $options, 'rows' => '7', 'cols' => '40', 'style' => 'width:75%')));
     // -------------------------------------
     //  Build setting: multiple?
     // -------------------------------------
     $multiple = $this->get_setting('multiple', $var_settings);
     $r[] = array($this->setting_label(lang('allow_multiple_items')), '<label class="low-checkbox">' . form_checkbox($this->input_name('multiple'), 'y', $multiple == 'y', 'class="low-allow-multiple"') . lang('allow_multiple_items_label') . '</label>');
     // -------------------------------------
     //  Build setting: separator
     // -------------------------------------
     $separator = $this->get_setting('separator', $var_settings);
     $r[] = array($this->setting_label(lang('separator_character')), $this->separator_select($separator));
     // -------------------------------------
     //  Build setting: multi interface
     // -------------------------------------
     $multi_interface = $this->get_setting('multi_interface', $var_settings);
     $r[] = array($this->setting_label(lang('multi_interface')), $this->interface_select($multi_interface));
     // -------------------------------------
     //  Return output
     // -------------------------------------
     return $r;
 }
开发者ID:kentonquatman,项目名称:iofa,代码行数:38,代码来源:vt.low_select.php


示例2: index

 public function index()
 {
     $offset = $this->general_lib->get_offset();
     $limit = $this->general_lib->get_limit();
     $total = $this->servis_mdl->count_all();
     $xdata['action'] = 'servis/search' . $this->_filter();
     $xdata['action_delete'] = 'servis/delete' . $this->_filter();
     $xdata['add_btn'] = anchor('servis/add', '<span class="glyphicon glyphicon-plus"></span> Tambah', array('class' => 'btn btn-success btn-sm'));
     $xdata['delete_btn'] = '<button id="delete-btn" class="btn btn-danger btn-sm"><span class="glyphicon glyphicon-trash"></span> Delete Checked</button>';
     $this->table->set_template(tbl_tmp());
     $head_data = array('nomor' => 'Nomor', 'nopol' => 'Kendaraan', 'tanggal' => 'Tanggal', 'tipe_nama' => 'Tipe', 'kilometer' => 'Kilometer', 'jumlah_satuan' => 'Jumlah Satuan', 'total_harga' => 'Total Harga');
     $heading[] = form_checkbox(array('id' => 'selectAll', 'value' => 1));
     $heading[] = '#';
     foreach ($head_data as $r => $value) {
         $heading[] = anchor('servis' . $this->_filter(array('order_column' => "{$r}", 'order_type' => $this->general_lib->order_type($r))), "{$value} " . $this->general_lib->order_icon("{$r}"));
     }
     $heading[] = 'Action';
     $this->table->set_heading($heading);
     $result = $this->servis_mdl->get()->result();
     $i = 1 + $offset;
     foreach ($result as $r) {
         $this->table->add_row(array('data' => form_checkbox(array('name' => 'check[]', 'value' => $r->id)), 'width' => '10px'), $i++, $r->nomor, $r->nopol, format_dmy($r->tanggal), $r->tipe_nama, $r->kilometer, array('data' => number_format($r->jumlah_satuan), 'align' => 'right'), array('data' => number_format($r->total_harga), 'align' => 'right'), anchor('servis/edit/' . $r->id . $this->_filter(), 'Edit') . "&nbsp;|&nbsp;" . anchor('servis/delete/' . $r->id . $this->_filter(), 'Delete', array('onclick' => "return confirm('you sure')")) . "&nbsp;|&nbsp;" . anchor('servis/print_detail/' . $r->id, 'Print', array('target' => '_blank')));
     }
     $xdata['table'] = $this->table->generate();
     $xdata['total'] = page_total($offset, $limit, $total);
     $config = pag_tmp();
     $config['base_url'] = site_url("servis" . $this->_filter());
     $config['total_rows'] = $total;
     $config['per_page'] = $limit;
     $this->pagination->initialize($config);
     $xdata['pagination'] = $this->pagination->create_links();
     $data['content'] = $this->load->view('servis_list', $xdata, true);
     $this->load->view('template', $data);
 }
开发者ID:adamprasetia,项目名称:ksk,代码行数:34,代码来源:servis.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: index

 public function index()
 {
     $offset = $this->general_lib->get_offset();
     $limit = $this->general_lib->get_limit();
     $total = $this->user_mdl->count_all();
     $xdata['action'] = 'user/search' . $this->_filter();
     $xdata['action_delete'] = 'user/delete' . $this->_filter();
     $xdata['add_btn'] = anchor('user/add', '<span class="glyphicon glyphicon-plus"></span> Tambah', array('class' => 'btn btn-success btn-sm'));
     $xdata['delete_btn'] = '<button id="delete-btn" class="btn btn-danger btn-sm"><span class="glyphicon glyphicon-trash"></span> Delete Checked</button>';
     $this->table->set_template(tbl_tmp());
     $head_data = array('fullname' => 'Fullname', 'username' => 'Username', 'level_name' => 'Level', 'ip_login' => 'Last IP Login', 'user_agent' => 'Last User Agent', 'date_login' => 'Last Login', 'status_name' => 'Status');
     $heading[] = form_checkbox(array('id' => 'selectAll', 'value' => 1));
     $heading[] = '#';
     foreach ($head_data as $r => $value) {
         $heading[] = anchor('user' . $this->_filter(array('order_column' => "{$r}", 'order_type' => $this->general_lib->order_type($r))), "{$value} " . $this->general_lib->order_icon("{$r}"));
     }
     $heading[] = 'Action';
     $this->table->set_heading($heading);
     $result = $this->user_mdl->get()->result();
     $i = 1 + $offset;
     foreach ($result as $r) {
         $this->table->add_row(array('data' => form_checkbox(array('name' => 'check[]', 'value' => $r->id)), 'width' => '10px'), $i++, $r->fullname, $r->username, $r->level_nama, $r->ip_login, $r->user_agent, $r->date_login, '<label class="label label-' . ($r->status_kode == 'ON' ? 'success' : 'danger') . '">' . $r->status_nama . '</label>', anchor('user/edit/' . $r->id . $this->_filter(), 'Edit') . "&nbsp;|&nbsp;" . anchor('user/delete/' . $r->id . $this->_filter(), 'Delete', array('onclick' => "return confirm('you sure')")));
     }
     $xdata['table'] = $this->table->generate();
     $xdata['total'] = page_total($offset, $limit, $total);
     $config = pag_tmp();
     $config['base_url'] = site_url("user" . $this->_filter());
     $config['total_rows'] = $total;
     $config['per_page'] = $limit;
     $this->pagination->initialize($config);
     $xdata['pagination'] = $this->pagination->create_links();
     $data['content'] = $this->load->view('user_list', $xdata, true);
     $this->load->view('template', $data);
 }
开发者ID:adamprasetia,项目名称:ksk,代码行数:34,代码来源:user.php


示例5: obtener_canciones

 function obtener_canciones($user)
 {
     //extraemos id usuario
     $this->db->select('id')->where('username', $user);
     $idUser = $this->db->get('usuarios')->result_array()[0]['id'];
     $this->db->select('id, nombre')->where('usuario', $idUser);
     //extraemos numero perfiles
     $perfiles = $this->db->get('perfiles');
     //$perfiles->num_rows();
     $songstable = "";
     //$result = "";
     //para cada perfil sacamos las canciones que estan en el
     foreach ($perfiles->result() as $perfil) {
         // echo $perfil->id;
         $this->table->set_heading('ID', 'Titulo', 'Artista', 'Album', 'Acciones');
         $this->table->set_caption($perfil->nombre);
         $canciones = $this->db->select('cancion_Id')->where('perfil_Id', $perfil->id)->get('cancionesperfiles');
         foreach ($canciones->result() as $cancion) {
             $rowCancion = $this->db->select('id, titulo, artista, album')->where('id', $cancion->cancion_Id)->get('canciones');
             foreach ($rowCancion->result() as $row) {
                 $links = anchor('canciones/edit/' . $row->id, 'Editar');
                 $links .= anchor('canciones/delete/' . $row->id, ' Borrar');
                 $this->table->add_row(form_checkbox('values[]', $row->id), $row->titulo, $row->artista, $row->album, $links);
             }
             //  $perfil->nombre;
         }
         //$this->table->set_caption($perfil->nombre);
         $songstable .= $this->table->generate();
     }
     $this->table->clear();
     //print_r($result);
     return $songstable;
 }
开发者ID:nuukcillo,项目名称:MusicBox-,代码行数:33,代码来源:canciones_model.php


示例6: display_settings

 /**
  * Display settings sub-form for this variable type
  *
  * @param      mixed     $var_id        The id of the variable: 'new' or numeric
  * @param      array     $var_settings  The settings of the variable
  * @return     array
  */
 function display_settings($var_id, $var_settings)
 {
     // -------------------------------------
     //  Init return value
     // -------------------------------------
     $r = array();
     // -------------------------------------
     //  Check current value from settings
     // -------------------------------------
     $rows = $this->get_setting('rows', $var_settings);
     // -------------------------------------
     //  Build settings for rows
     // -------------------------------------
     $r[] = array($this->setting_label(lang('variable_rows')), form_input(array('name' => $this->input_name('rows'), 'value' => $rows, 'maxlength' => '4', 'class' => 'x-small')));
     // -------------------------------------
     //  Build settings text_direction
     // -------------------------------------
     $dir_options = '';
     foreach (array('ltr', 'rtl') as $dir) {
         $dir_options .= '<label class="low-radio">' . form_radio($this->input_name('text_direction'), $dir, $this->get_setting('text_direction', $var_settings) == $dir) . ' ' . lang("text_direction_{$dir}") . '</label>';
     }
     $r[] = array($this->setting_label(lang('text_direction')), $dir_options);
     // -------------------------------------
     //  Build settings for code format
     // -------------------------------------
     $r[] = array($this->setting_label(lang('enable_code_format')), '<label class="low-checkbox">' . form_checkbox($this->input_name('code_format'), 'y', $this->get_setting('code_format', $var_settings)) . ' ' . lang('use_code_format') . '</label>');
     // -------------------------------------
     //  Return output
     // -------------------------------------
     return $r;
 }
开发者ID:thomasvandoren,项目名称:teentix-site,代码行数:38,代码来源:vt.low_textarea.php


示例7: fpbx_form_input_check

/**
 * Text Input Field With Enable/Disable Checkbox
 *
 * @access	public
 * @param	mixed
 * @param	string
 * @param	string
 * @param	string
 * @param	string
 * @param	bool
 * @return	string
 */
function fpbx_form_input_check($data = '', $value = '', $extra = '', $label = 'Enable', $disabled_value = 'DEFAULT', $check_enables = true)
{
    if (!is_array($data)) {
        $data['name'] = $data['id'] = $data;
    }
    if (!isset($data['id'])) {
        $data['id'] = $data['name'];
    }
    if (!isset($data['value'])) {
        $data['value'] = $value;
    }
    if (!empty($data['disabled'])) {
        $data['value'] = $disabled_value;
    }
    $cbdata['name'] = $data['name'] . '_cb';
    $cbdata['id'] = $data['id'] . '_cb';
    $cbdata['checked'] = isset($data['disabled']) ? !$data['disabled'] : true;
    $cbdata['data-disabled'] = $disabled_value;
    if ($check_enables) {
        $cbdata['class'] = "input_checkbox_toggle_false";
    } else {
        $cbdata['class'] = "input_checkbox_toggle_true";
        $cbdata['checked'] = !$cbdata['checked'];
    }
    return form_input($data) . form_checkbox($cbdata) . form_label($label, $cbdata['id']);
}
开发者ID:lidl,项目名称:framework,代码行数:38,代码来源:freepbx_helpers.php


示例8: build

 function build()
 {
     $output = "";
     $this->_getValue();
     switch ($this->status) {
         case "disabled":
         case "show":
             if (!isset($this->value)) {
                 $output = RAPYD_FIELD_SYMBOL_NULL;
             } elseif ($this->value == "") {
                 $output = "";
             } else {
                 $output = $this->value;
             }
             break;
         case "create":
         case "modify":
             $onchange = "";
             $onclick = "";
             if ($this->onchange != "") {
                 $onchange = ' onchange="' . $this->onchange . '"';
             }
             if ($this->onclick != "") {
                 $onclick = ' onclick="' . $this->onclick . '"';
             }
             $id = ' id="' . $this->name . '"';
             $output = form_checkbox($this->name, $this->true_value, $this->checked, $id . $onchange . $onclick) . $this->extra_output;
             break;
         case "hidden":
             $output = form_hidden($this->name, $this->value);
             break;
         default:
     }
     $this->output = $output;
 }
开发者ID:codethics,项目名称:proteoerp,代码行数:35,代码来源:checkbox.php


示例9: show

    public function show($options = array(), $data)
    {
        // dump($data);die;
        $mysql_table = end($this->ci->uri->segment_array());
        $path = site_url("lib_generic/method/forms/active_box/save_action");
        // die($path);
        //todo tirar de alert e colocar num bonito
        $js = <<<EOT
\t\t\t\$(".active_box_plugin").click(function(){
\t\t\t\tdata_send = {
\t\t\t\t\t"field_name" : \$(this).attr("active_box_field"),
\t\t\t\t\t"pk"\t\t: \$(this).attr("active_box_pk"),
\t\t\t\t\t"pk_val"\t  : \$(this).attr("active_box_id"),
\t\t\t\t\t"checked"\t  : \$(this).attr("checked")
\t\t\t\t};

\t\t\t\t\$.getJSON('{$path}', data_send, function(data) {
\t\t\t\t\t// alert(JSON.stringify(data));
\t\t\t\t});

\t\t\t});
\t\t\t\t\t
EOT;
        // Assets::add_js($js,"inline",true);
        $data_send = array('value' => $data['value'], 'checked' => $data['value'] == "1", "active_box_id" => $data['pk'], "active_box_field" => $data['field_name'], "active_box_pk" => $data['pk_name'], "data_path" => $path, "data_table" => $mysql_table, "class" => "active_box_plugin");
        // dump($data);die;
        return form_checkbox($data_send);
    }
开发者ID:caina,项目名称:pando,代码行数:28,代码来源:active_box.php


示例10: display_input

 /**
  * Display input field for regular user
  *
  * @param	int		$var_id			The id of the variable
  * @param	string	$var_data		The value of the variable
  * @param	array	$var_settings	The settings of the variable
  * @return	string
  */
 function display_input($var_id, $var_data, $var_settings)
 {
     // -------------------------------------
     //  Check current value from settings
     // -------------------------------------
     $options = $this->get_setting('options', $var_settings);
     $options = $this->explode_options($options);
     // -------------------------------------
     //  Prep current data
     // -------------------------------------
     $current = explode($this->separators[$this->get_setting('separator', $var_settings)], $var_data);
     // -------------------------------------
     //  Init return value
     // -------------------------------------
     $r = '';
     // -------------------------------------
     //  Build checkboxes
     // -------------------------------------
     foreach ($options as $key => $val) {
         $checked = in_array($key, $current) ? TRUE : FALSE;
         $r .= '<label class="low-checkbox">' . form_checkbox("var[{$var_id}][]", $key, $checked) . htmlspecialchars($val) . '</label>';
     }
     // -------------------------------------
     //  Return checkboxes
     // -------------------------------------
     return $r;
 }
开发者ID:kentonquatman,项目名称:iofa,代码行数:35,代码来源:vt.low_checkbox_group.php


示例11: list_node_image_terms

function list_node_image_terms()
{
    global $term_dir;
    $files = file_scan_directory($term_dir, '.*_(full|summ).*');
    if (!count($files)) {
        print 'No node_images for terms; update script does not support node images.';
        return;
    }
    $header = array(t('Term'), t('Image'), t('Migrate'), t('Delete'));
    foreach ($files as $image) {
        $image->tid = migrate_term_image_get_tid($image->name);
        list($image->width, $image->height) = getimagesize($image->filename);
        if ($image->height > 100) {
            $image->height = $image->height / 2;
            $image->width = $image->width / 2;
        }
        $img = "<img src='{$image->filename} ' width='{$image->width}' height='{$image->height}' />";
        $term = taxonomy_get_term($image->tid);
        $t_i_image = db_fetch_object(db_query('SELECT path FROM {term_image} WHERE tid = %d', $image->tid));
        if ($t_i_image) {
            $term->has_image = true;
        }
        unset($t_i_image);
        $item = $term->name . '($image->name)';
        $migrate = form_checkbox(NULL, "migrate][" . $image->name, 1, $term->has_image ? 0 : 1);
        $delete = form_checkbox(NULL, "delete][" . $image->name, 1, $term->has_image ? 1 : 0);
        $rows[] = array('data' => $item, $img, $migrate, $delete);
    }
    $table = theme('table', $header, $rows);
    $table .= '<em>Checked rows do not have an existing taxonomy_image entry</em><br/>';
    $form = form($table . form_submit('Migrate'));
    print $form;
}
开发者ID:nabuur,项目名称:nabuur-d5,代码行数:33,代码来源:update_term_images.php


示例12: get_all_sites_html

 function get_all_sites_html()
 {
     $this->_secure();
     $result = '';
     $url_params = $this->uri->uri_to_assoc(3);
     $user = $this->session->all_userdata();
     $this->load->model('model_sites');
     $sites = $this->model_sites->get_records(array('client_id' => $user['client_id'], 'site_displayed_flag' => '1'));
     if (!empty($sites)) {
         $columns = 1;
         if (isset($url_params['columns']) && !empty($url_params['columns'])) {
             $columns = $url_params['columns'];
         }
         $sites_per_column = ceil(sizeof($sites) / $columns);
         $site_counter = 0;
         foreach ($sites as $site) {
             if ($site_counter % $sites_per_column == 0) {
                 if ($site_counter > 0) {
                     $result .= '</div>';
                 }
                 $result .= '<div class="all_sites_column">';
             }
             $id = 'all_site_id_' . $site['site_id'];
             $value = $site['site_id'];
             $field_data = array('name' => 'data[site_id][]', 'id' => $id, 'class' => 'all_site');
             $result .= '<div class="form_field">' . form_checkbox($field_data, $value) . '<label for="' . $id . '" class="tooltip" title="' . $site['site_title'] . '">' . teaser($site['site_title'], 30) . '</label></div>';
             $site_counter++;
         }
         $result .= '</div>';
     }
     $data = array();
     $data['any'] = $result;
     $data['action_view'] = 'misc/any';
     $this->load->view('layouts/blank', $data);
 }
开发者ID:GordonTees,项目名称:masterdash,代码行数:35,代码来源:html.php


示例13: lists_view

/**
 * lists页面的view代码
 */
function lists_view($filter, $email_value, $begin_value, $rows, $page_html)
{
    //目前是写死的,到时候应该是在controller中将逻辑写好,在view层与页面控件结合
    $group1 = matrix_a_btn(array('href' => '#', 'text' => '未完成(100)'), 'info', '');
    $group2 = matrix_a_btn(array('href' => '#', 'text' => '已完成(2)'), 'info', '');
    $group3 = matrix_a_btn(array('href' => '#', 'text' => '已退货(21)'), 'info', 'active');
    $btn_groups = array(array($group1, $group2, $group3));
    //超链接按钮
    $buttons = array(matrix_a_btn(array('href' => base_url('user/add'), 'text' => '添加用户')));
    //过滤条件
    $options = array(0 => '包含', 1 => '等于', 2 => '开头', 3 => '完与');
    $select = form_dropdown('filter', $options, $filter);
    //单选下拉框
    $select = matrix_select($select, true);
    $email_attr = quick_input_attr('email', 'span3', '请输入邮箱');
    $email = form_input($email_attr, $email_value);
    $begin_attr = quick_input_attr('begin', 'span2', '开始注册时间');
    $begin = my97DatePicker($begin_attr, $begin_value);
    $inputs = array(array($select, $email), array($begin));
    //table列表
    //设置表头 排序的icon可以根据逻辑做修改 这里是写死的
    $ths = array(table_th(form_checkbox(), '5%'), table_th(table_a('#', '<i class="icon-sort"></i>邮箱'), '35%'), table_th(table_a('#', '<i class="icon-caret-down"></i>角色'), '20%'), table_th('上次登录时间', '20%'), table_th('操作', '20%'));
    $trs = array();
    foreach ($rows as $key => $row) {
        $a1 = table_a(base_url('user/add', array('id' => $row['id'])), '查看');
        $attrs = array('data-id' => $row['id'], 'data-name' => "xx", 'class' => 'warning', 'data-href' => base_url('user/add'), 'data-prompt' => '您确定这个订单吗?');
        $a2 = table_a_btn($attrs, '删除');
        $tds = array(table_format_td(form_checkbox()), table_format_td($row['email']), table_format_td(matrix_badge(array('text' => $row['role']))), table_format_td($row['time']), table_format_td($a1 . $a2));
        $trs[] = table_format_tr($tds, array('data-sort' => $key, 'data-id' => $row['id']));
    }
    $table_attrs = array('data-type' => 'dragsort', 'data-ajax' => 'ajax/sort.php', 'data-td' => $row['id']);
    $table = table_format($ths, $trs, $page_html, $table_attrs);
    return query_form($inputs, $buttons, $btn_groups) . $table;
}
开发者ID:pwstrick,项目名称:grape,代码行数:37,代码来源:userHelper.php


示例14: random_pages_widget_form

function random_pages_widget_form($num = 1)
{
    $widget = 'random_pages_widget_' . $num;
    // имя для формы и опций = виджет + номер
    // получаем опции
    $options = mso_get_option($widget, 'plugins', array());
    if (!isset($options['header'])) {
        $options['header'] = '';
    }
    if (!isset($options['count'])) {
        $options['count'] = 3;
    }
    if (!isset($options['page_type'])) {
        $options['page_type'] = 'blog';
    }
    if (!isset($options['page_content'])) {
        $options['page_content'] = false;
    }
    // вывод самой формы
    $CI =& get_instance();
    $CI->load->helper('form');
    $form = mso_widget_create_form(t('Заголовок'), form_input(array('name' => $widget . 'header', 'value' => $options['header'])), '');
    $form .= mso_widget_create_form(t('Количество'), form_input(array('name' => $widget . 'count', 'value' => $options['count'])), '');
    $form .= mso_widget_create_form(t('Тип страниц'), form_input(array('name' => $widget . 'page_type', 'value' => $options['page_type'])), '');
    $form .= mso_widget_create_form(' ', form_checkbox(array('name' => $widget . 'page_content', 'checked' => $options['page_content'], 'value' => 'page_content')) . ' ' . t('Показывать содержимое'), '');
    return $form;
}
开发者ID:Kmartynov,项目名称:cms,代码行数:27,代码来源:index.php


示例15: index

 public function index()
 {
     $offset = $this->general_lib->get_offset();
     $limit = $this->general_lib->get_limit();
     $total = $this->model->count_all();
     $xdata['action'] = $this->section_master . '/search' . $this->_filter();
     $xdata['action_delete'] = $this->section_master . '/delete' . $this->_filter();
     $xdata['add_btn'] = anchor($this->section_master . '/add', '<span class="glyphicon glyphicon-plus"></span> Tambah', array('class' => 'btn btn-success btn-sm'));
     $xdata['delete_btn'] = '<button id="delete-btn" class="btn btn-danger btn-sm"><span class="glyphicon glyphicon-trash"></span> Delete Checked</button>';
     $this->table->set_template(tbl_tmp());
     $head_data = array('kode' => 'Kode', 'nama' => 'Nama');
     $heading[] = form_checkbox(array('id' => 'selectAll', 'value' => 1));
     $heading[] = '#';
     foreach ($head_data as $r => $value) {
         $heading[] = anchor($this->section_master . $this->_filter(array('order_column' => "{$r}", 'order_type' => $this->general_lib->order_type($r))), "{$value} " . $this->general_lib->order_icon("{$r}"));
     }
     $heading[] = 'Action';
     $this->table->set_heading($heading);
     $result = $this->model->get()->result();
     $i = 1 + $offset;
     foreach ($result as $r) {
         $this->table->add_row(array('data' => form_checkbox(array('name' => 'check[]', 'value' => $r->id)), 'width' => '10px'), $i++, $r->kode, $r->nama, anchor($this->section_master . '/edit/' . $r->id . $this->_filter(), 'Edit') . "&nbsp;|&nbsp;" . anchor($this->section_master . '/delete/' . $r->id . $this->_filter(), 'Delete', array('onclick' => "return confirm('you sure')")));
     }
     $xdata['table'] = $this->table->generate();
     $xdata['total'] = page_total($offset, $limit, $total);
     $config = pag_tmp();
     $config['base_url'] = site_url($this->section_master . $this->_filter());
     $config['total_rows'] = $total;
     $config['per_page'] = $limit;
     $this->pagination->initialize($config);
     $xdata['pagination'] = $this->pagination->create_links();
     $data['content'] = $this->load->view('master_list', $xdata, true);
     $this->load->view('template', $data);
 }
开发者ID:adamprasetia,项目名称:ksk,代码行数:34,代码来源:master.php


示例16: form_output

 /**
  * Output form input
  *
  * @param	array
  * @param	array
  * @return	string
  */
 public function form_output($params, $entry_id, $field)
 {
     $return = null;
     $choices = $this->_choices_to_array($params['custom']['choice_data'], $params['custom']['choice_type'], $field->is_required);
     // Put it into a drop down
     if ($params['custom']['choice_type'] == 'dropdown') {
         $return = form_dropdown($params['form_slug'], $choices, $params['value'], 'id="' . $params['form_slug'] . '"');
     } else {
         // If these are checkboxes, then break up the vals
         if ($params['custom']['choice_type'] == 'checkboxes') {
             // We may have an array from $_POST or a string
             // from the data
             if (is_string($params['value'])) {
                 $vals = explode("\n", $params['value']);
             } else {
                 $vals = $params['value'];
             }
             foreach ($vals as $k => $v) {
                 $vals[$k] = trim($v);
             }
         }
         $return .= '<ul class="form_list">';
         foreach ($choices as $choice_key => $choice) {
             if ($params['custom']['choice_type'] == 'radio') {
                 $params['value'] == $choice_key ? $selected = TRUE : ($selected = FALSE);
                 $return .= '<li><label>' . form_radio($params['form_slug'], $choice_key, $selected) . '&nbsp;' . $choice . '</label></li>';
             } else {
                 in_array($choice_key, $vals) ? $selected = TRUE : ($selected = FALSE);
                 $return .= '<li><label>' . form_checkbox($params['form_slug'] . '[]', $choice_key, $selected, 'id="' . $choice_key . '"') . '&nbsp;' . $choice . '</label></li>';
             }
         }
         $return .= '</ul>';
     }
     return $return;
 }
开发者ID:phonglanpls,项目名称:jz-proj-2012,代码行数:42,代码来源:field.choice.php


示例17: list_cols

function list_cols($cols = false, $purs = false)
{
    if ($cols === false) {
        return "<li>nothing...</li>";
    }
    if ($purs and is_string($purs)) {
        $purs = explode(",", $purs);
    }
    $list = "";
    foreach ($cols as $k => $v) {
        $purview = "";
        if (is_array($v['purview']) and $v['purview']) {
            foreach ($v['purview'] as $pk => $pv) {
                $checked = false;
                if ($purs and is_array($purs) and in_array($pv['uri'], $purs)) {
                    $checked = true;
                }
                $purview .= '<label class="checkbox">' . form_checkbox('purview[]', $pv['uri'], $checked) . $pv['title'] . '</label>';
            }
        }
        $more = "";
        if ($v['more'] and is_array($v['more'])) {
            $more .= list_cols($v['more'], $purs);
        }
        $list .= '<li data-cid="' . $v['cid'] . '" > ' . '<input type="checkbox" class="checkline" /> <span  class="depth' . $v['cdepth'] . '">' . $v['ctitle'] . '</span>' . '<div class="btn-group pull-right form-inline">' . $purview . '</div>' . $more . ' </li>';
    }
    return $list;
}
开发者ID:PoppyLi,项目名称:PCMS,代码行数:28,代码来源:manager_group.php


示例18: products_list

 public function products_list()
 {
     ci()->load->model('admin/categories_model');
     ci()->page_title(lang('products_list'), lang('products_list'));
     $options = array('order_by' => 'product_order', 'direction' => 'ASC', 'limit' => 10, 'offset' => '0', 'iTotalRecords' => '0', 'iTotalDisplayRecords' => '0');
     $col_map = array('product_order', 'product_id', 'product_title', 'cat_id', 'regular_price');
     $categories = ci()->categories_model->get_sorted_cats_select();
     /* Ordering */
     //		if (1==1 or ($order_by = ci()->input->get('iSortCol_0')) !== FALSE)
     if (($order_by = ci()->input->get('iSortCol_0')) !== FALSE) {
         if (isset($col_map[$order_by])) {
             $options['order_by'] = $col_map[$order_by];
             $options['dir'] = ci()->input->get('sSortDir_0');
             if ($col_map[$order_by] == 'cat_id') {
                 $options['join']['table'] = 'categories c';
                 $options['join']['cond'] = ' products.cat_id=c.cat_id';
                 $options['join']['type'] = 'left';
                 $options['order_by'] = 'cat_name';
             }
         }
         $options['limit'] = ci()->input->get_post('perpage') ? (int) ci()->input->get_post('perpage') : 10;
         $options['offset'] = (int) ci()->input->get_post('iDisplayStart');
         $vars['sEcho'] = (int) ci()->input->get_post('sEcho');
         $get = ci()->input->get_post('keyword');
         if ($gr = ci()->input->get_post('cat_id')) {
             $options['where']['products.cat_id'] = $gr;
         }
         if (!ci()->input->get_post('exact_match')) {
             $options['custom'] = "(product_title like '%{$get}%' or product_description like '%{$get}%' or product_ingredients like '%{$get}%')";
         } else {
             $options['custom'] = "(product_title = '{$get}' or product_description = '{$get}' or product_ingredients = '{$get}')";
         }
         $ajax = TRUE;
     }
     $vars['default_sort'] = array(0, 'asc');
     $vars['non_sortable_columns'] = array(5, 6, 7);
     $vars['perpage_select_options'] = array('10' => '10 ' . lang('results'), '25' => '25 ' . lang('results'), '50' => '50 ' . lang('results'), '75' => '75 ' . lang('results'), '100' => '100 ' . lang('results'), '150' => '150 ' . lang('results'));
     $vars['aaData'] = array();
     $products = ci()->_model->get($options);
     $options['count'] = TRUE;
     $vars['iTotalRecords'] = $vars['iTotalDisplayRecords'] = ci()->_model->get($options);
     $vars['perpage'] = $options['limit'];
     $c = 0;
     foreach ($products as $v) {
         $vars['aaData'][] = array('<span class="ui-icon ui-icon-arrowthick-2-n-s" trid="s_' . $v['product_id'] . '_' . $v['product_order'] . '"></span>' . form_hidden("product_order[{$v['product_id']}]", $v['product_order']), $v['product_id'], "<a href='{$this->_view_base}edit_product?product_id={$v['product_id']}'> {$v['product_title']} </a>", @$categories[$v['cat_id']], $v['regular_price'], '<a href="' . $this->_view_base . 'edit_product?product_id=' . $v['product_id'] . '">' . lang('edit') . '</a>', '<a href="' . $this->_view_base . 'remove_product?product_id=' . $v['product_id'] . '" class="delete">' . lang('delete') . '</a>', form_checkbox('bulk[]', $v['product_id'], '', 'class="bulk"'));
     }
     $vars['categories'] = ci()->categories_model->get_sorted_cats_select();
     if (!@$ajax) {
         $js = $this->_datatables_js($this->_view_base . 'products_list', $vars['non_sortable_columns'], $vars['default_sort'], $options['limit']);
         $vars['js'] = $js;
         $vars['data'] = $products;
     } else {
         ci()->output->send_ajax_response($vars);
     }
     ci()->javascript->output(ci()->load->view($this->_view_base . 'javascript/products.js', '', true));
     ci()->javascript->compile();
     ci()->load->view($this->_view_base . 'products', $vars);
 }
开发者ID:alexhava,项目名称:elixirjuice,代码行数:58,代码来源:products.php


示例19: ractivo

 function ractivo($cobrado, $numero)
 {
     if ($cobrado == 'S') {
         $retorna = array('name' => $numero, 'id' => $cobrado, 'value' => 'accept', 'checked' => TRUE);
     } else {
         $retorna = array('name' => $numero, 'id' => $cobrado, 'value' => 'accept', 'checked' => FALSE);
     }
     return form_checkbox($retorna);
 }
开发者ID:enderochoa,项目名称:tortuga,代码行数:9,代码来源:repotra.php


示例20: ShiftEntry_edit_view

该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP form_checkbox_cell函数代码示例发布时间:2022-05-15
下一篇:
PHP form_button_submit函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap