1
<h3>Staff GIS List</h3>
3
<table class="staffTable">
13
<?php foreach ($ag_staff_geos as $ag_staff_geo): ?>
15
<td><a href="<?php echo url_for('staff/edit?id='.$ag_staff_geo->getId()) ?>"><?php echo $ag_staff_geo->getId() ?></a></td>
18
$siteContacts = $ag_staff_geo;
20
$siteContacts = $siteContacts->getAgEntity()->getAgEntityAddressContact();
21
foreach ($siteContacts as $siteContact) {
22
$address = $siteContact->getAgAddress();
23
$formats = $siteContact->getAgAddress()->getAgAddressStandard()->getAgAddressFormat();
24
foreach ($formats as $format) {
26
$addressValues = $address->getAgAddressMjAgAddressValue();
27
foreach ($addressValues as $addressValue) {
28
if ($addressValue->getAgAddressValue()->getAddressElementId() == $format->getAddressElementId()) {
29
if ($format->getLineSequence() <> 1 && $format->getInlineSequence() == 1) {
32
$string .= $format->getPreDelimiter() . $addressValue->getAgAddressValue() . $format->getPostDelimiter();
35
$order[$format->getLineSequence()][$format->getInlineSequence()] = $string;
38
$formatted_address = '';
39
$address_id = $siteContact->getAddressId();
40
foreach ($order as $key => $line) {
41
foreach ($line as $key2 => $inLine) {
42
$formatted_address .= $order[$key][$key2];
46
$fooaddress[] = $formatted_address;
47
//making a second array with the same indices as the above (hackish, needs redo)
48
$fooaddressid[] = $address_id;
50
if(isset($fooaddress[0]))
54
$addressfull = new agGis();
55
$addressparts = $addressfull->parse_address($fooaddress[0]);
57
echo '<a href="' . url_for('gis/geocode') . '?number=' . $addressparts['number'] . '&street=' . $addressparts['street'] . '&zip=' . $addressparts['zip'] . '&address_id=' . $fooaddressid[0] . '">geo</a>';
60
if(isset($fooaddress[1]))
64
//take the address, parse it into the pieces needed for geocoding
65
$addressfull = new agGis();
66
$addressparts = $addressfull->parse_address($fooaddress[1]);
68
echo '<a href="' . url_for('gis/geocode') . '?number=' . $addressparts['number'] . '&street=' . $addressparts['street'] . '&zip=' . $addressparts['zip'] . '&address_id=' . $fooaddressid[1] . '">geo</a>';
70
<td><?php echo $ag_staff_geo->getUpdatedAt() ?></td>
80
<a href="<?php echo url_for('gis/new') ?>">New</a>
b'\\ No newline at end of file'