Skip to content

Instantly share code, notes, and snippets.

@andyhawthorne
Created November 2, 2012 23:47
Show Gist options
  • Select an option

  • Save andyhawthorne/4005067 to your computer and use it in GitHub Desktop.

Select an option

Save andyhawthorne/4005067 to your computer and use it in GitHub Desktop.
index action - tasks
public function index()
{
$month = (!$this->uri->segment(4)) ? date('m') : $this->uri->segment(4);
$tasks = $this->tasks_model->get_tasks($month);
if($tasks == 0)
{
$data['cal'] = $this->calendar->generate($this->uri->segment(3), $this->uri->segment(4));
}
else
{
$data['cal'] = $this->calendar->generate($this->uri->segment(3), $this->uri->segment(4), $tasks);
}
$this->load->view('welcome_message', $data);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment