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


PHP grocery_CRUD::callback_after_delete方法代码示例

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


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

示例1: listarNeumonias

 public function listarNeumonias()
 {
     $sub = $this->frontend_model->buscarDiresas();
     $subr = array();
     foreach ($sub as $dato) {
         $subr[$dato->codigo] = $dato->nombre;
     }
     $est = $this->frontend_model->listaEstablec();
     $estab = array();
     foreach ($est as $dato) {
         $estab[$dato->cod_est] = $dato->raz_soc;
     }
     $crud = new grocery_CRUD();
     $crud->set_table('neumonias');
     $crud->columns('diresa', 'e_salud', 'apepat', 'apemat', 'nombres', 'sexo', 'fecha_reg', 'fecha_def', 'usuario');
     $crud->set_subject('Ficha');
     $nivelUsuario = $this->session->userdata("nivel");
     switch ($nivelUsuario) {
         case '8':
             $where = array('e_salud' => $this->session->userdata("establecimiento"));
             $crud->where($where);
             break;
         case '7':
             $where = array('microred' => $this->session->userdata("microred"), 'red' => $this->session->userdata("red"), 'diresa' => $this->session->userdata("diresa"));
             $crud->where($where);
             break;
         case '6':
             $where = array('red' => $this->session->userdata("red"), 'diresa' => $this->session->userdata("diresa"));
             $crud->where($where);
             break;
         case '5':
             $where = array('diresa' => $this->session->userdata("diresa"));
             $crud->where($where);
             break;
     }
     $crud->field_type('sexo', 'dropdown', array('M' => 'Masculino', 'F' => 'Femenino'));
     $crud->field_type('diresa', 'dropdown', $subr);
     $crud->field_type('e_salud', 'dropdown', $estab);
     $crud->display_as("apepat", "Apellido Paterno");
     $crud->display_as("apemat", "Apellido Materno");
     $crud->display_as("fecha_reg", "Registro");
     $crud->display_as("fecha_def", "Defunción");
     $crud->display_as("e_salud", "Establecimiento");
     $crud->unset_add();
     $crud->unset_edit();
     $crud->unset_read();
     $crud->unset_export();
     //$crud->unset_print();
     $crud->callback_after_delete(array($this, 'log_usuario_before_delete'));
     $crud->add_action_peru('', '', 'RegfichaNeum', 'add-icon');
     $crud->add_action('Modificar Ficha', '', 'modulos3/ModfichaNeum', 'edit-icon');
     $crud->add_action('Ver Ficha', '', 'modulos3/VerfichaNeum', 'read-icon');
     $output = $crud->render();
     $this->_example_output($output);
 }
开发者ID:alejandrob1519,项目名称:nwsp,代码行数:55,代码来源:modulos3.php

