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_ordertracking'); $crud->set_subject('Sales Tracking'); $crud->required_fields('NAME'); $crud->columns('ordertrackingid', 'orderid', 'name', 'orderdate'); // $crud->columns('fullfillment','orderdate','orderid','returnid','itemrece','caseid','product','status'); //$crud->fields('ordertrackingid','orderid','name','orderdate'); $crud->callback_column('ordertrackingid', array($this, '_callback_webpage_url')); $crud->callback_column('orderdate', array($this, '_callback_dateformat')); // $crud->fields('NAME'); // $crud->unset_add(); $crud->unset_edit(); $crud->unset_delete(); // $crud->callback_after_insert(array($this, 'fullfillmentid_generation')); $output = $crud->render(); $state = $crud->getState(); if ($state == 'add') { redirect('store/addtracking'); } // $this->grocery_crud->set_table('ips_login'); // $output = $this->grocery_crud->render(); $this->_example_output($output); }
public function enfants_window($id) { $this->id_demande = $id; try { $crud = new grocery_CRUD(); $crud->set_language("french"); $crud->set_theme('bootstrap'); $crud->where('id_from_demande', $this->id_demande); $crud->set_table('sos_enfants'); $crud->set_subject('Enfant'); $crud->unset_add(); $crud->unset_delete(); $crud->field_type('id_from_demande', 'hidden', $this->id_demande); $crud->unset_edit_fields('id_from_kids'); $crud->set_relation('id_from_kids', 'sos_kids', "id_kid"); $crud->set_relation('recu', 'sos_gen_recu', "name_recu", null, 'name_recu ASC'); $crud->set_relation_n_n('accompagniement', 'sos_relation_accompagniement_kid', 'sos_gen_accompagniement_kid', 'id_from_enfants', 'id_from_accompagniement_kid', 'name_accompagniement_kid'); $crud->set_relation_n_n('activite', 'sos_relation_activite_kid', 'sos_gen_activite_kid', 'id_from_enfants', 'id_from_activite_kid', 'name_activite_kid'); $crud->columns('enfant', 'recu', 'activite', 'accompagniement', 'commentaire_enfant'); //$crud->display_as('id_from_kids', 'Enfants'); $crud->display_as('accompagniement', 'Accompagnement'); $crud->display_as('activite', 'Activité'); $crud->display_as('recu', 'Reçu'); $crud->display_as('id_from_kids', 'Enfant(s)'); $crud->display_as('commentaire_enfant', 'Commentaire enfant'); $crud->callback_column('accompagniement', array($this, 'accompagniement')); $crud->callback_column('activite', array($this, 'activite')); $crud->callback_column('enfant', array($this, 'enfant')); $crud->required_fields('recu'); $output = $crud->render(); $this->db->where('id_demande', $this->id_demande); $query = $this->db->get('sos_demande'); if ($query->num_rows == 1) { $row_demande = $query->row(); } // $my_demande = $row_demande->id_from_demande; $menu = new stdClass(); $menu->n3 = true; //$menu->id_1 = $my_demande; $menu->id = $row_demande->id_from_femme; $menu->status = $this->session->userdata('status'); $this->db->where('id_femme', $menu->id); $query = $this->db->get('sos_femme'); if ($query->num_rows == 1) { $row_femme = $query->row(); } $header = $this->navigation->home_f($menu) . ' ' . '<p><pre>' . $row_femme->prenom . ' ' . $row_femme->nom . ' ' . $row_femme->nom_marital . '</pre></p>'; $data = array('output' => $output, 'header' => $header); $this->_example_output($data); } catch (Exception $e) { show_error($e->getMessage() . ' --- ' . $e->getTraceAsString()); } }
public function index() { $crud = new grocery_CRUD(); $crud->set_theme('flexigrid'); $crud->set_table('booking_refunds'); $crud->set_subject('Booking Refund'); $crud->unset_add(); $crud->unset_delete(); // $crud->unset_columns('booking_ref_no'); $crud->unset_fields('booking_ref_no'); $crud->field_type('refund_status', 'dropdown', array('1' => 'Requested', '0' => 'Rejected', '2' => 'Refunded')); // $crud->field_type('refund_status', 'dropdown', array('1'=>'Requested', '0'=>'Rejected', '2' => 'Refunded')); // $crud->callback_column('refund_status', function($value, $primary_key){ // $status = array('1'=>'Requested', '0'=>'Rejected', '2' => 'Refunded'); // return $status[$value]; // }); $crud->field_type('item_type', 'readonly'); $crud->callback_column('item_type', function ($value, $primary_key) { return ucfirst($value); }); $crud->callback_edit_field('item_type', function ($value, $primary_key) { return ucfirst($value); }); // $crud->callback_before_update(array($this, 'modified_date_callback')); $crud->callback_column('booking_ref_no', array($this, '_show_invoice')); $output = $crud->render(); $data = array('main_content' => 'list', 'output' => $output, 'pagetitle' => 'Booking Refund', 'pagedesc' => 'Booking Refund', 'contenttitle' => 'Booking Refund List Records'); $this->load->view('gc_admin_wrapper', $data); }
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); }
public function index() { $crud = new grocery_CRUD(); $crud->set_theme('bootstrap'); $crud->set_table('user'); $crud->set_subject('Gebruiker'); // hide fields $crud->columns('is_super_user', 'is_active', 'screen_name', 'email', 'gebruikersgroepen'); // new_password and new_password repeat are needed to make formvalidation work // id is needed to make the email unique check work $crud->fields('id', 'is_active', 'screen_name', 'email', 'gebruikersgroepen', 'password', 'new_password', 'new_password_repeat'); $crud->required_fields('email', 'screen_name', 'is_active'); $crud->set_relation_n_n('gebruikersgroepen', 'user_x_user_group', 'user_group', 'user_id', 'user_group_id', 'name'); $crud->field_type('id', 'hidden'); $crud->field_type('new_password_repeat', 'hidden'); $crud->field_type('password', 'hidden'); $crud->display_as('is_active', 'Actief'); $crud->display_as('screen_name', 'Schermnaam'); $crud->display_as('is_super_user', ''); $crud->display_as('new_password', 'Wachtwoord'); if ($crud->getState() == 'read') { $crud->field_type('new_password', 'hidden'); } else { $crud->callback_field('new_password', array($this, 'edit_field_callback_new_password')); } $crud->field_type('is_active', 'dropdown', array('yes' => 'ja', 'no' => 'nee')); $crud->callback_column('is_active', array($this, 'callback_list_is_active')); $crud->callback_column('is_super_user', array($this, 'callback_list_is_super_user')); $crud->callback_before_insert(array($this, 'before_insert_update_callback')); $crud->callback_before_update(array($this, 'before_insert_update_callback')); $crud->callback_after_insert(array($this, 'after_insert_callback')); $crud->callback_after_update(array($this, 'after_update_callback')); if ($crud->getState() === 'update_validation' or $crud->getState() === 'insert_validation') { $crud->set_rules('email', 'E-mail', 'required|valid_email|callback_email_unique_check'); $crud->set_rules('screen_name', 'Schermnaam', 'required'); if ($this->input->post('new_password') != '' or !$this->input->post('id')) { $crud->set_rules('new_password', 'Nieuw wachtwoord', 'required|min_length[10]|matches[new_password_repeat]'); $crud->set_rules('new_password_repeat', 'Herhaal nieuw wachtwoord', ''); } $this->form_validation->set_message('matches', 'De wachtwoorden zijn niet aan elkaar gelijk.'); } // render the crud HTML $crud_output = $crud->render(); //get the needed css and javascript files $this->javascript_files = $crud->get_js_files(); $this->css_files = $crud->get_css_files(); // put the crud content in the right position $this->views['content'] = $crud_output->output; $this->css[] = $this->load->view('admin/user/css/index.css', array(), true); // add javascript and css to make the password generate and change function possible if ($crud->getState() === 'add' or $crud->getState() === 'edit') { $this->css[] = $this->load->view('admin/user/css/edit_user.css', array(), true); $this->javascript[] = $this->load->view('admin/user/js/edit_user.js', array(), true); } // create the layout-HTML and show it to the user $this->_layout(); }
public function index() { $crud = new grocery_CRUD(); $crud->set_theme('flexigrid'); $crud->set_table('hotel_rooms'); $crud->set_subject('Hotel Rooms'); // $crud->unset_fields('ht_id'); $crud->display_as('room_hotel', 'Hotel Name'); $crud->display_as('hotel_title', 'Room Name'); $crud->display_as('room_desc', 'Room Description'); $crud->display_as('room_basic_price', 'Selling Price'); $crud->display_as('room_cost_price', 'Cost Price'); $crud->display_as('room_market_price', 'Market Price'); $crud->display_as('room_service_charge', 'Service Charge'); $crud->display_as('room_vat', 'VAT'); $crud->columns(array('room_hotel', 'room_title', 'room_vat', 'room_service_charge', 'room_cost_price', 'room_basic_price', 'room_basic_discount', 'room_order', 'room_quantity', 'room_added_on', 'room_status')); $crud->callback_column('room_basic_price', array($this, 'set_price')); // $crud->callback_read_field('room_basic_price', array($this, 'set_price')); // crud library modified SAM for read_field $crud->callback_column('room_basic_discount', array($this, 'set_price')); // $crud->callback_read_field('room_basic_discount', array($this, 'set_price')); // crud library modified SAM for read_field $crud->callback_add_field('room_cost_price', function ($value, $primary_key) { return "USD <input id='field-room_cost_price' class='form-control' name='room_cost_price' type='text' value='' maxlength='20'>"; }); $crud->callback_add_field('room_market_price', function ($value, $primary_key) { return "USD <input id='field-room_market_price' class='form-control' name='room_market_price' type='text' value='' maxlength='20'>"; }); $crud->callback_edit_field('room_cost_price', function ($value, $primary_key) { return "USD <input id='field-room_cost_price' class='form-control' name='room_cost_price' type='text' value='{$value}' maxlength='20'>"; }); $crud->callback_edit_field('room_market_price', function ($value, $primary_key) { return "USD <input id='field-room_market_price' class='form-control' name='room_market_price' type='text' value='{$value}' maxlength='20'>"; }); $crud->callback_add_field('room_basic_price', function ($value, $primary_key) { return "USD <input id='field-room_basic_price' class='form-control' name='room_basic_price' type='text' value='' maxlength='20'>"; }); $crud->callback_edit_field('room_basic_price', function ($value, $primary_key) { return "USD <input id='field-room_basic_price' class='form-control' name='room_basic_price' type='text' value='{$value}' maxlength='20'>"; }); $crud->callback_add_field('room_basic_discount', function ($value, $primary_key) { return "USD <input id='field-room_basic_discount' class='form-control' name='room_basic_discount' type='text' value='' maxlength='20'>"; }); $crud->callback_edit_field('room_basic_discount', function ($value, $primary_key) { return "USD <input id='field-room_basic_discount' class='form-control' name='room_basic_discount' type='text' value='{$value}' maxlength='20'>"; }); $crud->set_relation('room_hotel', 'hotels', '{hotel_name}'); $hrf = $this->generic_model->get_by('hotel_room_facilities', array('hrf_status' => 1), 'hrf_id'); $hrf = $this->generic_model->array_from_db($hrf, 'hrf_id, hrf_facility'); $crud->field_type('room_facilities', 'multiselect', $hrf); $output = $crud->render(); $data = array('main_content' => 'list', 'output' => $output, 'pagetitle' => 'Hotel Tariffs', 'pagedesc' => 'Hotel Tariffs', 'contenttitle' => 'Hotel Tariffs List Records'); $this->load->view('gc_admin_wrapper', $data); }
public function index() { $crud = new grocery_CRUD(); $crud->set_theme('flexigrid'); $crud->set_table('bookings'); $crud->set_subject('Bookings'); // $agents = $this->ion_auth->get_all_agents(); // $user = $this->ion_auth->user()->row(); // $agents += array($user->id => $user->first_name . " " . $user->last_name); // $crud->field_type('hotel_agent_id', 'dropdown', $agents); $crud->set_relation('booking_agent', 'io_users', '{first_name} {last_name} [{email}]', array('active' => 1)); $crud->set_relation('agent_id', 'io_users', '{first_name} {last_name} [{email}]', array('active' => 1)); $crud->set_relation('booking_to', 'io_users', '{first_name} {last_name} [{email}]', array('active' => 1)); $crud->display_as('agent_id', 'Agent of Hotel/Package'); $crud->display_as('booking_company_commission', 'Company Commission'); $crud->display_as('booking_status', 'Status (Change Status)'); $crud->display_as('booking_agent', 'Booked By'); // $crud->display_as('hotel_name', 'Hotel Name'); // $crud->display_as('hotel_rooms', 'Rooms'); // $crud->display_as('hotel_tariffs', 'Tariffs'); $crud->field_type('booking_ref_no', 'readonly'); $crud->field_type('paypal_transaction_id', 'readonly'); $crud->field_type('booking_agent_commission', 'readonly'); $crud->field_type('booking_company_commission', 'readonly'); $crud->field_type('booking_type', 'readonly'); $crud->field_type('booking_item_title', 'readonly'); $crud->field_type('booking_date', 'readonly'); $crud->field_type('booking_payment_type', 'readonly'); $crud->field_type('booking_total', 'readonly'); $crud->field_type('booking_agent', 'readonly'); $crud->field_type('agent_id', 'readonly'); $crud->field_type('booking_to', 'readonly'); $crud->unset_columns('booking_item', 'booking_subitem', 'booking_paymethod_tax', 'ip_address', 'booking_nights'); $crud->unset_fields('booking_item', 'booking_subitem', 'booking_paymethod_tax', 'ip_address', 'booking_nights'); $crud->where('agent_id', $this->ion_auth->get_user_id()); // $crud->columns('hotel_name', 'hotel_agent_id', 'hotel_phoneNumber', 'hotel_website', 'hotel_facebook' ,'hotel_googleMap', 'hotel_status'); // $state = $crud->getState(); // // if($state =='list' || $state =='ajax_list') // { $crud->set_js("assets/frontend/js/custom_functions_sam.js"); // } $crud->add_action('Conversation', 'http://www.grocerycrud.com/assets/uploads/general/smiley.png', '', 'ui-icon-image', array($this, '_booking_conversation')); $crud->callback_column('booking_ref_no', array($this, '_show_invoice')); $crud->callback_edit_field('booking_status', array($this, '_edit_field_callback')); $crud->callback_column('booking_status', array($this, '_booking_status')); $crud->unset_add(); $output = $crud->render(); $data = array('main_content' => 'list', 'output' => $output, 'pagetitle' => 'Bookings', 'pagedesc' => 'Bookings', 'contenttitle' => 'Booking List Records', 'left_menu' => 'agents_menu'); $this->load->view('gc_admin_wrapper', $data); }
function database() { $drp = $this->session->userdata('user_type'); $crud = new grocery_CRUD(); $crud->set_theme('datatables'); $crud->set_table('patients'); $crud->set_subject('Patient'); $crud->display_as('fo_nr', 'Medical Record number'); $crud->field_tip('fo_nr', 'eg: 1234/2016'); $crud->display_as('city', 'City or Locality'); $crud->display_as('gp_phone', 'GP Phone'); $crud->display_as('GP_info', 'Notes'); // User Level Unset if ($drp == "user") { $crud->unset_delete(); $crud->unset_export(); $crud->unset_print(); // afisare fara statistici // data 24.01.2017 $crud->columns('id', 'fo_nr', 'cnp', 'last_name', 'first_name', 'follow_up_date', 'status', 'signature'); } // afisare in admin coloane cu statistici // data 24.01.2017 $crud->columns('id', 'cnp', 'last_name', 'first_name', 'No_of_PCIs', 'Completed_FU_events', 'follow_up_date', 'status', 'signature', 'admin'); $crud->field_tip('cnp', 'Personal ID No.'); $crud->field_tip('gender', 'The gender of the patient'); $crud->field_tip('height', 'Height in cm'); $crud->field_tip('weight', 'Weight in kg'); $crud->required_fields('cnp', 'first_name', 'last_name', 'admin', 'status'); $crud->field_type('gender', 'dropdown', array('Male' => 'Male', 'Female' => 'Female')); $crud->field_type('country', 'dropdown', array('Romania' => 'Romania', 'Other' => 'Other', 'Unknown' => 'Unknown')); $crud->set_relation('county', 'county', 'county'); $crud->set_relation('signature', 'user', 'user_name'); $crud->set_relation('admin', 'user', 'user_name'); $crud->add_action('Interventions', '', '', 'ui-icon-heart', array($this, 'go_intervention')); $crud->add_action('Follow-Up', '', '', 'ui-icon-calculator', array($this, 'go_followup')); $crud->callback_column('follow_up_date', array($this, '_followup')); $crud->callback_column('Completed_FU_events', array($this, '_nofollowup')); $crud->callback_column('No_of_PCIs', array($this, '_nointerv')); // log- user activities $crud->callback_after_insert(array($this, 'log_user_after_insert_patient')); $crud->callback_after_update(array($this, 'log_user_after_update_patient')); $crud->callback_after_delete(array($this, 'log_user_after_delete_patient')); $crud->unique_fields('cnp'); $crud->field_type('status', 'dropdown', array('New' => 'New', 'In progress' => 'In progress', 'Finished' => 'Finished', 'Dead' => 'Dead', 'Delete' => 'Delete')); //$extra = "info"; //$output = $crud->render($extra); $output = $crud->render(); // $output->extra = '<h3>Pacient</h3>'; Adauga valori extra pentru view $this->_admin_output($output); }
public function index() { // $data = array( // 'main_content' => 'clients_wishlist', // 'output' => $this->db->get_where('clients_wishlist', array('wish_user' => $this->ion_auth->get_user_id()))->result(), // 'pagetitle' => 'Wishlist', // 'pagedesc' => 'Wishlist', // 'contenttitle' => 'Wishlist Records', // 'left_menu' => 'clients_menu' // ); // $this->load->view('gc_client_wrapper', $data); $this->load->library('grocery_CRUD'); // $this->upload_path = '../assets/uploads/' . 'packages'; // $this->wrapper = 'gc_admin_wrapper'; $this->load->model('generic_model'); $crud = new grocery_CRUD(); $crud->set_theme('flexigrid'); $crud->set_table('clients_wishlist'); $crud->set_subject('Client Wishlist'); $crud->unset_add(); $crud->unset_edit(); $crud->unset_read(); $crud->where('wish_user', $this->ion_auth->get_user_id()); $crud->display_as('wish_title', 'Wish Title'); $crud->display_as('wish_date', 'Wish Date'); $crud->callback_column('wish_title', array($this, 'set_change_status')); $crud->unset_columns('wish_url', 'wish_user'); $output = $crud->render(); $data = array('main_content' => 'list', 'output' => $output, 'pagetitle' => 'Client Wishlist', 'pagedesc' => 'Client Wishlist', 'contenttitle' => 'Wishlist Records', 'left_menu' => 'clients_menu'); $this->load->view('gc_admin_wrapper', $data); }
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); }
public function psy_window($id) { $this->id_femme = $id; try { // General $crud = new grocery_CRUD(); $crud->set_language("french"); $crud->set_theme('bootstrap'); $crud->where('id_from_femme', $this->id_femme); $crud->set_table('sos_psy'); $crud->set_subject('Accompagnement Psychologique'); //relations $crud->set_relation_n_n('troubles_physiologiques', 'sos_relation_troubles_physiologiques', 'sos_gen_troubles_physiologiques', 'id_from_psy', 'id_from_troubles_physiologiques', 'name_troubles_physiologiques', 'priority'); $crud->set_relation_n_n('troubles_cognitifs', 'sos_relation_troubles_cognitifs', 'sos_gen_troubles_cognitifs', 'id_from_psy', 'id_from_troubles_cognitifs', 'name_troubles_cognitifs', 'priority'); $crud->set_relation_n_n('troubles_emotionnels', 'sos_relation_troubles_emotionnels', 'sos_gen_troubles_emotionnels', 'id_from_psy', 'id_from_troubles_emotionnels', 'name_troubles_emotionnels', 'priority'); //Visual $crud->columns('troubles_physiologiques', 'troubles_cognitifs', 'troubles_emotionnels'); $crud->display_as('troubles_emotionnels', 'Troubles émotionnels'); //unsets $crud->unset_delete(); $crud->unset_add(); //Requireds //Callbacks $crud->callback_column('troubles_physiologiques', array($this, 'troubles_physiologiques')); $crud->callback_column('troubles_cognitifs', array($this, 'troubles_cognitifs')); $crud->callback_column('troubles_emotionnels', array($this, 'troubles_emotionnels')); //field Types $crud->field_type('id_from_femme', 'hidden', $this->id_femme); // Actions // Renders $output = $crud->render(); $menu = new stdClass(); $menu->n1 = true; $menu->status = $this->session->userdata('status'); $this->db->where('id_femme', $this->id_femme); $query = $this->db->get('sos_femme'); if ($query->num_rows == 1) { $row_femme = $query->row(); } $header = $this->navigation->home_f($menu) . ' ' . '<p><pre>' . $row_femme->prenom . ' ' . $row_femme->nom . ' ' . $row_femme->nom_marital . '</pre></p>'; $data = array('output' => $output, 'header' => $header); $this->_example_output($data); } catch (Exception $e) { show_error($e->getMessage() . ' --- ' . $e->getTraceAsString()); } }
public function index() { $crud = new grocery_CRUD(); $crud->set_theme('flexigrid'); $crud->set_table('hotels'); $crud->set_subject('Hotels'); $agents = $this->ion_auth->get_all_agents(); $user = $this->ion_auth->user()->row(); $agents += array($user->id => $user->first_name . " " . $user->last_name); $crud->field_type('hotel_agent_id', 'dropdown', $agents); //var_dump($agents); // $crud->set_relation('hotel_agent_id', 'io_users', '{first_name} {last_name}', array('active' => 1)); $crud->display_as('hotel_agent_id', 'Agent Name'); $crud->display_as('hotel_name', 'Hotel Name'); $crud->display_as('hotel_rooms', 'Rooms'); $crud->display_as('hotel_tariffs', 'Tariffs'); $crud->display_as('hotel_country', 'Country'); $crud->display_as('hotel_city', 'City'); $crud->display_as('hotel_street', 'Street'); $crud->display_as('hotel_state', 'State'); $crud->display_as('hotel_postCode', 'PostCode'); $crud->display_as('hotel_phoneNumber', 'Phone Number'); $crud->display_as('hotel_emailId', 'Email ID'); $crud->display_as('hotel_website', 'Website'); $crud->display_as('hotel_facebook', 'Facebook'); $crud->display_as('hotel_googleMap', 'Google Map'); $crud->display_as('hotel_related', 'Related Hotels'); $crud->display_as('hotel_status', 'Status'); $crud->columns('hotel_name', 'hotel_agent_id', 'hotel_phoneNumber', 'hotel_website', 'hotel_facebook', 'hotel_googleMap', 'hotel_status'); $crud->required_fields('hotel_agent_id'); $crud->field_type('hotel_stars', 'dropdown', range(0, 5)); /* * For related hotels * on add list all the hotels * on edit, list all except own name */ $hrf = array(); if ($crud->getState() == 'edit') { $hrf = $this->generic_model->get_by('hotels', array('hotel_status' => 1, 'hotel_id !=' => $crud->getStateInfo()->primary_key), 'hotel_id'); } else { $hrf = $this->generic_model->get_by('hotels', array('hotel_status' => 1), 'hotel_id'); } $hrf = $this->generic_model->array_from_db($hrf, 'hotel_id, hotel_name'); $crud->field_type('hotel_related', 'multiselect', $hrf); $crud->callback_column('hotel_image', array($this, 'set_image')); $crud->set_field_upload('hotel_image', $this->upload_path); $hf = $this->generic_model->get_by('hotel_facilities', array('hf_status' => 1), 'hf_id'); $hf = $this->generic_model->array_from_db($hf, 'hf_id, hf_facility'); $crud->field_type('hotel_facilities', 'multiselect', $hf); $hrf = $this->generic_model->get_by('hotel_room_facilities', array('hrf_status' => 1), 'hrf_id'); $hrf = $this->generic_model->array_from_db($hrf, 'hrf_id, hrf_facility'); $crud->field_type('hotel_room_facilities', 'multiselect', $hrf); $crud->unique_fields('hotel_slug'); $crud->add_action('Photo Gallery', '', 'hotels/gallery', 'ui-icon ui-icon-image'); $output = $crud->render(); $data = array('main_content' => 'list', 'output' => $output, 'pagetitle' => 'Hotels', 'pagedesc' => 'Hotels', 'contenttitle' => 'Hotels List Records'); $this->load->view('gc_admin_wrapper', $data); }
function salidas() { 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('salida'); /* Le asignamos un nombre */ $crud->set_subject('Salidas de productos'); $crud->set_relation('producto', 'productos', 'nombre'); $crud->set_relation('cliente', 'clientes', 'nombre'); //$crud->display_as('proveedor','Proveedor'); //$crud->set_subject('productos'); /* Asignamos el idioma español */ $crud->set_language('spanish'); /* Aqui le decimos a grocery que estos campos son obligatorios */ $crud->required_fields('producto', 'cantidad', 'cliente', 'folio', 'comentarios', 'precio', 'total'); /* Aqui le indicamos que campos deseamos mostrar */ $crud->columns('id', 'producto', 'cantidad', 'cliente', 'folio', 'comentarios', 'precio', 'total'); $crud->callback_column('precio', array($this, 'valuePeso')); $crud->callback_column('total', array($this, 'valuePeso')); $crud->callback_before_insert(array($this, 'checking_post_cantidad')); $crud->unset_delete(); $crud->unset_edit(); $crud->unset_export(); //$crud->add_action('Smileys', 'http://www.grocerycrud.com/assets/uploads/general/smiley.png', 'demo/action_smiley'); //$crud->callback_edit_field('cantidad',array($this,'edit_field_callback_1')); //$crud->callback_add_field('cantidad',array($this,'edit_field_callback_2')); /* 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'); } }
public function unit() { $crud = new grocery_CRUD(); $crud->set_table('unit'); //$crud->columns('namaGroup'); $crud->callback_column('namaGroup', array($this, '_linkSurat')); //$crud->columns('nomorSurat','perihal','tanggal'); $output = $crud->render(); $this->_outputs($output); }
public function products_management() { $crud = new grocery_CRUD(); $crud->set_table('products'); $crud->set_subject('Product'); $crud->unset_columns('productDescription'); $crud->callback_column('buyPrice', array($this, 'valueToEuro')); $output = $crud->render(); $this->_example_output($output); }
public function index() { $crud = new grocery_CRUD(); $crud->set_table('nav_menu'); $crud->columns('title', 'parent', 'type', 'link_url'); $crud->callback_column('link_url', array($this, 'link_callback')); $crud->callback_column('maps', array($this, 'maps_callback')); // $crud->callback_before_insert(array($this,'encrypt_password_callback')); // $crud->callback_before_update(array($this,'encrypt_password_callback')); $crud->set_subject('Main Menu'); $crud->fields('title', 'parent', 'type', 'link_url', 'static_pages'); $crud->set_relation('parent', 'nav_menu', 'title'); $crud->set_relation('static_pages', 'pages', 'title'); $crud->required_fields('title', 'type'); //$crud->set_relation_n_n('access_control', 'usrmgr_access', 'modul', 'id_users', 'id_modul', 'nama_modul','priority'); //$crud->set_relation('salesRepEmployeeNumber','employees','lastName'); $output = $crud->render(); $data['subject'] = 'Menu Navigation'; $data['content'] = $this->load->view('crud.php', $output, true); $this->load->view('base_theme', $data); }
public function ijorcsdata() { $this->data['page_title'] = 'ijorcs.org'; $crud = new grocery_CRUD(); $crud->set_table('newijorcs'); $crud->set_subject('Ijorcsdata'); $crud->callback_column('landingPagePath', array($this, 'full_text')); //$crud->set_relation('parent_id','autogeneratetree','nodename'); $crud->unset_add()->unset_edit()->unset_delete()->unset_read(); $this->data['output'] = $crud->render(); $this->render('admin/crud_view'); }
public function products_management() { $crud = new grocery_CRUD(); $crud->set_table('products'); $crud->set_subject('Product'); $crud->unset_columns('productDescription', 'productName', 'productVendor', 'MSRP'); $crud->callback_column('buyPrice', array($this, 'valueToEuro')); $output = $crud->render(); $data['judul'] = 'Products'; $data['crumb'] = array('Products' => ''); $template = 'admin_template'; $view = 'grocery'; $this->outputview->output_admin($view, $template, $data, $output); }
/** * function ni digunakan untuk kv urus maklumat kursus kolej pada crud * input: - * author: Mior Mohd Hanif * Date: 28 Jun 2013 * Modification Log: 4 Julai 2013 by Mior - fixed bug insert * 18 Julai 2013 by Mior - fixed bug before insert and update */ function college_course_management() { $user_login = $this->ion_auth->user()->row(); $col_id = $user_login->col_id; $crud = new grocery_CRUD(); $crud->set_theme('flexigrid'); $crud->set_subject('Kursus Kolej'); $crud->set_table('college_course'); $crud->set_relation('cou_id', 'course', '{cou_course_code} - {cou_name}'); $crud->columns('cou_course_code', 'cou_name', 'cou_cluster'); $crud->callback_column('cou_course_code', array($this, '_callback_cou_course_code')); $crud->callback_column('cou_name', array($this, '_callback_cou_name')); $crud->callback_column('cou_cluster', array($this, '_callback_cou_cluster')); $crud->display_as('cou_id', 'Kursus')->display_as('cou_course_code', 'Kod Kursus')->display_as('cou_name', 'Nama Kursus')->display_as('cou_cluster', 'Kluster'); $crud->required_fields('cou_id'); $crud->field_type('col_id', 'invisible'); $crud->callback_before_insert(array($this, 'callback_col_id')); $crud->callback_before_update(array($this, 'callback_col_id')); $crud->where('col_id', $col_id); $output = $crud->render(); $header = "<legend><h4>Penyelenggaraan Kursus Kolej</h4></legend>"; $this->_main_output($output, $header); }
public function index() { $crud = new grocery_CRUD(); $crud->set_theme('flexigrid'); $crud->set_table('ratings'); $crud->set_subject('Ratings'); $crud->display_as('rating_id', 'Package / Hotel Name'); $crud->callback_column('rating_id', array($this, 'set_package_or_hotel')); $crud->unset_add(); $crud->unset_edit(); $crud->unset_delete(); $output = $crud->render(); $data = array('main_content' => 'list', 'output' => $output, 'pagetitle' => 'Ratings', 'pagedesc' => 'Ratings'); $this->load->view('gc_admin_wrapper', $data); }
public function createtable($db) { $this->db = $this->load->database($db, true); $crud = new grocery_CRUD(); $crud->set_table('alert_logger'); $crud->set_primary_key('id'); $crud->columns('alert', 'all_alg_data', 'all_alg_file_data', 'toa', 'alert_name', 'status', 'del'); $crud->display_as('alert', 'Alert')->display_as('all_alg_file_data', 'ALG File.')->display_as('all_alg_data', 'ALG Ref.')->display_as('toa', 'Date')->display_as('alert_name', 'Name')->display_as('del', 'Deletion date'); $crud->unset_add(); $crud->unset_edit(); $crud->unset_delete(); $crud->callback_column('status', array($this, '_column_status')); $output = $crud->render(); $this->db->close(); $this->_example_output($output); }
public function products_management() { $crud = new grocery_CRUD(); $crud->set_table('products'); $crud->set_subject('Product'); //$crud->unset_columns('productDescription'); $crud->columns('productCode', 'productName', 'productLine', 'productScale', 'productVendor', 'quantityInStock', 'buyPrice', 'MSRP', 'move_up_down'); $crud->callback_column('buyPrice', array($this, 'valueToEuro')); $crud->callback_column('move_up_down', array($this, 'populate_up_down')); $crud->order_by('priority'); $this->session->set_userdata('callableAction', site_url() . '/examples/updatePosition/products'); $this->session->set_userdata('primary_key', 'productCode'); $crud->set_js("index.php/examples/dragdrop_js"); $output = $crud->render(); $this->_example_output($output); }
public function index() { $crud = new grocery_CRUD(); $crud->set_theme('flexigrid'); $crud->set_table('slider'); $crud->set_subject('Slider'); $crud->display_as('slider_title', 'Title'); $crud->display_as('slider_place', 'Place'); $crud->display_as('slider_price', 'Price'); $crud->display_as('slider_image', 'Image'); $crud->display_as('slider_status', 'Status'); $crud->callback_column('slider_image', array($this, 'set_image')); $crud->set_field_upload('slider_image', $this->upload_path); $output = $crud->render(); $data = array('main_content' => 'list', 'output' => $output, 'pagetitle' => 'Slider', 'pagedesc' => 'Slider', 'contenttitle' => 'Slider List Records'); $this->load->view('gc_admin_wrapper', $data); }
function principal($id) { try { $crud = new grocery_CRUD(); $crud->set_theme('flexigrid'); $crud->set_table('tp_videos_campa'); $crud->set_subject('videos_campa'); $crud->set_language('spanish'); $crud->fields('campa', 'video'); $crud->required_fields('campa', 'video'); $crud->set_subject('video'); $crud->display_as('campa', 'Campaña'); $crud->unset_add(); $crud->unset_export(); $crud->unset_print(); $crud->where('campa', $id); $crud->set_relation('campa', 'tp_campa', 'nombre'); $crud->callback_column('video', array($this, 'obtener_video')); $output = $crud->render(); $data['opcion'] = 'campa'; $data['nombre_usuario'] = $this->modelo->nombre_usuario($this->session->userdata('id_usuario')); $data['logo'] = $this->modelo->logo(); $data['url_logo'] = $this->modelo->url_logo(); $data['logo_opcional'] = $this->modelo->logo_opcional(); $data['url_logo_opcional'] = $this->modelo->url_logo_opcional(); $this->load->view('cabecera', $data); $data['opcion_campa'] = 'videos_campa'; $nombre_campa = ""; $campas = $this->modelo->obtener_nombre_campa($id); foreach ($campas->result() as $fila) { $nombre_campa = $fila->nombre; } $data['nombre_campa'] = $nombre_campa; $this->load->view('opciones_campa', $data); $data['nuevo_video'] = ''; $data['id'] = $id; $this->load->view('opciones_banner_imagen_otros', $data); $this->load->view('campa', $output); $this->load->view('regresar'); $this->load->view('pie'); } catch (Exception $e) { show_error($e->getMessage() . ' --- ' . $e->getTraceAsString()); } }
public function get_crud_add_mod_usuarios() { $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_tipopersona', 'gp_tipopersona', 'typo_persona'); $crud->set_relation('id_departamento', 'gp_departamentos', 'nombre_depart', array('estado_dep' => '1')); $crud->set_relation_n_n('modulos', 'gp_mod_persona', 'gp_modulos', 'id_persona', 'id_modulo', 'modulos'); $crud->set_table('gp_persona'); // $crud->callback_column('modulos', array($this, 'view_modulos')); $crud->callback_column('add_modulos', array($this, 'add_modulos')); $columns = array('cedula', 'nombres', 'apellidos', 'id_tipopersona', 'id_departamento', 'modulos', 'add_modulos'); $crud->columns2($columns); $crud->set_subject('Estudiante'); $crud->unset_add()->unset_delete()->unset_edit(); $output = $crud->render(); $this->load->view('crud/crud_view_datatable', $output); }
public function index() { $crud = new grocery_CRUD(); $crud->set_theme('datatables'); $crud->set_model('My_Custom_model'); $crud->set_table('ips_ordertracking', 'ips_productitems'); $crud->set_subject('Sales Tracking'); $crud->required_fields('NAME'); // void set_relation_n_n( string $field_name, string $relation_table, string $selection_table, string $primary_key_alias_to_this_table, string $primary_key_alias_to_selection_table , string $title_field_selection_table [ , string $priority_field_relation ] ) $crud->set_relation_n_n('orderdetails', 'ips_ordertracking', 'ips_productitems', 'ips_ordertracking', 'ordertrackingid', 'description', 'category'); // $crud->set_relation('ordertrackingid','ips_productitems','description'); // $crud->columns('ordertrackingid','fullfillment','orderdate','orderid','returnid','itemrece','caseid','product','status','Action'); // $crud->display_as('orderdate','Order Date')->display_as('orderid','Order ID')->display_as('returnid','Sales Return ID')->display_as('itemrece','Item Received')->display_as('caseid','Case ID')->display_as('product','Product Condition')->display_as('ordertrackingid','ID'); $crud->columns('ordertrackingid', 'orderid', 'description', 'category', 'product', 'itemrece', 'cost', 'mrp', 'Action'); $crud->display_as('orderid', 'Order ID')->display_as('itemrece', 'Item Received')->display_as('product', 'Product Condition')->display_as('ordertrackingid', 'ID')->display_as('description', 'Product Name')->display_as('category', 'Category')->display_as('cost', 'Recovery Min')->display_as('mrp', 'Recovery Max'); $crud->callback_column('ordertrackingid', array($this, '_callback_webpage_url')); $crud->callback_column('orderdate', array($this, '_callback_dateformat')); $crud->callback_column('fullfillment', array($this, '_callback_fullfillment')); // $crud->callback_column('product',array($this,'_callback_product')); $crud->callback_column('status', array($this, '_callback_status')); $crud->callback_column('itemrece', array($this, '_callback_itemrece')); $crud->callback_column('cost', array($this, '_callback_recovery_min')); $crud->callback_column('mrp', array($this, '_callback_recovery_max')); $crud->callback_column('Action', array($this, '_callback_viewpage_url')); $crud->unset_edit(); $crud->unset_read(); $crud->unset_delete(); // $crud->callback_after_insert(array($this, 'fullfillmentid_generation')); $output = $crud->render(); $state = $crud->getState(); if ($state == 'add') { redirect('store/addtracking'); } if ($state == 'view') { redirect('store/viewtracking'); } // $this->grocery_crud->set_table('ips_login'); // $output = $this->grocery_crud->render(); $this->_example_output($output); }
public function index() { $crud = new grocery_CRUD(); $crud->set_theme('flexigrid'); $crud->set_table('hotel_tariffs'); $crud->set_subject('Hotel Tariffs'); // $crud->unset_fields('ht_id'); $crud->display_as('hotels_hotel_id', 'Hotel Name'); $crud->display_as('ht_hotelRoom', 'Hotel Room'); $crud->display_as('ht_hotelTariffs', 'Hotel Tariffs'); $crud->callback_column('ht_hotelTariffs', array($this, 'set_price')); $crud->callback_read_field('ht_hotelTariffs', array($this, 'set_price')); // crud library modified SAM for read_field $crud->callback_add_field('ht_hotelTariffs', array($this, 'add_price1')); $crud->callback_edit_field('ht_hotelTariffs', array($this, 'edit_price1')); $crud->set_relation('hotels_hotel_id', 'hotels', '{hotel_name}'); $output = $crud->render(); $data = array('main_content' => 'list', 'output' => $output, 'pagetitle' => 'Hotel Tariffs', 'pagedesc' => 'Hotel Tariffs', 'contenttitle' => 'Hotel Tariffs List Records'); $this->load->view('gc_admin_wrapper', $data); }
function principal($id) { try { $crud = new grocery_CRUD(); $crud->set_theme('flexigrid'); $crud->set_table('tp_desglose_presupuesto'); $crud->set_subject('Desglose'); $crud->set_language('spanish'); $crud->fields('id_desglose_presupuesto', 'presupuesto', 'id_concepto', 'concepto', 'cantidad', 'porcentaje'); $crud->columns('id_concepto', 'concepto', 'cantidad', 'porcentaje'); $crud->display_as('id_concepto', 'Clave del concepto'); $crud->required_fields('id_concepto', 'concepto', 'cantidad'); $crud->unset_add(); $crud->unset_export(); $crud->unset_print(); $crud->edit_fields('id_concepto', 'concepto', 'cantidad'); $crud->where('presupuesto', $id); $crud->callback_after_update(array($this, 'actualizar_porcentaje')); $crud->callback_column('cantidad', array($this, 'formato_dinero')); $output = $crud->render(); $data['opcion'] = 'presupuesto'; $data['nombre_usuario'] = $this->modelo->nombre_usuario($this->session->userdata('id_usuario')); $data['logo'] = $this->modelo->logo(); $data['url_logo'] = $this->modelo->url_logo(); $data['logo_opcional'] = $this->modelo->logo_opcional(); $data['url_logo_opcional'] = $this->modelo->url_logo_opcional(); $this->load->view('cabecera', $data); $data['opcion_presupuesto'] = 'desglose'; $this->load->view('opciones_presupuesto', $data); $data['nuevo_desglose'] = ''; $data['id'] = $id; $this->load->view('opciones_banner_imagen_otros', $data); //$data['output'] = $output; //$data['opcion_medios'] = 'ver_todos'; $this->load->view('presupuesto', $output); $this->load->view('regresar'); $this->load->view('pie'); } catch (Exception $e) { show_error($e->getMessage() . ' --- ' . $e->getTraceAsString()); } }
public function users() { $crud = new grocery_CRUD(); $crud->set_table('users'); $crud->set_subject('Users'); $crud->columns('username', 'email', 'groups', 'active'); if ($this->uri->segment(3) !== 'read') { $crud->add_fields('username', 'first_name', 'last_name', 'email', 'phone', 'groups', 'password', 'password_confirm'); $crud->edit_fields('username', 'first_name', 'last_name', 'email', 'phone', 'groups', 'last_login', 'old_password', 'new_password'); } else { $crud->set_read_fields('username', 'first_name', 'last_name', 'email', 'phone', 'groups', 'last_login'); } $crud->set_relation_n_n('groups', 'users_groups', 'groups', 'user_id', 'group_id', 'name'); //VALIDATION $crud->required_fields('username', 'first_name', 'last_name', 'email', 'phone', 'password', 'password_confirm'); $crud->set_rules('email', 'E-mail', 'required|valid_email'); $crud->set_rules('phone', 'Phone', 'required|numeric'); $crud->set_rules('password', 'Password', 'required|min_length[' . $this->config->item('min_password_length', 'ion_auth') . ']|max_length[' . $this->config->item('max_password_length', 'ion_auth') . ']|matches[password_confirm]'); $crud->set_rules('new_password', 'New password', 'min_length[' . $this->config->item('min_password_length', 'ion_auth') . ']|max_length[' . $this->config->item('max_password_length', 'ion_auth') . ']'); //FIELD TYPES $crud->change_field_type('last_login', 'readonly'); $crud->change_field_type('password', 'password'); $crud->change_field_type('password_confirm', 'password'); $crud->change_field_type('old_password', 'password'); $crud->change_field_type('new_password', 'password'); //CALLBACKS $crud->callback_insert(array($this, 'create_user_callback')); $crud->callback_update(array($this, 'edit_user_callback')); $crud->callback_field('last_login', array($this, 'last_login_callback')); $crud->callback_column('active', array($this, 'active_callback')); //VIEW $output = $crud->render(); $data['judul'] = 'Users'; $data['crumb'] = array('Users' => ''); $template = 'admin_template'; $view = 'grocery'; $this->outputview->output_admin($view, $template, $data, $output); }
function facturas_campa($id) { try { $crud = new grocery_CRUD(); $crud->set_theme('flexigrid'); $crud->set_table('tp_detalle_factura'); $crud->set_subject('Desglose'); $crud->set_language('spanish'); $crud->fields('factura', 'factura_aux', 'medio', 'dependencia_contratante', 'contrato', 'concepto', 'unidades', 'monto_concepto', 'dependencia_s', 'campa_factura'); $crud->display_as('dependencia_s', 'Dependencia solicitante')->display_as('campa_factura', 'Campaña')->display_as('factura_aux', 'Factura')->display_as('concepto', 'Subconcepto')->display_as('monto_concepto', 'Monto subconcepto'); $crud->unset_add(); $crud->unset_export(); $crud->unset_print(); $crud->columns('factura', 'medio', 'dependencia_contratante', 'concepto', 'unidades', 'monto_concepto'); $crud->edit_fields('concepto', 'unidades', 'monto_concepto', 'dependencia_s', 'campa_factura'); $crud->required_fields('concepto', 'unidades', 'monto_concepto', 'dependencia_s', 'campa_factura'); $crud->callback_edit_field('dependencia_s', array($this, 'editar_dependencia_solicitante')); $crud->callback_edit_field('campa_factura', array($this, 'editar_campa')); $crud->where('campa_factura', $id); $crud->set_relation('factura', 'tp_factura', 'num_factura'); $crud->set_relation('dependencia_s', 'tp_dependencia', 'dependencia'); $crud->set_relation('campa_factura', 'tp_campa', 'nombre'); $crud->callback_after_upload(array($this, 'obtener_imagen_upload')); $crud->callback_column('medio', array($this, 'hacer_vinculo_medio')); $crud->callback_column('dependencia_contratante', array($this, 'hacer_vinculo_dependencia_contratante')); $crud->callback_column('monto_concepto', array($this, 'formato_dinero_monto_concepto')); $output = $crud->render(); $data['opcion'] = 'facturas'; $data['nombre_usuario'] = $this->modelo->nombre_usuario($this->session->userdata('id_usuario')); $data['logo'] = $this->modelo->logo(); $data['url_logo'] = $this->modelo->url_logo(); $data['logo_opcional'] = $this->modelo->logo_opcional(); $data['url_logo_opcional'] = $this->modelo->url_logo_opcional(); $this->load->view('cabecera', $data); $data['opcion_factura'] = 'detalle_factura'; $num_factura = ""; $facturas = $this->modelo->obtener_numero_factura($id); foreach ($facturas->result() as $fila) { $num_factura = $fila->num_factura; } $data['num_factura'] = $num_factura; $this->load->view('opciones_facturas', $data); $data['nuevo_detalle'] = ''; $data['id'] = $id; $this->load->view('opciones_banner_imagen_otros', $data); $totales = $this->modelo->totales_detalle_factura_campa($id); $data['totales'] = $totales; $this->load->view('total_detalle_factura', $data); $this->load->view('factura', $output); $this->load->view('regresar'); $this->load->view('pie'); } catch (Exception $e) { show_error($e->getMessage() . ' --- ' . $e->getTraceAsString()); } }