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


PHP grocery_CRUD::set_table方法代码示例

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


在下文中一共展示了grocery_CRUD::set_table方法的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: 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

示例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: transaksi

 function transaksi()
 {
     $crud = new grocery_CRUD();
     $crud->set_table('tb_transaksi');
     $crud->set_subject('Transaksi');
     $crud->set_theme('datatables');
     $crud->display_as('tglTransaksi', 'Tgl');
     $crud->display_as('namaPembeli', 'Pembeli');
     $crud->display_as('namaPenerima', 'Penerima');
     $crud->display_as('no_hp', 'HP');
     $crud->display_as('jenisTransaksi', 'Transaksi');
     $crud->display_as('namaBarang', 'Barang');
     $crud->display_as('jumlahBarang', 'Jumlah');
     //$crud->columns('perihal','tanggal_surat_masuk');
     //$crud->display_as('id_persoalan','persoalan');
     //$crud->add_action('Setting', base_url().'assets/img/tick.png', 'perencanaan/setting','ui-icon-image');
     $output = $crud->render();
     $stat = $this->session->userdata('lvl');
     if ($stat == 1) {
         //admin
         $this->_example_output($output);
     } else {
         //user
         $this->load->view('dashboard_user', $data);
     }
 }
开发者ID:ahmadchoirunnajib,项目名称:Inventory,代码行数:26,代码来源:Dashboard.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: 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

示例7: perfil

 function perfil()
 {
     $crud = new grocery_CRUD();
     $crud->where('row_id', $this->session->userdata('user_id'));
     $crud->set_table('usuarios');
     $crud->set_theme('datatables');
     $crud->set_language('spanish');
     $crud->set_subject('Usuario');
     $state = $crud->getState();
     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_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'] = "Configuración de Usuario";
         $this->load->view('include/head');
         $this->load->view('include/header');
         $this->load->view('include/sidebar');
         $this->load->view('admin/main', $data);
         $this->load->view('admin/grocery_crud', $output);
         $this->load->view('include/footer');
     }
 }
开发者ID:scortina,项目名称:kolor,代码行数:30,代码来源:user.php

示例8: index

 public function index()
 {
     $this->pagina_saida((object) array('output' => '', 'js_files' => array(), 'css_files' => array()));
     $this->load->view('template/navbar.php');
     try {
         $crud = new grocery_CRUD();
         $crud->set_theme('flexigrid');
         $crud->set_table('cliente_produto');
         $crud->set_subject('codorc');
         $crud->required_fields('codorc', 'codpro');
         $crud->display_as('codorc', 'Cód. Orçamento');
         $crud->display_as('tiporc', 'Tipo');
         $crud->display_as('numcpf', 'CPF');
         $crud->display_as('plavei', 'Placa');
         $crud->display_as('datent', 'Data Início');
         $crud->display_as('datsai', 'Data Saída');
         //			$crud->columns('NomeCliente');
         $crud->add_action('Smileys', 'http://www.grocerycrud.com/assets/uploads/general/smiley.png', 'demo/action_smiley');
         $output = $crud->render();
         $this->pagina_saida($output);
         $this->load->view('template/footer');
     } catch (Exception $e) {
         show_error($e->getMessage() . ' --- ' . $e->getTraceAsString());
     }
 }
开发者ID:willmartinsmg,项目名称:martinscar,代码行数:25,代码来源:cliente_produtos.php

示例9: clientes

 function clientes()
 {
     if ($this->session->userdata('id')) {
         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('clientes');
             /* Le asignamos un nombre */
             $crud->set_subject('Clientes');
             /* Asignamos el idioma español */
             $crud->set_language('spanish');
             /* Aqui le decimos a grocery que estos campos son obligatorios */
             $crud->required_fields('id', 'nombre', 'domicilio', 'telefono');
             /* Aqui le indicamos que campos deseamos mostrar */
             $crud->columns('nombre', 'domicilio', 'telefono');
             $crud->unset_export();
             /* Generamos la tabla */
             $output = $crud->render();
             /* La cargamos en la vista situada en 
             			/applications/views/productos/administracion.php */
             $this->_example_output($output);
         } catch (Exception $e) {
             /* Si algo sale mal cachamos el error y lo mostramos */
             show_error($e->getMessage() . ' --- ' . $e->getTraceAsString());
         }
     } else {
         redirect('login');
     }
 }
开发者ID:jalomo,项目名称:sisin,代码行数:32,代码来源:Clientes.php

示例10: 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

示例11: index

 public function index()
 {
     $crud = new grocery_CRUD();
     $crud->set_table('retail')->columns('id_retail', 'date', 'id_staff', 'dpp', 'ppn', 'discount_price', 'grand_total', 'paid')->display_as('id_retail', 'No Nota Retail')->display_as('id_staff', 'Staff')->display_as('dpp', 'DPP')->display_as('ppn', 'PPN')->display_as('date', 'Tanggal Transaksi')->display_as('discount_price', 'Diskon')->display_as('pain', 'Jumlah Bayar')->display_as('grand_total', 'Grand Total')->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'))->callback_column('paid', array($this, 'currencyFormat'))->set_relation('id_staff', 'staff', 'name')->add_action('Detail', '', '', 'read-icon', array($this, 'checkout'))->unset_read()->unset_add()->unset_edit()->unset_delete()->order_by('id_retail', 'desc');
     $output = $crud->render();
     $this->render($output);
 }
开发者ID:awalinyudhana,项目名称:medikasarana,代码行数:7,代码来源:History.php

示例12: 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

示例13: 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

示例14: 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

示例15: generate_crud

 protected function generate_crud($table, $subject = '')
 {
     // create CRUD object
     $this->load->library('Grocery_CRUD');
     $crud = new grocery_CRUD();
     $crud->set_table($table);
     // auto-generate subject
     if (empty($subject)) {
         $crud->set_subject(humanize(singular($table)));
     }
     // load settings from: application/config/grocery_crud.php
     $this->load->config('grocery_crud');
     $this->mCrudUnsetFields = $this->config->item('grocery_crud_unset_fields');
     if ($this->config->item('grocery_crud_unset_jquery')) {
         $crud->unset_jquery();
     }
     if ($this->config->item('grocery_crud_unset_jquery_ui')) {
         $crud->unset_jquery_ui();
     }
     if ($this->config->item('grocery_crud_unset_print')) {
         $crud->unset_print();
     }
     if ($this->config->item('grocery_crud_unset_export')) {
         $crud->unset_export();
     }
     if ($this->config->item('grocery_crud_unset_read')) {
         $crud->unset_read();
     }
     foreach ($this->config->item('grocery_crud_display_as') as $key => $value) {
         $crud->display_as($key, $value);
     }
     // other custom logic to be done outside
     $this->mCrud = $crud;
     return $crud;
 }
开发者ID:TowerX,项目名称:ci_bootstrap_3,代码行数:35,代码来源:Admin_Controller.php


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