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


PHP grocery_CRUD::where方法代码示例

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


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

示例1: enfants_window

 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());
     }
 }
开发者ID:simplonco,项目名称:sos_femmes,代码行数:53,代码来源:enfants.php

示例2: 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&oacute;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

示例3: listar_transito

 public function listar_transito()
 {
     /*$establecimiento = $this->mantenimiento_transito->listarEstablecimiento();
     
     		foreach($establecimiento as $dato){
     			$est[$dato->cod_est] = $dato->raz_soc;
     		} */
     $crud = new grocery_CRUD();
     //$crud->set_theme('bootstrap');
     $crud->set_table('trans_lesacctra');
     $crud->columns('id', 'ano', 'ap_nm1', 'ap_nm2', 'nom_les', 'edad', 'tipo_edad', 'diresa', 'eess');
     $crud->set_subject('Ficha Transito');
     $nivelUsuario = $this->session->userdata("nivel");
     switch ($nivelUsuario) {
         case '8':
             $where = array('cod_eess' => $this->session->userdata("establecimiento"));
             $crud->where($where);
             break;
         case '7':
             //$where = "where cod_eess in(select cod_est FROM renace where subregion = '$diresa' and red = '$red' and microred = '$microred')";
             $where = array('microred' => $this->session->userdata("microred"), 'red' => $this->session->userdata("red"), 'cod_dir' => $this->session->userdata("diresa"));
             $crud->where($where);
             break;
         case '6':
             //$where = "where cod_eess in(select cod_est FROM renace where subregion = '$diresa' and red = '$red')";
             $where = array('red' => $this->session->userdata("red"), 'cod_dir' => $this->session->userdata("diresa"));
             $crud->where($where);
             break;
         case '5':
             $where = array('cod_dir' => $this->session->userdata("diresa"));
             $crud->where($where);
             break;
     }
     //$crud->field_type('establec', 'dropdown', $est);
     $crud->display_as("id", "ID")->display_as("ano", "AÑO")->display_as("ap_nm1", "APELLIDO PATERNO")->display_as("ap_nm2", "APELLIDO MATERNO")->display_as("nom_les", "NOMBRES")->display_as("edad", "EDAD")->display_as("tipo_edad", "TIPO")->display_as("diresa", "DIRESA")->display_as("eess", "ESTABLECIENTO DE SALUD");
     $crud->unset_add();
     $crud->unset_edit();
     $crud->unset_read();
     $crud->unset_print();
     $crud->unset_export();
     $crud->unset_delete();
     $crud->order_by('id', 'desc');
     $crud->add_action('Eliminar Ficha', base_url() . 'assets/images/close.png', 'modulotransito/borrarFichatransito', 'borrar-icon');
     $crud->add_action('Vista previa', '', 'modulotransito/ver_ficha_transito', 'read-icon');
     $crud->add_action('Editar Ficha Transito', '', 'modulotransito/modificacion_transito', 'edit-icon');
     $output = $crud->render();
     $usuario = $this->session->userdata("usuario");
     $accion = 'Listar Casos Accidentes de Transito';
     $this->login_model->auditoriaOperador($usuario, $accion);
     $this->layout->view('listar_transito', $output);
 }
开发者ID:alejandrob1519,项目名称:nwsp,代码行数:51,代码来源:modulotransito.php

示例4: daftar

 public function daftar()
 {
     $crud = new grocery_CRUD();
     //$crud->set_table('permohonan');
     $crud->set_table('vtdp');
     $crud->set_subject('Data Permohonan Izin TDP');
     $crud->columns('no_agenda', 'nosk', 'perusahaan', 'tglpermohonan', 'status', 'catatan_bo', 'lama_proses');
     $crud->set_primary_key('id', 'vtdp');
     //$crud->set_relation_n_n('perusahaan', 'tdp','perusahaan','permohonan_id','perusahaan_id','nama');
     //$crud->set_relation('spermohonan_id', 'spermohonan','status');
     $crud->display_as('no_agenda', 'No.Agenda');
     $crud->display_as('nosk', 'No.SK');
     $crud->display_as('perusahaan', 'Nama Perusahaan');
     $crud->display_as('lama_proses', 'Lama Proses');
     $crud->add_action('Hapus Data', '', site_url() . '/tdp/simpen_hapus', 'delete-icon');
     $crud->add_action('Edit Data', '', site_url() . '/tdp/ubah', 'edit-icon');
     $crud->add_action('Ubah Status Pemrosessan Data', '', 'tdp', 'proses-icon');
     $crud->add_action('Cetak Tanda Bukti', '', 'tdp/cetak_sk', 'tbukti-icon', '', 'penerimaan', 'bap', 'bukti');
     $crud->add_action('Cetak SK', '', 'tdp/cetak_sk', 'sk-icon', '', 'sk', 'skatas');
     $crud->where('ijin_id', '6');
     $crud->order_by('tglpermohonan desc,id desc,perusahaan', 'desc');
     $crud->unset_export();
     $crud->unset_add();
     $crud->unset_edit();
     $crud->unset_delete();
     $crud->unset_read();
     $crud->set_crud_url_path(site_url(strtolower(__CLASS__ . "/" . __FUNCTION__)), site_url(strtolower(__CLASS__)));
     $output = $crud->render();
     $this->load->view('home.php');
     $this->load->view('vtdp_daftar.php', $output);
 }
