| | |
| | | function onUpdate() {
|
| | | global $app, $conf;
|
| | |
|
| | | $this->onBeforeUpdate(); |
| | | |
| | | $ext_where = '';
|
| | | $sql = $app->tform->getSQL($this->dataRecord,$app->tform->getCurrentTab(),'UPDATE',$this->id,$ext_where);
|
| | | if($app->tform->errorMessage == '') {
|
| | |
| | | function onInsert() {
|
| | | global $app, $conf;
|
| | |
|
| | | $this->onBeforeInsert(); |
| | | |
| | | $ext_where = '';
|
| | | $sql = $app->tform->getSQL($this->dataRecord,$app->tform->getCurrentTab(),'INSERT',$this->id,$ext_where);
|
| | | if($app->tform->errorMessage == '') {
|
| | |
| | | } else {
|
| | | $this->onError();
|
| | | }
|
| | | } |
| | | |
| | | function onBeforeUpdate() { |
| | | global $app, $conf; |
| | | } |
| | | |
| | | function onBeforeInsert() { |
| | | global $app, $conf; |
| | | }
|
| | |
|
| | | function onAfterUpdate() {
|
| | |
| | | }
|
| | | if(!$record = $app->db->queryOneRecord($sql)) $app->error($app->lng('error_no_view_permission'));
|
| | | } else {
|
| | | $record = $app->tform->encode($_POST,$this->active_tab);
|
| | | // $record = $app->tform->encode($_POST,$this->active_tab); |
| | | $record = $app->tform->encode($this->dataRecord,$this->active_tab); |
| | | }
|
| | |
|
| | | $this->dataRecord = $record;
|