示例2: index

 public function index()
 {
     try {
         // General
         $crud = new grocery_CRUD();
         $crud->set_language("french");
         $crud->set_theme('bootstrap');
         $crud->set_table('sos_femme');
         if (!$this->session->userdata('status')) {
             $crud->where('archiver', FALSE);
         }
         $crud->set_subject('Femme');
         //relations
         $crud->set_relation('situation_familiale', 'sos_gen_situation_familiale_parrent', 'name_situation_familiale_parrent');
         $crud->set_relation('detailles', 'sos_gen_situation_familiale_child', 'name_situation_familiale_child');
         $crud->set_relation('emplois', 'sos_gen_emplois_parrent', 'name_emplois');
         $crud->set_relation('emplois_detailles', 'sos_gen_emplois_child', 'name_emplois_detaille');
         $crud->set_relation('emplois_more_detailles', 'sos_gen_emplois_child_child', 'name_emplois_child_child');
         $crud->set_relation('age', 'sos_gen_femme_age', 'name_femme_age');
         $crud->set_relation('duree_de_la_relation', 'sos_gen_duree_de_la_relation', 'name_duree_de_la_relation', null, 'id_duree_de_la_relation ASC');
         $crud->set_relation('service', 'sos_gen_service', 'nom_service', null, 'nom_service DESC');
         $crud->set_relation('ville', 'sos_gen_villes', '{nom_ville}, {code_postal}', null, 'nom_ville ASC');
         $crud->set_relation('pays', 'sos_gen_pays', '{nom_pays} - {continent}', null, 'nom_pays ASC');
         $crud->set_relation('nationalite', 'sos_gen_nationalite', 'name_nationalite');
         $crud->set_relation('nationalite_detailles', 'sos_gen_nationalite_detailles', 'name_nationalite_detailles');
         $crud->set_relation('ressources', 'sos_gen_ressources', 'name_ressources');
         $crud->set_relation('provenance', 'sos_gen_provenance', 'name_provenance');
         $crud->set_relation('allocations_familiales', 'sos_gen_allocations_familiales', 'name_allocations_familiales');
         $crud->set_relation('percues_par', 'sos_gen_percues_par', 'name_percues_par');
         $crud->set_relation('logement', 'sos_gen_logement_parent', 'name_logement');
         $crud->set_relation('logement_detailles', 'sos_gen_logement_child', 'name_logement_child');
         $crud->set_relation('situation_actuelle_depuis', 'sos_gen_situation_actuelle_depuis', 'name_situation_actuelle_depuis', null, 'id_situation_actuelle_depuis ASC');
         $crud->set_relation('situation_actuelle', 'sos_gen_situation_actuelle', 'name_situation_actuelle');
         $crud->set_relation('situation_actuelle_detailles', 'sos_gen_situation_actuelle_detailles', 'name_situation_actuelle_detailles');
         $crud->set_relation('partenaire', 'sos_gen_partenaire', 'name_partenaire');
         $crud->set_relation('informations', 'sos_gen_informations', 'name_informations');
         $crud->set_relation('rdv', 'sos_gen_rdv', 'name_rdv');
         $crud->set_relation('hebergement', 'sos_gen_hebergement', 'name_hebergement');
         $crud->set_relation('departs_anterieurs', 'sos_gen_departs_anterieurs', 'name_departs_anterieurs');
         $crud->set_relation('depuis', 'sos_gen_depuis', 'name_depuis');
         //Master/child relations
         $fields_situation_familialle = array('situation_familiale' => array('table_name' => 'sos_gen_situation_familiale_parrent', 'title' => 'name_situation_familiale_parrent', 'relate' => null), 'detailles' => array('table_name' => 'sos_gen_situation_familiale_child', 'title' => 'name_situation_familiale_child', 'id_field' => 'id_situation_familiale_child', 'relate' => 'id_parrent_from_situation_familiale_parrent', 'data-placeholder' => 'Préciser'));
         $config_situation_familialle = array('main_table' => 'sos_femme', 'main_table_primary' => 'id_femme', "url" => base_url() . 'index.php/home/index/', 'segment_name' => "situation_familialle");
         $categories_situation_familialle = new gc_dependent_select($crud, $fields_situation_familialle, $config_situation_familialle);
         $js_situation_familialle = $categories_situation_familialle->get_js();
         $fields_nationalite = array('nationalite' => array('table_name' => 'sos_gen_nationalite', 'title' => 'name_nationalite', 'relate' => null), 'nationalite_detailles' => array('table_name' => 'sos_gen_nationalite_detailles', 'title' => 'name_nationalite_detailles', 'id_field' => 'id_nationalite_detailles', 'relate' => 'id_from_nationalite', 'data-placeholder' => 'Préciser'));
         $config_nationalite = array('main_table' => 'sos_femme', 'main_table_primary' => 'id_femme', "url" => base_url() . 'index.php/home/index/', 'segment_name' => "nationalite");
         $categories_nationalite = new gc_dependent_select($crud, $fields_nationalite, $config_nationalite);
         $js_nationalite = $categories_nationalite->get_js();
         $fields_emplois = array('emplois' => array('table_name' => 'sos_gen_emplois_parrent', 'title' => 'name_emplois', 'relate' => null), 'emplois_detailles' => array('table_name' => 'sos_gen_emplois_child', 'title' => 'name_emplois_detaille', 'id_field' => 'id_emplois_detailles', 'relate' => 'id_from_emplois', 'data-placeholder' => 'Préciser'), 'emplois_more_detailles' => array('table_name' => 'sos_gen_emplois_child_child', 'title' => 'name_emplois_child_child', 'id_field' => 'id_emplois_child_child', 'relate' => 'id_emplois_from_child', 'data-placeholder' => 'Préciser'));
         $config_emplois = array('main_table' => 'sos_femme', 'main_table_primary' => 'id_femme', "url" => base_url() . 'index.php/home/index/', 'segment_name' => "emplois");
         $categories_emplois = new gc_dependent_select($crud, $fields_emplois, $config_emplois);
         $js_emplois = $categories_emplois->get_js();
         $fields_ressources = array('ressources' => array('table_name' => 'sos_gen_ressources', 'title' => 'name_ressources', 'relate' => null), 'provenance' => array('table_name' => 'sos_gen_provenance', 'title' => 'name_provenance', 'id_field' => 'id_provenance', 'relate' => 'id_from_ressources', 'data-placeholder' => 'Préciser'));
         $config_ressources = array('main_table' => 'sos_femme', 'main_table_primary' => 'id_femme', "url" => base_url() . 'index.php/home/index/', 'segment_name' => "ressources");
         $categories_ressources = new gc_dependent_select($crud, $fields_ressources, $config_ressources);
         $js_ressources = $categories_ressources->get_js();
         $fields_allocations_familiales = array('allocations_familiales' => array('table_name' => 'sos_gen_allocations_familiales', 'title' => 'name_allocations_familiales', 'relate' => null), 'percues_par' => array('table_name' => 'sos_gen_percues_par', 'title' => 'name_percues_par', 'id_field' => 'id_percues_par', 'relate' => 'id_from_allocations_familiales', 'data-placeholder' => 'Préciser'));
         $config_allocations_familiales = array('main_table' => 'sos_femme', 'main_table_primary' => 'id_femme', "url" => base_url() . 'index.php/home/index/', 'segment_name' => "allocations_familiales");
         $categories_allocations_familiales = new gc_dependent_select($crud, $fields_allocations_familiales, $config_allocations_familiales);
         $js_allocations_familiales = $categories_allocations_familiales->get_js();
         $fields_logement = array('logement' => array('table_name' => 'sos_gen_logement_parent', 'title' => 'name_logement', 'relate' => null), 'logement_detailles' => array('table_name' => 'sos_gen_logement_child', 'title' => 'name_logement_child', 'id_field' => 'id_logement_child', 'relate' => 'id_from_logement_parent', 'data-placeholder' => 'Préciser'));
         $config_logement = array('main_table' => 'sos_femme', 'main_table_primary' => 'id_femme', "url" => base_url() . 'index.php/home/index/', 'segment_name' => "logement");
         $categories_logement = new gc_dependent_select($crud, $fields_logement, $config_logement);
         $js_logement = $categories_logement->get_js();
         $fields_situation_actuelle = array('situation_actuelle' => array('table_name' => 'sos_gen_situation_actuelle', 'title' => 'name_situation_actuelle', 'relate' => null), 'situation_actuelle_detailles' => array('table_name' => 'sos_gen_situation_actuelle_detailles', 'title' => 'name_situation_actuelle_detailles', 'id_field' => 'id_situation_actuelle_detailles', 'relate' => 'id_from_situation_actuelle', 'data-placeholder' => 'Préciser'));
         $config_situation_actuelle = array('main_table' => 'sos_femme', 'main_table_primary' => 'id_femme', "url" => base_url() . 'index.php/home/index/', 'segment_name' => "situation_actuelle");
         $categories_situation_actuelle = new gc_dependent_select($crud, $fields_situation_actuelle, $config_situation_actuelle);
         $js_situation_actuelle = $categories_situation_actuelle->get_js();
         //Visual
         if ($this->session->userdata('status') == '0' or $this->session->userdata('status') == '4') {
             $crud->columns('prenom', 'nom', 'nom_marital', 'age', 'date_naissance', 'telephone', 'ville', 'nombre_denfants', 'ouvertures', 'premier_contact', 'nombre_passages');
         } else {
             $crud->columns('archiver', 'prenom', 'nom', 'nom_marital', 'age', 'date_naissance', 'telephone', 'ville', 'nombre_denfants', 'ouvertures', 'premier_contact', 'nombre_passages');
         }
         $crud->display_as('pays', 'Originaire de')->display_as('archiver', 'Archivage')->display_as('prenom', 'Prénom')->display_as('telephone', 'Téléphone')->display_as('nationalite', 'Nationalité')->display_as('rue', 'Adresse')->display_as('oriente_par_SMS', 'Orientée par SMS')->display_as('departs_anterieurs', 'Départs antérieurs')->display_as('nationalite_detailles', 'Situation administrative')->display_as('detailles', 'Situation familiale en détail')->display_as('duree_de_la_relation', 'Durée de la relation')->display_as('emplois_detailles', 'Détails de l\'emploi')->display_as('emplois_more_detailles', 'Plus de détails de l\'emploi')->display_as('ouvertures', 'Dernière modification')->display_as('hebergement', 'Demande d\'hébergement')->display_as('aide_materielle', 'Demande d\'aide matérielle')->display_as('accompagnement_exterieur', 'Demande d\'accompagnement extérieur')->display_as('adresse_postale', 'Demande d\'adresse postale')->display_as('accueil', 'Demande d\'accueil')->display_as('informations', 'Demande d\'informations')->display_as('conseil', 'Demande de conseil')->display_as('orientation', 'Demande d\'orientation')->display_as('rdv', 'Demande de rdv')->display_as('hebergement', 'Demande d\'hébergement')->display_as('logement_dem', 'Demande de logement')->display_as('logement_detailles', 'Logement détaillé')->display_as('situation_actuelle_detailles', 'Situation actuelle détaillée')->display_as('emplois', 'Situation professionnelle')->display_as('emplois_detailles', 'Situation professionnelle détaillée')->display_as('emplois_more_detailles', 'Autres infos emploi')->display_as('percues_par', 'Perçues par')->display_as('commentaire', 'Commentaires')->display_as('partenaire', 'Orienteur')->display_as('nombre_passages', 'Nombre passages')->display_as('arrivee_en_france', 'Arrivée en France')->display_as('parle_pas_francais', 'Parle pas français')->display_as('ism', 'Utilisation ISM');
         $crud->order_by('prenom', 'asc');
         //unsets
         if ($this->session->userdata('status') == '1' or $this->session->userdata('status') == '2' or $this->session->userdata('status') == '3') {
             $crud->unset_edit_fields('service', 'par', 'archiver');
         } else {
             $crud->unset_edit_fields('service', 'premier_contact', 'par');
         }
         $crud->unset_add_fields('par', 'archiver');
         if ($this->session->userdata('status') == '0' or $this->session->userdata('status') == '4') {
             $crud->unset_delete();
             $crud->unset_export();
             $crud->unset_print();
         }
         //Requireds
         $crud->required_fields('service', 'premier_contact', 'prenom');
         //Callbacks
         $crud->callback_column('ouvertures', array($this, 'ouvertures'));
         $crud->callback_column('premier_contact', array($this, 'premier_contact'));
         $crud->callback_column('nombre_denfants', array($this, 'enfants'));
         $crud->callback_after_update(array($this, 'insert_after_update'));
         $crud->callback_after_insert(array($this, 'insert_after_insert'));
         $crud->callback_after_delete(array($this, 'after_delete'));
         $crud->callback_column('archiver', array($this, 'archiver'));
         $crud->callback_column('nombre_passages', array($this, 'nombre_passages'));
//.........这里部分代码省略.........
开发者ID:simplonco,项目名称:sos_femmes,代码行数:101,代码来源:home.php

示例3: irasCampos

 public function irasCampos()
 {
     if (empty($this->session_id)) {
         redirect(site_url("index/login"), 301);
     }
     $reporta = array('ano' => date('Y'), 'semana' => date('W') - 2);
     $this->reportes_model->registraCalidad($reporta);
     $this->calidad_model->edasCampos();
     $crud = new grocery_CRUD();
     $crud->set_table('irasDefunciones');
     $crud->columns('ano', 'semana', 'sub_reg_nt', 'red', 'microred', 'e_salud', 'ubigeo', 'ira_m2', 'ira_2_11', 'ira_1_4a', 'neu_2_11', 'neu_1_4a', 'ngr_m2', 'ngr_2_11', 'ngr_1_4a');
     $crud->display_as('ano', 'Año');
     switch ($this->session->userdata('nivel')) {
         case 4:
             $accesar = $this->session->userdata('equipo');
             break;
         case 5:
             $accesar = $this->session->userdata('diresa');
             $crud->or_where(array('sub_reg_nt' => $accesar));
             break;
         case 6:
             $accesar = $this->session->userdata('diresa');
             $accesar1 = $this->session->userdata('red');
             $crud->where(array('sub_reg_nt' => $accesar, 'red' => $accesar1));
             break;
         case 7:
             $accesar = $this->session->userdata('diresa');
             $accesar1 = $this->session->userdata('red');
             $accesar2 = $this->session->userdata('microred');
             $crud->where(array('sub_reg_nt' => $accesar, 'red' => $accesar1, 'microred' => $accesar2));
             break;
         case 8:
             $accesar = $this->session->userdata('establecimiento');
             $crud->where(array('e_salud' => $accesar));
             break;
     }
     $crud->order_by('semana');
     $crud->unset_add();
     $crud->unset_read();
     $crud->unset_edit();
     //$crud->unset_delete();
     //$crud->unset_export();
     $crud->unset_print();
     $crud->add_action('Editar', '', 'calidad/modIras', 'edit-icon');
     $crud->callback_after_delete(array($this, 'log_iras_registro_after_delete'));
     $output = $crud->render();
     $this->layout->view('irasCampos.php', $output);
 }
开发者ID:alejandrob1519,项目名称:nwsp,代码行数:48,代码来源:calidad.php

示例4: isset

    function detail_kelompok_management()
    {
        $session = isset($_SESSION['username_belajar']) ? $_SESSION['username_belajar'] : '';
        if ($session != "") {
            $pecah = explode("|", $session);
            $data["NIM"] = $pecah[0];
            $data["NAMA"] = $pecah[1];
            $data["STATUS"] = $pecah[3];
            if ($data["STATUS"] == "Admin") {
                $crud = new grocery_CRUD();
                $crud->set_language("indonesian");
                $crud->set_theme('datatables');
                $crud->set_table('KKN_DETAIL_KELOMPOK');
                $crud->set_relation('ID_KELOMPOK', 'KKN_KELOMPOK', 'NAMA_KELOMPOK');
                $crud->display_as('ID_KELOMPOK', 'Nama Kelompok');
                $crud->unset_edit();
                $crud->add_fields('ID_KELOMPOK', 'NO');
                $crud->edit_fields('ID_KELOMPOK', 'NO');
                $crud->set_relation('NO', 'KKN_MHS', '{NIM} , {JK}, {FAK}', array('SUDAH' => '2'));
                // $crud->set_relation('user_id','users','username',array('status' => 'active'));
                $crud->display_as('NO', 'Mahasiswa | Jenis Kelamin | Fakultas');
                $crud->columns('ID_KELOMPOK', 'NO');
                $crud->required_fields('ID_KELOMPOK', 'NO');
                //$crud->fields('ID_KELOMPOK', 'FAKULTAS');
                $crud->callback_after_insert(array($this, 'set_sudah_jadi_tiga'));
                $crud->callback_after_delete(array($this, 'set_sudah_jadi_dua'));
                $output = $crud->render();
                $this->_manage_output($output);
            } else {
                ?>
<script type="text/javascript" language="javascript">
			alert("Anda tidak berhak masuk ke Control Panel Admin...!!!");
			</script>
<?php 
                echo "<meta http-equiv='refresh' content='0; url=" . base_url() . "kkn'>";
            }
        } else {
            ?>
<script type="text/javascript" language="javascript">
		alert("Anda belum Log In...!!!\nAnda harus Log In untuk mengakses halaman ini...!!!");
		</script>
<?php 
            echo "<meta http-equiv='refresh' content='0; url=" . base_url() . "kkn'>";
        }
    }
开发者ID:rischanlab,项目名称:SI_KKN,代码行数:45,代码来源:manage.php

示例5: listadoIndividual


//.........这里部分代码省略.........
     $enf = $this->frontend_model->mostrarDiagnostico();
     $enfermedad = array();
     foreach ($enf as $dato) {
         $enfermedad[$dato->cie_10] = $dato->diagno;
     }
     $tdx = $this->frontend_model->mostrarTipo();
     $tipoDx = array();
     foreach ($tdx as $dato) {
         $tipoDx[$dato->codigo] = $dato->denominacion;
     }
     $filtro = array();
     $this->input->post('diresa') ? $filtro['sub_reg_nt'] = $this->input->post('diresa') : '';
     $this->input->post('redes') ? $filtro['red'] = $this->input->post('redes') : '';
     $this->input->post('microred') ? $filtro['microred'] = $this->input->post('microred') : '';
     $this->input->post('establec') ? $filtro['e_salud'] = $this->input->post('establec') : '';
     $this->input->post('departamento') ? $filtro['substr(ubigeo,1,2)'] = $this->input->post('departamento') : '';
     $this->input->post('provincia') ? $filtro['substr(ubigeo,1,4)'] = $this->input->post('provincia') : '';
     $this->input->post('distrito') ? $filtro['ubigeo'] = $this->input->post('distrito') : '';
     $this->input->post('diagno') ? $filtro['diagnostic'] = $this->input->post('diagno') : '';
     $this->input->post('tipoDx') ? $filtro['tipo_dx'] = $this->input->post('tipoDx') : '';
     $this->input->post('ano_ini') ? $filtro['ano'] = $this->input->post('ano_ini') : '';
     $this->input->post('semana_ini') ? $filtro['semana'] = $this->input->post('semana_ini') : '';
     $this->input->post('apepat') ? $filtro['apepat'] = $this->input->post('apepat') : '';
     $crud = new grocery_CRUD();
     $crud->set_theme("datatables");
     $crud->set_table('individual');
     $crud->columns('ano', 'semana', 'diagnostic', 'tipo_dx', 'subregion', 'sub_reg_nt', 'ubigeo', 'sexo', 'apepat', 'apemat', 'nombres');
     $crud->display_as('ano', 'A&ntilde;o')->display_as('diagnostic', 'Diagn&oacute;stico')->display_as('subregion', 'Diresa')->display_as('sub_reg_nt', 'Notificante')->display_as('ubigeo', 'Distrito')->display_as('tipo_dx', 'Tipo')->display_as('apepat', 'Ap. Paterno')->display_as('apemat', 'Ap. Materno');
     $crud->field_type('subregion', 'dropdown', $subr);
     $crud->field_type('sub_reg_nt', 'dropdown', $subr);
     $crud->field_type('ubigeo', 'dropdown', $ubigeo);
     $crud->field_type('diagnostic', 'dropdown', $enfermedad);
     $crud->field_type('tipo_dx', 'dropdown', $tipoDx);
     $crud->field_type('sexo', 'dropdown', array('M' => 'Masculino', 'F' => 'Femenino'));
     if ($this->input->post()) {
         if ($this->session->userdata('institucion') == 'A') {
             $crud->where($filtro);
         } else {
             $crud->where($filtro);
             $crud->where(array('substr(e_salud,7,1)' => $this->session->userdata('institucion')));
         }
     } else {
         $crud->where(array('ano' => date('Y')));
         switch ($this->session->userdata('nivel')) {
             case 4:
                 $accesar = $this->session->userdata('equipo');
                 if ($this->session->userdata('institucion') != 'A') {
                     $crud->where(array('substr(e_salud,7,1)' => $this->session->userdata('institucion')));
                 }
                 break;
             case 5:
                 $accesar = $this->session->userdata('diresa');
                 if ($this->session->userdata('institucion') != 'A') {
                     $crud->where(array('substr(e_salud,7,1)' => $this->session->userdata('institucion'), 'subregion' => $accesar));
                 } else {
                     $crud->where(array('subregion' => $accesar));
                     $crud->or_where(array('sub_reg_nt' => $accesar));
                 }
                 break;
             case 6:
                 $accesar = $this->session->userdata('diresa');
                 $accesar1 = $this->session->userdata('red');
                 if ($this->session->userdata('institucion') != 'A') {
                     $crud->where(array('substr(e_salud,7,1)' => $this->session->userdata('institucion'), 'sub_reg_nt' => $accesar, 'red' => $accesar1));
                 } else {
                     $crud->where(array('sub_reg_nt' => $accesar, 'red' => $accesar1));
                 }
                 break;
             case 7:
                 $accesar = $this->session->userdata('diresa');
                 $accesar1 = $this->session->userdata('red');
                 $accesar2 = $this->session->userdata('microred');
                 if ($this->session->userdata('institucion') != 'A') {
                     $crud->where(array('substr(e_salud,7,1)' => $this->session->userdata('institucion'), 'sub_reg_nt' => $accesar, 'red' => $accesar1, 'microred' => $accesar2));
                 } else {
                     $crud->where(array('sub_reg_nt' => $accesar, 'red' => $accesar1, 'microred' => $accesar2));
                 }
                 break;
             case 8:
                 $accesar = $this->session->userdata('establecimiento');
                 $crud->where(array('e_salud' => $accesar));
                 break;
         }
     }
     $crud->limit(1000);
     $crud->order_by('semana', 'DESC');
     $crud->set_subject('Individual');
     $crud->unset_add();
     $crud->unset_read();
     $crud->unset_edit();
     $crud->unset_export();
     $crud->unset_print();
     $crud->callback_after_delete(array($this, 'log_usuario_before_delete'));
     $crud->add_action('Editar', '', 'individual/modIndividual', 'ui-icon-pencil');
     ///////////////////////////////////////////////////////////////////////////////
     //$crud->add_action_peru('A&ntilde;adir Individual', '', 'regIndividual','add-icon');
     ///////////////////////////////////////////////////////////////////////////////
     $output = $crud->render();
     $this->_example_output1($output);
 }
开发者ID:alejandrob1519,项目名称:nwsp,代码行数:101,代码来源:individual.php

示例6: listadoEdas

 public function listadoEdas()
 {
     $sub = $this->frontend_model->buscarDiresas();
     $subr = array();
     foreach ($sub as $dato) {
         $subr[$dato->codigo] = $dato->nombre;
     }
     $dist = $this->frontend_model->listarDistritos();
     $ubigeo = array();
     foreach ($dist as $dato) {
         $ubigeo[$dato->ubigeo] = $dato->nombre;
     }
     $est = $this->frontend_model->listaEstablec();
     $establec = array();
     foreach ($est as $dato) {
         $establec[$dato->cod_est] = $dato->raz_soc;
     }
     $filtro = array();
     $this->input->post('diresa') ? $filtro['sub_reg_nt'] = $this->input->post('diresa') : '';
     $this->input->post('redes') ? $filtro['red'] = $this->input->post('redes') : '';
     $this->input->post('microred') ? $filtro['microred'] = $this->input->post('microred') : '';
     $this->input->post('establec') ? $filtro['e_salud'] = $this->input->post('establec') : '';
     $this->input->post('departamento') ? $filtro['substr(ubigeo,1,2)'] = $this->input->post('departamento') : '';
     $this->input->post('provincia') ? $filtro['substr(ubigeo,1,4)'] = $this->input->post('provincia') : '';
     $this->input->post('distrito') ? $filtro['ubigeo'] = $this->input->post('distrito') : '';
     $this->input->post('ano') ? $filtro['ano'] = $this->input->post('ano') : '';
     $this->input->post('semana') ? $filtro['semana'] = $this->input->post('semana') : '';
     $crud = new grocery_CRUD();
     $crud->set_theme("datatables");
     $crud->set_table('edas');
     $crud->columns('ano', 'semana', 'sub_reg_nt', 'e_salud', 'ubigeo', 'daa_c1', 'daa_c1_4', 'daa_c5', 'dis_c1', 'dis_c1_4', 'dis_c5');
     $crud->display_as('ano', 'A&ntilde;o')->display_as('e_salud', 'Establecimiento')->display_as('sub_reg_nt', 'Diresa');
     $crud->field_type('sub_reg_nt', 'dropdown', $subr);
     $crud->field_type('e_salud', 'dropdown', $establec);
     $crud->field_type('ubigeo', 'dropdown', $ubigeo);
     if ($this->input->post()) {
         if ($this->session->userdata('institucion') == 'A') {
             $crud->where($filtro);
         } else {
             $crud->where($filtro);
             $crud->where(array('substr(e_salud,7,1)' => $this->session->userdata('institucion')));
         }
     } else {
         $crud->where(array('ano' => date('Y')));
         switch ($this->session->userdata('nivel')) {
             case 4:
                 $accesar = $this->session->userdata('equipo');
                 if ($this->session->userdata('institucion') != 'A') {
                     $crud->where(array('substr(e_salud,7,1)' => $this->session->userdata('institucion')));
                 }
                 break;
             case 5:
                 $accesar = $this->session->userdata('diresa');
                 if ($this->session->userdata('institucion') != 'A') {
                     $crud->where(array('substr(e_salud,7,1)' => $this->session->userdata('institucion'), 'sub_reg_nt' => $accesar));
                 } else {
                     $crud->where(array('sub_reg_nt' => $accesar));
                 }
                 break;
             case 6:
                 $accesar = $this->session->userdata('diresa');
                 $accesar1 = $this->session->userdata('red');
                 if ($this->session->userdata('institucion') != 'A') {
                     $crud->where(array('substr(e_salud,7,1)' => $this->session->userdata('institucion'), 'sub_reg_nt' => $accesar, 'red' => $accesar1));
                 } else {
                     $crud->where(array('sub_reg_nt' => $accesar, 'red' => $accesar1));
                 }
                 break;
             case 7:
                 $accesar = $this->session->userdata('diresa');
                 $accesar1 = $this->session->userdata('red');
                 $accesar2 = $this->session->userdata('microred');
                 if ($this->session->userdata('institucion') != 'A') {
                     $crud->where(array('substr(e_salud,7,1)' => $this->session->userdata('institucion'), 'sub_reg_nt' => $accesar, 'red' => $accesar1, 'microred' => $accesar2));
                 } else {
                     $crud->where(array('sub_reg_nt' => $accesar, 'red' => $accesar1, 'microred' => $accesar2));
                 }
                 break;
             case 8:
                 $accesar = $this->session->userdata('establecimiento');
                 $crud->where(array('e_salud' => $accesar));
                 break;
         }
     }
     $crud->limit(1000);
     $crud->order_by('semana', 'DESC');
     $crud->set_subject('Atenciones');
     $crud->unset_add();
     $crud->unset_read();
     $crud->unset_edit();
     $crud->unset_export();
     $crud->unset_print();
     $crud->callback_after_delete(array($this, 'log_usuario_before_delete'));
     $crud->add_action('Editar', '', 'edas/modEdas', 'ui-icon-pencil');
     ///////////////////////////////////////////////////////////////////////////////
     //$crud->add_action_peru('A&ntilde;adir EDAS', '', 'regEdas','add-icon');
     ///////////////////////////////////////////////////////////////////////////////
     $output = $crud->render();
     $this->_example_output1($output);
 }
开发者ID:alejandrob1519,项目名称:nwsp,代码行数:100,代码来源:edas.php

示例7: followup

 function followup()
 {
     $crud = new grocery_CRUD();
     //verifica daca get este setata sa previn eroarea "undefine index variable" si verifica daca are valoare
     if (isset($_GET["p_id"]) != NULL) {
         // setez o variabila sesiune
         $this->session->set_userdata('patient_id', $_GET['p_id']);
         $pid = $this->session->userdata('patient_id');
         //print_r("ID_pacient: ".$pid);
         //echo $_GET['pacient_id'].' sesiune settata';
     } else {
         $pid = $this->session->userdata('patient_id');
         //echo "hau".$pid."nu are";
         //print_r("ID_pacient: ".$pid);
     }
     //aici fac filtrarea pentru pacient a spitalizarilor dupa variabila sesiune
     $crud->where('patient_id', $pid);
     // Configurez modelul pentru afisare
     $crud->set_theme('datatables');
     $crud->set_table('follow_up');
     $crud->set_subject('PCI Follow-Up');
     //Configurare coloane
     $crud->columns('date', 'survival_status', 'date_of_death', 'status', 'signature');
     $crud->required_fields('signature', 'status');
     // Formatare cod
     $crud->field_type('patient_id', 'hidden', $pid);
     // $crud->field_type('user_id', 'hidden');
     // $crud->field_type('edit_user', 'hidden');
     // $crud->field_type('edit_time', 'hidden');
     $crud->set_relation('signature', 'user', 'user_name');
     // User Level Unset
     $drp = $this->session->userdata('user_type');
     //print_r($drp);
     if ($drp == "user") {
         $crud->unset_delete();
         $crud->unset_export();
         $crud->unset_print();
     }
     // log- user activities
     $crud->callback_after_insert(array($this, 'log_user_after_insert_followup'));
     $crud->callback_after_update(array($this, 'log_user_after_update_followup'));
     $crud->callback_after_delete(array($this, 'log_user_after_delete_followup'));
     // Afisare nume formular follow-up
     //-- 1. Follow Up (30 days and 12 months)
     $crud->display_as('date', 'Date of follow up');
     $crud->field_tip('date', 'Indicate the date of last follow up alive. This may be the date of follow up or the date the patient is last seen alive by verifiable sources');
     $crud->display_as('survival_status', 'Survival status at folow up');
     $crud->field_tip('survival_status', 'Indicate vital status at follow up');
     $crud->display_as('death_cause', 'Primary cause of death');
     $crud->field_tip('death_cause', 'If the patient died indicate the cause of death');
     $crud->display_as('anginal_status', 'Anginal status');
     $crud->field_tip('anginal_status', 'Indicate the patients anginal status at the time of follow-up');
     $crud->display_as('date_readmission', 'Date of first hospital readmission since discharge');
     $crud->field_tip('date_readmission', 'If the patient is readmitted to hospital for a cardiovascular cause, indicate the date');
     $crud->field_tip('dyspnoea', 'Grade breathing status according to the New York Heart Association (NYHA) functional classification.');
     $crud->display_as('mi', 'Myocardial infarction [MI]');
     $crud->field_tip('mi', 'Indicate if the patient was diagnosed as having an MI since discharge');
     $crud->display_as('mi_date', 'Myocardial infarction date [MI]');
     $crud->field_tip('mi_date', 'Indicate the date the patient had the myocardial infarction');
     $crud->display_as('stroke', 'Stroke');
     $crud->field_tip('stroke', 'Indicate if the patient was diagnosed as having a stroke since discharge, as evidenced by persistent loss of neurological function caused by an ischaemic event.');
     $crud->field_tip('stroke_date', 'Indicate the date of stroke');
     $crud->display_as('pci', 'Percutaneous coronary intervention date [PCI]');
     $crud->field_tip('pci', 'Indicate if the patient had a percutaneous coronary intervention since the date of discharge');
     $crud->display_as('pci_date', 'Percutaneous coronary intervention date [PCI] date');
     $crud->field_tip('pci_date', 'Indicate the date of PCI');
     $crud->display_as('coronary_bypass', 'Coronary artery bypass graft [CABG]');
     $crud->field_tip('coronary_bypass', 'Indicate if the patient had a coronary artery bypass graft [CABG] since the date of  discharge');
     $crud->display_as('coronary_bypass_date', 'Coronary artery bypass graft [CABG] date');
     $crud->field_tip('coronary_bypass_date', 'Indicate the date of CABG');
     $crud->display_as('cardiac_rehabilitation', 'Cardiac rehabilitation program');
     $crud->field_tip('cardiac_rehabilitation', 'Indicate if the patient attended or is attending a cardiac rehabilitation programme since discharge');
     //-- 1. Follow Up (30 days and 12 months)
     $crud->field_tip('aspirin', 'On follow-up indicate if the patient is  taking aspirin regularly');
     $crud->field_tip('other_antiplatelet', 'On follow-up indicate if the patient is taking antiplatelet medication (other than aspirin) regularly ');
     $crud->field_tip('anticoagulants', 'On follow-up indicate if the patient is  taking anticoagulant medication regularly');
     $crud->field_tip('beta_blockers', 'On follow-up indicate if the patient is taking Beta-blockers regularly');
     $crud->field_tip('ace_inhibitors', 'On follow-up indicate if the patient is taking ACE inhibitors regularly');
     $crud->display_as('angiotensin', 'Angiotensin II receptor blockers');
     $crud->field_tip('angiotensin', 'On follow-up indicate if the patient is  taking angiotensin II receptor blockers regularly');
     $crud->field_tip('diabetic_control', 'On follow-up indicate the main method of diabetic control the patient is regularly receiving');
     $crud->field_tip('statins', 'On follow-up indicate if the patient is taking statins regularly');
     $crud->display_as('non_statin', 'Non statin lipid lowering agents');
     $crud->field_tip('non_statin', 'On follow-up indicate if the patient is non-statin lipid lowering agents regularly');
     $crud->field_tip('status', 'Indicate status of intervention insert data process');
     $crud->field_tip('notes', 'Indicate notes of intervention insert data process');
     // Dropdown menu
     // -- 1. Follow Up (30 days and 12 months)
     $crud->field_type('survival_status', 'dropdown', array('Alive' => 'Alive', 'Dead' => 'Dead', 'Unknown' => 'Unknown'));
     $crud->field_type('death_cause', 'dropdown', array('Cardiovascular' => 'Cardiovascular', 'Non-Cardiovascular' => 'Non-Cardiovascular', 'Unknown' => 'Unknown'));
     $crud->field_type('anginal_status', 'dropdown', array('CCS 0' => 'CCS 0', 'CCS I' => 'CCS I', 'CCS II' => 'CCS II', 'CCS III' => 'CCS III', 'CCS IV' => 'CCS IV', 'Unknown' => 'Unknown'));
     $crud->field_type('dyspnoea', 'dropdown', array('NYHA I' => 'NYHA I', 'NYHA II' => 'NYHA II', 'NYHA III' => 'NYHA III', 'NYHA IV' => 'NYHA IV', 'Unknown' => 'Unknown'));
     $crud->field_type('mi', 'dropdown', array('No' => 'No', 'Yes' => 'Yes', 'Unknown' => 'Unknown'));
     $crud->field_type('stroke', 'dropdown', array('No' => 'No', 'Yes' => 'Yes', 'Unknown' => 'Unknown'));
     $crud->field_type('pci', 'dropdown', array('No' => 'No', 'Yes' => 'Yes', 'Unknown' => 'Unknown'));
     $crud->field_type('coronary_bypass', 'dropdown', array('No' => 'No', 'Yes' => 'Yes', 'Unknown' => 'Unknown'));
     $crud->field_type('cardiac_rehabilitation', 'dropdown', array('No' => 'No', 'Yes' => 'Yes', 'Unknown' => 'Unknown'));
     // -- 2. Medication at follow Up (30 days and 12 months)
     $crud->field_type('aspirin', 'dropdown', array('No' => 'No', 'Yes' => 'Yes', 'Unknown' => 'Unknown'));
     $crud->field_type('other_antiplatelet', 'dropdown', array('No' => 'No', 'Clopidogrel' => 'Clopidogrel', 'Ticagrelor' => 'Ticagrelor', 'Prasugrel' => 'Prasugrel', 'Other antiplatelet agent' => 'Other antiplatelet agent', 'Unknown' => 'Unknown'));
//.........这里部分代码省略.........
开发者ID:tibioltean,项目名称:pcireg,代码行数:101,代码来源:dashboard.php

示例8: callback_after_delete

	public function callback_after_delete($callback = null,$override_all=0){
		if(!$override_all){
			$this->callback_after_delete_ext[] = $callback;
			if($this->callback_after_delete == null){
				$this->callback_after_delete = array($this,'extended_callback_after_delete');
			}
		}else{
			parent::callback_after_delete($callback);
		}

		return $this;
	}
开发者ID:arnon22,项目名称:transportcm,代码行数:12,代码来源:extension_grocery_crud.php

示例9: sub_menu

 public function sub_menu($id_header_menu, $level_one)
 {
     $crud = new grocery_CRUD();
     $crud->set_table('menu');
     $crud->set_subject('Sub Menu');
     $crud->where('level_one', $level_one);
     $crud->where('level_two', '0');
     $crud->change_field_type('id_header_menu', 'invisible');
     $crud->change_field_type('level_one', 'invisible');
     $crud->order_by('sort', 'ASC');
     $crud->set_relation_n_n('Akses', 'groups_menu', 'groups', 'id_menu', 'id_groups', 'name');
     $crud->unset_columns('level_one', 'level_two', 'icon', 'menu_id', 'id_header_menu');
     $crud->unset_read();
     $crud->unset_fields('level_two');
     $crud->add_action('Sub menu 2', 'fa fa-plus-circle', '', '', array($this, 'link_sub_menu_2'));
     $crud->callback_before_insert(array($this, 'call_sub_menu'));
     $crud->callback_after_delete(array($this, 'sub_menu_after_delete'));
     $output = $crud->render();
     $data['script'] = "\$('#menu-menu').addClass('active');";
     $data['script_grocery'] = "\$('a[href=\"#hidden\"]').replaceWith('<span style=\"color:#777\"><i class=\"fa fa-circle\"></i> Sub menu 2</span>')";
     $output->data = $data;
     $data['judul'] = "Sub menu";
     $data['crumb'] = array('Header menu' => 'crud/header_menu', 'Menu' => 'crud/menu/' . $id_header_menu, 'Sub menu' => '');
     $template = 'admin_template';
     $view = 'grocery';
     $this->outputview->output_admin($view, $template, $data, $output);
 }
开发者ID:robzimpulse,项目名称:myIgniter,代码行数:27,代码来源:crud.php

示例10: paragraph

 public function paragraph()
 {
     if (!is_super_user()) {
         redirect(site_url('admin/help'));
     }
     $this->load->config('grocery_crud');
     $this->config->set_item('grocery_crud_text_editor_type', 'minimal');
     $crud = new grocery_CRUD();
     $crud->set_theme('bootstrap');
     $crud->set_table('help_paragraph');
     $crud->set_subject("Documentatie alinea's");
     $crud->unset_add_fields('date_modified');
     $crud->unset_edit_fields('page_id', 'date_modified');
     $crud->field_type('date_created', 'invisible');
     $crud->field_type('user_id', 'invisible');
     $crud->field_type('order', 'hidden');
     $crud->callback_add_field('page_id', array($this, 'paragraph_callback_add_field_page_id'));
     $crud->callback_before_insert(array($this, 'paragraph_callback_before_insert'));
     $crud->callback_before_update(array($this, 'paragraph_callback_before_update'));
     $crud->callback_after_insert(array($this, 'save_to_sql'));
     $crud->callback_after_update(array($this, 'save_to_sql'));
     $crud->callback_after_delete(array($this, 'save_to_sql'));
     $crud->required_fields('key', 'title', 'content', 'is_visible');
     // render the crud HTML
     $crud_output = $crud->render();
     if ($crud->getState() == 'list') {
         redirect(site_url('admin/help'));
     } else {
         if ($crud->getState() == 'success') {
             $this->session->set_flashdata('form_submit', 'success');
             $this->session->set_flashdata('form_message', 'Alinea met succes opgeslagen.');
             $state = $crud->getStateInfo();
             $this->load->model('admin/help_model');
             $paragraph = $this->help_model->get_paragraph($state->primary_key, 'off');
             redirect(site_url('admin/help/index/' . $paragraph['page_id'] . '#' . $paragraph['key']));
         }
     }
     $this->javascript_files = $crud->get_js_files();
     $this->css_files = $crud->get_css_files();
     $this->views['content'] = $crud_output->output;
     $this->_layout();
 }
开发者ID:BitmanNL,项目名称:traffictower-cms,代码行数:42,代码来源:TT_help.php


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