function __construct()
 {
     parent::__construct();
     $geometryColumnsObj = new table("settings.geometry_columns_view");
     $this->rows = $geometryColumnsObj->getRecords();
     $this->rows = $this->rows['data'];
 }
Example #2
0
<?php

$table = new table("settings.geometry_columns_view");
$responseWmsLayers = $table->getRecords(NULL, "*", "1=1 ORDER BY sort_id,f_table_title,f_table_name");
<?php

$plannr = $_GET['plannr'];
$table = new table("lokalplaner.lpplandk2_join");
$table->execQuery("set client_encoding='LATIN1'", "PDO");
$response = $table->getRecords(NULL, "*", "plannr='{$plannr}'");
$row = $response['data'][0];
Example #4
0
<?php

session_start();
ini_set("display_errors", "On");
error_reporting(3);
include '../../../conf/main.php';
include 'libs/functions.php';
include 'inc/user_name_from_uri.php';
include 'libs/FirePHPCore/FirePHP.class.php';
include 'libs/FirePHPCore/fb.php';
include 'model/tables.php';
$postgisdb = $parts[3];
include "inc/lp_fields.php";
include "inc/lp_ref.php";
preg_match('/[0-9]+/', $_REQUEST['plannr'], $matches);
$_REQUEST['plannr'] = $matches[0];
//$_REQUEST['plannr'] = "5033";
$table = new table("lokalplaner.lpplandk2_join");
$table->execQuery("set client_encoding='LATIN1'", "PDO");
$response = $table->getRecords(NULL, "*", "plannr='{$_REQUEST['plannr']}'");
$row = $response['data'][0];
$table = new table("lokalplaner.lpdelplandk2_join");
$table->execQuery("set client_encoding='LATIN1'", "PDO");
$response = $table->getRecords(NULL, "*", "lokplan_id='{$row['planid']}' ORDER by delnr");
$rowsLpDel = $response['data'];
if (!is_array($rowsLpDel)) {
    $rowsLpDel = array();
}
//print_r($rowsLpDel);
Example #5
0
include 'libs/FirePHPCore/fb.php';
include 'model/tables.php';
$postgisdb = $parts[3];
$table = new table("vandforsyningsplan.anlaeg_join");
$table->execQuery("set client_encoding='LATIN1'", "PDO");
$response = $table->getRecords(NULL, "*", "id='{$_REQUEST['id']}'");
$row = $response['data'][0];
$response = $table->getRecords(NULL, "id,navn_paa_vandvaerk,html", "overordnet_id='{$row['overordnet_id']}'");
$rowOverordnet = $response['data'];
//print_r($rowOverordnet);
$table = new table("vandforsyningsplan.boringer");
$table->execQuery("set client_encoding='LATIN1'", "PDO");
$response = $table->getRecords(NULL, "*", "plant_id='{$_REQUEST['id']}'");
$rowBoringer = $response['data'];
//print_r($rowBoringer);
$table = new table("vandforsyningsplan.maengde");
$table->execQuery("set client_encoding='LATIN1'", "PDO");
$table->execQuery("set datestyle TO SQL,DMY", "PDO");
//$response = $table->getRecords(NULL,"*","plantid='{$_REQUEST['id']}' AND startdate::date>='01/01/2010'");
$response = $table->getRecords(NULL, "*", "plantid='{$row['overordnet_id']}'");
$rowMaengde = $response['data'];
$i = 0;
foreach ($rowMaengde as $value) {
    if (is_int($i / 2)) {
        $year[] = $value['time'];
    } else {
        $year[] = "";
    }
    $amount[] = $value['amount'];
    $i++;
}
Example #6
0
<?php

include '../../conf/main.php';
include '../../libs/functions.php';
include '../../model/tables.php';
include '../../inc/user_name_from_uri.php';
//print_r($parts);
$postgisdb = $parts[3];
$postgisschema = $parts[4];
$table = new table($parts[4] . "." . $parts[5]);
$response = $table->getRecords(NULL, $parts[6], "gid={$parts[7]}");
$data = base64_decode($response['data'][0][$parts[6]]);
Example #7
0
<?php

