$x = 1; } } $addresses[] = $thisCell; } curl_close($ch); return $addresses; } $addresses = array(); $found = array(); $addresses = getAddresses('http://www.wyreforest.gov.uk/fastweb/weeklylistapp.asp', '-2'); $addresses = array_merge($addresses, getAddresses('http://www.wyreforest.gov.uk/fastweb/weeklylistapp.asp', '-1')); $addresses = array_merge($addresses, getAddresses('http://www.wyreforest.gov.uk/fastweb/weeklylistapp.asp', '0')); $addresses = array_merge($addresses, getAddresses('http://www.wyreforest.gov.uk/fastweb/weeklylistdec.asp', '0')); $addresses = array_merge($addresses, getAddresses('http://www.wyreforest.gov.uk/fastweb/weeklylistdec.asp', '-1')); $addresses = array_merge($addresses, getAddresses('http://www.wyreforest.gov.uk/fastweb/weeklylistdec.asp', '-2')); foreach ($addresses as $address) { if (stripos($address['address'], 'cookley') !== false) { $found[] = $address; } } echo '<p>We found ' . count($addresses) . ' planning applications/decisions, ' . count($found) . ' contained "Cookley".</p>'; if (count($found) > 0) { foreach ($found as $item) { echo '<p>' . $item['address'] . ' - <a href="http://www.wyreforest.gov.uk/fastweb/detail.asp?AltRef=' . $item['url'] . '">' . $item['url'] . '</a></p>'; } } ?> </body> </html>
case "--debug": $debug = TRUE; break; case "--no-graphs": $no_graphs = TRUE; break; default: echo "ERROR: Invalid Argument: ({$arg})\n\n"; display_help(); exit(1); } } /* Build some data structures */ $hostTemplates = getHostTemplates(); $hostDescriptions = getHostsByDescription(); $addresses = getAddresses(); $graphTemplates = getGraphTemplates(); $snmpQueries = getSNMPQueries(); /* We store the Netdot id in the notes field, which makes sure we keep all the device information even if the hostname and/or IP change */ $hostsByNetdotId = array(); $hq = db_fetch_assoc("SELECT id, notes FROM host WHERE notes LIKE '%netdot_id%'"); foreach ($hq as $row) { if (preg_match('/netdot_id:(\\d+)/', $row["notes"], $matches)) { $nid = $matches[1]; $hostsByNetdotId[$nid] = $row["id"]; } } /* ----------------------------------------------------------------------------------------------------- */ /* Query Netdot and build multi-dimensional array */ $netdot_db = NewADOConnection($netdot_db_type);
$addressGroups = getAddressGroups(); $sortBy = 'fullname'; $displayAddressInfo = getAddresses($currentUserID, $sortBy); include '/includes/actionsForm.php'; ?> <?php if (isset($selectedGroup)) { $displayAddressInfo = groupSort($currentUserID, $selectedGroup, $sortBy); } if (isset($searchIndex)) { $displayAddressInfo = searchDatabase($currentUserID, $searchIndex, $searchField); } if (isset($sortIndex)) { $displayAddressInfo = getAddresses($currentUserID, $sortIndex); } if (isset($displayAddressInfo) && count($displayAddressInfo) > 0) { ?> <div class="row"> <table class="table"> <td><b>Name</b></td> <td><b>Address</b></td> <td> </td> <?php foreach ($displayAddressInfo as $row) { ?> <tr> <td><?php echo $row['fullname'];