public $created;
# hidden, sort, ... fields
- public static $params = array( 'db', 'table', 'limit', 'debug', 'action');
+ public static $params = array( 'db', 'table', 'limit', 'debug', 'action', 'page');
public $fields;
}
// Connection
-#bye($opt['db']);
if (isset($opt['db'])) {
$this->db(is_object($opt['db']) ? $opt['db'] : new Db($opt['db']));
unset($opt['db']);
+
} elseif(isset($GLOBALS['Db'])) {
$this->db($GLOBALS['Db']);
+
} else {
$this->db(new Db());
+
}
// Order BY
$st = $this->db()->conn->prepare($sql);
$st->execute();
- echo '<form class="db edit" method="post" action="?">'.NB_EOL;
+ echo '<form class="db edit form-table" method="post" action="?">'.NB_EOL;
echo '<div class="fields">'.NB_EOL;
$count = 0;
if ( $add or ($row = $st->fetch(PDO::FETCH_ASSOC, PDO::FETCH_ORI_NEXT))) {
}
}
-
+
#
# Row
#
$html = '';
#$html .= '<table data-role="table" class="ui-responsive rows '.$this->name.'">'.NB_EOL;
- $html .= '<table class="rows">'.NB_EOL;
+ $html .= '<table class="rows wp-list-table widefat fixed striped">'.NB_EOL;
#if (!empty($opt)) $html .= '<caption>' . $this->nav($opt['count'],$opt['tot'],$opt['limit']) . '</caption>' .NB_EOL;
if ($this->p('header')!=="0") {
Html Div
-----------------------------------------------------------------*/
public function rows_begin_div() {
- return '<div class="rows">'.NB_EOL;
+ return '<div class="rows search-results">'.NB_EOL;
}
public function rows_rec_div(&$row) {
$r .= '</span>';
}
+ // Submit
+ $r .= '<input type="submit" class="button button-small" /><input type="reset" class="button button-small" />';
+
// Order By
/*
$r .= '<span class="label">';