From 10fd8617343c156e653b54ab9f49a61114e6d8bd Mon Sep 17 00:00:00 2001 From: Nicolas Boisselier Date: Sat, 19 Mar 2016 18:43:47 +0000 Subject: [PATCH] Move EOL from nb, hangle empty msg --- lib/php/db/table.php | 129 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 127 insertions(+), 2 deletions(-) diff --git a/lib/php/db/table.php b/lib/php/db/table.php index 2d16b843..e002fe19 100644 --- a/lib/php/db/table.php +++ b/lib/php/db/table.php @@ -5,6 +5,20 @@ require_once(dirname(__FILE__).'/../out.php'); define('TABLE_INDENT',NB_EOL ? "\t" : ""); define('TABLE_CSV_SEP',nb::p('sep') ? nb::p('sep') : "\t"); + +if (!defined('DB_HTML_FORM_BUTTONS')) define('DB_HTML_FORM_BUTTONS','' + #.'' + #.'' + #.'' +// NB 04.08.15 .'X' + .'' + .'' + .'' + .'' +); +#if (!defined('DB_HTML_BUTTON_SUBMIT')) define('DB_HTML_BUTTON_SUBMIT',''); +#if (!defined('DB_HTML_BUTTON_ADD')) define('DB_HTML_BUTTON_ADD','Add'); +#if (!defined('DB_HTML_BUTTON_ADD')) define('DB_HTML_BUTTON_ADD',''); if (!defined('DB_HTML_EDIT')) define('DB_HTML_EDIT','Edit'); if (!defined('DB_HTML_DELETE')) define('DB_HTML_DELETE','Delete'); if (!defined('DB_TABLE_QUERY_NAME')) define('DB_TABLE_QUERY_NAME','_query_'); @@ -434,6 +448,21 @@ FROM pg_catalog.pg_attribute a WHERE a.attrelid = (SELECT c.oid FROM pg_catalog. $next = 999999; } + /* + if ($prev>=0) $html .= ''; + + $html .= '
  • '.($tot ? ($x+1) : 0).' - '.( $count<($x+$y) ? $count : ($x+$y) ).' / '.$tot.' results
  • '; + + if ($next<$tot) $html .= ''; + + if ($html) $html = '' + .''.NB_EOL + ; + */ if ($prev>=0) $html .= '<< '; $html .= ''.($tot ? ($x+1) : 0).' - '.( $count<($x+$y) ? $count : ($x+$y) ).' / '.$tot.' results'; @@ -614,7 +643,7 @@ FROM pg_catalog.pg_attribute a WHERE a.attrelid = (SELECT c.oid FROM pg_catalog. ).')$/',$format)) { - if (!($out_conf = out::$types[$format])) $this->bye("Unknow format `$format`"); + if (!($out_conf = out::type($format))) $this->bye("Unknow format `$format`"); $this->params += array_values(out::$types); if (empty($out_conf['enclose'])) $out_conf['enclose'] = array('',''); @@ -1142,7 +1171,103 @@ FROM pg_catalog.pg_attribute a WHERE a.attrelid = (SELECT c.oid FROM pg_catalog. $err = $this->db->conn->errorInfo(); $err[] = $sql; self::bye(join(' | ',$err)); - } + } + + public function html_menu() { + + $r = ''.NB_EOL; + return $r; + } + } ?> -- 2.47.3