コード例 #1
12
ファイル: user.php プロジェクト: Juchiha/mandala
 function configuracion()
 {
     $crud = new grocery_CRUD();
     $crud->set_table('usuarios');
     $crud->set_theme('datatables');
     $crud->set_language('spanish');
     $crud->set_subject('Usuario');
     $state = $crud->getState();
     $state_info = $crud->getStateInfo();
     if ($state == 'list' || $state == 'success') {
         redirect('user/dashboard');
     } else {
         $crud->unset_add();
         $crud->unset_delete();
         $crud->field_type('usuario', 'readonly');
         $crud->field_type('clave', 'password');
         $crud->field_type('id_cliente', 'hidden');
         $crud->field_type('id_nivel', 'hidden');
         $crud->field_type('row_id', 'hidden');
         $crud->field_type('id_estatus', 'hidden');
         $crud->set_field_upload('foto', 'assets/uploads/users/');
         $output = $crud->render();
         $data['titulo'] = "CONFIGURACION DE USUARIO";
         $this->load->view('include/head', $output);
         $this->load->view('include/header', $data);
         $this->load->view('admin/output');
         $this->load->view('include/footer', $data);
         $this->load->view('admin/librerias');
     }
 }
コード例 #2
11
ファイル: user.php プロジェクト: scortina/kolor
 function perfil()
 {
     $crud = new grocery_CRUD();
     $crud->where('row_id', $this->session->userdata('user_id'));
     $crud->set_table('usuarios');
     $crud->set_theme('datatables');
     $crud->set_language('spanish');
     $crud->set_subject('Usuario');
     $state = $crud->getState();
     if ($state == 'list' || $state == 'success') {
         redirect('user/dashboard');
     } else {
         $crud->unset_add();
         $crud->unset_delete();
         $crud->field_type('usuario', 'readonly');
         $crud->field_type('clave', 'password');
         $crud->field_type('id_nivel', 'hidden');
         $crud->field_type('row_id', 'hidden');
         $crud->field_type('id_estatus', 'hidden');
         $crud->set_field_upload('foto', 'assets/uploads/users/');
         $output = $crud->render();
         $data['titulo'] = "Configuración de Usuario";
         $this->load->view('include/head');
         $this->load->view('include/header');
         $this->load->view('include/sidebar');
         $this->load->view('admin/main', $data);
         $this->load->view('admin/grocery_crud', $output);
         $this->load->view('include/footer');
     }
 }
コード例 #3
1
ファイル: enfants.php プロジェクト: simplonco/sos_femmes
 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());
     }
 }
コード例 #4
0
ファイル: ciudadanos.php プロジェクト: Citlaa/LAY
 public function denuncias_por_ciudadano($idCiudadano)
 {
     $crud = new grocery_CRUD();
     $crud->set_theme('bootstrap');
     $crud->set_language('spanish');
     $crud->where('denuncias.idCiudadano', $idCiudadano);
     $crud->set_table('denuncias');
     $crud->set_subject('Denuncias Por Ciudadano');
     $crud->set_relation('idCiudadano', 'ciudadanos', '{nombre}\\n{apellidoPa}\\n{apellidoMa}');
     $crud->set_relation('idRecepcion', 'recepcion', 'descripcion');
     $crud->set_relation('idDependencia', 'dependencias', 'dependencia');
     $crud->set_relation('idEstatus', 'estatus', 'descripcion');
     $crud->set_relation('idDireccion', 'direcciones', 'Calle:{calle} \\n #:{noExt} # Int:{noInt} Col:{colonia}, \\n{localidad}, CP:{cp} ');
     $crud->set_relation('idAsunto', 'asuntos', 'descripcion');
     $crud->display_as('idCiudadano', 'Ciudadano');
     $crud->display_as('idDireccion', 'Dirección');
     $crud->display_as('idRecepcion', 'Recepción');
     $crud->display_as('idEstatus', 'Estatus');
     $crud->display_as('idDependencia', 'Dependencia');
     $crud->display_as('idAsunto', 'Asunto');
     $crud->unset_add();
     $crud->columns('idCiudadano', 'idAsunto', 'idDependencia', 'idEstatus', 'idDireccion', 'idRecepcion');
     $output = $crud->render();
     $this->_example_output($output);
 }
