Thanks in advance and congratulations for the forum full of information
sorry for my poor english
this is my code
function photogalleryshow()
{
if (!$this->ion_auth->logged_in())
{
//redirect them to the login page
redirect('auth/login', 'refresh');
}
elseif (!$this->ion_auth->is_admin()) //remove this elseif if you want to enable this for non-admins
{
//redirect them to the home page because they must be an administrator to view this
return show_error('You must be an administrator to view this page.');
}
else
{
$image_crud = new image_CRUD();
$image_crud->set_primary_key_field('id');
$image_crud->set_url_field('url');
$image_crud->set_table('photogallery')
->set_relation_field('category_id')
->set_ordering_field('priority')
->set_image_path('images/photogallery');
$output = $image_crud->render();
$this->_photogallery_output($output);
}
}
