<th><?php echo _("Description"); ?> </th> <?php if ($_SESSION["_user"] == "admin") { ?> <th><?php echo _("User"); ?> </th><?php } ?> <th></th> <?php $locations = Wireless::get_locations($conn); $ossim_sensors = Sensor::get_list($conn, "s, sensor_properties p WHERE s.ip=p.ip AND p.has_kismet=1"); $sensors_list = ""; foreach ($ossim_sensors as $sensor) { $sensors_list .= "<option value='" . $sensor->get_name() . "'>" . $sensor->get_name() . " [" . $sensor->get_ip() . "]"; } $c = 0; foreach ($locations as $data) { $c++; echo "<tr bgcolor='#f2f2f2'>\n\t<td width='20'><a href=\"javascript:;\" onclick=\"showhide('#cell{$c}','#img{$c}')\"><img src='../pixmaps/plus-small.png' id='img{$c}' border=0></a></td>\n\t<td>" . $data["location"] . "</td>\n\t<td style='text-align:left;padding-left:10px'>" . $data['description'] . "</td>"; if ($_SESSION["_user"] == "admin") { echo "<td>" . $data["user"] . "</td>"; } echo "<td width='20'>\n\t\t<a href='?action=del&location=" . urlencode($data["location"]) . "'><img src='../repository/images/del.gif' border=0></a>\n\t</td></tr>\n\t<tr><td colspan=3 style='padding:10px 0px 10px 40px;display:none' id='cell{$c}'>\n\t\t<table width='100%'>\n\t\t<tr><td colspan=7>\n\n\t\t\t<form>\n\t\t\t<input type='hidden' name='action' value='add_sensor'>\n\t\t\t<input type='hidden' name='layer' value='{$c}'>\n\t\t\t<input type='hidden' name='location' value='" . $data["location"] . "'>\n\t\t\t<table class='noborder'>\n\t\t\t<tr>\n\t\t\t\t<td class='noborder'><select name='sensor'>" . $sensors_list . "</select></td>\n\t\t\t\t<td class='noborder'><input type='text' size='15' name='model' id='model{$c}'></td>\n\t\t\t\t<td class='noborder'><input type='text' size='15' name='serial' id='serial{$c}'></td>\n\t\t\t\t<td class='noborder'><input type='text' size='25' name='mounting' id='mounting{$c}'></td>\n\t\t\t\t<td class='noborder'><input type='submit' value='Add Sensor' class='lbutton'></td>\n\t\t\t</tr>\n\t\t\t</table>\n\t\t\t</form>\n\t\n\t\t</td></tr>\n\t\t<th nowrap>" . _("Sensor") . "</th>\n\t\t<th nowrap>" . _("IP Addr") . "</th>\n\t\t<th nowrap>" . _("Mac Address") . "</th>\n\t\t<th nowrap>" . _("Model #") . "</th>\n\t\t<th nowrap>" . _("Serial #") . "</th>\n\t\t<th nowrap>" . _("Mounting Location") . "</th>\n\t\t<th></th>"; $i = 0; foreach ($data["sensors"] as $sensors) {