<?php

require_once 'system/autoload.inc.php';
require_once 'dbd/autoload.inc.php';
require_once 'dasense/autoload.inc.php';

$call = new DBD\dasensedata();
/*$call = array(  array(\DBD\APITable::FIELD_ID => 0,     \DBD\APITable::FIELD_FLAG =>0,  \DBD\APITable::FIELD_PARENTID =>-1,     \DBD\APITable::FIELD_PARENTVALUE =>NULL,            \DBD\APITable::FIELD_NAME =>'call',             \DBD\APITable::FIELD_ALLOWEDVALUES =>NULL),
                array(\DBD\APITable::FIELD_ID => 45,    \DBD\APITable::FIELD_FLAG =>1,  \DBD\APITable::FIELD_PARENTID =>1,      \DBD\APITable::FIELD_PARENTVALUE =>'geopoint',      \DBD\APITable::FIELD_NAME =>'datatype',         \DBD\APITable::FIELD_ALLOWEDVALUES =>'ALL'),
                array(\DBD\APITable::FIELD_ID => 120,   \DBD\APITable::FIELD_FLAG =>0,  \DBD\APITable::FIELD_PARENTID =>60,     \DBD\APITable::FIELD_PARENTVALUE =>'login',         \DBD\APITable::FIELD_NAME =>'compatibility',    \DBD\APITable::FIELD_ALLOWEDVALUES =>'FLAG'),
                array(\DBD\APITable::FIELD_ID => 5,     \DBD\APITable::FIELD_FLAG =>0,  \DBD\APITable::FIELD_PARENTID =>0,      \DBD\APITable::FIELD_PARENTVALUE =>'map',           \DBD\APITable::FIELD_NAME =>'algo',             \DBD\APITable::FIELD_ALLOWEDVALUES =>NULL),
                array(\DBD\APITable::FIELD_ID => 6,     \DBD\APITable::FIELD_FLAG =>0,  \DBD\APITable::FIELD_PARENTID =>5,      \DBD\APITable::FIELD_PARENTVALUE =>NULL,            \DBD\APITable::FIELD_NAME =>'key',              \DBD\APITable::FIELD_ALLOWEDVALUES =>'FLAG'),
                array(\DBD\APITable::FIELD_ID => 16,    \DBD\APITable::FIELD_FLAG =>1,  \DBD\APITable::FIELD_PARENTID =>6,      \DBD\APITable::FIELD_PARENTVALUE =>NULL,            \DBD\APITable::FIELD_NAME =>'type',             \DBD\APITable::FIELD_ALLOWEDVALUES =>'SENSORTYPE'),
                array(\DBD\APITable::FIELD_ID => 7,     \DBD\APITable::FIELD_FLAG =>0,  \DBD\APITable::FIELD_PARENTID =>5,      \DBD\APITable::FIELD_PARENTVALUE =>NULL,            \DBD\APITable::FIELD_NAME =>'markers',          \DBD\APITable::FIELD_ALLOWEDVALUES =>'FLAG'),
                array(\DBD\APITable::FIELD_ID => 8,     \DBD\APITable::FIELD_FLAG =>0,  \DBD\APITable::FIELD_PARENTID =>5,      \DBD\APITable::FIELD_PARENTVALUE =>NULL,            \DBD\APITable::FIELD_NAME =>'animation',        \DBD\APITable::FIELD_ALLOWEDVALUES =>'FLAG'),
                array(\DBD\APITable::FIELD_ID => 17,    \DBD\APITable::FIELD_FLAG =>1,  \DBD\APITable::FIELD_PARENTID =>7,      \DBD\APITable::FIELD_PARENTVALUE =>NULL,            \DBD\APITable::FIELD_NAME =>'x',                \DBD\APITable::FIELD_ALLOWEDVALUES =>'GOOGLEMAPCOORD'),
                array(\DBD\APITable::FIELD_ID => 18,    \DBD\APITable::FIELD_FLAG =>1,  \DBD\APITable::FIELD_PARENTID =>7,      \DBD\APITable::FIELD_PARENTVALUE =>NULL,            \DBD\APITable::FIELD_NAME =>'y',                \DBD\APITable::FIELD_ALLOWEDVALUES =>'GOOGLEMAPCOORD'),
                array(\DBD\APITable::FIELD_ID => 19,    \DBD\APITable::FIELD_FLAG =>1,  \DBD\APITable::FIELD_PARENTID =>7,      \DBD\APITable::FIELD_PARENTVALUE =>NULL,            \DBD\APITable::FIELD_NAME =>'zoom',             \DBD\APITable::FIELD_ALLOWEDVALUES =>'GOOGLEMAPZOOM'),
                array(\DBD\APITable::FIELD_ID => 20,    \DBD\APITable::FIELD_FLAG =>1,  \DBD\APITable::FIELD_PARENTID =>7,      \DBD\APITable::FIELD_PARENTVALUE =>NULL,            \DBD\APITable::FIELD_NAME =>'from',             \DBD\APITable::FIELD_ALLOWEDVALUES =>'WIERDTIMESTAMP'),
                array(\DBD\APITable::FIELD_ID => 21,    \DBD\APITable::FIELD_FLAG =>1,  \DBD\APITable::FIELD_PARENTID =>7,      \DBD\APITable::FIELD_PARENTVALUE =>NULL,            \DBD\APITable::FIELD_NAME =>'to',               \DBD\APITable::FIELD_ALLOWEDVALUES =>'WIERDTIMESTAMP'),
                array(\DBD\APITable::FIELD_ID => 22,    \DBD\APITable::FIELD_FLAG =>1,  \DBD\APITable::FIELD_PARENTID =>7,      \DBD\APITable::FIELD_PARENTVALUE =>NULL,            \DBD\APITable::FIELD_NAME =>'type',             \DBD\APITable::FIELD_ALLOWEDVALUES =>'SENSORTYPE'),
                array(\DBD\APITable::FIELD_ID => 23,    \DBD\APITable::FIELD_FLAG =>1,  \DBD\APITable::FIELD_PARENTID =>7,      \DBD\APITable::FIELD_PARENTVALUE =>NULL,            \DBD\APITable::FIELD_NAME =>'provider',         \DBD\APITable::FIELD_ALLOWEDVALUES =>'SENSORPROVIDER'),
                array(\DBD\APITable::FIELD_ID => 9,     \DBD\APITable::FIELD_FLAG =>1,  \DBD\APITable::FIELD_PARENTID =>5,      \DBD\APITable::FIELD_PARENTVALUE =>NULL,            \DBD\APITable::FIELD_NAME =>'x',                \DBD\APITable::FIELD_ALLOWEDVALUES =>'GOOGLEMAPCOORD'),
                array(\DBD\APITable::FIELD_ID => 10,    \DBD\APITable::FIELD_FLAG =>1,  \DBD\APITable::FIELD_PARENTID =>5,      \DBD\APITable::FIELD_PARENTVALUE =>NULL,            \DBD\APITable::FIELD_NAME =>'y',                \DBD\APITable::FIELD_ALLOWEDVALUES =>'GOOGLEMAPCOORD'),
                array(\DBD\APITable::FIELD_ID => 11,    \DBD\APITable::FIELD_FLAG =>1,  \DBD\APITable::FIELD_PARENTID =>5,      \DBD\APITable::FIELD_PARENTVALUE =>NULL,            \DBD\APITable::FIELD_NAME =>'zoom',             \DBD\APITable::FIELD_ALLOWEDVALUES =>'GOOGLEMAPZOOM'),
                array(\DBD\APITable::FIELD_ID => 12,    \DBD\APITable::FIELD_FLAG =>1,  \DBD\APITable::FIELD_PARENTID =>5,      \DBD\APITable::FIELD_PARENTVALUE =>NULL,            \DBD\APITable::FIELD_NAME =>'from',             \DBD\APITable::FIELD_ALLOWEDVALUES =>'WIERDTIMESTAMP'),
                array(\DBD\APITable::FIELD_ID => 13,    \DBD\APITable::FIELD_FLAG =>1,  \DBD\APITable::FIELD_PARENTID =>5,      \DBD\APITable::FIELD_PARENTVALUE =>NULL,            \DBD\APITable::FIELD_NAME =>'to',               \DBD\APITable::FIELD_ALLOWEDVALUES =>'WIERDTIMESTAMP'),
                array(\DBD\APITable::FIELD_ID => 14,    \DBD\APITable::FIELD_FLAG =>1,  \DBD\APITable::FIELD_PARENTID =>5,      \DBD\APITable::FIELD_PARENTVALUE =>NULL,            \DBD\APITable::FIELD_NAME =>'type',             \DBD\APITable::FIELD_ALLOWEDVALUES =>'SENSORTYPE'),
                array(\DBD\APITable::FIELD_ID => 15,    \DBD\APITable::FIELD_FLAG =>1,  \DBD\APITable::FIELD_PARENTID =>5,      \DBD\APITable::FIELD_PARENTVALUE =>NULL,            \DBD\APITable::FIELD_NAME =>'provider',         \DBD\APITable::FIELD_ALLOWEDVALUES =>'SENSORPROVIDER'),
                array(\DBD\APITable::FIELD_ID => 132,   \DBD\APITable::FIELD_FLAG =>1,  \DBD\APITable::FIELD_PARENTID =>130,    \DBD\APITable::FIELD_PARENTVALUE =>NULL,            \DBD\APITable::FIELD_NAME =>'password',         \DBD\APITable::FIELD_ALLOWEDVALUES =>'PASSWORD'),
                array(\DBD\APITable::FIELD_ID => 111,   \DBD\APITable::FIELD_FLAG =>1,  \DBD\APITable::FIELD_PARENTID =>110,    \DBD\APITable::FIELD_PARENTVALUE =>'data',          \DBD\APITable::FIELD_NAME =>'source',           \DBD\APITable::FIELD_ALLOWEDVALUES =>'INPUTSOURCE'),
                array(\DBD\APITable::FIELD_ID => 110,   \DBD\APITable::FIELD_FLAG =>0,  \DBD\APITable::FIELD_PARENTID =>0,      \DBD\APITable::FIELD_PARENTVALUE =>'input',         \DBD\APITable::FIELD_NAME =>'type',             \DBD\APITable::FIELD_ALLOWEDVALUES =>NULL),
                array(\DBD\APITable::FIELD_ID => 131,   \DBD\APITable::FIELD_FLAG =>1,  \DBD\APITable::FIELD_PARENTID =>130,    \DBD\APITable::FIELD_PARENTVALUE =>NULL,            \DBD\APITable::FIELD_NAME =>'username',         \DBD\APITable::FIELD_ALLOWEDVALUES =>'USERNAME'),
                array(\DBD\APITable::FIELD_ID => 130,   \DBD\APITable::FIELD_FLAG =>0,  \DBD\APITable::FIELD_PARENTID =>60,     \DBD\APITable::FIELD_PARENTVALUE =>'create',        \DBD\APITable::FIELD_NAME =>'compatibility',    \DBD\APITable::FIELD_ALLOWEDVALUES =>'FLAG'),
                array(\DBD\APITable::FIELD_ID => 126,   \DBD\APITable::FIELD_FLAG =>1,  \DBD\APITable::FIELD_PARENTID =>125,    \DBD\APITable::FIELD_PARENTVALUE =>NULL,            \DBD\APITable::FIELD_NAME =>'username',         \DBD\APITable::FIELD_ALLOWEDVALUES =>'USERNAME'),
                array(\DBD\APITable::FIELD_ID => 125,   \DBD\APITable::FIELD_FLAG =>0,  \DBD\APITable::FIELD_PARENTID =>60,     \DBD\APITable::FIELD_PARENTVALUE =>'available',     \DBD\APITable::FIELD_NAME =>'compatibility',    \DBD\APITable::FIELD_ALLOWEDVALUES =>'FLAG'),
                array(\DBD\APITable::FIELD_ID => 123,   \DBD\APITable::FIELD_FLAG =>1,  \DBD\APITable::FIELD_PARENTID =>120,    \DBD\APITable::FIELD_PARENTVALUE =>NULL,            \DBD\APITable::FIELD_NAME =>'hashed',           \DBD\APITable::FIELD_ALLOWEDVALUES =>'BOOL'),
                array(\DBD\APITable::FIELD_ID => 122,   \DBD\APITable::FIELD_FLAG =>1,  \DBD\APITable::FIELD_PARENTID =>120,    \DBD\APITable::FIELD_PARENTVALUE =>NULL,            \DBD\APITable::FIELD_NAME =>'password',         \DBD\APITable::FIELD_ALLOWEDVALUES =>'PASSWORD'),
                array(\DBD\APITable::FIELD_ID => 121,   \DBD\APITable::FIELD_FLAG =>1,  \DBD\APITable::FIELD_PARENTID =>120,    \DBD\APITable::FIELD_PARENTVALUE =>NULL,            \DBD\APITable::FIELD_NAME =>'username',         \DBD\APITable::FIELD_ALLOWEDVALUES =>'USERNAME'),
                array(\DBD\APITable::FIELD_ID => 34,    \DBD\APITable::FIELD_FLAG =>1,  \DBD\APITable::FIELD_PARENTID =>8,      \DBD\APITable::FIELD_PARENTVALUE =>NULL,            \DBD\APITable::FIELD_NAME =>'x',                \DBD\APITable::FIELD_ALLOWEDVALUES =>'GOOGLEMAPCOORD'),
                array(\DBD\APITable::FIELD_ID => 35,    \DBD\APITable::FIELD_FLAG =>1,  \DBD\APITable::FIELD_PARENTID =>8,      \DBD\APITable::FIELD_PARENTVALUE =>NULL,            \DBD\APITable::FIELD_NAME =>'y',                \DBD\APITable::FIELD_ALLOWEDVALUES =>'GOOGLEMAPCOORD'),
                array(\DBD\APITable::FIELD_ID => 36,    \DBD\APITable::FIELD_FLAG =>1,  \DBD\APITable::FIELD_PARENTID =>8,      \DBD\APITable::FIELD_PARENTVALUE =>NULL,            \DBD\APITable::FIELD_NAME =>'zoom',             \DBD\APITable::FIELD_ALLOWEDVALUES =>'GOOGLEMAPZOOM'),
                array(\DBD\APITable::FIELD_ID => 37,    \DBD\APITable::FIELD_FLAG =>1,  \DBD\APITable::FIELD_PARENTID =>8,      \DBD\APITable::FIELD_PARENTVALUE =>NULL,            \DBD\APITable::FIELD_NAME =>'from',             \DBD\APITable::FIELD_ALLOWEDVALUES =>'WIERDTIMESTAMP'),
                array(\DBD\APITable::FIELD_ID => 38,    \DBD\APITable::FIELD_FLAG =>1,  \DBD\APITable::FIELD_PARENTID =>8,      \DBD\APITable::FIELD_PARENTVALUE =>NULL,            \DBD\APITable::FIELD_NAME =>'to',               \DBD\APITable::FIELD_ALLOWEDVALUES =>'WIERDTIMESTAMP'),
                array(\DBD\APITable::FIELD_ID => 39,    \DBD\APITable::FIELD_FLAG =>1,  \DBD\APITable::FIELD_PARENTID =>8,      \DBD\APITable::FIELD_PARENTVALUE =>NULL,            \DBD\APITable::FIELD_NAME =>'type',             \DBD\APITable::FIELD_ALLOWEDVALUES =>'SENSORTYPE'),
                array(\DBD\APITable::FIELD_ID => 40,    \DBD\APITable::FIELD_FLAG =>1,  \DBD\APITable::FIELD_PARENTID =>8,      \DBD\APITable::FIELD_PARENTVALUE =>NULL,            \DBD\APITable::FIELD_NAME =>'provider',         \DBD\APITable::FIELD_ALLOWEDVALUES =>'SENSORPROVIDER'),
                array(\DBD\APITable::FIELD_ID => 43,    \DBD\APITable::FIELD_FLAG =>1,  \DBD\APITable::FIELD_PARENTID =>1,      \DBD\APITable::FIELD_PARENTVALUE =>'geopoint',      \DBD\APITable::FIELD_NAME =>'radius',           \DBD\APITable::FIELD_ALLOWEDVALUES =>'ALL'),
                array(\DBD\APITable::FIELD_ID => 42,    \DBD\APITable::FIELD_FLAG =>1,  \DBD\APITable::FIELD_PARENTID =>1,      \DBD\APITable::FIELD_PARENTVALUE =>'geopoint',      \DBD\APITable::FIELD_NAME =>'long',             \DBD\APITable::FIELD_ALLOWEDVALUES =>'ALL'),
                array(\DBD\APITable::FIELD_ID => 41,    \DBD\APITable::FIELD_FLAG =>1,  \DBD\APITable::FIELD_PARENTID =>1,      \DBD\APITable::FIELD_PARENTVALUE =>'geopoint',      \DBD\APITable::FIELD_NAME =>'lat',              \DBD\APITable::FIELD_ALLOWEDVALUES =>'ALL'),
                array(\DBD\APITable::FIELD_ID => 60,    \DBD\APITable::FIELD_FLAG =>0,  \DBD\APITable::FIELD_PARENTID =>0,      \DBD\APITable::FIELD_PARENTVALUE =>'account',       \DBD\APITable::FIELD_NAME =>'action',           \DBD\APITable::FIELD_ALLOWEDVALUES =>NULL),
                array(\DBD\APITable::FIELD_ID => 140,   \DBD\APITable::FIELD_FLAG =>1,  \DBD\APITable::FIELD_PARENTID =>1,      \DBD\APITable::FIELD_PARENTVALUE =>'sensor',        \DBD\APITable::FIELD_NAME =>'sensorid',         \DBD\APITable::FIELD_ALLOWEDVALUES =>'INT'),
                array(\DBD\APITable::FIELD_ID => 1,     \DBD\APITable::FIELD_FLAG =>0,  \DBD\APITable::FIELD_PARENTID =>0,      \DBD\APITable::FIELD_PARENTVALUE =>'page',          \DBD\APITable::FIELD_NAME =>'page',             \DBD\APITable::FIELD_ALLOWEDVALUES =>NULL),
                array(\DBD\APITable::FIELD_ID => 47,    \DBD\APITable::FIELD_FLAG =>1,  \DBD\APITable::FIELD_PARENTID =>46,     \DBD\APITable::FIELD_PARENTVALUE =>NULL,            \DBD\APITable::FIELD_NAME =>'lat',              \DBD\APITable::FIELD_ALLOWEDVALUES =>'LATLONCOORD'),
                array(\DBD\APITable::FIELD_ID => 48,    \DBD\APITable::FIELD_FLAG =>1,  \DBD\APITable::FIELD_PARENTID =>46,     \DBD\APITable::FIELD_PARENTVALUE =>NULL,            \DBD\APITable::FIELD_NAME =>'long',             \DBD\APITable::FIELD_ALLOWEDVALUES =>'LATLONCOORD'),
                array(\DBD\APITable::FIELD_ID => 49,    \DBD\APITable::FIELD_FLAG =>1,  \DBD\APITable::FIELD_PARENTID =>46,     \DBD\APITable::FIELD_PARENTVALUE =>NULL,            \DBD\APITable::FIELD_NAME =>'radius',           \DBD\APITable::FIELD_ALLOWEDVALUES =>'UINT'),
                array(\DBD\APITable::FIELD_ID => 61,    \DBD\APITable::FIELD_FLAG =>1,  \DBD\APITable::FIELD_PARENTID =>60,     \DBD\APITable::FIELD_PARENTVALUE =>'login',         \DBD\APITable::FIELD_NAME =>'username',         \DBD\APITable::FIELD_ALLOWEDVALUES =>'USERNAME'),
                array(\DBD\APITable::FIELD_ID => 51,    \DBD\APITable::FIELD_FLAG =>1,  \DBD\APITable::FIELD_PARENTID =>46,     \DBD\APITable::FIELD_PARENTVALUE =>NULL,            \DBD\APITable::FIELD_NAME =>'datatype',         \DBD\APITable::FIELD_ALLOWEDVALUES =>'SENSORTYPE'),
                array(\DBD\APITable::FIELD_ID => 62,    \DBD\APITable::FIELD_FLAG =>1,  \DBD\APITable::FIELD_PARENTID =>60,     \DBD\APITable::FIELD_PARENTVALUE =>'login',         \DBD\APITable::FIELD_NAME =>'password',         \DBD\APITable::FIELD_ALLOWEDVALUES =>'PASSWORD'),
                array(\DBD\APITable::FIELD_ID => 63,    \DBD\APITable::FIELD_FLAG =>1,  \DBD\APITable::FIELD_PARENTID =>60,     \DBD\APITable::FIELD_PARENTVALUE =>'login',         \DBD\APITable::FIELD_NAME =>'hashed',           \DBD\APITable::FIELD_ALLOWEDVALUES =>'BOOL'),
                array(\DBD\APITable::FIELD_ID => 64,    \DBD\APITable::FIELD_FLAG =>1,  \DBD\APITable::FIELD_PARENTID =>60,     \DBD\APITable::FIELD_PARENTVALUE =>'check',         \DBD\APITable::FIELD_NAME =>'rightid',          \DBD\APITable::FIELD_ALLOWEDVALUES =>'UINT'),
                array(\DBD\APITable::FIELD_ID => 65,    \DBD\APITable::FIELD_FLAG =>1,  \DBD\APITable::FIELD_PARENTID =>60,     \DBD\APITable::FIELD_PARENTVALUE =>'create',        \DBD\APITable::FIELD_NAME =>'username',         \DBD\APITable::FIELD_ALLOWEDVALUES =>'USERNAME'),
                array(\DBD\APITable::FIELD_ID => 66,    \DBD\APITable::FIELD_FLAG =>1,  \DBD\APITable::FIELD_PARENTID =>60,     \DBD\APITable::FIELD_PARENTVALUE =>'create',        \DBD\APITable::FIELD_NAME =>'password',         \DBD\APITable::FIELD_ALLOWEDVALUES =>'PASSWORD'),
                array(\DBD\APITable::FIELD_ID => 67,    \DBD\APITable::FIELD_FLAG =>1,  \DBD\APITable::FIELD_PARENTID =>60,     \DBD\APITable::FIELD_PARENTVALUE =>'create',        \DBD\APITable::FIELD_NAME =>'email',            \DBD\APITable::FIELD_ALLOWEDVALUES =>'EMAIL'),
                array(\DBD\APITable::FIELD_ID => 68,    \DBD\APITable::FIELD_FLAG =>1,  \DBD\APITable::FIELD_PARENTID =>60,     \DBD\APITable::FIELD_PARENTVALUE =>'create',        \DBD\APITable::FIELD_NAME =>'hashed',           \DBD\APITable::FIELD_ALLOWEDVALUES =>'BOOL'),
                array(\DBD\APITable::FIELD_ID => 70,    \DBD\APITable::FIELD_FLAG =>0,  \DBD\APITable::FIELD_PARENTID =>0,      \DBD\APITable::FIELD_PARENTVALUE =>'analysis',      \DBD\APITable::FIELD_NAME =>'action',           \DBD\APITable::FIELD_ALLOWEDVALUES =>NULL),
                array(\DBD\APITable::FIELD_ID => 71,    \DBD\APITable::FIELD_FLAG =>0,  \DBD\APITable::FIELD_PARENTID =>70,     \DBD\APITable::FIELD_PARENTVALUE =>NULL,            \DBD\APITable::FIELD_NAME =>'mthd',             \DBD\APITable::FIELD_ALLOWEDVALUES =>NULL),
                array(\DBD\APITable::FIELD_ID => 72,    \DBD\APITable::FIELD_FLAG =>1,  \DBD\APITable::FIELD_PARENTID =>71,     \DBD\APITable::FIELD_PARENTVALUE =>'within',        \DBD\APITable::FIELD_NAME =>'lat',              \DBD\APITable::FIELD_ALLOWEDVALUES =>'LATLONCOORD'),
                array(\DBD\APITable::FIELD_ID => 73,    \DBD\APITable::FIELD_FLAG =>1,  \DBD\APITable::FIELD_PARENTID =>71,     \DBD\APITable::FIELD_PARENTVALUE =>'within',        \DBD\APITable::FIELD_NAME =>'lng',              \DBD\APITable::FIELD_ALLOWEDVALUES =>'LATLONCOORD'),
                array(\DBD\APITable::FIELD_ID => 74,    \DBD\APITable::FIELD_FLAG =>1,  \DBD\APITable::FIELD_PARENTID =>71,     \DBD\APITable::FIELD_PARENTVALUE =>'within',        \DBD\APITable::FIELD_NAME =>'when',             \DBD\APITable::FIELD_ALLOWEDVALUES =>'ALL'),
                array(\DBD\APITable::FIELD_ID => 75,    \DBD\APITable::FIELD_FLAG =>1,  \DBD\APITable::FIELD_PARENTID =>71,     \DBD\APITable::FIELD_PARENTVALUE =>'gettotal',      \DBD\APITable::FIELD_NAME =>'useruid',          \DBD\APITable::FIELD_ALLOWEDVALUES =>'ALL'),
                array(\DBD\APITable::FIELD_ID => 76,    \DBD\APITable::FIELD_FLAG =>1,  \DBD\APITable::FIELD_PARENTID =>71,     \DBD\APITable::FIELD_PARENTVALUE =>'gettotal',      \DBD\APITable::FIELD_NAME =>'intval',           \DBD\APITable::FIELD_ALLOWEDVALUES =>'ALL'),
                array(\DBD\APITable::FIELD_ID => 77,    \DBD\APITable::FIELD_FLAG =>1,  \DBD\APITable::FIELD_PARENTID =>71,     \DBD\APITable::FIELD_PARENTVALUE =>'getseries',     \DBD\APITable::FIELD_NAME =>'useruid',          \DBD\APITable::FIELD_ALLOWEDVALUES =>'ALL'),
                array(\DBD\APITable::FIELD_ID => 78,    \DBD\APITable::FIELD_FLAG =>1,  \DBD\APITable::FIELD_PARENTID =>71,     \DBD\APITable::FIELD_PARENTVALUE =>'projection24',  \DBD\APITable::FIELD_NAME =>'useruid',          \DBD\APITable::FIELD_ALLOWEDVALUES =>'ALL'),
                array(\DBD\APITable::FIELD_ID => 79,    \DBD\APITable::FIELD_FLAG =>1,  \DBD\APITable::FIELD_PARENTID =>71,     \DBD\APITable::FIELD_PARENTVALUE =>'projection24',  \DBD\APITable::FIELD_NAME =>'intval',           \DBD\APITable::FIELD_ALLOWEDVALUES =>'ALL'),
                array(\DBD\APITable::FIELD_ID => 80,    \DBD\APITable::FIELD_FLAG =>1,  \DBD\APITable::FIELD_PARENTID =>71,     \DBD\APITable::FIELD_PARENTVALUE =>'get',           \DBD\APITable::FIELD_NAME =>'useruid',          \DBD\APITable::FIELD_ALLOWEDVALUES =>'ALL'),
                array(\DBD\APITable::FIELD_ID => 81,    \DBD\APITable::FIELD_FLAG =>1,  \DBD\APITable::FIELD_PARENTID =>71,     \DBD\APITable::FIELD_PARENTVALUE =>'get',           \DBD\APITable::FIELD_NAME =>'acronym',          \DBD\APITable::FIELD_ALLOWEDVALUES =>'ALL'),
                array(\DBD\APITable::FIELD_ID => 82,    \DBD\APITable::FIELD_FLAG =>1,  \DBD\APITable::FIELD_PARENTID =>71,     \DBD\APITable::FIELD_PARENTVALUE =>'gethist',       \DBD\APITable::FIELD_NAME =>'useruid',          \DBD\APITable::FIELD_ALLOWEDVALUES =>'ALL'),
                array(\DBD\APITable::FIELD_ID => 83,    \DBD\APITable::FIELD_FLAG =>1,  \DBD\APITable::FIELD_PARENTID =>71,     \DBD\APITable::FIELD_PARENTVALUE =>'gethist',       \DBD\APITable::FIELD_NAME =>'sort',             \DBD\APITable::FIELD_ALLOWEDVALUES =>'ALL'),
                array(\DBD\APITable::FIELD_ID => 84,    \DBD\APITable::FIELD_FLAG =>1,  \DBD\APITable::FIELD_PARENTID =>71,     \DBD\APITable::FIELD_PARENTVALUE =>'is',            \DBD\APITable::FIELD_NAME =>'useruid',          \DBD\APITable::FIELD_ALLOWEDVALUES =>'ALL'),
                array(\DBD\APITable::FIELD_ID => 85,    \DBD\APITable::FIELD_FLAG =>1,  \DBD\APITable::FIELD_PARENTID =>71,     \DBD\APITable::FIELD_PARENTVALUE =>'is',            \DBD\APITable::FIELD_NAME =>'acronym',          \DBD\APITable::FIELD_ALLOWEDVALUES =>'ALL'),
                array(\DBD\APITable::FIELD_ID => 86,    \DBD\APITable::FIELD_FLAG =>1,  \DBD\APITable::FIELD_PARENTID =>71,     \DBD\APITable::FIELD_PARENTVALUE =>'getbyuser',     \DBD\APITable::FIELD_NAME =>'useruid',          \DBD\APITable::FIELD_ALLOWEDVALUES =>'ALL'),
                array(\DBD\APITable::FIELD_ID => 87,    \DBD\APITable::FIELD_FLAG =>1,  \DBD\APITable::FIELD_PARENTID =>71,     \DBD\APITable::FIELD_PARENTVALUE =>'getallcond',    \DBD\APITable::FIELD_NAME =>'useruid',          \DBD\APITable::FIELD_ALLOWEDVALUES =>'ALL'),
                array(\DBD\APITable::FIELD_ID => 88,    \DBD\APITable::FIELD_FLAG =>1,  \DBD\APITable::FIELD_PARENTID =>71,     \DBD\APITable::FIELD_PARENTVALUE =>'getallcond',    \DBD\APITable::FIELD_NAME =>'acronym',          \DBD\APITable::FIELD_ALLOWEDVALUES =>'ALL'),
                array(\DBD\APITable::FIELD_ID => 89,    \DBD\APITable::FIELD_FLAG =>1,  \DBD\APITable::FIELD_PARENTID =>71,     \DBD\APITable::FIELD_PARENTVALUE =>'getalldefs',    \DBD\APITable::FIELD_NAME =>'useruid',          \DBD\APITable::FIELD_ALLOWEDVALUES =>'ALL'),
                array(\DBD\APITable::FIELD_ID => 90,    \DBD\APITable::FIELD_FLAG =>1,  \DBD\APITable::FIELD_PARENTID =>71,     \DBD\APITable::FIELD_PARENTVALUE =>'getalldefs',    \DBD\APITable::FIELD_NAME =>'acronym',          \DBD\APITable::FIELD_ALLOWEDVALUES =>'ALL'),
                array(\DBD\APITable::FIELD_ID => 91,    \DBD\APITable::FIELD_FLAG =>1,  \DBD\APITable::FIELD_PARENTID =>71,     \DBD\APITable::FIELD_PARENTVALUE =>'all',           \DBD\APITable::FIELD_NAME =>'useruid',          \DBD\APITable::FIELD_ALLOWEDVALUES =>'ALL'),
                array(\DBD\APITable::FIELD_ID => 92,    \DBD\APITable::FIELD_FLAG =>1,  \DBD\APITable::FIELD_PARENTID =>71,     \DBD\APITable::FIELD_PARENTVALUE =>'all',           \DBD\APITable::FIELD_NAME =>'last',             \DBD\APITable::FIELD_ALLOWEDVALUES =>'ALL'),
                array(\DBD\APITable::FIELD_ID => 93,    \DBD\APITable::FIELD_FLAG =>1,  \DBD\APITable::FIELD_PARENTID =>71,     \DBD\APITable::FIELD_PARENTVALUE =>'own',           \DBD\APITable::FIELD_NAME =>'useruid',          \DBD\APITable::FIELD_ALLOWEDVALUES =>'ALL'),
                array(\DBD\APITable::FIELD_ID => 94,    \DBD\APITable::FIELD_FLAG =>1,  \DBD\APITable::FIELD_PARENTID =>71,     \DBD\APITable::FIELD_PARENTVALUE =>'own',           \DBD\APITable::FIELD_NAME =>'last',             \DBD\APITable::FIELD_ALLOWEDVALUES =>'ALL'),
                array(\DBD\APITable::FIELD_ID => 95,    \DBD\APITable::FIELD_FLAG =>1,  \DBD\APITable::FIELD_PARENTID =>71,     \DBD\APITable::FIELD_PARENTVALUE =>'register',      \DBD\APITable::FIELD_NAME =>'useruid',          \DBD\APITable::FIELD_ALLOWEDVALUES =>'ALL'),
                array(\DBD\APITable::FIELD_ID => 96,    \DBD\APITable::FIELD_FLAG =>1,  \DBD\APITable::FIELD_PARENTID =>71,     \DBD\APITable::FIELD_PARENTVALUE =>'register',      \DBD\APITable::FIELD_NAME =>'regid',            \DBD\APITable::FIELD_ALLOWEDVALUES =>'ALL'),
                array(\DBD\APITable::FIELD_ID => 97,    \DBD\APITable::FIELD_FLAG =>1,  \DBD\APITable::FIELD_PARENTID =>71,     \DBD\APITable::FIELD_PARENTVALUE =>'register',      \DBD\APITable::FIELD_NAME =>'deviceid',         \DBD\APITable::FIELD_ALLOWEDVALUES =>'ALL'),
                array(\DBD\APITable::FIELD_ID => 98,    \DBD\APITable::FIELD_FLAG =>1,  \DBD\APITable::FIELD_PARENTID =>71,     \DBD\APITable::FIELD_PARENTVALUE =>'fetch',         \DBD\APITable::FIELD_NAME =>'useruid',          \DBD\APITable::FIELD_ALLOWEDVALUES =>'ALL'),
                array(\DBD\APITable::FIELD_ID => 99,    \DBD\APITable::FIELD_FLAG =>1,  \DBD\APITable::FIELD_PARENTID =>71,     \DBD\APITable::FIELD_PARENTVALUE =>'fetch',         \DBD\APITable::FIELD_NAME =>'last',             \DBD\APITable::FIELD_ALLOWEDVALUES =>'ALL'),
                array(\DBD\APITable::FIELD_ID => 100,   \DBD\APITable::FIELD_FLAG =>1,  \DBD\APITable::FIELD_PARENTID =>71,     \DBD\APITable::FIELD_PARENTVALUE =>'explore',       \DBD\APITable::FIELD_NAME =>'lat',              \DBD\APITable::FIELD_ALLOWEDVALUES =>'LATLONCOORD'),
                array(\DBD\APITable::FIELD_ID => 101,   \DBD\APITable::FIELD_FLAG =>1,  \DBD\APITable::FIELD_PARENTID =>71,     \DBD\APITable::FIELD_PARENTVALUE =>'explore',       \DBD\APITable::FIELD_NAME =>'lng',              \DBD\APITable::FIELD_ALLOWEDVALUES =>'LATLONCOORD'),
                array(\DBD\APITable::FIELD_ID => 102,   \DBD\APITable::FIELD_FLAG =>1,  \DBD\APITable::FIELD_PARENTID =>71,     \DBD\APITable::FIELD_PARENTVALUE =>'explore',       \DBD\APITable::FIELD_NAME =>'radius',           \DBD\APITable::FIELD_ALLOWEDVALUES =>'UINT'),
                array(\DBD\APITable::FIELD_ID => 103,   \DBD\APITable::FIELD_FLAG =>1,  \DBD\APITable::FIELD_PARENTID =>71,     \DBD\APITable::FIELD_PARENTVALUE =>'explore',       \DBD\APITable::FIELD_NAME =>'endtime',          \DBD\APITable::FIELD_ALLOWEDVALUES =>'ALL'),
                array(\DBD\APITable::FIELD_ID => 104,   \DBD\APITable::FIELD_FLAG =>1,  \DBD\APITable::FIELD_PARENTID =>71,     \DBD\APITable::FIELD_PARENTVALUE =>'citybyzip',     \DBD\APITable::FIELD_NAME =>'zip',              \DBD\APITable::FIELD_ALLOWEDVALUES =>'ALL'),
                array(\DBD\APITable::FIELD_ID => 112,   \DBD\APITable::FIELD_FLAG =>1,  \DBD\APITable::FIELD_PARENTID =>110,    \DBD\APITable::FIELD_PARENTVALUE =>'data',          \DBD\APITable::FIELD_NAME =>'json',             \DBD\APITable::FIELD_ALLOWEDVALUES =>'JSON'),
                array(\DBD\APITable::FIELD_ID => 113,   \DBD\APITable::FIELD_FLAG =>1,  \DBD\APITable::FIELD_PARENTID =>110,    \DBD\APITable::FIELD_PARENTVALUE =>'deviceinfo',    \DBD\APITable::FIELD_NAME =>'json',             \DBD\APITable::FIELD_ALLOWEDVALUES =>'JSON'),
                array(\DBD\APITable::FIELD_ID => 133,   \DBD\APITable::FIELD_FLAG =>1,  \DBD\APITable::FIELD_PARENTID =>130,    \DBD\APITable::FIELD_PARENTVALUE =>NULL,            \DBD\APITable::FIELD_NAME =>'email',            \DBD\APITable::FIELD_ALLOWEDVALUES =>'EMAIL'),
                array(\DBD\APITable::FIELD_ID => 134,   \DBD\APITable::FIELD_FLAG =>1,  \DBD\APITable::FIELD_PARENTID =>130,    \DBD\APITable::FIELD_PARENTVALUE =>NULL,            \DBD\APITable::FIELD_NAME =>'hashed',           \DBD\APITable::FIELD_ALLOWEDVALUES =>'BOOL'),
                array(\DBD\APITable::FIELD_ID => 135,   \DBD\APITable::FIELD_FLAG =>1,  \DBD\APITable::FIELD_PARENTID =>0,      \DBD\APITable::FIELD_PARENTVALUE =>'log',           \DBD\APITable::FIELD_NAME =>'json',             \DBD\APITable::FIELD_ALLOWEDVALUES =>'JSON'),
                array(\DBD\APITable::FIELD_ID => 46,    \DBD\APITable::FIELD_FLAG =>0,  \DBD\APITable::FIELD_PARENTID =>1,      \DBD\APITable::FIELD_PARENTVALUE =>'geopoint',      \DBD\APITable::FIELD_NAME =>'explore',          \DBD\APITable::FIELD_ALLOWEDVALUES =>'FLAG'));*/

$api = new SYSTEM\API\Api($call, new ApiVerify(), new ApiClass());

$json = json_decode(file_get_contents("php://input"), true);

$starttime = microtime(true);
try {
    if($json){
        echo $api->CALL($json);
    } else {
        echo $api->CALL(array_merge($_POST,$_GET));}
} catch(Exception $e){
    echo JsonResult::error($starttime, $e);
}