/*
All
.rows { margin: 0 auto; }
+border: solid 1px red !important;
*/
+.rows ul {
+ margin: 0 0 0.5em 0;
+ padding: 0.2em;
+ /*
+ margin: 0 0.5em 0.5em 0;
+ float: left;
+ width: 45em;
+ overflow: scroll;
+ */
+}
+
+.rows ul .edit { float: right; }
+
/*
Edit
*/
-form.Zdb.edit
-,form.db.edit label
+form.db.edit label
,form.db.edit input
{
float: left;
float: none;
}
-/*
- List
- border: solid 1px red;
-*/
-.sel:before { content: ">"; }
-
div.db.menu label {
margin-right: 0.1em;
}
$st = $this->db->conn->prepare($sql);
$st->execute();
- $format = (!empty($opt['format']) ? $opt['format'] : 'table');
+ $format = ( $this->db->p('format') ? $this->db->p('format') : 'table' );
- if (!@$opt['is_html']) $opt['is_html'] = preg_match('/^(table)$/',$format) ? true : false;
+ if (!isset($opt['is_html'])) $opt['is_html'] = preg_match('/^(table|div)$/',$format) ? true : false;
$escape = preg_match('/^(table|row|xml)$/',$format) ? true : false;
if (preg_match('/^(1)?$/',$this->db->p('header'))) echo $this->{"rows_begin_$format"}($opt);
function rows_begin_table() {
$html = '';
- $html .= '<table class="'.$this->name.' rows border">'.PHP_EOL;
+ $html .= '<table class="rows border '.$this->name.'">'.PHP_EOL;
if (DB_HTML_NAV_TOP) $html .= '<thead><tr>'
. '<td colspan="'.(count($this->fields())+1).'">' . DB_HTML_NAV_TOP . '</td>'
Html Div
-----------------------------------------------------------------*/
function rows_begin_div() {
- return '<div class="'.$this->name.' rows">'.DB_HTML_NAV_TOP.PHP_EOL;
+ return '<div class="rows '.$this->name.'">'.DB_HTML_NAV_TOP.PHP_EOL;
}
function rows_rec_div($row) {
foreach ($row as $k => $v) {
$html .= '<li>'
- .'<span class="k">'.$k.'</span>'
- .': '
+ .( $k == '0' ? '' : '<span class="k">'.$k.'</span>: ')
.'<span class="v">'.$v.'</span>'
.'</li>';
}
class Page {
- var $call = array();
- var $output = '';
+ public $call = array();
+ public $output = '';
- var $charset = 'utf-8';
- var $content_type = 'text/html';
- var $title = '';
+ public $charset = 'utf-8';
+ public $content_type = 'text/html';
+ public $title = '';
- var $css = array();
- var $head = array();
- var $css_code = '';
+ public $css = array();
+ public $head = array();
+ public $css_code = '';
- var $js = array();
- var $js_code = '';
+ public $js = array();
+ public $js_code = '';
/*
Create