Skip to content

Instantly share code, notes, and snippets.

@douggrubba
Created September 12, 2011 15:13
Show Gist options
  • Save douggrubba/1211520 to your computer and use it in GitHub Desktop.
Save douggrubba/1211520 to your computer and use it in GitHub Desktop.
my goofy controller
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Create extends Personal_Controller {
/*
*
* Let people create new projects
*
*/
public function index()
{
//are they special? show them admin stuff if so (bool)
$data['is_special'] = is_special_nice($this->session->userdata('backend_perm'));
//get the roles that this person has, FALSE if none
$roles = $this->Roles_model->all_roles_by_user($this->session->userdata('id'));
//an array to hold the info for the profile box
$prof['name'] = $this->session->userdata('name');
$prof['roles']= $roles;
$this->template->set_layout('default');
$this->template->set_partial('profile_box', 'profile/profile_box', $prof);
$this->template->set_partial('project_select', 'profile/project_select');
$this->template->build('create/index', $data);
}
}
/* End of file login.php */
/* Location: ./application/controllers/create.php */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment