function training_event() { $options = array(); $ci =& get_instance(); $t = new Training_event(); $t->order_by('event_from', 'DESC'); $types = $t->get(); $ci->load->helper('text'); foreach ($types as $type) { $tc = new Training_course(); $tc->get_by_id($type->course_id); $options[$type->id] = $type->event_from . "\t \t | " . $type->event_to . "\t \t | " . $tc->course_title; } return $options; }
function event_delete($id = '', $page = '') { $event = new Training_event(); $event->get_by_id($id); $event->delete(); Session::flash('msg', 'Training Event Deleted!'); return Redirect::to('training_manage/event/' . $page, 'refresh'); }
</tr> </table> <table width="100%" border="0" class="type-one"> <tr class="type-one-header"> <th width="8%" bgcolor="#D6D6D6">ID</th> <th width="21%" bgcolor="#D6D6D6">Name</th> <th width="10%" bgcolor="#D6D6D6">Local</th> <th width="10%" bgcolor="#D6D6D6">Other</th> <th width="9%" bgcolor="#D6D6D6">Relevant</th> <th width="9%" bgcolor="#D6D6D6">Certified</th> <th width="15%" bgcolor="#D6D6D6">Remarks</th> <th width="18%" bgcolor="#D6D6D6"><strong>Actions</strong></th> </tr> <?php $course = new Training_course(); $event = new Training_event(); $employee = new Training_employee(); ?> <?php foreach ($rows as $row) { ?> <?php $event->get_by_id($row->event_id); ?> <?php $course->get_by_id($event->course_id); ?> <?php $employee->get_by_id($row->employee_id); ?>