include "html_header.php";
include "inc/lp_fields.php";
include "inc/lp_ref.php";
$table = new table("lokalplaner.lpplandk2_join");
$table->execQuery("set client_encoding='latin1'", "PDO");
$response = $table->getRecords(null, "*", "plannr='{$_REQUEST['plannr']}'");
//print_r($response['data'][0]);
$row = $response['data'][0];
if (empty($row)) {
    die;
}
/*
$table = new table("public.lpdelplandk2_join");
$response = $table->getRecords("lokplan_id='{$_REQUEST['planid']}'");
print_r($response['data']);
$rowsLpDel = $response['data'];
*/
$postgisObject = new postgis();
//$postgisObject->execQuery("set client_encoding='latin1'","PG");
$query = "SELECT * FROM lokalplaner.lpdelplandk2_join where lokplan_id='" . $row["planid"] . "' order by delnr";
//echo $query;
$result = $postgisObject->execQuery($query, "PG");
$rowsLpDel = pg_fetch_all($result);
if (!is_array($rowsLpDel)) {
    $rowsLpDel = array();
}
$i = 1;
?>
<!DOCTYPE html>
Example #8
0
			MapappWin 	= window.open(strURL, strWinName, strParameters);
			MapappWin.focus();
		} else {
			if (!MapappWin.closed) {
				MapappWin.focus();
			}
		}
	}
</script>
<div id="map-win"></div>
<?php 
include "inc/lp_fields.php";
include "inc/lp_ref.php";
$table = new table("lokalplaner.lpplandk2_join");
$table->execQuery("set client_encoding='latin1'", "PDO");
$response = $table->getRecords(null, "*", "planid='{$_REQUEST['planid']}'", "");
//print_r($response['data'][0]);
$row = $response['data'][0];
/*
$table = new table("public.lpdelplandk2_join");
$response = $table->getRecords("lokplan_id='{$_REQUEST['planid']}'");
print_r($response['data']);
$rowsLpDel = $response['data'];
*/
$postgisObject = new postgis();
//$postgisObject->execQuery("set client_encoding='latin1'","PG");
$query = "SELECT * FROM lokalplaner.lpdelplandk2_join where lokplan_id='" . $_REQUEST["planid"] . "' order by delnr";
//echo $query;
$result = $postgisObject->execQuery($query, "PG");
$rowsLpDel = pg_fetch_all($result);
if (!is_array($rowsLpDel)) {
Example #9
0
<?php

$table = new table("public.ways");
//$table->execQuery("set client_encoding='latin1'","PDO");
$response = $table->getRecords(NULL, "*", "id={$parts['2']}");
//print_r($response['data'][0]);
$row = $response['data'][0];
Example #10
0
<?php

//preg_match('/(?<=\s)[0-9|\.]+/',$_GET['plannr'],$matches);
//$plannr = $matches[0];
$table = new table("lokalplaner.lpplandk2_join");
$table->execQuery("set client_encoding='LATIN1'", "PDO");
$response = $table->getRecords(NULL, "*", "planid='{$_GET['planid']}'");
$row = $response['data'][0];
$time = time();
<?php

$table = new table("lokalplaner.lpplandk2_join");
$table->execQuery("set client_encoding='LATIN1'", "PDO");
$response = $table->getRecords(NULL, "forsidebillede,plannr,plannavn,forsidetekst", "forsidebillede<>'' order by planid");
$row = $response['data'];
Example #12
0
<?php

include "../server_header.inc";
//include("../../inc/oauthcheck.php");
$table = new table($parts[5]);
if ($HTTP_RAW_POST_DATA) {
    $obj = json_decode($HTTP_RAW_POST_DATA);
}
//print_r($obj);
switch ($parts[4]) {
    case "getrecords":
        // only geometrycolumns table
        $response = $table->getRecords(true, "*", $whereClause = "f_table_schema='{$postgisschema}'");
        break;
    case "getgeojson":
        // only geometrycolumns table
        $response = $table->getGeoJson();
        break;
    case "getallrecords":
        // All tables
        $response = $table->getRecords(false, "gid,plannr,plannavn,distrikt,anvendelsegenerel,zonestatus,doklink", null);
        break;
    case "getgroupby":
        // All tables
        $response = $table->getGroupBy($parts[6]);
        break;
    case "updaterecord":
        // All tables
        $response = $table->updateRecord($obj->data, $parts[6]);
        makeMapFile($_SESSION['screen_name']);
        break;
Example #13
0
			MapappWin 	= window.open(strURL, strWinName, strParameters);
			MapappWin.focus();
		} else {
			if (!MapappWin.closed) {
				MapappWin.focus();
			}
		}
	}
