<tr> <td class='noborder' width='20%' valign='top'> <div id="first" class="category-section"> <div id='location_list'> <table class='noborder locations' width='100%' align="center"> <tbody> <?php $locations = is_array($locations) ? $locations : array(); foreach ($locations as $l) { $id = $l->get_id(); $name = $l->get_name(); $icon = file_exists("../pixmaps/flags/" . $l->get_country() . ".png") ? '<img src="../pixmaps/flags/' . $l->get_country() . '.png" border="0" class="flag">' : ''; $total_n = Locations::count_related_networks($conn, $id); $class = $total_n > 0 ? colorize_location($conn, $id) : 'l_error'; $sensors = Locations::get_related_sensors($conn, $id); if (count($sensors) == 0) { $tooltip = "0 " . _('Sensors') . "<br> {$total_n} " . _('Networks'); } else { $tooltip = count($sensors) . " " . (count($sensors) == 1 ? _('Sensor') : _('Sensors')) . ":<br> "; $tooltip .= "<ul>"; foreach ($sensors as $s) { $tooltip .= "<li>" . $s[1] . " (" . $s[2] . ")</li>"; } $tooltip .= "</ul>"; $tooltip .= "{$total_n} " . ($total_n == 1 ? _('Network') : _('Networks')); } ?> <tr class='<?php echo $class;
echo _('Longitude') . required(); ?> </label> </th> <td class="left"> <input type="text" class='vfield' name="longitude" id="longitude" maxlength="25" value="<?php echo $longitude; ?> "/> </td> </tr> <?php if ($locations_id != '') { $sensors = Av_sensor::get_basic_list($conn); $related = Locations::get_related_sensors($conn, $locations_id); ?> <input type="hidden" class='vfield' name="locations_id" id="locations_id" value="<?php echo $locations_id; ?> "/> <input type="hidden" class='vfield' name="delete" id="delete"/> <tr> <td colspan="2" style="height:20px"></td> </tr> <tr> <th colspan="2" align="center"> <label for='sensor'><?php echo _('Sensors in this Location'); ?>