fetchObjectList($sql) as $row) { $out .= sprintf('
  • %s ', $row->name); $out .= '
    '; $out .= sprintf('', $row->id); $out .= sprintf('', $this->rootPath); $out .= '
    '; $out .= '
  • '; } return array('html' => array('machines' => $out)); } public function ajaxSave(Array $data) { if ($this->id) { $sql = sprintf("UPDATE sprit_machine SET name=%s,sys_edit=now(),sys_user=%s WHERE id = %d", $this->quote(utf8_decode($data['name'])), $this->quote($_SERVER['REMOTE_USER']), $this->id); } else { $sql = sprintf("INSERT INTO sprit_machine (name,active,sys_user,sys_edit) " . "VALUES (%s,1,%s,now())", $this->quote(utf8_decode($data['name'])), $this->quote($_SERVER['REMOTE_USER'])); } return $this->execute($sql); } }