コード例 #5
0
ファイル: notificaciones.php プロジェクト: Juchiha/mandala
 function index()
 {
     if ($this->session->userdata('is_logged_in')) {
         $crud = new grocery_CRUD();
         //-> Identifico el ID del Cliente
         $crud->set_table('notificaciones');
         //->
         $crud->set_theme('datatables');
         $crud->set_language('spanish');
         // Display As
         $crud->unset_add();
         $crud->unset_export();
         $crud->unset_print();
         //-> Columnas
         $crud->columns('titulo', 'contenido', 'fecha');
         // Relaciones
         ##
         //-> Renderizar
         $output = $crud->render();
         $data['titulo'] = "NOTIFICACIONES";
         $this->load->view('include/head', $output);
         $this->load->view('include/header', $data);
         $this->load->view('admin/output');
         $this->load->view('admin/librerias');
         $this->load->view('include/footer', $data);
     } else {
         $this->load->view('admin/login');
     }
 }
コード例 #6
0
ファイル: Clientes.php プロジェクト: jalomo/sisin
 function clientes()
 {
     if ($this->session->userdata('id')) {
         try {
             /* Creamos el objeto */
             $crud = new grocery_CRUD();
             /* Seleccionamos el tema */
             $crud->set_theme('flexigrid');
             /* Seleccionmos el nombre de la tabla de nuestra base de datos*/
             $crud->set_table('clientes');
             /* Le asignamos un nombre */
             $crud->set_subject('Clientes');
             /* Asignamos el idioma español */
             $crud->set_language('spanish');
             /* Aqui le decimos a grocery que estos campos son obligatorios */
             $crud->required_fields('id', 'nombre', 'domicilio', 'telefono');
             /* Aqui le indicamos que campos deseamos mostrar */
             $crud->columns('nombre', 'domicilio', 'telefono');
             $crud->unset_export();
             /* Generamos la tabla */
             $output = $crud->render();
             /* La cargamos en la vista situada en 
             			/applications/views/productos/administracion.php */
             $this->_example_output($output);
         } catch (Exception $e) {
             /* Si algo sale mal cachamos el error y lo mostramos */
             show_error($e->getMessage() . ' --- ' . $e->getTraceAsString());
         }
     } else {
         redirect('login');
     }
 }
コード例 #7
0
 function admin_usuario()
 {
     $this->load->view('headers/header');
     $this->load->view('headers/Navegacion');
     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('usuarios');
         /* Le asignamos un nombre */
         $crud->set_subject('Usuarios');
         /* Asignamos el idioma español */
         $crud->set_language('spanish');
         /* Aqui le decimos a grocery que estos campos son obligatorios */
         $crud->required_fields('login', 'rut', 'nombre', 'apellido_paterno', 'apellido_materno', 'telefono_usuario', 'celular_usuario', 'direccion', 'email', 'fecha_creacion', 'fecha_modificacion', 'privilegios', 'sucursal_id');
         /* Aqui le indicamos que campos deseamos mostrar */
         $crud->columns('login', 'rut', 'nombre', 'apellido_paterno', 'apellido_materno', 'telefono_usuario', 'celular_usuario', 'direccion', 'email');
         /* Generamos la tabla */
         $output = $crud->render();
         /* La cargamos en la vista situada en
            /applications/views/productos/administracion.php */
         $this->load->view('usuarios/admin_usuario', $output);
     } catch (Exception $e) {
         /* Si algo sale mal cachamos el error y lo mostramos */
         show_error($e->getMessage() . ' --- ' . $e->getTraceAsString());
     }
 }
コード例 #8
0
 function administracion()
 {
     $this->load->view('headers/header');
     $this->load->view('headers/Navegacion');
     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('productos');
         /* Le asignamos un nombre */
         $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('nombre_producto', 'marca', 'descripcion', 'fecha_ingreso', 'precio', 'cantidad', 'valor_total');
         /* Aqui le indicamos que campos deseamos mostrar */
         $crud->columns('nombre_producto', 'marca', 'descripcion', 'fecha_ingreso', 'precio', 'cantidad', 'valor_total');
         /* Generamos la tabla */
         $output = $crud->render();
         /* La cargamos en la vista situada en
            /applications/views/productos/administracion.php */
         $this->load->view('productos/administracion', $output);
     } catch (Exception $e) {
         /* Si algo sale mal cachamos el error y lo mostramos */
         show_error($e->getMessage() . ' --- ' . $e->getTraceAsString());
     }
 }
