Example #1
0
 function edit_place($mode = '')
 {
     if ($mode == 'plantilla') {
         $c = new Plantilla();
         $c->where('id', $this->input->post('rowid'));
         $c->get();
         $field = $this->input->post('colid');
         $c->{$field} = $this->input->post('new');
         $c->save();
         exit;
     }
 }
Example #2
0
	  <th width="35%" bgcolor="#D6D6D6"><strong>Name of Incumbent</strong></th>
	  <th width="12%" bgcolor="#D6D6D6">Year</th>
	  <th width="7%" bgcolor="#D6D6D6">SG</th>
	  <th width="11%" bgcolor="#D6D6D6">Amount</th>
	</tr>
	<?php 
$i = 0;
?>
	<?php 
$p = new Plantilla();
?>
	<?php 
foreach ($rows as $row) {
    ?>
	<?php 
    $p->where('year', $year);
    $p->where('plantilla_item_id', $row->id);
    $p->get();
    $e = new Employee_m();
    $e->get_by_id($p->employee_id);
    // last param of dg_editCell is the size of the textbox
    $onclick0 = "onClick=\"dg_editCell(offices,'" . $p->id . "','item_no','offices.0.{$i}', 'plantilla')\"";
    $onclick1 = "onClick=\"dg_editCell(offices,'" . $p->id . "','position','offices.1.{$i}', 'plantilla', '40')\"";
    $onclick2 = "onClick=\"dg_editCell(offices,'" . $p->id . "','year','offices.2.{$i}', 'plantilla', '8')\"";
    $onclick3 = "onClick=\"dg_editCell(offices,'" . $p->id . "','sg','offices.3.{$i}', 'plantilla', '5')\"";
    $onclick4 = "onClick=\"dg_editCell(offices,'" . $p->id . "','amount','offices.4.{$i}', 'plantilla', '10')\"";
    ?>
	<?php 
    $bg = $this->Helps->set_line_colors();
    ?>
	<tr bgcolor="<?php