echo $mac; ?> "/> <input type="hidden" name="sensor" value="<?php echo $sensor; ?> "/> <input type="hidden" name="action" value="update"/> <table id='w_form'> <tr><th><?php echo _("Notes"); ?> </th></tr> <?php $data = Wireless::get_ap_data($conn, $mac); ?> <tr><td valign='top'><textarea cols='100' rows='10' name="notes"><?php echo $data["notes"]; ?> </textarea></td></tr> </table> <div class='c_button'> <input type="submit" value="<?php echo _('Save'); ?> "/> </div> <br/>
<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) {
// $si = intval(GET('index')); $sensors = isset($_SESSION['sensors'][$si]) ? $_SESSION['sensors'][$si] : ""; $type = GET('type'); $location = base64_decode(GET('location')); ossim_valid($location, OSS_ALPHA, OSS_PUNC_EXT, 'illegal: location'); ossim_valid($sensors, OSS_ALPHA, OSS_PUNC, 'illegal: sensors'); ossim_valid($type, OSS_DIGIT, 'illegal: type'); if (ossim_error()) { die(ossim_error()); } require_once 'ossim_db.inc'; $db = new ossim_db(); $conn = $db->connect(); $networks = array(); $nets = Wireless::get_wireless_aps_networks($conn, $type, $sensors); if ($type == 1) { // only networks with cloaked Yes and No foreach ($nets as $ne) { $yes = $no = 0; foreach ($ne['aps'] as $mac => $arr) { if ($arr['cloaked'] == 'No') { $no = 1; } if ($arr['cloaked'] == 'Yes') { $yes = 1; } } if ($yes && $no) { $networks[] = $ne; }
echo _("First"); ?> </th> <th nowrap><?php echo _("Last"); ?> </th> </thead> <tbody> <?php $sids = ""; if ($sensors != "") { $sensor_list = explode(",", $sensors); $sids = Wireless::get_sids($conn, $sensor_list); } $events = Wireless::get_events($conn, $sids); $i = 0; foreach ($events as $data) { $color = $i++ % 2 == 0 ? "bgcolor='#f2f2f2'" : ""; echo "<tr {$color}>\n\t<td style='text-align:left;padding-left:5px'>" . $data['signature'] . "</td>\n\t<td>" . $data['total'] . "</td>\n\t<td>" . $data['sensor'] . "</td>\n\t<td>" . $data['src'] . "</td>\n\t<td>" . $data['dst'] . "</td>\n\t<td>" . $data['first'] . "</td>\n\t<td>" . $data['last'] . "</td>\n\t</tr>"; } ?> </tbody> </table> <br> <form action="../forensics/base_qry_main.php" method="get"> <input type="hidden" name="hmenu" value="Forensics"> <input type="hidden" name="smenu" value="Forensics"> <input type="hidden" name="search" value="1"> <input type="hidden" name="sensor" value="<?php echo $sids;
echo _("Dest.<br/>Address"); ?> </th> <th><?php echo _("First"); ?> </th> <th><?php echo _("Last"); ?> </th> </tr> </thead> <tbody> <?php $events = Wireless::get_events($conn, explode(',', $sensors)); $i = 0; if (is_array($events) && !empty($events)) { foreach ($events as $data) { ?> <tr> <td class='td_signature' style='text-align:left;'><?php echo $data['signature']; ?> </td> <td class='td_counter'><?php echo $data['total']; ?> </td> <td class='td_ip_addr'><?php echo $data['sensor'];
</th> <th><?php echo _("Notes"); ?> </th> <th></th> </thead> <tbody> <?php /* $sids = ""; if ($sensors!="") { $sensor_list = explode(",",$sensors); $sids = Wireless::get_sids($conn,$sensor_list); } $networks = Wireless::get_networks($conn,$order,$sids);*/ $networks = Wireless::get_wireless_networks($conn, $order, $sensors); $i = 0; $nossid = array(); foreach ($networks as $data) { $color = $i++ % 2 == 0 ? "bgcolor='#f2f2f2'" : ""; $_SESSION["clients"][$data['ssid']] = $data['macs']; $enc = $data['encryption'] == "None" ? "None" : str_replace("None", "<font color=red>None</font>", str_replace(",", " ", $data['encryption'])); echo "<tr {$color}>\n <td style='text-align:left;padding-left:5px'><a href=\"ap.php?ssid=" . urlencode(base64_encode($data['ssid'])) . "&sensor=" . urlencode($data['sensor']) . "\" class='greybox' title='Access Points: " . Util::htmlentities($data['ssid']) . "'>" . Util::htmlentities(utf8_encode($data['ssid'])) . "</a></td>\n <td><a href=\"ap.php?ssid=" . urlencode(base64_encode($data['ssid'])) . "&sensor=" . urlencode($data['sensor']) . "\" class='greybox' title='Access Points: " . Util::htmlentities($data['ssid']) . "'>" . $data['aps'] . "</a></td>\n <td><a href=\"clients_gb.php?index={$si}&ssid=" . urlencode(base64_encode($data['ssid'])) . "\" class='greybox' title='Clients: " . Util::htmlentities($data['ssid']) . "'>" . $data['clients'] . "</a></td>\n <td>" . $data['type'] . "</td>\n <td>{$enc}</td>\n <td>" . str_replace("Yes/No", "Yes/<font color=red>No</font>", str_replace("No/Yes", "Yes/No", $data['cloaked'])) . "</td>\n <td><font color='" . Wireless::date_color($data['firsttime'], 1) . "'>" . $data['firsttime'] . "</font></td>\n <td><font color='" . Wireless::date_color($data['lasttime'], 2) . "'>" . $data['lasttime'] . "</font></td>\n <td>" . $data['description'] . "</td>\n <td style='text-align:left;padding-left:5px'>" . nl2br($data['notes']) . "</td>\n <td nowrap>\n <a href=\"network_edit.php?ssid=" . urlencode(base64_encode($data['ssid'])) . "&sensor=" . urlencode($data['sensor']) . "\" class='greybox' title='Edit " . Util::htmlentities($data['ssid']) . " description, type and notes'><img src='../repository/images/edit.gif' border=0></a>\n <a href=\"javascript:load_data('networks.php?order={$order}&action=delete&ssid=" . urlencode(base64_encode($data['ssid'])) . "&sensor=" . urlencode($data['sensor']) . "')\"><img src='../repository/images/delete_on.gif' border=0></a>\n </td>\n </tr>"; } ?> </tbody> </table> <?php $db->close($conn);
// PDF define('FPDF_FONTPATH', '../pdf/font/'); require '../pdf/fpdf.php'; // $location = base64_decode(GET('location')); $si = intval(GET('index')); $sensors = isset($_SESSION['sensors'][$si]) ? $_SESSION['sensors'][$si] : ""; ossim_valid($sensors, OSS_ALPHA, OSS_PUNC, 'illegal: sensors'); ossim_valid($location, OSS_ALPHA, OSS_PUNC_EXT, 'illegal: location'); if (ossim_error()) { die(ossim_error()); } $db = new ossim_db(); $conn = $db->connect(); $plugin_sids = Wireless::get_plugin_sids($conn); $clients = Wireless::get_wireless_clients($conn, "", $sensors, ""); $db->close(); $now = date("Y-m-d H:i:s"); $pdf = new PDF_Table(); $pdf->AddPage(); $pdf->SetFont('Helvetica', 'B', 13); $pdf->Image("../pixmaps/logo_siempdf.png", 10, 11, 40); $pdf->Cell(0, 17, _("Wireless / Suspicious clients "), 1, 1, 'R', 0); $pdf->SetFont('Helvetica', '', 10); $pdf->Cell(70, 6, _("Location") . ": {$location}", 1, 0, 'L'); $pdf->Cell(60, 6, _("User") . ": " . $_SESSION["_user"], 1, 0, 'L'); $pdf->Cell(60, 6, _("Date") . ": {$now}", 1, 1, 'R'); $pdf->Ln(); $pdf->SetWidths(array(28, 23, 22, 15, 23, 10, 15, 15, 30, 9)); $pdf->SetAligns(array('C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C')); $pdf->SetFont('Helvetica', '', 8);
<th><?php echo _("Sensor"); ?> </th> <th></th> <?php /*$sids = ""; if ($sensor!="") { $sensor_list = explode(",",$sensor); $sids = Wireless::get_sids($conn,$sensor_list); }*/ $aps = Wireless::get_wireless_aps($conn, $ssid, $sensor); $i = 0; foreach ($aps as $data) { $color = $i++ % 2 == 0 ? "bgcolor='#f2f2f2'" : ""; if (preg_match("/laptop/", $data['nettype'])) { $color = "bgcolor='#D4D1EF'"; } // other color for 'probe' $enc = $data['encryption'] == "None" ? "None" : str_replace("None", "<font color=red>None</font>", $data['encryption']); echo "<tr {$color}>\n\t<td>" . $data['mac'] . "<br><font style='font-size:9px'>" . $data['vendor'] . "</font></td>\n\t<td>" . $data['nettype'] . "</td>\n\t<td>" . $data['clients'] . "</td>\n\t<td>" . $data['channel'] . "</td>\n\t<td>" . $data['maxrate'] . " Mbps</td>\n\t<td>" . $data['cloaked'] . "</td>\n\t<td>{$enc}</td>\n\t<td><font color='" . Wireless::date_color($data['firsttime'], 1) . "'>" . $data['firsttime'] . "</font></td>\n\t<td><font color='" . Wireless::date_color($data['lasttime'], 2) . "'>" . $data['lasttime'] . "</font></td>\n\t<td>{$sensor}</td>\n\t<td width='20' nowrap>\n\t\t<a href='ap_edit.php?ssid=" . urlencode(base64_encode($ssid)) . "&mac=" . urlencode($data['mac']) . "&sensor=" . urlencode($sensor) . "'><img src='../repository/images/edit.gif' border=0></a>\n\t\t<a href='ap.php?action=delete&ssid=" . urlencode(base64_encode($ssid)) . "&mac=" . urlencode($data['mac']) . "&sensor=" . urlencode($sensor) . "'><img src='../repository/images/delete_on.gif' border=0></a>\n\t</td>\n\t</tr>"; if ($data['notes'] != "") { echo "<tr {$color}><td colspan=12 style='text-align:left;padding:0px 10px 10px 0px'><img src='../pixmaps/theme/arrow-315-small.png' border=0 align=absmiddle><b>Notes:</b> " . utf8_encode(nl2br($data['notes'])) . "</td></tr>"; } } ?> </table><br> </body> </html> <?php $db->close($conn);
?> </th> <th></th> </thead> <tbody> <?php # sensor list with perms require_once 'classes/Sensor.inc'; $ossim_sensors = Sensor::get_list($conn, "s, sensor_properties p WHERE s.ip=p.ip AND p.has_kismet=1"); $sensors_list = array(); foreach ($ossim_sensors as $sensor) { $sensors_list[] = $sensor->get_ip(); } # $locations = Wireless::get_locations($conn, $location); $i = 0; if (isset($locations[0])) { foreach ($locations[0]['sensors'] as $data) { $color = $i++ % 2 == 0 ? "bgcolor='#f2f2f2'" : ""; if (!in_array($data['ip'], $sensors_list)) { $color = "bgcolor='#FFCA9F'"; } echo "<tr {$color}>\n <td><a href=\"javascript:;\" onclick=\"browsexml('" . $data['ip'] . "','')\">" . $data['sensor'] . "</a></td>\n <td>" . $data['ip'] . "</td>\n <td>" . $data['mac'] . "</td>\n <td>" . $data['model'] . "</td>\n <td>" . $data['serial'] . "</td>\n <td style='text-align:left;padding-left:10px'>" . $data["mounting_location"] . "</td>\n <td>" . Wireless::get_firstevent_date($snort, $data['ip']) . "</td>\n <td><img src='../pixmaps/tables/tick.png'></td>\n <td width='20'>\n <a href='sensor_edit.php?location=" . urlencode(base64_encode($location)) . "&sensor=" . urlencode($data["sensor"]) . "' class='greybox' title='Edit " . $data["sensor"] . " details'><img src='../repository/images/edit.gif' border=0></a>\n </td>\n </tr>"; } } ?> </tbody> </table> <div id="browsexml"></div> <?php $db->close($conn);
if (trim($mac) != "") { if ($i++ < $max) { $connected .= trim($mac) . "<br>"; } else { $rest .= trim($mac) . "<br>"; } } } if (trim($sidsstr) != '') { $rest .= "<b>Attacks</b><br>" . trim($sidsstr); } $connected .= "<a href='javascript:;' class='scriptinfo' txt='{$rest}'>[" . ($i - $max) . " more]</a>"; } else { $connected = implode("<br>", $data['connected']); } echo "<tr {$color}>\n \t\t\t\t<td>" . $data['name'] . "</td>\n \t\t\t\t<td>" . $data['mac'] . "<br><font style='font-size:10px'>" . $data['vendor'] . "</font></td>\n \t\t\t\t<td><a target='main' class='HostReportMenu' id='" . $data['ip'] . ";" . $data['ip'] . ";" . $data['id'] . "' href='" . Menu::get_menu_url("../av_asset/common/views/detail.php?asset_id=" . $data['id'], 'environment', 'assets', 'assets') . "'>" . $data['ip'] . "</a></td>\n \t\t\t\t<td>" . $data['type'] . "</td>\n \t\t\t\t<td>" . $data['encryption'] . "</td>\n \t\t\t\t<td>" . $data['encoding'] . "</td>\n \t\t\t\t<td><font color='" . Wireless::date_color($data['firsttime'], 1) . "'>" . $data['firsttime'] . "</font></td>\n \t\t\t\t<td><font color='" . Wireless::date_color($data['lasttime'], 2) . "'>" . $data['lasttime'] . "</font></td>\n \t\t\t\t<td style='padding:0px 5px 0px 5px;text-align:left' nowrap='nowrap'>{$connected}</td>\n \t\t\t\t<td><a href='?action=delete&ssid=" . urlencode(base64_encode($ssid)) . "&mac=" . urlencode($data['mac']) . "&sensor=" . urlencode($data['sensor']) . "'><img src='../vulnmeter/images/delete.gif' border='0'/></a></td>\n \t\t\t</tr>"; } } else { ?> <tr><td colspan="10"><?php echo _("No clients found"); ?> </td></tr> <?php } ?> </tbody> </table> <?php $db->close();
</th> <th><?php echo _("Description"); ?> </th> <th><?php echo _("Notes"); ?> </th> <th> </th> </tr> </thead> <tbody> <?php $networks = Wireless::get_wireless_networks($conn, $order, $sensors); $i = 0; $nossid = array(); if (is_array($networks) && !empty($networks)) { foreach ($networks as $data) { $_SESSION["clients"][$data['ssid']] = $data['macs']; $enc = $data['encryption'] == "None" ? "None" : str_replace("None", "<span style='color:red'>None</span>", str_replace(",", " ", $data['encryption'])); echo "<tr>\n \t\t\t\t\t<td class='left'>\n \t\t\t\t\t <a href=\"ap.php?ssid=" . urlencode(base64_encode($data['ssid'])) . "&sensor=" . urlencode($data['sensor']) . "\" class='greybox' title='Access Points: " . Util::htmlentities($data['ssid']) . "'>" . Util::htmlentities(utf8_encode($data['ssid'])) . "</a>\n \t\t\t\t\t</td>\n \t\t\t\t\t\n \t\t\t\t\t<td class='td_counter'>\n \t\t\t\t\t <a href=\"ap.php?ssid=" . urlencode(base64_encode($data['ssid'])) . "&sensor=" . urlencode($data['sensor']) . "\" class='greybox' title='Access Points: " . Util::htmlentities($data['ssid']) . "'>" . $data['aps'] . "</a>\n \t\t\t\t\t</td>\n \t\t\t\t\t\n \t\t\t\t\t<td class='td_counter'>\n \t\t\t\t\t <a href=\"clients_gb.php?index={$si}&ssid=" . urlencode(base64_encode($data['ssid'])) . "\" class='greybox' title='Clients: " . Util::htmlentities($data['ssid']) . "'>" . $data['clients'] . "</a>\n \t\t\t\t\t</td>\n \t\t\t\t\t\n \t\t\t\t\t<td>" . $data['type'] . "</td>\n \t\t\t\t\t\n \t\t\t\t\t<td>{$enc}</td>\n \t\t\t\t\t\n \t\t\t\t\t<td>" . str_replace("Yes/No", "Yes/<font color=red>No</font>", str_replace("No/Yes", "Yes/No", $data['cloaked'])) . "</td>\n \t\t\t\t\t\n \t\t\t\t\t<td class='td_date'><span style='color:" . Wireless::date_color($data['firsttime'], 1) . "'>" . $data['firsttime'] . "</span></td>\n \t\t\t\t\t\n \t\t\t\t\t<td class='td_date'><span style='color:" . Wireless::date_color($data['lasttime'], 2) . "'>" . $data['lasttime'] . "</span></td>\n \t\t\t\t\t\n \t\t\t\t\t<td>" . $data['description'] . "</td>\n \t\t\t\t\t\n \t\t\t\t\t<td style='text-align:left;'>" . nl2br($data['notes']) . "</td>\n \t\t\t\t\t\n \t\t\t\t\t<td style='white-space:nowrap;'>\n \t\t\t\t\t\t<a href=\"network_edit.php?ssid=" . urlencode(base64_encode($data['ssid'])) . "&sensor=" . urlencode($data['sensor']) . "\" class='greybox' title='Edit " . Util::htmlentities($data['ssid']) . " description, type and notes'><img src='../vulnmeter/images/pencil.png' border='0'/></a>\n \t\t\t\t\t\t<a href=\"javascript:load_data('networks.php?order={$order}&action=delete&ssid=" . urlencode(base64_encode($data['ssid'])) . "&sensor=" . urlencode($data['sensor']) . "')\"><img src='../vulnmeter/images/delete.gif' border='0'/></a>\n \t\t\t\t\t</td>\n \t\t\t\t</tr>"; } } ?> </tbody> </table> <?php $db->close();
?> <table width="100%"> <th><?php echo _("Description"); ?> </th> <th><?php echo _("Type"); ?> </th> <th><?php echo _("Notes"); ?> </th> <?php $data = Wireless::get_network_data($conn, $ssid, $sensor); ?> <tr> <td valign=top><textarea cols=40 rows=3 name="desc"><?php echo $data["description"]; ?> </textarea></td> <td valign=top><select name="type"> <option value="Un-Trusted"<?php if ($data["type"] == "Un-Trusted") { echo " selected"; } ?> >Un-Trusted <option value="Trusted"<?php if ($data["type"] == "Trusted") {
// $connected = ""; $rest = "<b>APs</b><br>"; if (count($data['connected']) > 3) { $i = 0; $max = 3; foreach ($data['connected'] as $mac) { if (trim($mac) != "") { if ($i++ < $max) { $connected .= trim($mac) . "<br>"; } else { $rest .= trim($mac) . "<br>"; } } } if (trim($sidsstr) != "") { $rest .= "<b>Attacks</b><br>" . trim($sidsstr); } $connected .= "<a href='javascript:;' class='tiptip' data-title='{$rest}'>[" . ($i - $max) . " more]</a>"; } else { $connected = implode("<br>", $data['connected']); } echo "<tr {$color}>\n \t\t\t<td>" . $data['name'] . "</td>\n \t\t\t<td class='td_mac'>" . $data['mac'] . "<br><font style='font-size:10px'>" . $data['vendor'] . "</font></td>\n \t\t\t<td class='td_ip_addr'><a target='main' class='HostReportMenu' id='" . $data['ip'] . ";" . $data['ip'] . ";" . $data['id'] . "' href='" . Menu::get_menu_url("../av_asset/common/views/detail.php?asset_id=" . $data['id'], 'environment', 'assets', 'assets') . "'>" . $data['ip'] . "</a></td>\n \t\t\t<td>" . $data['type'] . "</td>\n \t\t\t<td>" . $data['encryption'] . "</td>\n \t\t\t<td>" . $data['encoding'] . "</td>\n \t\t\t<td class='td_date'><font color='" . Wireless::date_color($data['firsttime'], 1) . "'>" . $data['firsttime'] . "</font></td>\n \t\t\t<td class='td_date'><font color='" . Wireless::date_color($data['lasttime'], 2) . "'>" . $data['lasttime'] . "</font></td>\n \t\t\t<td class='td_date'>{$connected}</td>\n \t\t\t<td><a href=\"javascript:load_data('clients.php?action=delete&mac=" . urlencode($data['mac']) . "&sensor=" . urlencode($data['sensor']) . "')\"><img src='../vulnmeter/images/delete.gif' border='0'/></a></td>\n \t\t</tr>"; } } ?> </tbody> </table> <?php $db->close();
if (count($data['connected']) > 3) { $i = 0; $max = 3; foreach ($data['connected'] as $mac) { if (trim($mac) != "") { if ($i++ < $max) { $connected .= trim($mac) . "<br>"; } else { $rest .= trim($mac) . "<br>"; } } } if (trim($sidsstr) != "") { $rest .= "<b>Attacks</b><br>" . trim($sidsstr); } $connected .= "<a href='javascript:;' class='scriptinfo' txt='{$rest}'>[" . ($i - $max) . " more]</a>"; } else { $connected = implode("<br>", $data['connected']); } echo "<tr {$color}>\n\t<td>" . $data['name'] . "</td>\n\t<td>" . $data['mac'] . "<br><font style='font-size:10px'>" . $data['vendor'] . "</font></td>\n\t<td><a target='main' class='HostReportMenu' id='" . $data['ip'] . ";" . $data['ip'] . "' href='../report/index.php?host=" . $data['ip'] . "&hmenu=Host+Report&smenu=Host+Report'>" . $data['ip'] . "</a></td>\n\t<td>" . $data['type'] . "</td>\n\t<td>" . $data['encryption'] . "</td>\n\t<td>" . $data['encoding'] . "</td>\n\t<td><font color='" . Wireless::date_color($data['firsttime'], 1) . "'>" . $data['firsttime'] . "</font></td>\n\t<td><font color='" . Wireless::date_color($data['lasttime'], 2) . "'>" . $data['lasttime'] . "</font></td>\n\t<td style='padding:0px 5px 0px 5px;text-align:left' nowrap>{$connected}</td>\n\t<td><a href='?action=delete&ssid=" . urlencode(base64_encode($ssid)) . "&mac=" . urlencode($data['mac']) . "&sensor=" . urlencode($data['sensor']) . "'><img src='../repository/images/delete_on.gif' border=0></a></td>\n\t</tr>"; } ?> </tbody> </table> <?php $db->close($conn); ?> <br> </body> </html>
define('FPDF_FONTPATH', '../pdf/font/'); require '../pdf/fpdf.php'; // $order = GET('order'); $location = base64_decode(GET('location')); $si = intval(GET('index')); $sensors = isset($_SESSION['sensors'][$si]) ? $_SESSION['sensors'][$si] : ""; ossim_valid($order, OSS_ALPHA, OSS_NULLABLE, 'illegal: order'); ossim_valid($sensors, OSS_ALPHA, OSS_PUNC, 'illegal: sensors'); ossim_valid($location, OSS_ALPHA, OSS_PUNC_EXT, 'illegal: location'); if (ossim_error()) { die(ossim_error()); } $db = new ossim_db(); $conn = $db->connect(); $networks = Wireless::get_wireless_networks($conn, $order, $sensors); $db->close(); $now = date("Y-m-d H:i:s"); // $pdf = new PDF_Table(); $pdf->AddPage(); $pdf->SetFont('Helvetica', 'B', 13); $pdf->Image("../pixmaps/logo_siempdf.png", 10, 11, 40); $pdf->Cell(0, 17, _(" Wireless / Networks"), 1, 1, 'C', 0); $pdf->SetFont('Helvetica', '', 10); $pdf->Cell(70, 6, _("Location") . ": {$location}", 1, 0, 'L'); $pdf->Cell(60, 6, _("User") . ": " . $_SESSION["_user"], 1, 0, 'L'); $pdf->Cell(60, 6, _("Date") . ": {$now}", 1, 1, 'R'); $pdf->Ln(); $pdf->Cell(37, 8, _("Network SSID"), 1, 0, 'C'); $pdf->Cell(15, 8, _("# of APs"), 1, 0, 'C');
<th><?php echo _("Last Connect"); ?> </th> <th><?php echo _("Sensor"); ?> </th> <th></th> <?php $sids = ""; if ($sensors != "") { $sensor_list = explode(",", $sensors); $sids = Wireless::get_sids($conn, $sensor_list); } $aps = Wireless::get_aps($conn, $ssid, $sids); $i = 0; foreach ($aps as $data) { $color = $i++ % 2 == 0 ? "bgcolor='#f2f2f2'" : ""; echo "<tr {$color}>\n\t<td>" . $data['mac'] . "</td>\n\t<td style='padding:0px 10px 0px 10px;text-align:left'>" . $data['vendor'] . "</td>\n\t<td>" . $data['clients'] . "</td>\n\t<td>" . $data['freq'] . "</td>\n\t<td>" . $data['channel'] . "</td>\n\t<td>" . $data['type'] . "</td>\n\t<td>" . $data['first'] . "</td>\n\t<td>" . $data['last'] . "</td>\n\t<td>-</td>\n\t<td width='20'>\n\t\t<a href='ap_edit.php?ssid=" . urlencode(base64_encode($ssid)) . "&mac=" . urlencode($data['mac']) . "'><img src='../repository/images/edit.gif' border=0></a>\n\t</td>\n\t</tr>"; $details = Wireless::get_ap_data($ossim, $data['mac']); if ($details['notes'] != "") { echo "<tr {$color}><td colspan=10 style='text-align:left;padding:0px 10px 10px 0px'><img src='../pixmaps/theme/arrow-315-small.png' border=0 align=absmiddle><b>Notes:</b> " . utf8_encode(nl2br($details['notes'])) . "</td></tr>"; } } ?> </table><br> </body> </html> <?php $db->close($conn);