开发者ID:ibnoe,项目名称:perijinanbontang,代码行数:31,代码来源:tdp.php

示例5: perfil

 function perfil()
 {
     $crud = new grocery_CRUD();
     $crud->where('row_id', $this->session->userdata('user_id'));
     $crud->set_table('usuarios');
     $crud->set_theme('datatables');
     $crud->set_language('spanish');
     $crud->set_subject('Usuario');
     $state = $crud->getState();
     if ($state == 'list' || $state == 'success') {
         redirect('user/dashboard');
     } else {
         $crud->unset_add();
         $crud->unset_delete();
         $crud->field_type('usuario', 'readonly');
         $crud->field_type('clave', 'password');
         $crud->field_type('id_nivel', 'hidden');
         $crud->field_type('row_id', 'hidden');
         $crud->field_type('id_estatus', 'hidden');
         $crud->set_field_upload('foto', 'assets/uploads/users/');
         $output = $crud->render();
         $data['titulo'] = "Configuración de Usuario";
         $this->load->view('include/head');
         $this->load->view('include/header');
         $this->load->view('include/sidebar');
         $this->load->view('admin/main', $data);
         $this->load->view('admin/grocery_crud', $output);
         $this->load->view('include/footer');
     }
 }
开发者ID:scortina,项目名称:kolor,代码行数:30,代码来源:user.php

示例6: denuncias_por_ciudadano

 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);
 }
开发者ID:Citlaa,项目名称:LAY,代码行数:25,代码来源:ciudadanos.php

示例7: index

 public function index($categoryid = 0)
 {
     $session_data = $this->session->userdata('logged_in');
     $data['username'] = $session_data['username'];
     $data['cat_id'] = $categoryid;
     //              $form_subject = ($categoryid==0 ? "Category" : "Sub Category");
     if ($categoryid == 0) {
         $form_subject = "Category";
         $data['cat_title'] = "Categories";
     } else {
         $this->category->getTitle($categoryid);
         $data['cat_title'] = $this->category->getTitle($categoryid) . " - Sub Categories";
         $form_subject = "Sub Category";
     }
     $crud = new grocery_CRUD();
     $crud->set_table('dbx_categories');
     $crud->where('pid', $categoryid);
     $crud->set_subject($form_subject);
     $crud->required_fields('title');
     $crud->columns('title');
     $crud->callback_column('title', array($this, 'link_title'));
     $crud->set_rules('title', 'Title', 'trim|required|xss_clean|is_unique[dbx_categories.title]');
     $crud->add_action('Sub Categories', '', '', 'cat-icon', array($this, 'goto_sub'));
     $crud->fields('title', 'desc', 'published', 'type', 'pid', 'ownerid', 'created_date');
     $crud->field_type('pid', 'hidden', $categoryid);
     $crud->field_type('published', 'dropdown', array('0' => 'No', '1' => 'Yes'));
     $crud->field_type('type', 'dropdown', array('C' => 'Celebrity', 'M' => 'Movie', 'P' => 'Parent'));
     $crud->change_field_type('ownerid', 'invisible');
     $crud->change_field_type('created_date', 'invisible');
     $crud->callback_before_insert(array($this, 'before_insert'));
     $output = $crud->render($data);
     $this->load->view('header_view', $data);
     $this->load->view('categories_view', $output);
     $this->load->view('footer_view', $data);
 }
开发者ID:sali141,项目名称:bportal,代码行数:35,代码来源:categories.php

示例8: index

 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);
 }
开发者ID:beingjungshahi,项目名称:theexcursionnepal,代码行数:31,代码来源:wishlist.php

