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


PHP grocery_CRUD::render方法代码示例

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


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

示例1: index

    public function index()
    {
        //$data['main_content'] = 'login_form';
        //$this->load->view('includes/template',$data);
        //$this->load->view('admin/configuration');
        //$this->load->view('admin/homepage');
        $crud = new grocery_CRUD();
        $crud->set_theme('datatables');
        $crud->set_table('ips_disposition');
        $crud->set_subject('Disposition');
        $crud->required_fields('NAME');
        $crud->columns('NAME', 'DISABLE');
        $crud->fields('NAME');
        // $crud->unset_add();
        // $crud->unset_edit();
        $crud->unset_delete();
        $crud->set_lang_string('insert_success_message', 'Your data has been successfully stored into the database.<br/>Please wait while you are redirecting to the list page.
			<script type="text/javascript">
			window.location = "' . site_url('admin/disposition') . '";
			</script>
			<div style="display:none">
			');
        $crud->callback_after_insert(array($this, 'disposition_generation'));
        $output = $crud->render();
        // $this->grocery_crud->set_table('ips_login');
        // $output = $this->grocery_crud->render();
        $this->_example_output($output);
    }
开发者ID:selva316,项目名称:trackingtool,代码行数:28,代码来源:disposition.php

示例2: administracion

 function administracion()
 {
     if (!$this->tank_auth->is_logged_in()) {
         redirect('/auth/login/');
     }
     try {
         /* Creamos el objeto */
         $crud = new grocery_CRUD();
         /* Seleccionamos el tema */
         $crud->set_theme('flexigrid');
         /* Seleccionmos el nombre de la tabla de nuestra base de datos*/
         $crud->set_table('method');
         /* Le asignamos un nombre */
         $crud->set_subject('Metodo');
         /* Asignamos el idioma español */
         $crud->set_language('spanish');
         /* Aqui le decimos a grocery que estos campos son obligatorios */
         $crud->required_fields('MethodID', 'Description');
         /* Aqui le indicamos que campos deseamos mostrar */
         $crud->columns('MethodID', 'Description');
         $crud->display_as('MethodID', 'ID');
         $crud->display_as('Description', 'Descripci&oacuten');
         /* Generamos la tabla */
         $output = $crud->render();
         /* La cargamos en la vista situada en */
         $this->load->view('Method/administracion', $output);
     } catch (Exception $e) {
         /* Si algo sale mal cachamos el error y lo mostramos */
         show_error($e->getMessage() . ' --- ' . $e->getTraceAsString());
     }
 }
开发者ID:aloewens,项目名称:vacan,代码行数:31,代码来源:Method.php

示例3: get_crud_propuesta

 public function get_crud_propuesta()
 {
     $this->config->load('grocery_crud');
     $this->config->set_item('grocery_crud_dialog_forms', true);
     $crud = new grocery_CRUD();
     $crud->set_theme('datatables2');
     $crud->set_relation('id_periodo', 'gp_periodo', 'siglas');
     $crud->set_relation('id_departamento', 'gp_departamentos', 'nombre_depart', array('estado_dep' => '1'));
     $crud->set_relation('id_persona', 'gp_persona', '{nombres} {apellidos}');
     $crud->display_as('id_periodo', 'Periodo')->display_as('id_departamento', 'Departamento')->display_as('id_persona', 'Usuario');
     // $crud->set_relation('id_persona', 'gp_tipopersona', 'typo_persona');
     //$crud->set_relation('id_estado', 'gp_estados', 'valor');
     $crud->callback_column('estado', array($this, 'color_estado'));
     $crud->callback_column('tipo_persona', array($this, 'tipo_persona'));
     $crud->callback_column('asignacion_tutor', array($this, 'asigna_tutor'));
     $crud->callback_column('tutor', array($this, 'view_tutor'));
     $crud->callback_column('historial', array($this, 'get_historial'));
     $cols = array('titulo', 'contenido', 'id_periodo', 'id_departamento', 'id_persona', 'tipo_persona', 'fecha_post', 'estado', 'tutor', 'asignacion_tutor', 'historial');
     $crud->columns2($cols);
     $crud->set_table('gp_propuesta');
     $crud->set_subject('Tesis');
     $crud->unset_add()->unset_delete()->unset_edit();
     $output = $crud->render();
     $this->load->view('crud/crud_view_datatable', $output);
 }
开发者ID:RooseveltJavier,项目名称:Proyecto,代码行数:25,代码来源:crt_propuestas.php

示例4: index

 public function index($categoryid = 0)
 {
     $session_data = $this->session->userdata('logged_in');
     $data['username'] = $session_data['username'];
     $data['cat_id'] = $categoryid;
     //              $form_subject = ($categoryid==0 ? "Category" : "Sub Category");
     if ($categoryid == 0) {
         $form_subject = "Category";
         $data['cat_title'] = "Categories";
     } else {
         $this->category->getTitle($categoryid);
         $data['cat_title'] = $this->category->getTitle($categoryid) . " - Sub Categories";
         $form_subject = "Sub Category";
     }
     $crud = new grocery_CRUD();
     $crud->set_table('dbx_categories');
     $crud->where('pid', $categoryid);
     $crud->set_subject($form_subject);
     $crud->required_fields('title');
     $crud->columns('title');
     $crud->callback_column('title', array($this, 'link_title'));
     $crud->set_rules('title', 'Title', 'trim|required|xss_clean|is_unique[dbx_categories.title]');
     $crud->add_action('Sub Categories', '', '', 'cat-icon', array($this, 'goto_sub'));
     $crud->fields('title', 'desc', 'published', 'type', 'pid', 'ownerid', 'created_date');
     $crud->field_type('pid', 'hidden', $categoryid);
     $crud->field_type('published', 'dropdown', array('0' => 'No', '1' => 'Yes'));
     $crud->field_type('type', 'dropdown', array('C' => 'Celebrity', 'M' => 'Movie', 'P' => 'Parent'));
     $crud->change_field_type('ownerid', 'invisible');
     $crud->change_field_type('created_date', 'invisible');
     $crud->callback_before_insert(array($this, 'before_insert'));
     $output = $crud->render($data);
     $this->load->view('header_view', $data);
     $this->load->view('categories_view', $output);
     $this->load->view('footer_view', $data);
 }
开发者ID:sali141,项目名称:bportal,代码行数:35,代码来源:categories.php

示例5: index

 public function index()
 {
     try {
         // General
         $crud = new grocery_CRUD();
         $crud->set_language("french");
         $crud->set_theme('bootstrap');
         $crud->set_table('sos_gen_frequence');
         $crud->set_subject('Fréquence');
         //relations
         //Master/child relations
         //Visual
         $crud->columns('name_frequence');
         $crud->display_as('name_frequence', 'Fréquence');
         $crud->order_by('name_frequence', 'desc');
         //unsets
         //Requireds
         $crud->required_fields('name_frequence');
         //Callbacks
         //field Types
         // Actions
         // Renders
         $output = $crud->render();
         $menu = new stdClass();
         $menu->n1 = true;
         $menu->lien3_3_1 = false;
         $menu->status = $this->session->userdata('status');
         $header = $this->navigation->home_f($menu);
         $data = array('output' => $output, 'header' => $header);
         $this->_example_output($data);
     } catch (Exception $e) {
         show_error($e->getMessage() . ' --- ' . $e->getTraceAsString());
     }
 }
开发者ID:simplonco,项目名称:sos_femmes,代码行数:34,代码来源:frequence.php

示例6: index

 public function index()
 {
     $crud = new grocery_CRUD();
     $crud->set_table('principal')->columns('name', 'email', 'address', 'zipcode', 'city', 'state', 'country', 'telp1', 'telp2', 'npwp', 'siup', 'pbf', 'pbak', 'fak')->display_as('npwp', 'NPWP')->display_as('name', 'Nama Prinsipal')->display_as('address', 'Alamat')->display_as('zipcode', 'Kode Pos')->display_as('city', 'Kota')->display_as('state', 'Provinsi')->display_as('country', 'Negara')->display_as('telp1', 'Telp 1')->display_as('telp2', 'Telp 2')->display_as('siup', 'SIUP')->display_as('pbf', 'PBF')->display_as('pbak', 'PBAK')->display_as('fak', 'FAK')->fields('name', 'email', 'address', 'zipcode', 'city', 'state', 'country', 'telp1', 'telp2', 'npwp', 'siup', 'pbf', 'pbak', 'fak')->required_fields('name', 'address', 'city', 'state', 'country', 'telp1')->set_rules('email', 'Email', 'valid_email')->unset_read();
     $output = $crud->render();
     $this->render($output);
 }
开发者ID:awalinyudhana,项目名称:medikasarana,代码行数:7,代码来源:Principal.php

示例7: historial

 function historial()
 {
     if ($this->session->userdata('is_logged_in')) {
         $crud = new grocery_CRUD();
         //-> Identifico el ID del Cliente
         $crud->set_table('dolar_hoy');
         //->
         $crud->set_theme('datatables');
         $crud->set_language('spanish');
         // Display As
         $crud->unset_add();
         //-> Columnas
         $crud->columns('cambio', 'fecha', 'registrado_por', 'registrado_fecha', 'registrado_hora');
         // Relaciones
         ##
         //-> Renderizar
         $output = $crud->render();
         $data['titulo'] = "DOLAR HISTORIAL";
         $this->load->view('include/head', $output);
         $this->load->view('include/header', $data);
         $this->load->view('admin/output');
         $this->load->view('admin/librerias');
         $this->load->view('include/footer', $data);
     } else {
         $this->load->view('admin/login');
     }
 }
开发者ID:Juchiha,项目名称:mandala,代码行数:27,代码来源:dolar.php

示例8: administration

 function administration()
 {
     try {
         $crud = new grocery_CRUD();
         $crud->set_theme('flexigrid');
         $crud->set_table('news');
         $crud->set_subject('Noticias');
         $crud->set_language('spanish');
         $crud->unset_export();
         $crud->columns('title', 'author', 'summary', 'date_time', 'active');
         $crud->required_fields('title', 'author', 'fk_source', 'date_time', 'priority', 'category', 'tags');
         //            $crud->add_fields('title', 'author', 'image', 'footer_text', 'date_time', 'url', 'summary', 'text', 'fk_source', 'priority', 'active', 'category', 'tags', 'img');
         $crud->set_relation('fk_source', 'sources', 'name');
         $crud->set_relation_n_n('category', 'news_categories', 'categories', 'fk_news', 'fk_category', 'category');
         $crud->set_relation_n_n('tags', 'news_tags', 'tags', 'fk_news', 'fk_tag', 'tag');
         $crud->set_field_upload('image', 'assets/uploads/news/');
         $crud->display_as('title', 'Título')->display_as('summary', 'Sumario')->display_as('text', 'Texto')->display_as('author', 'Autor')->display_as('date_time', 'Fecha')->display_as('active', 'Estado')->display_as('comment_url', 'URL')->display_as('comment_count', 'Comentarios')->display_as('category', 'Categoría')->display_as('tags', 'Palabras Claves')->display_as('image', 'Imagen principal')->display_as('priority', 'Prioridad')->display_as('fk_source', 'Fuente')->display_as('img', 'Imágenes Adicionales')->display_as('footer_text', 'Texto de imagen');
         $crud->set_relation_n_n('img', 'news_image', 'images', 'fk_news', 'fk_image', 'image');
         //            $crud->set_field_upload('img', 'assets/uploads/news/');
         //            $crud->set_field_upload('img', 'uploads/news/');
         //            $crud->callback_add_field('img', array($this, 'add_field_image_callback'));
         //            $crud->callback_edit_field('img', array($this, 'edit_field_image_callback'));
         /* Generamos la tabla */
         //            $crud->callback_after_insert(array($this, 'after_insert'));
         //            $crud->callback_before_delete(array($this, 'before_delete_log'));
         //            $crud->callback_after_update(array($this, 'after_update_log'));
         //
         $output = $crud->render();
         $this->load->view('includes/template', $output);
     } catch (Exception $e) {
         /* Si algo sale mal cachamos el error y lo mostramos */
         show_error($e->getMessage() . ' --- ' . $e->getTraceAsString());
     }
 }
开发者ID:jorgemunoz8807,项目名称:admin_portal,代码行数:34,代码来源:news.php

示例9: index

 public function index()
 {
     $crud = new grocery_CRUD();
     $crud->set_table('bank_info')->columns('id_principal', 'bank_name', 'bank_account', 'bank_beneficiary_name', 'bank_city', 'bank_branch')->display_as('id_principal', 'Nama Prinsipal')->display_as('bank_name', 'Nama Bank')->display_as('bank_account', 'No Rekening')->display_as('bank_beneficiary_name', 'Nama Rekening')->display_as('bank_city', 'Kota')->display_as('bank_branch', 'Cabang')->set_relation('id_principal', 'principal', 'name')->fields('id_principal', 'bank_name', 'bank_account', 'bank_beneficiary_name', 'bank_city', 'bank_branch')->required_fields('id_principal', 'bank_account', 'bank_beneficiary_name')->unset_read();
     $output = $crud->render();
     $this->render($output);
 }
开发者ID:awalinyudhana,项目名称:medikasarana,代码行数:7,代码来源:Bank.php

示例10: index

 public function index()
 {
     $crud = new grocery_CRUD();
     $crud->set_table('purchase_order')->columns('id_purchase_order', 'id_principal', 'id_staff', 'status_ppn', 'date', 'due_date', 'total', 'dpp', 'ppn', 'discount_price', 'grand_total')->display_as('id_purchase_order', 'No Faktur')->display_as('status_ppn', 'Status PPn')->display_as('id_principal', 'Principal')->display_as('id_staff', 'Staff')->display_as('date', 'Tanggal Transaksi')->display_as('due_date', 'Jatuh Tempo')->display_as('discount_price', 'Discount')->display_as('grand_total', 'Grand Total')->callback_column('status_ppn', array($this, '_callback_status_ppn'))->callback_column('total', array($this, 'currencyFormat'))->callback_column('dpp', array($this, 'currencyFormat'))->callback_column('ppn', array($this, 'currencyFormat'))->callback_column('discount_price', array($this, 'currencyFormat'))->callback_column('grand_total', array($this, 'currencyFormat'))->set_relation('id_principal', 'principal', 'name')->set_relation('id_staff', 'staff', 'name')->add_action('Detail', '', '', 'read-icon', array($this, 'checkout'))->add_action('Attach', '\\assets\\grocery_crud\\themes\\flexigrid\\css\\images\\attachment-icon.png', '', '', array($this, 'attach_file'))->unset_read()->unset_add()->unset_edit()->unset_delete()->order_by('id_purchase_order', 'desc');
     $output = $crud->render();
     $this->render($output);
 }
开发者ID:ibnoe,项目名称:medikasarana,代码行数:7,代码来源:History.php

示例11: index

 function index()
 {
     if ($this->session->userdata('is_logged_in')) {
         $crud = new grocery_CRUD();
         $crud->set_table('productos');
         //->
         $crud->set_theme('datatables');
         $crud->set_language('spanish');
         $crud->set_subject('Producto');
         // Display As
         $crud->display_as('id_clasificacion', 'Clasificación');
         $crud->display_as('id_estatus', 'Estatus');
         //-> Columnas
         $crud->columns('descripcion', 'id_clasificacion', 'precio');
         // Relaciones
         $crud->set_relation('id_clasificacion', 'productos_clasificaciones', 'descripcion');
         $crud->set_relation('id_estatus', 'disponible_nodisponible', 'descripcion');
         // Upload
         ##
         // Validacion
         $crud->field_type('precio', 'integer');
         $crud->required_fields('descripcion', 'id_clasificacion', 'precio');
         //-> Renderizar
         $output = $crud->render();
         $data['titulo'] = "PRODUCTOS";
         $this->load->view('include/head', $output);
         $this->load->view('include/header', $data);
         $this->load->view('admin/output');
         $this->load->view('admin/librerias');
         $this->load->view('include/footer', $data);
     } else {
         $this->load->view('admin/login');
     }
 }
开发者ID:Juchiha,项目名称:mandala,代码行数:34,代码来源:productos.php

示例12: capturar

 function capturar()
 {
     if ($this->session->userdata('is_logged_in')) {
         $crud = new grocery_CRUD();
         //-> Identifico el ID del Cliente
         $crud->set_table('facturas');
         //->
         $crud->set_theme('datatables');
         $crud->set_language('spanish');
         $crud->set_subject('Factura');
         $crud->unset_add();
         $crud->unset_export();
         $crud->unset_print();
         $output = $crud->render();
         $data['titulo'] = "CREAR FACTURAS";
         $clientes = $this->Clientes_model->GetClients();
         $producto = $this->Products_model->get_all_products();
         $sucursales = $this->Sucursales_model->get_all_sucursales();
         $moneda = $this->datos_model->get_datos("tipos_moneda", "row_id, descripcion", "row_id", "ASC");
         $datos = array('clientes' => $clientes, 'productos' => $producto, 'sucursales' => $sucursales, "moneda" => $moneda);
         $this->load->view('include/head', $output);
         $this->load->view('include/header', $data);
         $this->load->view('admin/addFactura', $datos);
         $this->load->view('admin/librerias');
         $this->load->view('include/footer', $data);
     } else {
         $this->load->view('admin/login');
     }
 }
开发者ID:Juchiha,项目名称:mandala,代码行数:29,代码来源:facturas.php

示例13: index

 public function index()
 {
     //Inisialisasi
     $crud = new grocery_CRUD();
     $crud->set_subject('Pasien');
     $crud->set_table('tbl_pasien');
     //Label Fields
     $crud->display_as('idPasien', 'ID Pasien');
     $crud->display_as('namaPasien', 'Nama');
     $crud->display_as('umur', 'Umur');
     $crud->display_as('tanggalLahir', 'Tanggal Lahir');
     $crud->display_as('jenisKelamin', 'Jenis Kelamin');
     $crud->display_as('status', 'Status');
     $crud->display_as('alamat', 'Alamat');
     $crud->display_as('pekerjaan', 'Pekerjaan');
     $crud->display_as('no_telp', 'Nomor Telepon');
     //Kolom Input dan Callbacks
     $crud->fields('idPasien', 'namaPasien', 'umur', 'tanggalLahir', 'jenisKelamin', 'status', 'alamat', 'pekerjaan', 'no_telp');
     $crud->field_type('idPasien', 'invisible');
     $crud->callback_field('jenisKelamin', array($this, 'jenisKelamin_callback'));
     $crud->field_type('status', 'dropdown', array('Menikah' => 'Menikah', 'Belum Menikah' => 'Belum Menikah'));
     $crud->field_type('pekerjaan', 'dropdown', array('Pegawai Negeri' => 'Pegawai Negeri', 'Wiraswasta' => 'Wiraswasta', 'Karyawan Swasta' => 'Karyawan Swasta', 'Mahasiswa' => 'Mahasiswa', 'Ibu Rumah Tangga' => 'Ibu Rumah Tangga', 'Pensiunan' => 'Pensiunan', 'Lainnya' => 'Lainnya'));
     //Aturan Pengisian Form
     $crud->required_fields('namaPasien', 'umur', 'tanggalLahir', 'jenisKelamin', 'status', 'alamat', 'pekerjaan');
     $crud->set_rules('umur', 'Umur', array('required', 'max_length[2]', 'numeric'));
     $crud->set_rules('no_telp', 'Nomor Telepon', 'numeric');
     $crud->set_language("indonesian");
     //Cetak Tabel
     $output = $crud->render();
     $this->_example_output($output);
 }
开发者ID:elraghifary,项目名称:RSIA-Humana-Prima,代码行数:31,代码来源:pasien.php

示例14: index

 public function index()
 {
     $crud = new grocery_CRUD();
     $crud->set_table('customer')->columns('name', 'owner', 'npwp', 'address', 'zipcode', 'city', 'state', 'country', 'plafond', 'telp1', 'telp2')->display_as('npwp', 'NPWP')->display_as('zipcode', 'Zip Code')->display_as('telp1', 'Telp 1')->display_as('telp2', 'Telp 2')->display_as('owner', 'Direktur')->fields('name', 'owner', 'npwp', 'address', 'zipcode', 'city', 'state', 'country', 'plafond', 'telp1', 'telp2')->required_fields('name', 'owner', 'npwp', 'address', 'zipcode', 'city', 'state', 'country', 'plafond', 'telp1')->unset_read();
     $output = $crud->render();
     $this->render($output);
 }
开发者ID:nurulimamnotes,项目名称:pos,代码行数:7,代码来源:Customer.php

示例15: configuracion

 function configuracion()
 {
     $crud = new grocery_CRUD();
     $crud->set_table('usuarios');
     $crud->set_theme('datatables');
     $crud->set_language('spanish');
     $crud->set_subject('Usuario');
     $state = $crud->getState();
     $state_info = $crud->getStateInfo();
     if ($state == 'list' || $state == 'success') {
         redirect('user/dashboard');
     } else {
         $crud->unset_add();
         $crud->unset_delete();
         $crud->field_type('usuario', 'readonly');
         $crud->field_type('clave', 'password');
         $crud->field_type('id_cliente', 'hidden');
         $crud->field_type('id_nivel', 'hidden');
         $crud->field_type('row_id', 'hidden');
         $crud->field_type('id_estatus', 'hidden');
         $crud->set_field_upload('foto', 'assets/uploads/users/');
         $output = $crud->render();
         $data['titulo'] = "CONFIGURACION DE USUARIO";
         $this->load->view('include/head', $output);
         $this->load->view('include/header', $data);
         $this->load->view('admin/output');
         $this->load->view('include/footer', $data);
         $this->load->view('admin/librerias');
     }
 }
开发者ID:Juchiha,项目名称:mandala,代码行数:30,代码来源:user.php


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