function edit_place($mode = '') { if ($mode == 'rates') { $r = new Rates(); $r->where('id', Input::get('rowid')); $r->get(); if (Input::get('colid') == 'rate_per_day') { $r->rate_per_day = Input::get('new'); } if (Input::get('colid') == 'pagibig_amount') { $r->pagibig_amount = Input::get('new'); } $r->save(); exit; } if ($mode == 'jo_days') { $j = new Jo_days(); $j->where('id', Input::get('rowid')); $j->get(); if (Input::get('colid') == 'hours') { $j->hours = Input::get('new'); } if (Input::get('colid') == 'days') { $j->days = Input::get('new'); } $j->save(); exit; } if ($mode == 'status') { $c = new Cos_status(); $c->where('id', Input::get('rowid')); $c->get(); $c->status = Input::get('new'); $c->save(); exit; } }
<th width="16%" bgcolor="#D6D6D6">Rate per Day</th> <th width="31%" bgcolor="#D6D6D6">Pag-ibig Personal Contribution</th> <th width="31%" bgcolor="#D6D6D6"> </th> </tr> <?php $i = 0; ?> <?php $r = new Rates(); ?> <?php foreach ($rows as $row) { ?> <?php $r->where('employee_id', $row['employee_id']); $r->get(); $onclick0 = "onClick=\"dg_editCell(offices,'" . $r->id . "','rate_per_day','offices.0.{$i}', 'cto_balance')\""; $onclick1 = "onClick=\"dg_editCell(offices,'" . $r->id . "','pagibig_amount','offices.1.{$i}', 'cto_balance')\""; ?> <?php $bg = $this->Helps->set_line_colors(); ?> <tr bgcolor="<?php echo $bg; ?> " onmouseover="this.bgColor = '<?php echo $this->config->item('mouseover_linecolor'); ?> ';" onmouseout ="this.bgColor = '<?php echo $bg;