示例9: debitAlert

 public function debitAlert()
 {
     $crud = new grocery_CRUD();
     $where = "((SELECT DATEDIFF(sales_order.`due_date`, '{$this->curDate}') AS days) < 14) AND (sales_order.`due_date` > '{$this->curDate}') AND (sales_order.`status_paid` = 0)";
     $crud->where($where)->order_by('due_date', 'asc')->set_table('sales_order')->columns('id_sales_order', 'id_customer', 'date', 'due_date', 'grand_total', 'paid', 'debit')->display_as('id_sales_order', 'No Faktur')->display_as('name', 'Nama Pelanggan')->display_as('date', 'Tanggal Transaksi')->display_as('due_date', 'Jatuh Tempo')->display_as('grand_total', 'Tagihan')->display_as('paid', 'Terbayar')->display_as('debit', 'Piutang')->callback_column('debit', array($this, 'getBalance'))->callback_column('grand_total', array($this, 'currencyFormat'))->callback_column('paid', array($this, 'currencyFormat'))->set_relation('id_customer', 'customer', 'name')->unset_operations();
     $extra = 'Informasi Tagihan Piutang';
     $output = $crud->render($extra);
     $this->render($output);
 }
开发者ID:nurulimamnotes,项目名称:pos,代码行数:9,代码来源:Dashboard.php

示例10: listarMnp

 public function listarMnp()
 {
     $crud = new grocery_CRUD();
     $crud->set_table('mnp');
     $crud->columns('registroId', 'ape_nom', 'sexo', 'fecha_nac', 'fecha_mte', 'fecha_reg', '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', 'I' => 'Indeterminado'));
     $crud->display_as("registroId", "Ficha");
     $crud->display_as("ape_nom", "Apellidos y Nombres");
     $crud->display_as("fecha_nac", "Fecha de Nacimiento");
     $crud->display_as("fecha_mte", "Defunci&oacute;n");
     $crud->display_as("fecha_reg", "Fecha de Registro");
     $crud->unset_add();
     $crud->unset_edit();
     $crud->unset_read();
     $crud->unset_export();
     $crud->unset_delete();
     //$crud->unset_print();
     $crud->add_action_peru('', '', 'RegfichaMnp', 'add-icon');
     $crud->add_action('Eliminar Ficha', base_url() . 'assets/images/close.png', 'modulosmnp/delFichaMnp', 'borrar-icon');
     $crud->add_action('Modificar Ficha', '', 'modulosmnp/ModfichaMnp', 'edit-icon');
     $crud->add_action('Ver Ficha', '', 'modulosmnp/VerfichaMnp', 'read-icon');
     $output = $crud->render();
     $this->_example_output($output);
 }
开发者ID:alejandrob1519,项目名称:nwsp,代码行数:44,代码来源:modulosmnp.php

示例11: isset

    function peserta_kkn_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") {
                try {
                    /* This is only for the autocompletion */
                    $crud = new grocery_CRUD();
                    $crud->set_theme('datatables');
                    $crud->where('SUDAH', '2');
                    $crud->set_table('KKN_MHS');
                    $crud->set_language("indonesian");
                    $crud->display_as('NIM', 'Data Pribadi');
                    $crud->set_relation('NIM', 'D_MAHASISWA', 'Nim :{NIM}, Angkatan :{ANGKATAN},Nama :{NAMA},Jk: {J_KELAMIN},Asal: {ALAMAT_MHS}, Golongan Darah: {GOL_DARAH},HP Mhs: {HP_MHS},Telp Keluarga: {TELP_MHS}');
                    $crud->display_as('FAK', 'Fakultas')->display_as('NO', 'No Pendaftaran')->display_as('ALAMAT_JOGJA', 'Alamat di Jogja')->display_as('NM_KEC_JOGJA', 'Kec di Jogja')->display_as('NM_KAB_JOGJA', 'Kab di Jogja')->display_as('PRESTASI', 'Keahlian')->display_as('RT_JOGJA', 'RT di Jogja')->display_as('DESA_JOGJA', 'Desa di Jogja')->display_as('KODE_POS_JOGJA', 'Kod Pos di Jogja')->display_as('TRANSPORTASI', 'Transportasi')->display_as('PATH_SK_DOKTER', 'Upload SK Dokter')->display_as('PATH_SK_GOLONGAN_DARAH', 'Upload SK Gol Darah')->display_as('PATH_SK_CUTI', 'Upload SK Cuti Kerja')->display_as('PATH_SK_TIDAK_HAMIL', 'Upload SK Tidak Hamil');
                    $crud->unset_edit_fields('SUDAH');
                    $crud->unset_add();
                    $crud->unset_edit();
                    $crud->unset_delete();
                    $crud->unset_add_fields('NO', 'SUDAH');
                    $crud->set_subject('Peserta KKN');
                    $crud->required_fields('ALAMAT_JOGJA');
                    $crud->columns('NIM', 'FAK', 'ALAMAT_JOGJA', 'PRESTASI', 'NM_KEC_JOGJA', 'NM_KAB_JOGJA');
                    $crud->set_field_upload('PATH_SK_DOKTER', 'assets/kesehatan');
                    $crud->set_field_upload('PATH_SK_GOLONGAN_DARAH', 'assets/goldarah');
                    $crud->set_field_upload('PATH_SK_CUTI', 'assets/cutikerja');
                    $crud->set_field_upload('PATH_SK_TIDAK_HAMIL', 'assets/tidakhamil');
                    //$crud->edit_fields('NIM','KD_FAK','ALAMAT_JOGJA','PRESTASI','KD_KEC','KD_KAB');
                    $crud->callback_edit_field('NIM', array($this, 'edit_field_callback_nim'));
                    $crud->callback_edit_field('NO', array($this, 'edit_field_callback_no'));
                    $output = $crud->render();
                    $this->_manage_output($output);
                } catch (Exception $e) {
                    show_error($e->getMessage() . ' --- ' . $e->getTraceAsString());
                }
            } 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,代码行数:56,代码来源:manage.php

