convert to php array $subtarget = json_decode($_REQUEST['subtarget'], TRUE); if ($subtarget['object'] > 0) { // object is NOT undefined $structure = Factory::getObjectByID($subtarget['object']); // default object $defaultobject = array(); // read the data for the object $defaultobject['data'] = $structure->getDisplayData(); // read the data for the object's regions such as city name etc $defaultobject['regions'] = $structure->getDisplayRegions(); } } if (isset($subtarget['type'])) { // type of the pick object call has been set } else { // type has not been set $subtarget['type'] = ""; } if ($subtarget['type'] == "fileconnection" && $subtarget['fileid'] > 0) { // a file is connected to an object // get file classes require_once CROOT."/midware/File.class.php"; require_once CROOT."/midware/GenerateURL.class.php"; // loading basic info for the file $fileid = intval($subtarget['fileid']); $file = new File($fileid); $data = $file->getData(); // get the access rights of the current user for the given file $content_vars['access'] = Tools::checkAccessrights( array( "type" => "file", "id" => $fileid, "currentaccountid" => $_SESSION['account_id'], "setupaccountid" => $data['setupaccountid'] ) ); } ?>

checked="checked" />
0): ?> show it */?>
$defaultobject['regions']['countryisocode']));?>

'lastviewedobjects')); if (count($objects) == 0) { // no last viewed objects in the session found; load them from the database // TODO: get rid of DUPLICATE objects that have been viewed last $query = sprintf("SELECT objectid from log_action where accountid = %u ORDER BY accessdate desc LIMIT 20 ", $_SESSION['account_id']); $objects = query($query); } /* echo "
";
        var_dump($objects);
        echo "
"; */ if (count($objects) > 0) { // some objects were found $objectsidarray = array(); foreach ($objects as $object) { $objectsidarray[] = $object['objectid']; } require_once CROOT."/midware/Elasticsearch.class.php"; // load structures $elasticparams = array( "index" => "structures", "type" => "structure", "id" => $objectsidarray ); $vars['elasticresult'] = Elasticsearch::mgetElasticDataById($elasticparams); /* echo "
";
            var_dump($vars['elasticresult']['query']['docs']);
            echo "
"; die(); */ } #var_dump($objects); ?>

0): ?> 1000): ?>
25): ?> ..
Selected object: