</p>


                <p>
                    <b>Involved in events: </b>

                    <ul>
                        <?php 
    // find related events
    $records_events = recordSearch_2('[{"t":"14"},{"related_to:10":"' . $recID . '"} ]');
    if (@$records_events['reccount'] > 0) {
        foreach ($records_events['order'] as $eventID) {
            //get relationship record for related address (or search events with relation at once?)
            $term_id = recordGetRealtionshipType($system, $eventID, $recID);
            //date and time
            $date_out = composeDates($records_events, $eventID, '<b>Date: </b>');
            $time_out = composeTime($records_events, $eventID, '<b>Time: </b>');
            print '<li><a href="dh_popup.php?db=' . HEURIST_DBNAME . '&full=1&recID=' . $eventID . '">' . getFieldValue($records_events, $eventID, DT_NAME) . '</a> (' . getTermById(getFieldValue($records_events, $eventID, DT_EVENT_TYPE)) . ')';
            print '<ul><li>' . $date_out . '&nbsp;' . $time_out . '</li>';
            //get address of event
            $records_address = recordSearch_2('[{"t":"12"},{"relatedfrom:14":"' . $eventID . '"} ]');
            foreach ($records_address['order'] as $addrID) {
                $relation1 = recordGetRealtionship_2($system, $eventID, $addrID, 'address for event');
                // TODO: Remove, enable or explain: $term_id = recordGetRealtionshipType( $system, $recID, $recID );
                $event_address = '';
                $term_id = getFieldValue($relation1, 0, DT_RELATION_TYPE);
                if ($term_id == TERM_MAIN_CRIME_LOCATION) {
                    $event_address = 'Location: ';
                } else {
                    $event_address = getTermById_2($term_id);
                }
                $relation1 = recordGetRealtionship_2($system, $reportID, $personID, 'report for person');
                foreach ($relation1['order'] as $relID) {
                    $person_age = getFieldValue($relation1, $relID, DT_PERSON_AGE);
                    if ($person_age > 0) {
                        print '<li>' . $person_age . '&nbsp;years of age on&nbsp;' . getFieldValue($records_reports, $reportID, DT_DATE) . '</li>';
                    }
                    $occupation_termid = getFieldValue($relation1, $relID, DT_PERSON_OCCUPATION);
                    if ($occupation_termid > 0) {
                        print '<li>' . getTermById_2($occupation_termid) . '&nbsp;on&nbsp;' . getFieldValue($records_reports, $reportID, DT_DATE) . '</li>';
                    }
                }
            }
            $records_address = recordSearch_2('[{"t":"12"},{"relatedfrom:10":"' . $personID . '"} ]');
            foreach ($records_address['order'] as $addrID) {
                $relation1 = recordGetRealtionship_2($system, $personID, $addrID, 'address for person');
                print '<li>' . getTermById_2(getFieldValue($relation1, 0, DT_RELATION_TYPE)) . ' at <a href="dh_popup.php?db=' . HEURIST_DBNAME . '&full=1&recID=' . $addrID . '">' . getFieldValue($records_address, $addrID, 'rec_Title') . '</a> on ' . composeDates($relation1, 0) . '</li>';
            }
            print '</ul></li>';
        }
        //for persons
    } else {
        echo '<li>Nobody recorded</li>';
    }
    ?>

                    </ul></p>

                <br />


                <p>
Beispiel #3
0
        if ($recTypeID == RT_EVENT) {
            if (@$_REQUEST['full'] == 1) {
                require 'dh_popup_event.php';
            }
            //get relationship record for related address
            $relation2 = recordGetRealtionship_2($system, $recID, $addrID, 'address for event');
            $event_address = '';
            $term_id = getFieldValue($relation2, 0, DT_RELATION_TYPE);
            if ($term_id == TERM_MAIN_CRIME_LOCATION) {
                $event_address = 'Location of the event at';
            } else {
                $event_address = 'This event ' . getTermById($term_id) . ' this address: ';
            }
            $comment = getFieldValue($relation2, 0, DT_EXTENDED_DESCRIPTION);
            //date and time
            $date_out = composeDates($records, $recID, '<b>Date: </b>');
            $time_out = composeTime($records, $recID, '<b>Time: </b>');
            ?>

<div class="infowindow infowindow-map">
    <h3><?php 
            echo getFieldValue($records, $recID, DT_NAME);
            ?>
</h3>
        <p><b><?php 
            echo getTermById(getFieldValue($records, $recID, DT_EVENT_TYPE));
            ?>
 </b></p>

        <p><?php 
            echo $event_address;