コード例 #9
0
ファイル: frequence.php プロジェクト: simplonco/sos_femmes
 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());
     }
 }
コード例 #10
0
ファイル: facturas.php プロジェクト: Juchiha/mandala
 function capturar()
 {
     if ($this->session->userdata('is_logged_in')) {
         $crud = new grocery_CRUD();
         //-> Identifico el ID del Cliente
         $crud->set_table('facturas');
         //->
         $crud->set_theme('datatables');
         $crud->set_language('spanish');
         $crud->set_subject('Factura');
         $crud->unset_add();
         $crud->unset_export();
         $crud->unset_print();
         $output = $crud->render();
         $data['titulo'] = "CREAR FACTURAS";
         $clientes = $this->Clientes_model->GetClients();
         $producto = $this->Products_model->get_all_products();
         $sucursales = $this->Sucursales_model->get_all_sucursales();
         $moneda = $this->datos_model->get_datos("tipos_moneda", "row_id, descripcion", "row_id", "ASC");
         $datos = array('clientes' => $clientes, 'productos' => $producto, 'sucursales' => $sucursales, "moneda" => $moneda);
         $this->load->view('include/head', $output);
         $this->load->view('include/header', $data);
         $this->load->view('admin/addFactura', $datos);
         $this->load->view('admin/librerias');
         $this->load->view('include/footer', $data);
     } else {
         $this->load->view('admin/login');
     }
 }
コード例 #11
0
ファイル: Productos.php プロジェクト: autobitacora/misgastos
 function administracion()
 {
     try {
         /* Creamos el objeto */
         $crud = new grocery_CRUD();
         /* Seleccionamos el tema */
         $crud->set_theme('bootstrap');
         /* Seleccionmos el nombre de la tabla de nuestra base de datos*/
         $crud->set_table('productos');
         /* Le asignamos un nombre */
         $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('id', 'nombre', 'descripcion', 'precio_venta', 'existencia');
         /* Aqui le indicamos que campos deseamos mostrar */
         $crud->columns('id', 'proveedor', 'nombre', 'descripcion', 'precio_compra', 'precio_venta', 'existencia');
         /*Le cambiamos en nombre al la columna id */
         $crud->display_as('id', 'Referencia');
         //$crud->unset_jquery();
         /* Generamos la tabla */
         $output = $crud->render();
         /* La cargamos en la vista situada en
            /applications/views/productos/administracion.php */
         $this->load->view('header');
         $this->load->view('productos/administracion', $output);
         $this->load->view('footer');
     } catch (Exception $e) {
         /* Si algo sale mal cachamos el error y lo mostramos */
         show_error($e->getMessage() . ' --- ' . $e->getTraceAsString());
     }
 }
コード例 #12
0
ファイル: productos.php プロジェクト: Juchiha/mandala
 function index()
 {
     if ($this->session->userdata('is_logged_in')) {
         $crud = new grocery_CRUD();
         $crud->set_table('productos');
         //->
         $crud->set_theme('datatables');
         $crud->set_language('spanish');
         $crud->set_subject('Producto');
         // Display As
         $crud->display_as('id_clasificacion', 'Clasificación');
         $crud->display_as('id_estatus', 'Estatus');
         //-> Columnas
         $crud->columns('descripcion', 'id_clasificacion', 'precio');
         // Relaciones
         $crud->set_relation('id_clasificacion', 'productos_clasificaciones', 'descripcion');
         $crud->set_relation('id_estatus', 'disponible_nodisponible', 'descripcion');
         // Upload
         ##
         // Validacion
         $crud->field_type('precio', 'integer');
         $crud->required_fields('descripcion', 'id_clasificacion', 'precio');
         //-> Renderizar
         $output = $crud->render();
         $data['titulo'] = "PRODUCTOS";
         $this->load->view('include/head', $output);
         $this->load->view('include/header', $data);
         $this->load->view('admin/output');
         $this->load->view('admin/librerias');
         $this->load->view('include/footer', $data);
     } else {
         $this->load->view('admin/login');
     }
 }
