<?php
+return;
require_once(realpath(dirname(__FILE__).'/../../lib/php/maps.php'));
+function pub_map(&$r) {
+ if (empty($r['latitude'])) return;
+ if (empty($r['longiture'])) return;
+ $r['maps'] = '<a href="'.Maps::link($r['latitude'],$r['latitude']).'">'
+ .Maps::img($r['latitude'],$r['latitude'])
+ .'</a>';
+}
+
$DBQ['pub'] = [
'tables' => [
+ 'zipcode' => [ 'extras' => ['maps' => ''] ],
],
];
?>
// Post
//
if ($parser and !empty($this->row_parse_post)) {
- $call = $this->row_parse_post; $call($row,$this);
+ $call = $this->row_parse_post;
+ $call($row,$this);
}
if ($parser and !empty($this->db()->row_parse_post)) {
public function table_rows($fct=null) {
$this->db->limit = $this->limit();
+ if (!empty($this->db()->row_parse_pre)) {
+ $row_parse_pre = $this->db()->row_parse_pre;
+ }
+
+ if (!empty($this->db()->row_parse_post)) {
+ $row_parse_post = $this->db()->row_parse_post;
+ $call($r,$this);
+ }
+
$opt = ($this->page->is('html')
and $this->table_rw()
) ? [
'row_parse_pre' => function(&$r){
+ if (!empty($row_parse_pre)) $row_parse_pre($r,$this);
$GLOBALS['dbq_args'] = urlencode( join($this->param_args_sep,$this->table->fields_keys_values($r)) );
},
'row_parse_post' => function(&$r){
+ if (!empty($row_parse_post)) $row_parse_post($r,$this);
$args = $GLOBALS['dbq_args'];
$hidden = $this->form_hidden($r);
},
] : [];
- $this->table->rows($opt);
+ #$this->table->rows($opt);
+ $this->db()->__construct($opt);
+ $this->table->rows();
unset($GLOBALS['dbq_args']);
}