function action() {
$action = $this->p('action');
- $table = $this->p('table');
+ $table = $this->table($this->p('table'));
$data = null;
return true;
} elseif ($action == 'fields') {
- $data = $this->table($this->p('table'))->fields();
+ $data = $table->fields();
} elseif ($action == 'delete') {
- if (!$this->delete($this->p(),$e)) bye($e);
+ if (!$table->delete($this->p(),$e)) bye($e);
#header('Location: ?table='.$table);
- header('Location: '.str_replace('&','&',$this->url_list()));
+ header('Location: '.str_replace('&','&',$table->url_list()));
return true;
} elseif ($action == 'insert') {
- $this->insert($this->p());
- header('Location: ?table=' . $table);
+ $table->insert($this->p());
+ header('Location: ?table=' . $table->name);
#header('Location: '.str_replace('&','&',$this->url_list()));
return true;
} elseif ($action == 'update') {
- $this->bye($this->p());
- $this->update($this->p());
- header('Location: ?table=' . $table);
+ #$this->bye($this->p());
+ $table->update($this->p());
+ header('Location: ?table=' . $table->name);
#header('Location: '.str_replace('&','&',$this->url_list()));
return true;