示例12: index

 public function index()
 {
     $crud = new grocery_CRUD();
     $crud->set_theme('flexigrid');
     $crud->set_table('hotels');
     $crud->set_subject('Hotels');
     //        $crud->set_relation('hotel_agent_id', 'io_users', '{first_name} {last_name}');
     $agent_id = $this->ion_auth->user()->row()->id;
     $crud->where('hotel_agent_id', $agent_id);
     $crud->field_type('hotel_agent_id', 'hidden', $agent_id);
     //        $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', 'GoogleMap');
     $crud->display_as('hotel_status', 'Status');
     $crud->columns('hotel_name', 'hotel_phoneNumber', 'hotel_website', 'hotel_facebook', 'hotel_googleMap', 'hotel_status');
     $crud->callback_column('hotel_image', array($this, 'set_image'));
     $crud->set_field_upload('hotel_image', $this->upload_path);
     /*
      * For related hotels
      * on add list all the hotels
      * on edit, list all except own name
      */
     if ($crud->getState() == 'edit') {
         $hrf = $this->generic_model->get_by('hotels', array('hotel_status' => 1, 'hotel_agent_id' => $this->ion_auth->get_user_id(), 'hotel_id !=' => $crud->getStateInfo()->primary_key), 'hotel_id');
     } else {
         $hrf = $this->generic_model->get_by('hotels', array('hotel_status' => 1, 'hotel_agent_id' => $this->ion_auth->get_user_id()), 'hotel_id');
     }
     // empty data for multiselect field generates error
     if (empty($hrf)) {
         $hrf = array('');
     } else {
         $hrf = $this->generic_model->array_from_db($hrf, 'hotel_id, hotel_name');
     }
     $crud->field_type('hotel_related', 'multiselect', $hrf);
     $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->add_action('Photo Gallery', '', 'agents/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', 'left_menu' => 'agents_menu');
     $this->load->view('gc_admin_wrapper', $data);
 }
开发者ID:beingjungshahi,项目名称:theexcursionnepal,代码行数:56,代码来源:hotels.php

示例13: faiz

 function faiz()
 {
     session_start();
     if (!is_null($_SESSION['fromLogin']) && in_array($_SESSION['email'], array('nationalminerals52@gmail.com', 'mesaifee52@gmail.com', 'mustukotaliya53@gmail.com', 'murtaza52@gmail.com', 'murtaza.sh@gmail.com', 'yusuf4u52@gmail.com', 'tzabuawala@gmail.com', 'mustafamnr@gmail.com'))) {
     } else {
         header("Location: http://www.faizstudents.com/users/login.php");
     }
     $crud = new grocery_CRUD();
     $crud->set_theme('datatables');
     $crud->set_table('thalilist');
     if ($_SESSION['email'] == 'mustukotaliya53@gmail.com') {
         $crud->unset_edit();
         $crud->unset_delete();
         $crud->where('Transporter', 'Mustafa Bhai') && $crud->where('Active', '1');
         $crud->columns('Thali', 'NAME', 'CONTACT', 'Active', 'Transporter', 'Full_Address');
     }
     $output = $crud->render();
     $this->_example_output($output);
 }
开发者ID:yusuf4u52,项目名称:faiz-static,代码行数:19,代码来源:Examples.php

示例14: admins

 public function admins()
 {
     $crud = new grocery_CRUD();
     $crud->set_theme('datatables');
     $crud->set_table('users');
     $crud->where('group_id', '1');
     $crud->columns('username', 'email', 'user_skype', 'user_contact', 'user_lastname');
     $output = $crud->render();
     $this->_example_output($output);
 }
开发者ID:jeremiahC,项目名称:ci2,代码行数:10,代码来源:crud.php

示例15: index

 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);
 }
开发者ID:beingjungshahi,项目名称:theexcursionnepal,代码行数:51,代码来源:bookings.php


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