コード例 #13
0
 public function index()
 {
     //Inisialisasi
     $crud = new grocery_CRUD();
     $crud->set_subject('Pasien');
     $crud->set_table('tbl_pasien');
     //Label Fields
     $crud->display_as('idPasien', 'ID Pasien');
     $crud->display_as('namaPasien', 'Nama');
     $crud->display_as('umur', 'Umur');
     $crud->display_as('tanggalLahir', 'Tanggal Lahir');
     $crud->display_as('jenisKelamin', 'Jenis Kelamin');
     $crud->display_as('status', 'Status');
     $crud->display_as('alamat', 'Alamat');
     $crud->display_as('pekerjaan', 'Pekerjaan');
     $crud->display_as('no_telp', 'Nomor Telepon');
     //Kolom Input dan Callbacks
     $crud->fields('idPasien', 'namaPasien', 'umur', 'tanggalLahir', 'jenisKelamin', 'status', 'alamat', 'pekerjaan', 'no_telp');
     $crud->field_type('idPasien', 'invisible');
     $crud->callback_field('jenisKelamin', array($this, 'jenisKelamin_callback'));
     $crud->field_type('status', 'dropdown', array('Menikah' => 'Menikah', 'Belum Menikah' => 'Belum Menikah'));
     $crud->field_type('pekerjaan', 'dropdown', array('Pegawai Negeri' => 'Pegawai Negeri', 'Wiraswasta' => 'Wiraswasta', 'Karyawan Swasta' => 'Karyawan Swasta', 'Mahasiswa' => 'Mahasiswa', 'Ibu Rumah Tangga' => 'Ibu Rumah Tangga', 'Pensiunan' => 'Pensiunan', 'Lainnya' => 'Lainnya'));
     //Aturan Pengisian Form
     $crud->required_fields('namaPasien', 'umur', 'tanggalLahir', 'jenisKelamin', 'status', 'alamat', 'pekerjaan');
     $crud->set_rules('umur', 'Umur', array('required', 'max_length[2]', 'numeric'));
     $crud->set_rules('no_telp', 'Nomor Telepon', 'numeric');
     $crud->set_language("indonesian");
     //Cetak Tabel
     $output = $crud->render();
     $this->_example_output($output);
 }
コード例 #14
0
ファイル: Method.php プロジェクト: aloewens/vacan
 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());
     }
 }
コード例 #15
0
ファイル: news.php プロジェクト: jorgemunoz8807/admin_portal
 function administration()
 {
     try {
         $crud = new grocery_CRUD();
         $crud->set_theme('flexigrid');
         $crud->set_table('news');
         $crud->set_subject('Noticias');
         $crud->set_language('spanish');
         $crud->unset_export();
         $crud->columns('title', 'author', 'summary', 'date_time', 'active');
         $crud->required_fields('title', 'author', 'fk_source', 'date_time', 'priority', 'category', 'tags');
         //            $crud->add_fields('title', 'author', 'image', 'footer_text', 'date_time', 'url', 'summary', 'text', 'fk_source', 'priority', 'active', 'category', 'tags', 'img');
         $crud->set_relation('fk_source', 'sources', 'name');
         $crud->set_relation_n_n('category', 'news_categories', 'categories', 'fk_news', 'fk_category', 'category');
         $crud->set_relation_n_n('tags', 'news_tags', 'tags', 'fk_news', 'fk_tag', 'tag');
         $crud->set_field_upload('image', 'assets/uploads/news/');
         $crud->display_as('title', 'Título')->display_as('summary', 'Sumario')->display_as('text', 'Texto')->display_as('author', 'Autor')->display_as('date_time', 'Fecha')->display_as('active', 'Estado')->display_as('comment_url', 'URL')->display_as('comment_count', 'Comentarios')->display_as('category', 'Categoría')->display_as('tags', 'Palabras Claves')->display_as('image', 'Imagen principal')->display_as('priority', 'Prioridad')->display_as('fk_source', 'Fuente')->display_as('img', 'Imágenes Adicionales')->display_as('footer_text', 'Texto de imagen');
         $crud->set_relation_n_n('img', 'news_image', 'images', 'fk_news', 'fk_image', 'image');
         //            $crud->set_field_upload('img', 'assets/uploads/news/');
         //            $crud->set_field_upload('img', 'uploads/news/');
         //            $crud->callback_add_field('img', array($this, 'add_field_image_callback'));
         //            $crud->callback_edit_field('img', array($this, 'edit_field_image_callback'));
         /* Generamos la tabla */
         //            $crud->callback_after_insert(array($this, 'after_insert'));
         //            $crud->callback_before_delete(array($this, 'before_delete_log'));
         //            $crud->callback_after_update(array($this, 'after_update_log'));
         //
         $output = $crud->render();
         $this->load->view('includes/template', $output);
     } catch (Exception $e) {
         /* Si algo sale mal cachamos el error y lo mostramos */
         show_error($e->getMessage() . ' --- ' . $e->getTraceAsString());
     }
 }
