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

PHP grocery_CRUD类代码示例

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

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



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

示例1: index

 public function index()
 {
     $crud = new grocery_CRUD();
     $crud->set_table('store')->columns('name', 'owner', 'address', 'zipcode', 'city', 'state', 'country', 'telp1', 'telp2', 'fax', 'npwp', 'note')->display_as('npwp', 'NPWP')->display_as('zipcode', 'Zip Code')->display_as('telp1', 'Telp 1')->display_as('telp2', 'Telp 2')->fields('name', 'owner', 'address', 'zipcode', 'city', 'state', 'country', 'telp1', 'telp2', 'fax', 'npwp', 'note')->required_fields('name', 'owner', 'address', 'zipcode', 'city', 'state', 'country', 'telp1')->unset_read()->unset_add()->unset_delete()->callback_field('note', array($this, 'setTextarea'));
     $output = $crud->render();
     $this->render($output);
 }
开发者ID:ibnoe,项目名称:medikasarana,代码行数:7,代码来源:Store.php


示例2: index

 public function index($nombre_tabla = null)
 {
     $this->is_login();
     $id_grupo_usuario = (array) reset($this->ion_auth->get_users_groups($this->user->id)->result());
     // donde 1 es admin, 2 es ministerio, 3 el coordinador, 4 digitador, 5 externo
     if (in_array($id_grupo_usuario['id'], array(1, 2, 3, 4))) {
         if (!empty($nombre_tabla)) {
             // correr el procedimiento almacenado
             $this->load->model('tabla_model');
             $this->tabla_model->correr_procedimiento_almacenado($nombre_tabla);
             try {
                 $crud = new grocery_CRUD();
                 $crud->set_theme('flexigrid-inline-edit');
                 $crud->set_table($nombre_tabla);
                 // $crud->unset_edit();
                 $crud->unset_delete();
                 $output = $crud->render();
                 $this->_example_output($output);
             } catch (Exception $e) {
                 echo "el nombre de tabla no es valida";
             }
         } else {
             redirect('/', 'refresh');
         }
     } else {
         redirect('/', 'refresh');
     }
 }
开发者ID:Jarvizx,项目名称:app-m,代码行数:28,代码来源:tabla.php


示例3: index

 public function index()
 {
     $crud = new grocery_CRUD();
     $crud->set_table('store')->columns('name', 'owner', 'address', 'zipcode', 'city', 'state', 'country', 'telp1', 'telp2', 'fax', 'npwp', 'note')->display_as('name', 'Nama Toko')->display_as('owner', 'Nama Pemilik')->display_as('address', 'Alamat')->display_as('zipcode', 'Kode Pos')->display_as('city', 'Kota')->display_as('state', 'Provinsi')->display_as('country', 'Negara')->display_as('npwp', 'NPWP')->display_as('note', 'Keterangan')->display_as('telp1', 'Telp 1')->display_as('telp2', 'Telp 2')->fields('name', 'owner', 'address', 'zipcode', 'city', 'state', 'country', 'telp1', 'telp2', 'fax', 'npwp', 'note')->required_fields('name', 'owner', 'address', 'zipcode', 'city', 'state', 'country', 'telp1')->unset_read()->unset_add()->unset_delete()->callback_field('note', array($this, 'setTextarea'));
     $output = $crud->render();
     $this->render($output);
 }
开发者ID:awalinyudhana,项目名称:medikasarana,代码行数:7,代码来源:Store.php


示例4: productPlacing

 public function productPlacing()
 {
     $crud = new grocery_CRUD();
     $crud->set_table('warehouse_rack_detail')->display_as('id_rack', 'Rack Name')->display_as('id_product', 'Product Name')->columns('id_rack', 'id_product', 'stock')->set_relation('id_rack', 'warehouse_rack', 'name')->set_relation('id_product', 'product', 'name')->unset_fields('total')->callback_column('stock', array($this, 'addProductStockColumn'))->required_fields('id_rack', 'id_product')->unset_read();
     $output = $crud->render();
     $this->render($output);
 }
开发者ID:nurulimamnotes,项目名称:pos,代码行数:7,代码来源:Warehouse.php


示例5: category

 public function category()
 {
     $crud = new grocery_CRUD();
     $crud->set_table('category');
     $output = $crud->render();
     $this->_example_output($output);
 }
开发者ID:danieljulia,项目名称:backend_cas_us_1_ci,代码行数:7,代码来源:Admin.php


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


示例7: index

 public function index()
 {
     $crud = new grocery_CRUD();
     $crud->set_table('customer')->columns('name', 'alias_name1', 'alias_name2', 'owner', 'npwp', 'address', 'zipcode', 'city', 'state', 'country', 'plafond', 'telp1', 'telp2')->display_as('npwp', 'NPWP')->display_as('name', 'Nama Konsumen')->display_as('alias_name1', 'Nama Faktur 1')->display_as('alias_name2', 'Nama Faktur 2')->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('plafond', 'Plafon')->callback_column('plafond', array($this, 'currencyFormat'))->display_as('telp1', 'Telp 1')->display_as('telp2', 'Telp 2')->display_as('owner', 'Direktur')->fields('name', 'alias_name1', 'alias_name2', 'owner', 'npwp', 'address', 'zipcode', 'city', 'state', 'country', 'plafond', 'telp1', 'telp2')->required_fields('name', 'address', 'city', 'state', 'country', 'plafond', 'telp1')->unset_read();
     $output = $crud->render();
     $this->render($output);
 }
