/** * Options for dropdown list * * * @return array */ function schedule_options($add_blank = FALSE) { $s = new Schedule(); $rows = $s->order_by('name')->get(); $minute = 0; if ($add_blank == TRUE) { $options[''] = ''; } foreach ($rows as $row) { $options[$row->id] = $row->name; $minute++; } return $options; }
function schedules() { $data['page_name'] = '<b>Schedules</b>'; $data['msg'] = ''; $s = new Schedule(); $data['rows'] = $s->order_by('name')->get(); $data['page'] = $this->uri->segment(3); $data['main_content'] = 'schedules'; return View::make('includes/template', $data); }