コード例 #16
0
ファイル: regidenu.php プロジェクト: Citlaa/LAY
 public function mostrar_busqueda()
 {
     $grocery = new grocery_CRUD();
     $grocery->set_theme('bootstrap');
     $grocery->set_table('denuncias');
     $grocery->set_language('spanish');
     $grocery->set_relation('idEstatus', 'estatus', 'descripcion');
     $grocery->set_relation('idRecepcion', 'recepcion', 'descripcion');
     $grocery->set_relation('idDependencia', 'dependencias', 'dependencia');
     $grocery->set_relation('idCiudadano', 'ciudadanos', '{nombre} \\n{apellidoPa} \\n{apellidoMa}');
     $grocery->set_relation('idDireccion', 'direcciones', 'colonia');
     $grocery->set_relation('idAsunto', 'asuntos', 'descripcion');
     $grocery->set_relation('idMedios', 'medios', 'descripcion');
     $grocery->display_as('idDependencia', 'Dependencia');
     $grocery->display_as('idCiudadano', 'Ciudadano');
     $grocery->display_as('idDireccion', 'Dirección');
     $grocery->display_as('idRecepcion', 'Recepción');
     $grocery->display_as('idEstatus', 'Estatus');
     $grocery->display_as('idAsunto', 'Asunto');
     $grocery->display_as('idMedios', 'Medios');
     $grocery->unset_add();
     $grocery->unset_export();
     //$grocery->unset_edit();
     $grocery->edit_fields('fecha', 'idDependencia', 'idEstatus', 'idRecepcion', 'idMedios');
     $grocery->add_action('Editar ciudadano', '', 'ciudadanos/editar_ciudadano');
     $grocery->add_action('Editar Direccion', '', 'direcciones/editar_direccion');
     $grocery->add_action('Editar Asunto', '', 'asuntos/editar_asunto');
     $grocery->columns('fecha', 'idDependencia', 'idCiudadano', 'idEstatus', 'idRecepcion', 'idDireccion', 'idAsunto');
     $output = $grocery->render();
     $this->_example_output($output);
 }
コード例 #17
0
ファイル: dolar.php プロジェクト: Juchiha/mandala
 function historial()
 {
     if ($this->session->userdata('is_logged_in')) {
         $crud = new grocery_CRUD();
         //-> Identifico el ID del Cliente
         $crud->set_table('dolar_hoy');
         //->
         $crud->set_theme('datatables');
         $crud->set_language('spanish');
         // Display As
         $crud->unset_add();
         //-> Columnas
         $crud->columns('cambio', 'fecha', 'registrado_por', 'registrado_fecha', 'registrado_hora');
         // Relaciones
         ##
         //-> Renderizar
         $output = $crud->render();
         $data['titulo'] = "DOLAR HISTORIAL";
         $this->load->view('include/head', $output);
         $this->load->view('include/header', $data);
         $this->load->view('admin/output');
         $this->load->view('admin/librerias');
         $this->load->view('include/footer', $data);
     } else {
         $this->load->view('admin/login');
     }
 }
