$next = 999999;
}
- if ($prev>=0) $html .= '<span class="prev"><a href="'.$this->url_list('limit',preg_replace('/^0,/','',"$prev,$y")).'"><<</a></span> ';
+ if ($prev>=0) $html .= '<span class="prev"><a href="'.$this->url_list('limit',preg_replace('/^0,/','',"$prev,$y")).'"><</a></span> ';
$html .= '<span class="count">'.($tot ? ($x+1) : 0).' - '.( $tot<($x+$y) ? $tot : ($x+$y) ).' / '.$tot.'</span>';
- if ($next<$tot) $html .= ' <span class="prev"><a href="'.$this->url_list('limit',"$next,$y").'">>></a></span>';
+ if ($next<$tot) $html .= ' <span class="prev"><a href="'.$this->url_list('limit',"$next,$y").'">></a></span>';
return $html;
$buttons = '<input type="submit" class="button button-small" value="Go"/>';
if (!empty($opt['buttons'])) $buttons = $opt['buttons'];
- #$r = '<form class="menu" method="get" action="?">'.NB_EOL;
$r = '<form class="menu" method="get" action="'.$this->request_uri().'">'.NB_EOL;
- #$r = '<form class="menu" method="get" action="'.$this->db()->base.preg_replace('/\?.*$/','',$_SERVER["REQUEST_URI"]).'">'.NB_EOL;
# See: http://html5doctor.com/html5-forms-input-types/
#$r .= '<input id="skill" type="range" min="1" max="100" value="0" />';
//
// Options
//
- if ($this->p('options')!=='0') {
+ $options = (bool)($this->p('table-menu-options')!=='0');
+ if ($options) {
$r .= '<div class="options">';
$r .= '</span>';
*/
- // Hiddens
- $form_hidden = ['db','table','format','limit'];#,'download'];
- if ($this->show_hidden_params) $r .= ''#.print_r(self::$params,true)
- .self::form_hidden($form_hidden)
- // Embed for no html format (rent)
-# NB 08.06.18 .'<input type="'.($this->p('debug') ? 'text' : 'hidden').'" name="download" value="0"/>';
- ;
+ $form_hidden_ignore = ['db','table','format','limit'];#,'download'];
$r .= '</div>'; # < Options
+ } else { # // Options
+ $form_hidden_ignore = ['limit'];
+ $form_hidden_ignore = null;
+
}
+ //
+ // Hidden
+ //
+ if ($this->show_hidden_params) $r .= ''#.print_r(self::$params,true)
+ .self::form_hidden($form_hidden_ignore)
+ // Embed for no html format (rent)
+# NB 08.06.18 .'<input type="'.($this->p('debug') ? 'text' : 'hidden').'" name="download" value="0"/>';
+ ;
+
//
// Criterias
//
}
- if ($this->p('options')==='0') $r .= $buttons;
+ if (!$options) $r .= $buttons;
$r .= '</div>'; # < Criterias
///
--- /dev/null
+DROP TABLE IF EXISTS nginx_vars;
+CREATE TABLE IF NOT EXISTS nginx_vars (
+ name varchar(200),
+ module varchar(200) DEFAULT '',
+ link varchar(2000)
+);
+BEGIN TRANSACTION;
+DELETE FROM nginx_vars;
+COPY nginx_vars (link,name,module) FROM PROGRAM '. /etc/profile && http_get https://nginx.org/en/docs/varindex.html | \
+xmllint --html --xpath "/html/body//div[@id=\"content\"]//a" - 2>/dev/null | \
+sed -E "s,<a href=\"([^\"]+)\">([^<]+)</a> *(\(([^\)]+)\))?,https://nginx.org/en/docs/\1\t\2\t\4\n,g" | \
+cat \
+' WITH (format 'text', NULL '');
+COMMIT;
+
private function table_rows($fct=null) {
$ropt = [
#'html_menu' => empty($this->_nopage),
-# NB 07.06.18 'is_html' => empty($this->_nopage),
-# NB 20.06.18 'is_html' => $this->is_html,
- 'is_html' => ($this->is_html and empty($this->_nopage)),
+
+ # With limit or criterias or page next
+ 'is_html' => $this->is_html,
+
+ # Without limit or criterias or page next
+# NB 20.06.18 'is_html' => ($this->is_html and empty($this->_nopage)),
+
];
$this->db->is_html = $ropt['is_html'];
$this->db->limit = $ropt['is_html'] ? $this->limit() : null;