function training_type() { $options = array(); $t = new Training_type(); $t->order_by('training_type'); $types = $t->get(); foreach ($types as $type) { $options[$type->id] = $type->training_type; } return $options; }
<td width="17%"></td> </tr> </table> <table width="100%" border="0" class="type-one"> <tr class="type-one-header"> <th width="5%" bgcolor="#D6D6D6">ID</th> <th width="23%" bgcolor="#D6D6D6">Title </th> <th width="26%" bgcolor="#D6D6D6">Description</th> <th width="10%" bgcolor="#D6D6D6">Estimated Duration</th> <th width="7%" bgcolor="#D6D6D6">Estimated Cost</th> <th width="7%" bgcolor="#D6D6D6">Ave. Evaluation</th> <th width="12%" bgcolor="#D6D6D6"><strong>Training Type</strong></th> <th width="10%" bgcolor="#D6D6D6"><strong>Actions</strong></th> </tr> <?php $t = new Training_type(); ?> <?php foreach ($rows as $row) { ?> <?php $t->get_by_id($row->training_type_id); ?> <?php $bg = $this->Helps->set_line_colors(); ?> <tr bgcolor="<?php echo $bg; ?> " onmouseover="this.bgColor = '<?php echo $this->config->item('mouseover_linecolor');
function type_delete($id = '', $page = '') { $type = new Training_type(); $type->get_by_id($id); $type->delete(); Session::flash('msg', 'Training Type Deleted!'); return Redirect::to('training_manage/type/' . $page, 'refresh'); }
function training_type_options($training_type = '') { $this->load->model('training_type'); $options = array(); $t = new Training_type(); $types = $t->order_by('training_type')->get(); $options[0] = '---ALL---'; foreach ($types as $type) { $options[$type->id] = $type->training_type; } return $options; }