コード例 #18
0
ファイル: clientes.php プロジェクト: Juchiha/mandala
 function consultar()
 {
     if ($this->session->userdata('is_logged_in')) {
         $crud = new grocery_CRUD();
         //-> Identifico el ID del Cliente
         $crud->set_table('clientes');
         //->
         $crud->set_theme('datatables');
         $crud->set_language('spanish');
         $crud->set_subject('Cliente');
         // Display As
         $crud->display_as('razon_social', 'Razón Social');
         $crud->display_as('clasificacion', 'Clasificación');
         $crud->display_as('id_responsable', 'Responsable');
         $crud->display_as('id_estado', 'Estado');
         $crud->display_as('id_pais', 'Pais');
         $crud->display_as('rfc', 'RFC');
         $crud->display_as('cp', 'CP');
         $crud->display_as('id_estatus', 'Estatus');
         $crud->field_type('registrado_por', 'hidden');
         $crud->field_type('email', 'email');
         //-> Columnas
         $crud->columns('razon_social', 'rfc', 'clasificacion', 'tipo_pago', 'id_responsable');
         // Relaciones
         $crud->set_relation('tipo_pago', 'tipos_pago', 'descripcion', array('tipos_pago.id_estatus' => '1'));
         $crud->set_relation('id_responsable', 'asignatarios', 'nombre');
         $crud->set_relation('id_estado', 'estados_mexico', 'descripcion');
         $crud->set_relation('id_pais', 'paises', 'descripcion');
         $crud->set_relation('id_estatus', 'clientes_estatus', 'descripcion');
         $crud->set_relation('dia_revision', 'dias_revision', 'dia', null, 'row_id ASC');
         $crud->set_relation('fecha_corte', 'fecha_corte', 'descripcion', null, 'row_id ASC');
         $crud->set_relation('id_estatus', 'disponible_nodisponible', 'descripcion');
         //-> Filas Requeridas
         $crud->required_fields('razon_social', 'nombre', 'tipo_pago', 'dia_revision', 'fecha_corte', 'email', 'id_estatus');
         //-> Renderizar
         $output = $crud->render();
         $data['titulo'] = "CLIENTES";
         $this->load->view('include/head', $output);
         $this->load->view('include/header', $data);
         $this->load->view('admin/output');
         $this->load->view('admin/librerias');
         $this->load->view('include/footer', $data);
     } else {
         $this->load->view('admin/login');
     }
 }
コード例 #19
0
ファイル: psy.php プロジェクト: simplonco/sos_femmes
 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());
     }
 }
コード例 #20
0
 function administration()
 {
     try {
         $crud = new grocery_CRUD();
         $crud->set_theme('flexigrid');
         $crud->set_table('feed_rss');
         $crud->set_subject('RSS');
         $crud->set_language('spanish');
         $crud->display_as('fk_source', 'Fuente de Noticia')->display_as('rss', 'RSS')->display_as('category', 'Categorías');
         $crud->set_relation('fk_source', 'sources', 'name');
         $output = $crud->render();
         $this->load->view('includes/template', $output);
     } catch (Exception $e) {
         /* Si algo sale mal cachamos el error y lo mostramos */
         show_error($e->getMessage() . ' --- ' . $e->getTraceAsString());
     }
 }
コード例 #21
0
 function principal($id)
 {
     try {
         $crud = new grocery_CRUD();
         $crud->set_theme('flexigrid');
         $crud->set_table('tp_banners_campa');
         $crud->set_subject('banners_campa');
         $crud->set_language('spanish');
         $crud->fields('campa', 'banner');
         $crud->required_fields('campa', 'banner');
         $crud->set_subject('banner');
         $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->set_field_upload('banner', 'archivos/banners');
         $crud->callback_after_upload(array($this, 'obtener_imagen_upload'));
         $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'] = 'banners_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_banner'] = '';
         $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());
     }
 }