开发者ID:awalinyudhana,项目名称:medikasarana,代码行数:7,代码来源:Customer.php


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


示例9: index

 public function index()
 {
     $crud = new grocery_CRUD();
     $crud->set_table('sales_order_return')->columns('id_sales_order_return', 'date', 'id_staff', 'id_sales_order')->display_as('id_sales_order', 'No Faktur Jual')->display_as('id_staff', 'Staff')->display_as('date', 'Tanggal Transaksi')->display_as('id_sales_order_return', 'No Faktur Retur')->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_sales_order_return', 'desc');
     $output = $crud->render();
     $this->render($output);
 }
开发者ID:awalinyudhana,项目名称:medikasarana,代码行数:7,代码来源:History.php


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


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


示例12: old

 public function old()
 {
     $crud = new grocery_CRUD();
     $crud->set_table('sales_order')->columns('id_sales_order', 'id_proposal', 'id_customer', 'id_staff', 'date', 'due_date', 'dpp', 'ppn', 'discount_price', 'grand_total', 'status_ppn', 'paid')->display_as('id_sales_order', 'No Faktur')->display_as('id_proposal', 'No Proposal')->display_as('id_customer', 'Nama Konsumen')->display_as('id_staff', 'Staff')->display_as('date', 'Tanggal Transaksi')->display_as('due_date', 'Jatuh Tempo')->display_as('discount_price', 'Diskon')->display_as('grand_total', 'Grand Total')->display_as('status_ppn', 'Status PPN')->display_as('dpp', 'DPP')->display_as('ppn', 'PPN')->display_as('pain', 'Terbayar')->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'))->callback_column('status_ppn', array($this, '_callback_status_ppn'))->set_relation('id_customer', 'customer', 'name')->set_relation('id_staff', 'staff', 'name')->add_action('Detail', '', '', 'read-icon', array($this, 'checkout'))->where('active', '0')->unset_read()->unset_add()->unset_edit()->unset_delete()->order_by('id_sales_order', 'desc');
     $output = $crud->render();
     $this->render($output);
 }
开发者ID:awalinyudhana,项目名称:medikasarana,代码行数:7,代码来源:History.php


示例13: 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', 'Principal Name')->display_as('bank_name', 'Bank Name')->display_as('bank_account', 'Bank Account')->display_as('bank_beneficiary_name', 'Bank Beneficiary Name')->display_as('bank_city', 'Bank City')->display_as('bank_branch', 'Bank Branch')->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:ibnoe,项目名称:medikasarana,代码行数:7,代码来源:Bank.php


示例14: categorias

 function categorias()
 {
     $crud = new grocery_CRUD();
     $crud->set_table('categorias');
     $output = $crud->render();
     $this->load->view('main/ventas', $output);
 }
开发者ID:tellurion-project,项目名称:POS-PHP,代码行数:7,代码来源:main.php


示例15: group

 public function group()
 {
     $crud = new grocery_CRUD();
     $crud->set_table('staff_group')->columns('name_group', 'note', 'jml_user')->fields('name_group', 'note')->display_as('name_group', 'Group Name')->display_as('jml_user', 'Jumlah User')->required_fields('name_group')->callback_column('jml_user', array($this, 'countJmlUser'))->callback_field('note', array($this, 'setTextarea'))->add_action('Update Role', '', '', 'read-icon', array($this, 'addUpdateRoleAction'))->unset_read();
     $output = $crud->render();
     $this->renderGroup($output);
 }
开发者ID:nurulimamnotes,项目名称:pos,代码行数:7,代码来源:Users.php


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


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


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


示例19: index

 public function index()
 {
     $crud = new grocery_CRUD();
     $crud->set_table('proposal')->columns('id_proposal', 'date_created', 'id_customer', 'id_staff', 'status_ppn', 'type')->display_as('id_proposal', 'No Proposal')->display_as('id_customer', 'Konsumen')->display_as('id_staff', 'Staff')->display_as('date_created', 'Tanggal Pembuatan')->set_relation('id_customer', 'customer', 'name')->set_relation('id_staff', 'staff', 'name')->display_as('status_ppn', 'Status PPn')->callback_column('status_ppn', array($this, '_callback_status_ppn'))->callback_column('type', array($this, '_callback_type'))->add_action('Detail', '', '', 'read-icon', array($this, 'checkout'))->where('status', '2')->unset_read()->unset_add()->unset_edit()->unset_delete();
     $output = $crud->render();
     $this->render($output);
 }
开发者ID:ibnoe,项目名称:medikasarana,代码行数:7,代码来源:History.php


示例20: index

 public function index()
 {
     $crud = new grocery_CRUD();
     $crud->set_table('delivery_order')->columns('id_delivery_order', 'id_sales_order', 'date_printed', 'date_sending', 'id_staff')->display_as('id_delivery_order', 'No Order Kirim')->display_as('id_sales_order', 'No Faktur Jual')->display_as('id_staff', 'Staff Pengiriman')->display_as('date_printed', 'Tanggal Pembuatan')->display_as('date_sending', 'Tanggal Pengiriman')->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_delivery_order', 'desc');
     $output = $crud->render();
     $this->render($output);
 }
开发者ID:awalinyudhana,项目名称:medikasarana,代码行数:7,代码来源:History.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP group类代码示例发布时间:2022-05-23
下一篇:
PHP grid_param类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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