$params = self::params2hash(self::$params);
}
- foreach (array_diff($params,$ignore) as $k=>$v) {
+ #debug([$params,array_diff($params,$ignore)]);
+# NB 07.01.18 foreach (array_diff($params,$ignore) as $k=>$v) {
+ foreach ($params as $k=>$v) {
+ if (!empty($ignore) and in_array($k,$ignore)) continue;
if (isset($v) or $k=='action') {
if (self::p('debug')) $h .= "<label>$k</label>";
$h .= '<input type="'.(self::p('debug')?'text':'hidden').'" name="'.$k.'" value="'.$v.'"/>'.NB_EOL;
if ($opt['is_html']) {
echo '<div class="results">'.NB_EOL;
- if ($this->show_hidden_params and !$this->p('inc')) echo $this->form_hidden();
+# NB 07.01.18 if ($this->show_hidden_params and !$this->p('inc')) echo $this->form_hidden();
}
if ($opt['is_html']) $this->db()->out->type('html');
}
public static function link($longitude,$latitude) {
- return 'http://maps.google.com/?q='.$longitude.','.$latitude;
+ return $_SERVER['REQUEST_SCHEME'].'://maps.google.com/?q='.$longitude.','.$latitude;
}
public static function html(&$r) {
$v = self::scalar($v);
if ($v==='') $is_scalar = true;
- if (empty($o['no_escape'])) $v = self::escape($v);
+# NB 07.01.18 if (empty($o['no_escape'])) $v = self::escape($v);
+ if (!empty($o['escape'])) $v = self::escape($v);
if (!$is_scalar and strpos($type,'html') !== false) $v = '<pre>'.NB_EOL.$v.NB_EOL.'</pre>';
return $v;
eqfips varchar(2)
);
CREATE INDEX IF NOT EXISTS country_geoid_idx ON country (geoid);
+CREATE INDEX IF NOT EXISTS country_capital_idx ON country (capital);
BEGIN TRANSACTION;
DELETE FROM country;
COPY country FROM PROGRAM 'curl -s http://download.geonames.org/export/dump/countryInfo.txt | grep -v "^#" | sed "s/\\\\/\\\\\\\\/g"' WITH (format 'text', NULL '');
#public $limits = [];
public $default_limit = '30';
public $limits = ['30','100','500','1000'];
- public $formats = [ 'html','csv','xml','json','yaml','sh','sql','php' ];
+ public $formats = [ 'html','div','csv','xml','json','yaml','sh','sql','php' ];
public $is_html;
# Page
$bottom[] = 'Database: '.preg_replace(array_keys($r),$r,$this->db->pdo);
}
- if ($bottom and $this->page->is('html')) echo $this->page->tag('div class="block" style="display:inline-block"',join('<br />'.NB_EOL,$bottom));
+ if ($bottom and $this->page->is('html')) echo $this->page->tag('div class="block bottom"',join('<br />'.NB_EOL,$bottom));
$this->page->end();
}
margin: 0.2em 0.4em 0.2em 0;
}
+.rows { padding: 0; }
+.rows form { display: inline-block; }
+
table.rows,
div.row,
ul.row,
}
-.rows { padding: 0; }
-.rows form { display: inline-block; }
-
table.rows {
border-style: hidden;
border-collapse: collapse;
}
table.rows.fixed th,
-table.rows.fixed td
+table.rows.fixed td,
+div.row div label
{
white-space: nowrap;
text-overflow: ellipsis;
/*
div.row { float: left; margin-right: 12px; min-width: 31%; }
*/
+div.rows { clear: both; }
div.row { float: left; margin-right: 4px; min-width: 24%; }
div.row div {
div.row div.view label, div.row div.delete label { display: none; }
div.row div.view, div.row div.delete { text-align: center; }
-ul.row li label, div.row div label {
+div.row div label,
+ul.row li label
+{
padding: 0.1em 0.5em 0.1em 0;
min-width: 20%;
display: inline-block;
}
-.menu, .nav, .rows, td.button, .center {
+.menu,
+.nav,
+.rows,
+.bottom,
+.center {
+ clear: both;
display: table;
}
-.menu, .nav, .rows, .buttons, td.button, .center {
+.menu,
+.nav,
+.rows,
+.bottom,
+.buttons,
+td.button,
+.center {
margin-left: auto;
margin-right: auto;
}
border-top: dashed 1px #DDDDDD;
margin-top: 0.3em;
padding-top: 0.3em;
+ clear: both;
}
form.menu .criterias span.label {
border-right: solid 1px #fff;
+ border-radius: 3px;
+ /*
padding: 0.2em 0.1em;
margin: 0.2em 0.2em 0 0;
- border-radius: 3px;
+ */
+ margin: 0 0.2em;
+ white-space: nowrap;
+ float: left;
}
form.menu .criterias span.label:last-child {
form.menu select { max-width: 20%; }
-form.menu .criterias input[type=text]:focus { width: auto; }
form.menu .criterias input[type=text] { width: 4em; }
+/*
+form.menu .criterias input[type=text]:focus { width: auto; }
+*/
/*
EDIT PAGE
*/
+div.row label,
form.edit .fields label {
width: 25%;
text-align: right;
vertical-align: top;
}
+div.row .label span,
form.edit .fields .label span {
width: 54%;
display: inline-block;