コード例 #22
0
 function administration()
 {
     try {
         $crud = new grocery_CRUD();
         $crud->set_theme('flexigrid');
         $crud->set_table('types_site');
         $crud->set_subject('Tipos de Sitios');
         $crud->set_language('spanish');
         $crud->unset_export();
         $crud->required_fields('type');
         $crud->display_as('type', 'Tipo');
         $output = $crud->render();
         $this->load->view('includes/template', $output);
     } catch (Exception $e) {
         /* Si algo sale mal cachamos el error y lo mostramos */
         show_error($e->getMessage() . ' --- ' . $e->getTraceAsString());
     }
 }
コード例 #23
0
ファイル: usuarios.php プロジェクト: Citlaa/LAY
 public function mostrar_usuarios()
 {
     $grocery = new grocery_CRUD();
     $grocery->set_theme('bootstrap');
     $grocery->set_table('users');
     $grocery->set_language('spanish');
     $grocery->display_as('username', 'Usuario');
     $grocery->display_as('email', 'E-mail');
     $grocery->fields('username', 'email');
     $grocery->unset_read();
     $grocery->columns('username', 'password', 'email');
     $grocery->field_type('password', 'password');
     $grocery->unset_add();
     $grocery->unset_export();
     $grocery->unset_print();
     $output = $grocery->render();
     $this->_example_output($output);
 }
コード例 #24
0
ファイル: Salidas.php プロジェクト: jalomo/sisin
 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');
     }
 }
コード例 #25
0
ファイル: Client.php プロジェクト: aloewens/vacan
 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('datatables');
         $crud->set_theme('flexigrid');
         /* Seleccionmos el nombre de la tabla de nuestra base de datos*/
         $crud->set_table('client');
         /* Le asignamos un nombre */
         $crud->set_subject('cliente');
         /* Asignamos el idioma español */
         $crud->set_language('spanish');
         /* Aqui le decimos a grocery que estos campos son obligatorios */
         $crud->required_fields('ClientID', 'Name', 'Lastname', 'IdentType', 'Ident', 'BirthDate', 'Address', 'City');
         /* Aqui le indicamos que campos deseamos mostrar */
         $crud->columns('ClientID', 'Name', 'Lastname', 'IdentType', 'Ident', 'BirthDate', 'Address', 'City', 'Phone1', 'Phone2', 'Phone3', 'Mail', 'Facebook', 'Twitter', 'Facebook', 'Skype', 'Company');
         $crud->add_action('Productos', base_url() . 'assets/uploads/detalle.png', 'Product/admin_by_client');
         $crud->display_as('ClientID', 'ID');
         $crud->display_as('Name', 'Nombre');
         $crud->display_as('Lastname', 'Apellido');
         $crud->display_as('IdentType', 'Tipo Identificaci&oacuten');
         $crud->display_as('Ident', 'Identificaci&oacuten');
         $crud->display_as('BirthDate', 'Fecha Nacimiento');
         $crud->display_as('Address', 'Direcci&oacuten');
         $crud->display_as('City', 'Ciudad');
         $crud->display_as('Phone1', 'Tel&eacutefono 1');
         $crud->display_as('Phone2', 'Tel&eacutefono 2');
         $crud->display_as('Phone3', 'Tel&eacutefono 3');
         $crud->display_as('Company', 'Empresa');
         /* Generamos la tabla */
         $output = $crud->render();
         /* La cargamos en la vista situada en */
         $this->load->view('Client/administracion', $output);
     } catch (Exception $e) {
         /* Si algo sale mal cachamos el error y lo mostramos */
         show_error($e->getMessage() . ' --- ' . $e->getTraceAsString());
     }
 }
