nb_api_post() {
local usage="Usage: nb_api_post TABLE field1=val1 field2=val2 ..."
+ local debug=0; [ "$1" = "-debug" ] && debug=1 && shift
local table="${1:?$usage}"; shift
local curl="nb_api /data/$table/replace.sh"
curl="$curl -d \"$1\""
shift
done
- #echo "$curl"; return
+ if [ "$debug" = "1" ]; then
+ echo "$curl"; return
+ fi
(
eval "$(eval "$curl")" #&& echo "$table: $rowCount: $args"
)
private function url_sort($name) {
- if (!$this->show_url_sort or !($f=$this->field($name)) or !empty($f->dyn) or $f->is_encrypt()) return self::prettyText($name);
+ if (0
+ or !$this->show_url_sort
+ or !($f=$this->field($name))
+ or !empty($f->dyn)
+ or $f->is_encrypt()
+ ) return self::prettyText($name);
#debug($f);
# See: http://dev.w3.org/html5/html-author/charref
;
if ($this->base) $this->page->head[] = '<base href="' . $this->base . '/" />';
-#debug($this->base);
$this->page->begin();
- } else {
- #$this->db->is_html = false;
+
} # if (empty($this->_nopage)) {
- #die($obj);
- #if (is_scalar($obj)) {
$conf = ['row_parse_post'=>$fct];
$rows = '';
$ropt = [
'html_menu' => empty($this->_nopage),
];
+ if (!empty($this->_nopage)) {
+ $this->table->show_url_sort = false;
+ }
- #if (!empty($this->_nopage)) $this->db->
$this->row_parse_pre();
$this->row_parse_post();
}
- $path = '/';
+ $path = $this->base . '/';
$nav = [];
$i = 0;
foreach ($title as $k=>$v) {
if ($i == 0) {
- $nav[] = [$v,'/'];
+ $nav[] = [$v,$this->base . '/'];
} else {
}
div.row div label:after,
-form label:after { content: ':'; }
+form label:after
+{ content: ':'; }
form label,
form input,
document.querySelector("th.delete").appendChild(a);
}
+ //
+ // h1 to select links
+ //
if (document.querySelector("body.no-db")) document.querySelectorAll("body > h1 a.db, body > h1 a.table").forEach(function(e) {
var base = window._dbq[e.className+'.base'].replace(/\/[^\/]+$/,'');