本文整理汇总了PHP中grocery_CRUD::unset_columns方法的典型用法代码示例。如果您正苦于以下问题:PHP grocery_CRUD::unset_columns方法的具体用法?PHP grocery_CRUD::unset_columns怎么用?PHP grocery_CRUD::unset_columns使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类grocery_CRUD
的用法示例。
在下文中一共展示了grocery_CRUD::unset_columns方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: get_crud
private function get_crud()
{
$this->data['message'] = $this->session->flashdata('message');
$crud = new grocery_CRUD();
$crud->set_theme(GROCERY_CRUD_THEME);
$crud->set_table('usuario');
$crud->set_subject('Usuário');
$crud->unset_columns('id', 'senha', 'senha_anterior1', 'senha_anterior2', 'senha_anterior3', 'ultima_troca', 'cadastro');
$crud->fields('id', 'nome', 'login', 'email', 'grupos', 'tipo_usuario_id', 'situacao_usuario_id', 'senha', 'senha_anterior1', 'senha_anterior2', 'senha_anterior3');
$crud->unset_texteditor('id', 'senha', 'senha_anterior1', 'senha_anterior2', 'senha_anterior3', 'ultima_troca', 'cadastro');
$crud->change_field_type('id', 'invisible');
$crud->change_field_type('senha', 'invisible');
$crud->change_field_type('senha_anterior1', 'invisible');
$crud->change_field_type('senha_anterior2', 'invisible');
$crud->change_field_type('senha_anterior3', 'invisible');
$crud->set_relation('situacao_usuario_id', 'situacao_usuario', 'descricao');
$crud->display_as('situacao_usuario_id', 'Situacao');
$crud->set_relation('tipo_usuario_id', 'tipo_usuario', 'descricao');
$crud->display_as('tipo_usuario_id', 'Tipo de Usuário');
$crud->set_relation_n_n('grupos', 'grupo_usuario_x_usuario', 'grupo_usuario', 'usuario_id', 'grupo_usuario_id', 'descricao');
/* regras e campos obrigatórios */
$crud->required_fields('login', 'grupos', 'tipo_usuario_id', 'situacao_usuario_id');
$crud->set_rules('login', 'Login', 'required|min_length[2]');
$crud->set_rules('grupos', 'Grupos', 'required');
$crud->set_rules('tipo_usuario_id', 'Tipo de Usuário', 'required');
$crud->set_rules('situacao_usuario_id', 'Situação do Usuário', 'required');
$crud->callback_before_insert(array($this, 'checking_new_user'));
return $crud->render();
}
示例2: 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);
}
示例3: array
/**
* function ni digunakan untuk kv urus maklumat pengguna pada crud
* input: -
* author: Mior Mohd Hanif
* Date: 28 Jun 2013
* Modification Log:
*/
function user_management()
{
$user_login = $this->ion_auth->user()->row();
$col_id = $user_login->col_id;
$crud = new grocery_CRUD();
$crud->where('user.col_id', $col_id);
$crud->set_theme('flexigrid');
$crud->set_subject('Pengguna');
$crud->set_table('user');
$crud->display_as('user_name', 'Nama Pengguna')->display_as('user_username', 'Katanama')->display_as('user_password', 'Katalaluan')->display_as('user_email', 'Email')->display_as('col_id', 'Kolej')->display_as('created_on', 'Tarikh Daftar')->display_as('last_login', 'Tarikh Log Masuk')->display_as('active', 'Status')->display_as('phone', 'No. Telefon');
$crud->set_relation('col_id', 'college', 'col_name');
$crud->required_fields('user_name', 'user_username', 'user_password', 'user_email', 'active', 'phone');
$crud->set_rules('user_username', 'Katanama', 'trim|required');
$crud->set_rules('phone', 'No. Telefon', 'trim|required|numeric');
$crud->set_rules('user_email', 'Email', 'trim|required|valid_email');
$crud->unset_columns('ip_address', 'user_password', 'salt', 'activation_code', 'forgotten_password_code', 'forgotten_password_time', 'remember_code');
$crud->unset_fields('ip_address', 'activation_code', 'forgotten_password_code', 'forgotten_password_time', 'remember_code', 'last_login');
$crud->change_field_type('user_password', 'password');
$crud->change_field_type('created_on', 'invisible');
$crud->change_field_type('salt', 'invisible');
$crud->change_field_type('col_id', 'invisible');
$crud->callback_before_insert(array($this, 'callback_for_time_and_encrypt_password'));
$crud->callback_column('created_on', array($this, 'strtotime_convert_to_date'));
$crud->callback_column('last_login', array($this, 'strtotime_convert_to_date'));
$output = $crud->render();
$header = "<legend><h4>Penyelenggaraan Pengguna</h4></legend>";
$this->_main_output($output, $header);
}
示例4: 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);
}
示例5: index
public function index()
{
$crud = new grocery_CRUD();
$crud->set_theme('flexigrid');
$crud->set_table('clients');
$crud->set_subject('Clients');
$crud->unset_fields('client_id');
$crud->unset_columns('client_id');
// $crud->unset_columns('package_thingsToConsider');
// $crud->unset_columns('package_weatherCondition');
// $crud->unset_columns('package_itinerary');
//
$crud->display_as('client_postcode', 'Post Code');
$crud->display_as('client_phoneNumber', 'Phone Number');
$crud->display_as('client_emailId', 'Email ID');
$crud->display_as('client_firstName', 'First Name');
$crud->display_as('client_lastName', 'Last Name');
// $crud->set_field_upload('package_image', $this->upload_path);
// $crud->unique_fields('package_slug');
//
// $crud->set_relation('package_agent', 'agents', '{agent_companyName}');
//
// $crud->callback_column('package_image', array($this, 'set_image'));
// $crud->callback_column('package_cost', array($this, 'set_price'));
//
// $crud->callback_add_field('package_cost', array($this, 'add_price1'));
// $crud->callback_edit_field('package_cost', array($this, 'edit_price1'));
// $crud->callback_column('package_status', array($this, 'set_change_status'));
// $crud->unset_columns('package_status');
// $crud->add_action('change Status', '', '/change_status');
// $crud->add_action('Change Status', './assets/grocery_crud/themes/flexigrid/css/images/add.png', 'packages/change_status');
// $crud->add_action('package_status', '', '','ui-icon-image',array($this,'just_a_test'));
// $crud->add_action('package_status', '', '','ui-icon-image',array($this,'just_a_test'));
// $crud->set_lang_string('insert_success_message',
// 'Your data has been successfully stored into the database.<br/>Please wait while you are redirecting to the list page.
// <script type="text/javascript">
// window.location = "'.site_url(strtolower(__CLASS__).'/'.strtolower(__FUNCTION__)).'";
// </script>
// <div style="display:none">
// '
// );
$crud->unset_add();
$crud->unset_delete();
$output = $crud->render();
$data = array('main_content' => 'list', 'output' => $output, 'pagetitle' => 'Clients', 'pagedesc' => 'Clients', 'contenttitle' => 'Clients List Records');
// redirect(base_url());
$this->load->view('gc_admin_wrapper', $data);
}
示例6: master
private function master()
{
$crud = new grocery_CRUD();
$crud->set_table('contents');
$crud->unset_columns('jenis', 'slug', 'isi');
$crud->callback_before_insert(array($this, "_timestamp"));
$crud->callback_before_update(array($this, "_timestamp"));
$crud->unset_export();
$crud->unset_print();
$crud->unset_read();
$crud->change_field_type('jenis', 'invisible');
$crud->change_field_type('slug', 'invisible');
$crud->change_field_type('created_at', 'invisible');
$crud->change_field_type('updated_at', 'invisible');
return $crud;
}
示例7: index
public function index($log_type = NULL)
{
$this->load->model('shared/log_model');
$this->config->load('grocery_crud');
$this->config->set_item('grocery_crud_character_limiter', 0);
$crud = new grocery_CRUD();
if ($crud->getState() == 'list') {
// get all known log types
$log_types = $this->log_model->get_log_types();
$this->views['content'] = $this->load->view('admin/log/action_selector', array('log_types' => $log_types, 'selected_log_type' => $log_type), TRUE);
$this->javascript[] = $this->load->view('admin/log/js/action_selector.js', NULL, TRUE);
}
if (!is_null($log_type) && $log_type != 'ajax_list' && $log_type != 'export' && $log_type != 'print' && $log_type != 'ajax_list_info') {
$crud->where(array('action' => $log_type));
$crud->unset_columns('action');
}
$crud->set_theme('bootstrap');
$crud->set_table('log');
$crud->set_subject('Logs');
// Op twee velden orderen. Grocerycrud houd zich niet aan de Codeigniter active record
// maar dit werkt.
$crud->order_by('date_created desc, id', 'desc');
$crud->columns('date_created', 'action', 'message', 'user_id');
$crud->set_relation('user_id', 'user', 'screen_name');
$crud->display_as('user_id', 'Gebruiker');
$crud->display_as('date_created', 'Tijd');
$crud->display_as('action', 'Actie');
$crud->display_as('message', 'Bericht');
$crud->display_as('ip_hash', 'IP-hash');
$crud->unset_add();
$crud->unset_edit();
$crud->unset_delete();
// render the crud HTML
$crud_output = $crud->render();
//get the needed css and javascript files
$this->javascript_files = $crud->get_js_files();
$this->css_files = $crud->get_css_files();
if (isset($this->views['content'])) {
$this->views['content'] .= $crud_output->output;
} else {
$this->views['content'] = $crud_output->output;
}
$this->_layout();
}
示例8: salacontrol
public function salacontrol()
{
try {
$crud = new grocery_CRUD();
//$crud->set_theme('datatables');
$crud->set_table('salas');
$crud->set_subject('Sala');
$crud->required_fields('campus', 'numero', 'tipo', 'capacidade');
$crud->display_as('campus', 'Campus');
$crud->display_as('numero', 'Número da Sala');
$crud->display_as('cidadeID', 'Campus');
$crud->unset_columns('disponibilidade');
$crud->unset_add_fields('disponibilidade');
$crud->set_relation('campus', 'cidades', 'nome');
$crud->set_relation('tipo', 'tipos', 'nome');
//$crud->set_rules('numero', 'Número da Sala', 'Integer');
$crud->change_field_type('disponibilidade', 'true_false');
$output = $crud->render();
$this->_sala_output($output);
} catch (Exception $e) {
show_error($e->getMessage() . ' --- ' . $e->getTraceAsString());
}
}
示例9: get_crud
private function get_crud()
{
$this->data['message'] = $this->session->flashdata('message');
$crud = new grocery_CRUD();
$crud->set_theme(GROCERY_CRUD_THEME);
$crud->set_table('insumo');
$crud->set_subject('Insumo');
$crud->unset_columns('id');
$crud->fields('id', 'codigo', 'descricao', 'tipo_insumo_id', 'tipo_unidade_id', 'origem_insumo_id');
$crud->display_as('codigo', 'Código');
$crud->display_as('descricao', 'Descrição');
$crud->display_as('tipo_insumo_id', 'Tipo');
$crud->display_as('tipo_unidade_id', 'Unidade');
$crud->display_as('origem_insumo_id', 'Origem');
$crud->change_field_type('id', 'invisible');
/* relacionamentos */
$crud->set_relation('tipo_insumo_id', 'tipo_insumo', 'descricao');
$crud->set_relation('tipo_unidade_id', 'tipo_unidade', 'sigla');
$crud->set_relation('origem_insumo_id', 'origem_insumo', 'descricao');
/* regras e campos obrigatórios */
$crud->required_fields('descricao');
$crud->set_rules('descricao', 'Descrição', 'required|min_length[3]');
return $crud->render();
}
示例10: get_crud
private function get_crud()
{
$this->data['message'] = $this->session->flashdata('message');
$crud = new grocery_CRUD();
$crud->set_theme(GROCERY_CRUD_THEME);
$crud->set_table('fornecedor');
$crud->set_subject('Fornecedor');
$crud->unset_columns('id');
$crud->fields('id', 'codigo', 'nome', 'cnpj', 'inscricao_estadual', 'tipo_fornecedor_id');
$crud->unset_texteditor('id');
$crud->change_field_type('id', 'invisible');
/* relacionamentos */
$crud->set_relation('tipo_fornecedor_id', 'tipo_fornecedor', 'descricao');
/* descrição dos campos de relacionamento */
$crud->display_as('tipo_fornecedor_id', 'Tipo de Fornecedor');
/* regras e campos obrigatórios */
$crud->required_fields('nome');
$crud->required_fields('codigo');
$crud->required_fields('tipo_fornecedor_id');
$crud->set_rules('nome', 'Nome', 'required|min_length[3]');
$crud->set_rules('codigo', 'Código', 'required|min_length[3]');
$crud->set_rules('tipo_fornecedor_id', 'Tipo de Fornecedor', 'required');
return $crud->render();
}
示例11: Perfil
public function Perfil()
{
$crud = new grocery_CRUD();
$crud->set_table('tblusuario');
$crud->set_subject('Perfiles');
$crud->unset_columns('usuario', 'pass', 'correo');
//$crud->callback_column('buyPrice',array($this,'valueToEuro'));
$output = $crud->render();
$this->_Servicios_view($output);
}
示例12:
function film_management()
{
$crud = new grocery_CRUD();
$crud->set_table('film');
$crud->set_relation_n_n('actors', 'film_actor', 'actor', 'film_id', 'actor_id', 'fullname', 'priority');
$crud->set_relation_n_n('category', 'film_category', 'category', 'film_id', 'category_id', 'name');
$crud->unset_columns('special_features', 'description');
$crud->fields('title', 'description', 'actors', 'category', 'release_year', 'rental_duration', 'rental_rate', 'length', 'replacement_cost', 'rating', 'special_features');
$output = $crud->render();
$this->_example_output($output);
}
示例13: ops
public function ops($page = 'crud_view')
{
$data['title'] = "AA Planetica";
$data['activepage'] = "Clients Page";
if (!$this->ion_auth->logged_in()) {
// redirect them to the login page
$this->session->set_userdata('last_page', current_url());
redirect('users/admin/login', 'refresh');
//echo "Redirect to Login";
} elseif ($this->ion_auth->is_admin()) {
$this->data['message'] = validation_errors() ? validation_errors() : $this->session->flashdata('message');
$crud = new grocery_CRUD();
$crud->set_theme('flexigrid');
$crud->set_table('siteinfo');
$crud->set_subject('Site Info');
//$crud->columns('lastName','firstName','email','jobTitle');
$crud->unset_columns('id');
$crud->unset_fields('id', 'userid', 'date');
$crud->field_type('description', 'text');
$crud->field_type('name', 'string');
$crud->display_as('userid', 'User ID');
$crud->unset_delete();
$crud->field_type('status', 'dropdown', array('1' => 'New', '2' => 'Current', '3' => 'Done'));
//$crud->callback_column('buyPrice',array($this,'valueToEuro'));
$this->data['output'] = $crud->render();
$this->load->view('aries_admin/apps/crud_view', $this->data);
//var_dump($this->data['test']);
//$this->load->view('aries_admin/apps/'.$page, $this->data);
} else {
$this->data['message'] = validation_errors() ? validation_errors() : $this->session->flashdata('message');
//echo "Rest of the work as an Admin";
$data = $this->yapps_model->client_passport_check('AB12345684');
if ($data == 'true') {
var_dump($this->sms);
return show_error('Duplicate Accounts, Search in the Clients Section');
}
if (isset($this->sms)) {
echo $this->sms['msg'] . '</br>' . $this->sms['error'];
}
}
}
示例14: date
function toppers_ans_booklets()
{
$expertid = $this->tank_auth->get_user_id();
$TAB_HOME = "visionias_data/assets/home/resources/toppers_ans_booklets";
$crud = new grocery_CRUD();
$crud->set_theme('datatables');
$crud->set_table('toppers_ans_booklets');
$crud->columns('name', 'rank', 'notification_year', 'res_loc', 'subject_id', 'test_id');
$crud->display_as('res_loc', 'Choose File');
$crud->display_as('subject_id', 'Subject');
$crud->display_as('notification_year', 'CSE Year');
$crud->unset_columns('created_by', 'time_of_creation');
$crud->set_subject("Toppers' Answer Booklets");
$crud->set_relation('subject_id', 'subjects', '{subject_id}-{subject_name}');
$crud->field_type('created_by', 'hidden', $expertid);
$crud->field_type('view_count', 'hidden');
$crud->field_type('time_of_creation', 'hidden', date('Y-m-d H:i:s'));
$crud->set_field_upload('res_loc', "{$TAB_HOME}");
$crud->callback_before_insert(array($this, 'move_resource_file'));
$output = $crud->render();
$this->_example_output($output);
}
示例15: film_management
public function film_management()
{
$crud = new grocery_CRUD();
$crud->set_table('film');
$crud->set_relation_n_n('actors', 'film_actor', 'actor', 'film_id', 'actor_id', 'fullname', 'priority');
$crud->set_relation_n_n('category', 'film_category', 'category', 'film_id', 'category_id', 'name');
$crud->unset_columns('special_features', 'description', 'actors', 'release_year', 'rental_duration', 'rental_rate', 'replacement_cost');
$crud->fields('title', 'description', 'actors', 'category', 'release_year', 'rental_duration', 'rental_rate', 'length', 'replacement_cost', 'rating', 'special_features');
$crud->set_theme('flexigrid');
$output = $crud->render();
$data['judul'] = 'Films';
$data['crumb'] = array('Films' => '');
$template = 'admin_template';
$view = 'grocery';
$this->outputview->output_admin($view, $template, $data, $output);
}