];
public $colors = [
- 'text' => '#ddd',
- 'background' => '#009B9C',
+ 'body' => '#ddd',
+ 'body-background' => '#009B9C',
#'button' => '#ddd',
- #'button-backgound' => '#3C3C3B',
+ #'button-background' => '#3C3C3B',
'button' => '#444',
- 'button-backgound' => '#aaa',
+ 'button-background' => '#aaa',
+ 'button-border' => '#888',
];
public $css = '/default.css';
public function __construct($opt=[]) {
#bye($this->params);
+ if (self::p('action')) $this->params['action'] = self::p('action');
$this->uri_params();
$this->params['format'] =
preg_match('/^\S+\s+.Windows|iPhone|Android|Macintosh|Linux/',$_SERVER['HTTP_USER_AGENT'])
public function page($obj,$meth=null,$head=[],$fct=null) {
- if (!empty($this->colors)) $this->page->css_code = trim('
+ if (!empty($this->colors)) {
+ if (empty($this->colors['body-border'])) $this->colors['body-border'] = $this->colors['body'];
+ if (empty($this->colors['button'])) $this->colors['button'] = $this->colors['body'];
+ if (empty($this->colors['button-background'])) $this->colors['button-background'] = $this->colors['body-background'];
+ if (empty($this->colors['button-border'])) $this->colors['button-border'] = $this->colors['body-border'];
+ $this->page->css_code = trim('
body, .button {
- color: '.$this->colors['text'].';
- background-color: '.$this->colors['background'].';
-}
-.button {
- color: '.$this->colors['button'].';
- border-color: '.$this->colors['button-backgound'].';
- background-color: '.$this->colors['button-backgound'].';
+ color: '.$this->colors['body'].';
+ background-color: '.$this->colors['body-background'].';
}
table.rows,
div.rows,
form.edit,
object, iframe, pre
{
- border-color: '.$this->colors['text'].';
+ border-color: '.$this->colors['body'].';
+}
+table.rows th, table.rows td { border-color: '.$this->colors['body-border'].'; }
+.button {
+ color: '.$this->colors['button'].';
+ border-color: '.$this->colors['button-border'].';
+ background-color: '.$this->colors['button-background'].';
}
-table.rows th, table.rows td { border-color: '.$this->colors['text'].'; }
');
+ }
if (empty($this->_nopage)) {
$this->page->content_type($this->page->ext2mime($this->params['format']) ? $this->page->ext2mime($this->params['format']) : 'text/plain');
} elseif ($this->params['action'] == 'ls') {
$this->page($this->table,'rows');
+# NB 08.12.16 } elseif ($action == 'insert') {
+# NB 08.12.16 if (!$this->insert($this->p(),$e)) bye();
+# NB 08.12.16 $this->db()->print_header('Location',$this->url_referer());
+# NB 08.12.16 $this->out($e);
+# NB 08.12.16 return true;
+# NB 08.12.16
+# NB 08.12.16 } elseif ($action == 'update') {
+# NB 08.12.16 #$this->bye($this->p());
+# NB 08.12.16 if (!$this->update($this->p(),$e)) bye($e);
+# NB 08.12.16 $this->db()->print_header('Location',$this->url_referer());
+# NB 08.12.16 $this->out($e);
+# NB 08.12.16 return true;
+
}
return false;