# Tables
if (isset($opt['tables'])) {
- foreach ($opt['tables'] as $name=>$param) $this->table($name,$param);
+ foreach ($opt['tables'] as $name=>$param) {
+ $this->table($name,$param);
+ }
unset($opt['tables']);
}
$type = self::p('type','');
foreach ($this->conf as $id => $attr) {
-# NB 21.09.16 $attr['_no_connect'] = true;
$attr['id'] = $id;
$d = new Db($attr);
$db = [];
public function table_row_encrypt(&$table,&$row) {
if (!empty($table->update_parse)) {
$fct = $table->update_parse;
- $row = $fct($row,$table);
+ $fct($row,$table);
}
if (0
public function html_type() {
# See: http://www.w3schools.com/html/html_form_input_types.asp
- if (strpos($this->name,'password') !== false) return 'password';
+ if (strpos($this->name,'password') !== false) return 'password" autocomplete="off';
if ($this->numeric() !== false) return 'number" step="any';
return 'text';
# Html5 only
$this->err_sql($sql);
return false;
}
-
foreach ($fields as $name => $field) {
$row = [ $name => $post[$name] ];
$this->db()->table_row_encrypt($this,$row);
+ #debug($name.': '.$row[$name]);
+ if (!empty($info['values'][$name])) $info['values'][$name] = $row[$name];
$field->bindParam($query,$row[$name],":$name");
}
#return $ex;
}
- public function ssha_password($password='') {
- return $this->db->ssha_password($password);
+ public function ssha_password($password) {
+ return $this->db()->ssha_password($password);
}
} # < Class
__table_define();