</script>
<div id="map-win"></div>
<?php 
include "inc/lp_fields.php";
include "inc/lp_ref.php";
$table = new table("lokalplaner.lpplandk2_join");
$table->execQuery("set client_encoding='latin1'", "PDO");
$response = $table->getRecords("planid='{$_REQUEST['planid']}'");
//print_r($response['data'][0]);
$row = $response['data'][0];
/*
$table = new table("public.lpdelplandk2_join");
$response = $table->getRecords("lokplan_id='{$_REQUEST['planid']}'");
print_r($response['data']);
$rowsLpDel = $response['data'];
*/
$postgisObject = new postgis();
//$postgisObject->execQuery("set client_encoding='latin1'","PG");
$query = "SELECT * FROM lokalplaner.lpdelplandk2_join where lokplan_id='" . $_REQUEST["planid"] . "' order by delnr";
//echo $query;
$result = $postgisObject->execQuery($query, "PG");
$rowsLpDel = pg_fetch_all($result);
if (!is_array($rowsLpDel)) {
Example #14
0
<?php

include "inc/lp_fields.php";
include "inc/lp_ref.php";
$table = new table("lokalplaner.lpplandk2_join");
$table->execQuery("set client_encoding='LATIN1'", "PDO");
$response = $table->getRecords(NULL, "*", "planid='{$_REQUEST['planid']}'");
$row = $response['data'][0];
$table = new table("lokalplaner.lpdelplandk2_join");
$table->execQuery("set client_encoding='LATIN1'", "PDO");
$response = $table->getRecords(NULL, "*", "lokplan_id='{$_REQUEST['planid']}'");
$rowsLpDel = $response['data'];
if (!is_array($rowsLpDel)) {
    $rowsLpDel = array();
}
//print_r($rowsLpDel);
Example #15
0
<?php

$table = new table("tforms_115770000000094_join");
$response = $table->getRecords("f_table_schema='{$postgisschema}'", true);
Example #16
0
<?php

$table = new table("{$_REQUEST['schema']}.tforms{$_REQUEST['formid']}_join");
$table->execQuery("set client_encoding='UTF8'", "PDO");
$response = $table->getRecords(NULL, "*", "irowid='{$_REQUEST['id']}'");
$row = $response['data'][0];
if (empty($row)) {
    die("empty");
}
//print_r($row);
$checkTable = new table("public.save_check");
$checkTable->execQuery("set client_encoding='UTF8'", "PDO");
$checkResponse = $checkTable->getRecords(NULL, "*", "irowid={$_REQUEST['id']}");
$checkRow = $checkResponse['data'][0];
//print_r($checkRow);
Example #17
0
<?php

$table = new table("public.tforms115770000000094_join");
$table->execQuery("set client_encoding='UTF8'", "PDO");
//$response_INI_bygning = $table->getRecords(NULL,"*");
$response_INI_bygning = $table->getRecords(NULL, "*", "irowid='{$parts[4]}'");
$row_INI_bygning = $response_INI_bygning['data'][0];
$table = new table("public.tforms115770000001933_join");
$table->execQuery("set client_encoding='UTF8'", "PDO");
$response_INI_bnr = $table->getRecords(NULL, "*", "fieldkey='{$row_INI_bygning['bnr_nuuk']}'");
$row_INI_bnr = $response_INI_bnr['data'][0];
$table = new table("public.tforms115770000000004_join");
$table->execQuery("set client_encoding='UTF8'", "PDO");
$response_INI_aktiviteter = $table->getRecords(NULL, "*", "bygning_nuuk='{$row_INI_bnr['fieldkey']}'");
$rows_INI_aktiviteter = $response_INI_aktiviteter['data'];
$table = new table("public.tforms115770000000108_join");
$table->execQuery("set client_encoding='UTF8'", "PDO");
$response_INI_standardbygningsdele = $table->getRecords(NULL, "*");
$rows_INI_standardbygningsdele = $response_INI_standardbygningsdele['data'];
$table = new table("public.tforms115770000000324_join");
$table->execQuery("set client_encoding='UTF8'", "PDO");
$response_INI_standardgrupper_af_bygningsdele = $table->getRecords(NULL, "*");
$rows_INI_standardgrupper_af_bygningsdele = $response_INI_standardgrupper_af_bygningsdele['data'];