コード例 #26
0
 function principal()
 {
     try {
         $crud = new grocery_CRUD();
         $crud->set_theme('flexigrid');
         $crud->set_table('tp_logos');
         $crud->set_subject('logo');
         $crud->set_language('spanish');
         $crud->fields('logo_gobierno', 'vinculacion_logo_gobierno', 'logo_opcional', 'vinculacion_logo_opcional');
         $crud->display_as('logo_gobierno', 'Logotipo principal');
         $crud->display_as('vinculacion_logo_gobierno', 'Vínculo del logotipo principal');
         $crud->display_as('logo_opcional', 'Logotipo secundario (opcional)');
         $crud->display_as('vinculacion_logo_opcional', 'Vínculo del logotipo secundario');
         $crud->unset_add();
         $crud->unset_export();
         $crud->unset_print();
         $crud->unset_delete();
         $crud->unset_list();
         $crud->where('id_logo', 1);
         $crud->set_field_upload('logo_gobierno', 'archivos/logos');
         $crud->set_field_upload('logo_opcional', 'archivos/logos');
         $crud->callback_after_upload(array($this, 'obtener_imagen_upload'));
         $crud->callback_after_update(array($this, 'redireccionar'));
         $output = $crud->render();
         $data['opcion'] = '';
         $data['cambiar_logos'] = '';
         $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);
         $this->load->view('nuevos_logos', $output);
         $this->load->view('pie');
     } catch (Exception $e) {
         if ($e->getCode() == 14) {
             redirect('medios/principal');
         } else {
             show_error($e->getMessage());
         }
     }
 }
コード例 #27
0
ファイル: tags.php プロジェクト: jorgemunoz8807/admin_portal
 function administration()
 {
     try {
         $crud = new grocery_CRUD();
         $crud->set_theme('flexigrid');
         $crud->set_table('tags');
         $crud->set_subject('Palabras Claves de Sitios');
         $crud->set_language('spanish');
         $crud->unset_export();
         $crud->display_as('tag', 'Palabra Clave');
         $crud->callback_after_insert(array($this, 'after_insert_log'));
         $crud->callback_before_delete(array($this, 'before_delete_log'));
         $crud->callback_after_update(array($this, 'after_update_log'));
         $output = $crud->render();
         $this->load->view('includes/template', $output);
     } catch (Exception $e) {
         /* Si algo sale mal cachamos el error y lo mostramos */
         show_error($e->getMessage() . ' --- ' . $e->getTraceAsString());
     }
 }
コード例 #28
0
 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());
     }
 }
コード例 #29
0
ファイル: kids.php プロジェクト: simplonco/sos_femmes
 public function kids_window($id)
 {
     $this->id_femme = $id;
     try {
         $crud = new grocery_CRUD();
         $crud->set_language("french");
         $crud->set_theme('bootstrap');
         $crud->where('id_femme', $id);
         $crud->set_table('sos_kids');
         $crud->set_subject('Enfant(s)');
         $crud->unset_edit_fields('id_kid');
         $crud->unset_add_fields('id_kid');
         $crud->field_type('id_femme', 'hidden', $this->id_femme);
         $crud->columns('prenom', 'nom', 'age', 'sex', 'commentaire');
         $crud->display_as('prenom', 'Prénom');
         $crud->display_as('sex', 'Sexe');
         $crud->display_as('commentaire', 'Commentaires');
         $crud->set_relation('age', 'sos_gen_kids_age', 'name_kids_age');
         if (!$this->session->userdata('status')) {
             $crud->unset_export();
             $crud->unset_print();
         }
         $crud->callback_after_update(array($this, 'after_update'));
         $crud->callback_after_insert(array($this, 'insert_after'));
         $crud->field_type('sex', 'enum', array('Fille', 'Garçon'));
         $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());
     }
 }
コード例 #30
0
 function administration()
 {
     try {
         $crud = new grocery_CRUD();
         $crud->set_theme('flexigrid');
         $crud->set_table('owners');
         $crud->set_subject('Propietarios de Sitios');
         $crud->set_language('spanish');
         $crud->unset_export();
         $crud->display_as('name', 'Nombre')->display_as('description', 'Descripción')->display_as('email', 'Correo')->display_as('phone', 'Teléfono');
         $crud->add_fields('name', 'email', 'phone', 'description');
         $crud->callback_after_insert(array($this, 'after_insert_log'));
         $crud->callback_before_delete(array($this, 'before_delete_log'));
         $crud->callback_after_update(array($this, 'after_update_log'));
         $output = $crud->render();
         $this->load->view('includes/template', $output);
     } catch (Exception $e) {
         /* Si algo sale mal cachamos el error y lo mostramos */
         show_error($e->getMessage() . ' --- ' . $e->getTraceAsString());
     }
 }