} echo "</tr>"; do { $sql2 = "SELECT system_name, net_ip_address, system_uuid, system_timestamp, system_description, net_domain, system_service_pack, system_os_name, system_system_type FROM system where system_timestamp = '" . $myrow["MAX(system_timestamp)"] . "' AND system_name LIKE '%" . $_POST["system_name"] . "%'"; $result2 = mysql_query($sql2, $db); if ($myrow2 = mysql_fetch_array($result2)) { do { $os_name = determine_os($myrow2["system_os_name"]); $img = determine_img($myrow2["system_os_name"], $myrow2["system_system_type"]); if ($bgcolor == "#F1F1F1") { $bgcolor = "#FFFFFF"; } else { $bgcolor = "#F1F1F1"; } echo "<tr>"; echo "<td align=\"center\" bgcolor=\"" . $bgcolor . "\"> " . ip_trans($myrow2["net_ip_address"]) . " </td>\n"; echo "<td align=\"center\" bgcolor=\"" . $bgcolor . "\"> <a href=\"system_summary.php?pc=" . $myrow2["system_uuid"] . "&sub=all\">" . $myrow2["system_name"] . "</a> </td>\n"; if ($show_os == "y") { echo "<td align=\"center\" bgcolor=\"" . $bgcolor . "\"> " . $os_name . " </td>\n"; } else { } if ($show_date_audited == "y") { echo "<td align=\"center\" bgcolor=\"" . $bgcolor . "\"> " . return_date($myrow2["system_timestamp"]) . " </td>\n"; } else { } if ($show_type == "y") { echo "<td align=\"center\" bgcolor=\"" . $bgcolor . "\"> " . $img . " </td>\n"; } else { } if ($show_description == "y") { echo "<td align=\"center\" bgcolor=\"" . $bgcolor . "\"> " . $myrow2["system_description"] . " </td>\n";
<?php $sql = ""; $page = "other"; include "include.php"; $SQL = "SELECT * FROM printer WHERE printer_id = '" . $_GET['printer'] . "'"; $result = mysql_query($SQL, $db); if ($myrow = mysql_fetch_array($result)) { do { echo "<div class=\"main_each\">"; echo "<table border=\"0\" cellpadding=\"2\" cellspacing=\"0\" width=\"100%\" class=\"content\">"; echo "<tr><td colspan=\"2\" class=\"contenthead\"><img src=\"images/inv_printer" . $pic_style . ".png\" width=\"64\" height=\"64\" alt=\"\" /> " . $myrow["printer_caption"] . "</td></tr>"; echo "<tr><td>Name: </td><td>" . $myrow["printer_caption"] . "</td></tr>"; echo "<tr><td>Location: </td><td>" . $myrow["printer_location"] . "</td></tr>"; if ($myrow["printer_ip"]) { echo "<tr><td>Network Address: </td><td>" . ip_trans($myrow["printer_ip"]) . "</td></tr>"; echo "<tr><td>MAC Address: </td><td>" . return_unknown($myrow["printer_mac_address"]) . "</td></tr>\n"; } else { echo "<tr><td>Attached with PC: </td><td>" . $myrow["printer_system_name"] . "</td></tr>\n"; } echo "<tr><td>Date Discovered: </td><td>" . return_date($myrow["printer_first_timestamp"]) . "</td></tr>\n"; echo "<tr><td>Manufacturer: </td><td>" . $myrow["printer_manufacturer"] . "</td></tr>\n"; echo "<tr><td>Model Number: </td><td>" . $myrow["printer_model"] . "</td></tr>\n"; echo "<tr><td>Serial Number: </td><td>" . $myrow["printer_serial"] . "</td></tr>\n"; echo "<tr><td>Physical Location: </td><td>" . $myrow["printer_location"] . "</td></tr>\n"; echo "<tr><td>Date of Purchase: (yyyy-mm-dd) </td><td>" . $myrow["printer_date_purchased"] . "</td></tr>\n"; echo "<tr><td>Dollar Value: </td><td>\$" . $myrow["printer_value"] . "</td></tr>\n"; echo "<tr><td valign=\"top\">Description: </td><td>" . $myrow["printer_description"] . "</td></tr>\n"; echo "<tr><td><form action=\"printer_edit.php?printer=" . $_GET['printer'] . "\" method=\"post\"><input name=\"Submit\" value=\" Edit \" type=\"submit\" class=\"content\" /></form></td></tr>\n"; $SQL2 = "SELECT * from nmap_other_ports WHERE nmap_other_id = '" . $myrow["printer_mac_address"] . "' ORDER BY nmap_port_number"; $result2 = mysql_query($SQL2, $db);
$result2 = mysql_query($sql2, $db); if ($myrow2 = mysql_fetch_array($result2)) { do { if ($bgcolor == "#F1F1F1") { $bgcolor = "#FFFFFF"; } else { $bgcolor = "#F1F1F1"; } if ($sort == "system_name" or $sort == "net_ip_address") { $ip = ip_trans($myrow["net_ip_address"]); $name = $myrow["system_name"]; $uuid = $myrow["system_uuid"]; $key = $myrow2["ms_keys_cd_key"]; $app_name = $myrow2["ms_keys_name"]; } else { $ip = ip_trans($myrow2["net_ip_address"]); $name = $myrow2["system_name"]; $uuid = $myrow2["system_uuid"]; $key = $myrow["ms_keys_cd_key"]; $app_name = $myrow["ms_keys_name"]; } echo " <tr bgcolor=\"{$bgcolor}\">\n"; echo " <td align=\"center\"> {$ip} </td>\n"; echo " <td align=\"center\"> <a href=\"system_summary.php?pc={$uuid}&sub=all\">{$name}</a> </td>\n"; echo " <td align=\"center\"> {$app_name} </td>\n"; echo " <td align=\"center\"> {$key} </td>\n"; echo " </tr>\n"; } while ($myrow2 = mysql_fetch_array($result2)); } else { } } while ($myrow = mysql_fetch_array($result));
if (is_file($language_file)) { include $language_file; } else { die("Language-File not found: " . $language_file); } $db = mysql_connect($mysql_server, $mysql_user, $mysql_password) or die('Could not connect: ' . mysql_error()); mysql_select_db($mysql_database, $db); $sql = "SELECT system_name, net_ip_address, system_uuid, system_first_timestamp FROM system "; $sql .= "WHERE system_first_timestamp > '" . adjustdate(0, 0, -$system_detected) . "000000' ORDER BY system_name"; $result = mysql_query($sql, $db); $bgcolor = "#FFFFFF"; echo '<rss version="2.0">' . "\n"; echo '<channel>' . "\n"; echo '<image>' . "\n"; echo '<url>' . $sitename . 'favicon.ico</url>' . "\n"; echo '</image>' . "\n"; echo '<title>' . $sitename . '</title>' . "\n"; echo '<link>' . $sitebaseurl . '</link>' . "\n"; echo '<description>' . $sitedescription . '</description>' . "\n"; if ($myrow = mysql_fetch_array($result)) { do { echo '<item>' . "\n"; echo "<guid isPermaLink=\"false\">openauditnewsys-" . $myrow["system_uuid"] . "</guid>\n"; echo '<title>' . $myrow["system_name"] . '</title>' . "\n"; echo '<link>' . $sitebaseurl . 'system.php?pc=' . $myrow["system_uuid"] . '&view=summary</link>' . "\n"; echo '<description>' . $myrow["system_name"] . ' ' . ip_trans($myrow["net_ip_address"]) . ' ' . return_datetime($myrow["system_first_timestamp"]) . '</description>' . "\n"; echo '</item>' . "\n"; } while ($myrow = mysql_fetch_array($result)); } echo '</channel>' . "\n"; echo '</rss>' . "\n";
echo "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"content\" width=\"100%\">\n"; echo " <tr>\n <td class=\"contenthead\" colspan=\"3\">List Systems with <i>\"" . $_GET["name"] . "\"</i> installed.<br /> </td>\n </tr>\n"; echo " <tr>"; echo " <td width=\"100\"> <b>IP Address</b></td>\n"; echo " <td width=\"100\"> <b>Name</b></td>\n"; echo " <td width=\"450\"> <b>Description</b></td>"; echo " <td width=\"100\"> <b>Version</b></td>\n"; echo "\n </tr>\n"; do { if ($bgcolor == "#F1F1F1") { $bgcolor = "#FFFFFF"; } else { $bgcolor = "#F1F1F1"; } echo " <tr bgcolor=\"" . $bgcolor . "\">\n"; echo " <td> " . ip_trans($myrow["net_ip_address"]) . " </td>\n"; echo " <td> <a href=\"system_summary.php?pc=" . $myrow["system_uuid"] . "\">" . $myrow["system_name"] . "</a> </td>\n"; echo " <td> " . $myrow["system_description"] . "</td>\n"; echo " <td> " . $myrow["software_version"] . "</td>\n"; echo " </tr>\n"; } while ($myrow = mysql_fetch_array($result)); echo "</div>"; } else { echo "<div class=\"main_each\">\nNo Systems have this software installed.\n"; } } else { } echo "</div>\n"; include "include_png_replace.php"; echo "</body>\n"; echo "</html>\n";
$sql .= "motherboard_uuid = system_uuid AND motherboard_timestamp = system_timestamp AND ("; $sql .= "motherboard_manufacturer LIKE '%{$search}%' OR "; $sql .= "motherboard_product LIKE '%{$search}%') "; $result = mysql_query($sql, $db); if ($myrow = mysql_fetch_array($result)) { do { if (strpos(strtoupper($myrow["motherboard_manufacturer"]), $search) !== false) { $search_field = "Motherboard manufacturer"; $search_result = $myrow["motherboard_manufacturer"]; } if (strpos(strtoupper($myrow["motherboard_product"]), $search) !== false) { $search_field = "Motherboard Product"; $search_result = $myrow["motherboard_product"]; } $bgcolor = change_row_color($bgcolor, $bg1, $bg2); $result_set[] = array($myrow["system_name"], $myrow["system_uuid"], ip_trans($myrow["net_ip_address"]), $search_field, $search_result); } while ($myrow = mysql_fetch_array($result)); } else { } // End search for motherboard } else { } // end if search != "" if (isset($result_set) and $result_set) { sort($result_set); $count = count($result_set); for ($i = 0; $i < $count; $i++) { $countmore = count($result_set[0]); $bgcolor = change_row_color($bgcolor, $bg1, $bg2); echo "<tr bgcolor=\"{$bgcolor}\">"; echo "<td> " . $result_set[$i][2] . " </td>";
} $db = mysql_connect($mysql_server, $mysql_user, $mysql_password) or die('Could not connect: ' . mysql_error()); mysql_select_db($mysql_database, $db); $sql = "SELECT sw.software_id, sw.software_name, sw.software_first_timestamp, sys.system_name, sys.system_uuid, sys.net_ip_address, sys.net_user_name FROM software sw, system sys "; $sql .= "WHERE sw.software_first_timestamp >= '" . adjustdate(0, 0, -$days_software_detected) . "000000' "; $sql .= "AND sys.system_first_timestamp < '" . adjustdate(0, 0, -$days_software_detected) . "000000' "; $sql .= "AND sw.software_name NOT LIKE '%Hotfix%' AND sw.software_name NOT LIKE '%Service Pack%' AND sw.software_name NOT REGEXP '[KB|Q][0-9]{6,}' "; $sql .= "AND sw.software_timestamp = sys.system_timestamp "; $sql .= "AND sw.software_uuid = sys.system_uuid "; $result = mysql_query($sql, $db); $bgcolor = "#FFFFFF"; echo '<rss version="2.0">' . "\n"; echo '<channel>' . "\n"; echo '<image>' . "\n"; echo '<url>' . $sitename . 'favicon.ico</url>' . "\n"; echo '</image>' . "\n"; echo '<title>' . $sitename . '</title>' . "\n"; echo '<link>' . $sitebaseurl . '</link>' . "\n"; echo '<description>' . $sitedescription . '</description>' . "\n"; if ($myrow = mysql_fetch_array($result)) { do { echo '<item>' . "\n"; echo '<guid isPermaLink="false">openaudit-' . $myrow["software_id"] . "</guid>\n"; echo '<title>' . htmlentities($myrow["software_name"]) . '</title>' . "\n"; echo '<link>' . $sitebaseurl . 'system.php?pc=' . $myrow["system_uuid"] . '&view=summary</link>' . "\n"; echo '<description>' . __("Machine Name") . ' :' . $myrow["system_name"] . ' ' . __("IP Address") . ':' . ip_trans($myrow["net_ip_address"]) . ' ' . __("User") . ':' . $myrow["net_user_name"] . ' </description>' . "\n"; echo '</item>' . "\n"; } while ($myrow = mysql_fetch_array($result)); } echo '</channel>' . "\n"; echo '</rss>' . "\n";
echo "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"content\" width=\"100%\">\n"; echo "<tr>\n"; echo "<td align=\"center\"><a href=\"index.php?sub=" . $sub . "&sort=sys.net_ip_address\" class=\"content\">IP Address </a></td>\n"; echo "<td align=\"center\"><a href=\"index.php?sub=" . $sub . "&sort=sys.system_name\" class=\"content\">Name</a></td>\n"; echo "<td align=\"center\"><a href=\"index.php?sub=" . $sub . "&sort=cdkey.ms_keys_name\" class=\"content\">Package</a></td>\n"; echo "<td align=\"center\"><a href=\"index.php?sub=" . $sub . "&sort=cdkey.ms_keys_cd_key\" class=\"content\">CD Key</a></td>\n"; echo "</tr>\n"; do { $os = determine_os($myrow["ms_keys_name"]); if ($bgcolor == "#F1F1F1") { $bgcolor = "#FFFFFF"; } else { $bgcolor = "#F1F1F1"; } echo "<tr bgcolor=\"" . $bgcolor . "\">"; echo "<td align=\"center\"> " . ip_trans($myrow["net_ip_address"]) . " </td>\n"; echo "<td align=\"center\"> <a href=\"system_summary.php?pc=" . $myrow["net_mac_address"] . "&sub=all\">" . $myrow["system_name"] . "</a> </td>\n"; echo "<td align=\"center\"> " . $myrow["ms_keys_name"] . " </td>\n"; echo "<td align=\"center\"> " . $myrow["ms_keys_cd_key"] . " </td>\n"; echo "</tr>\n"; } while ($myrow = mysql_fetch_array($result)); echo "</table>\n"; $show_icons = 1; } else { echo "No CD Keys have been detected."; echo "</table>"; $show_icons = 0; } } else { } if ($show_icons == 1) {
$option1 = ip_trans($myrow["net_ip_address"]); $option2 = ""; } if ($_POST["equipment"] == "net_wins_primary") { $system_name = "<a href=\"system_summary.php?pc=" . $myrow["net_mac_address"] . "&sub=all\">" . $myrow["system_name"] . "</a>"; $option1 = ip_trans($myrow["net_ip_address"]); $option2 = ip_trans($myrow["net_wins_primary"]); } if ($_POST["equipment"] == "net_dns_server") { $system_name = "<a href=\"system_summary.php?pc=" . $myrow["net_mac_address"] . "&sub=all\">" . $myrow["system_name"] . "</a>"; $option1 = ip_trans($myrow["net_ip_address"]); $option2 = ip_trans($myrow["net_dns_server"]); } if ($_POST["equipment"] == "system WHERE system_num_processors") { $system_name = "<a href=\"system_summary.php?pc=" . $myrow["net_mac_address"] . "&sub=all\">" . $myrow["system_name"] . "</a>"; $option1 = ip_trans($myrow["net_ip_address"]); $option2 = $myrow["system_num_processors"]; } if ($_POST["equipment"] == "processor WHERE processor_max_clock_speed") { $SQL2 = "select * from system where net_mac_address = '" . $myrow["processor_mac_address"] . "'"; $result2 = mysql_query($SQL2, $db); $myrow2 = mysql_fetch_array($result2); $option1 = $myrow["processor_name"]; $option2 = $myrow["processor_max_clock_speed"] . " Mhz"; $system_name = "<a href=\"system_summary.php?pc=" . $myrow2["net_mac_address"] . "&sub=all\">" . $myrow2["system_name"] . "</a>"; } if ($_POST["equipment"] == "hard_drive WHERE hard_drive_size") { $SQL2 = "select * from system where net_mac_address = '" . $myrow["hard_drive_mac_address"] . "'"; $result2 = mysql_query($SQL2, $db); $myrow2 = mysql_fetch_array($result2); $option1 = $myrow["hard_drive_partitions"];
function ConvertSpecialField($myrow, $field, $db, $page) { if (!isset($field["name"])) { return ""; } switch ($field["name"]) { case "system_os_name": return determine_os($myrow[$field["name"]]); case "net_dhcp_lease_obtained": case "net_dhcp_lease_expires": case "net_driver_date": case "ldap_computers_timestamp": case "ldap_users_timestamp": return return_date($myrow[$field["name"]]); case "net_speed": return number_format($myrow[$field["name"]]) . " Mbps"; case "software_first_timestamp": case "software_timestamp": case "system_first_timestamp": case "system_timestamp": case "other_first_timestamp": case "other_timestamp": case "monitor_first_timestamp": case "monitor_timestamp": case "system_audits_timestamp": case "system_last_boot": case "log_timestamp": return return_date_time($myrow[$field["name"]]); case "system_system_type": if ($page == "list") { return determine_img($myrow["system_os_name"], $myrow[$field["name"]]); } else { return $myrow[$field["name"]]; } case "other_type": if ($page == "list") { return "<img src=\"images/o_" . str_replace(" ", "_", $myrow[$field["name"]]) . ".png\" alt=\"\" border=\"0\" width=\"16\" height=\"16\"/>"; } else { return $myrow[$field["name"]]; } case "other_ip_address": return ip_trans($myrow[$field["name"]]); case "delete": return "<img src=\"images/button_delete_out.png\" id=\"button" . rand(0, 999999999) . "\" width=\"58\" height=\"22\" border=\"0\" alt=\"\" />"; case "ldap_user_status": return "<img src='../images/user_" . $myrow[$field["name"]] . ".gif'>"; case "ldap_computer_status": return "<img src='../images/computer_" . $myrow[$field["name"]] . ".gif'>"; case "startup_location": if (substr($myrow[$field["name"]], 0, 2) == "HK") { return __("Registry"); } case "percentage": case "disk_percent": return $myrow[$field["name"]] . " %"; case "system_memory": case "video_adapter_ram": case "hard_drive_size": case "partition_size": case "partition_free_space": case "total_memory": case "pagefile_initial_size": case "pagefile_max_size": return number_format($myrow[$field["name"]]) . " MB"; case "evt_log_file_size": case "evt_log_max_file_size": return number_format($myrow[$field["name"]]) . " KB"; case "video_current_number_colours": return strlen(decbin($myrow[$field["name"]])) + 1 . " Bit"; case "video_current_refresh_rate": return $myrow[$field["name"]] . " Hz"; case "firewall_enabled_domain": case "firewall_enabled_standard": case "firewall_disablenotifications_standard": case "firewall_donotallowexceptions_standard": case "firewall_disablenotifications_domain": case "firewall_donotallowexceptions_domain": if ($myrow[$field["name"]] == "1") { return __("Yes"); } if ($myrow[$field["name"]] == "0") { return __("No"); } return __("Profile Not Detected"); case "other_ip_address": return ($myrow["other_ip_address"] == "" and !isset($_REQUEST["edit"])) ? "Not-Networked" : $myrow[$field["name"]]; case "net_dhcp_server": return $myrow[$field["name"]] == "none" ? __("No") : __("Yes") . " / " . $myrow[$field["name"]]; case "auth_enabled": case "auth_admin": if ($myrow[$field["name"]] == "0") { return __("No"); } if ($myrow[$field["name"]] == "1") { return __("Yes"); } return $myrow[$field["name"]]; case "auth_hash": return "*****"; case "other_linked_pc": if (!isset($_REQUEST["edit"])) { $result = mysql_query("SELECT system_name FROM system WHERE system_uuid='" . $myrow[$field["name"]] . "' AND system_uuid != '' ", $db); return ($myrow3 = mysql_fetch_array($result)) ? $myrow3["system_name"] : $myrow[$field["name"]]; } case "monitor_uuid": if (!isset($_REQUEST["edit"]) or isset($_REQUEST["edit"]) and isset($field["edit"]) and $field["edit"] == "n") { $result = mysql_query("SELECT system_name FROM system WHERE system_uuid = '" . $myrow[$field["name"]] . "' AND system_uuid != '' ", $db); return ($myrow3 = mysql_fetch_array($result)) ? $myrow3["system_name"] : $myrow[$field["name"]]; } default: if (isset($myrow[$field["name"]])) { return $myrow[$field["name"]]; } } return ""; }
echo "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" class=\"content\">\n"; echo "<tr><td class=\"contenthead\" colspan=\"4\">System Summary for " . ip_trans($myrow["net_ip_address"]) . " - " . $myrow["system_name"] . "</td></tr>\n"; do { echo "<tr><td colspan=\"2\" class=\"contenthead\"><img src=\"images/inv_summary" . $pic_style . ".png\" width=\"64\" height=\"64\" alt=\"\" />Summary</td></tr>\n"; echo "<tr bgcolor=\"#F1F1F1\"><td width=\"200\">Machine Name: </td><td>" . $myrow["system_name"] . "</td></tr>\n"; echo "<tr><td>Description: </td><td>" . $myrow["system_description"] . "</td></tr>\n"; echo "<tr bgcolor=\"#F1F1F1\"><td>Domain Role: </td><td>" . $myrow["net_domain_role"] . "</td></tr>\n"; echo "<tr><td>Registered User: </td><td>" . $myrow["system_registered_user"] . "</td></tr>\n"; echo "<tr bgcolor=\"#F1F1F1\"><td>Chassis Type: </td><td>" . $myrow["system_system_type"] . "</td></tr>\n"; echo "<tr><td>Model / Serial #: </td><td>" . $myrow["system_model"] . " / " . $myrow["system_id_number"] . "</td></tr>\n"; echo "<tr bgcolor=\"#F1F1F1\"><td>Manufacturer: </td><td>" . $myrow["system_vendor"] . "</td></tr>\n"; echo "<tr><td>Operating System: </td><td>" . $myrow["system_os_name"] . "</td></tr>\n"; echo "<tr bgcolor=\"#F1F1F1\"><td>Build Number / Service Pack: </td><td>" . $myrow["system_build_number"] . " / " . $myrow["system_service_pack"] . "</td></tr>\n"; echo "<tr><td>System UUID: </td><td>" . $myrow["system_uuid"] . " </td></tr>\n"; echo "<tr bgcolor=\"#F1F1F1\"><td>Windows Installed On: </td><td>" . $myrow["date_system_install"] . "</td></tr>\n"; echo "<tr><td>IP Address / Subnet: </td><td>" . ip_trans($ip) . " / " . ip_trans($subnet) . "</td></tr>\n"; echo "<tr bgcolor=\"#F1F1F1\"><td>DHCP Enabled / DCHP Server: </td><td>" . $dhcp_enabled . " / " . $dhcp_server . "</td></tr>\n"; echo "<tr><td>Date First Audited: </td><td>" . return_date_time($myrow["system_first_timestamp"]) . " </td></tr>\n"; echo "<tr bgcolor=\"#F1F1F1\"><td>Date Last Audited: </td><td>" . return_date_time($timestamp) . " </td></tr>\n"; echo "<tr><td>System Memory: </td><td>" . $myrow["system_memory"] . " MB</td></tr>\n"; } while ($myrow = mysql_fetch_array($result)); } else { } $bgcolor = "#FFFFFF"; $SQL = "SELECT * FROM hard_drive WHERE hard_drive_uuid = '{$pc}' AND hard_drive_timestamp = '{$timestamp}' ORDER BY hard_drive_index"; $result = mysql_query($SQL, $db); if ($myrow = mysql_fetch_array($result)) { do { if ($bgcolor == "#F1F1F1") { $bgcolor = "#FFFFFF"; } else {
$result = mysql_query($query) or die("Query failed at delete stage. system_man"); $query = "DELETE FROM system_security WHERE ss_uuid = '" . $id . "'"; $result = mysql_query($query) or die("Query failed at delete stage. system_security"); $query = "DELETE FROM tape_drive WHERE tape_drive_uuid = '" . $id . "'"; $result = mysql_query($query) or die("Query failed at delete stage. tape_drive"); $query = "DELETE FROM usb WHERE usb_uuid = '" . $id . "'"; $result = mysql_query($query) or die("Query failed at delete stage. usb"); $query = "DELETE FROM users WHERE users_uuid = '" . $id . "'"; $result = mysql_query($query) or die("Query failed at delete stage. users"); $query = "DELETE FROM video WHERE video_uuid = '" . $id . "'"; $result = mysql_query($query) or die("Query failed at delete stage. video"); $query = "DELETE FROM other WHERE other_linked_pc = '" . $id . "'"; $result = mysql_query($query) or die("Query failed at delete stage. other"); } } $sql = "SELECT system_uuid, net_ip_address, system_name, net_domain, system_os_name, system_system_type, system_timestamp FROM system ORDER BY system_name "; $result = mysql_query($sql, $db); $bgcolor = "#FFFFFF"; echo "<td valign=\"top\">\r\n <div class=\"main_each\">"; if ($myrow = mysql_fetch_array($result)) { echo "<form name=\"DeleteList\" id=\"DeleteList\" method=\"post\" action=\"" . $_SERVER["PHP_SELF"] . "\" >\r\n \r\n <script language=\"JavaScript\" TYPE=\"text/javascript\">\r\n function CheckUncheckAll(form){\r\n if(!form)\r\n return;\r\n var objElements = form.elements;\r\n if(!objElements)\r\n return;\r\n var countElements = objElements.length;\r\n if(!countElements)\r\n return;\r\n else\r\n for (var i = 1; i < countElements; i++){ \r\n eval(\"objElements[\" + i + \"].checked = objElements[1].checked\"); \r\n }\r\n }\r\n </script>\r\n \r\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">\r\n <tr>\r\n <td class=\"contenthead\">" . __("Delete Systems") . "<br /> </td>\r\n </tr>\r\n </table>\r\n \r\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">\r\n <tr>\r\n <td width=\"30%\"><input type=\"submit\" name=\"Perform\" id=\"Perform\" value=\"Delete selected systems\" onclick=\"return confirm('Do you really want to DELETE all selected Systems?')\"></td>\r\n <td width=\"70%\"><input type=\"checkbox\" name=\"SetUnset\" id=\"SetUnset\" onClick=\"CheckUncheckAll(this.form);\" />Check/Uncheck all<br /></td> \r\n </tr>\r\n </table>\r\n\r\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">\r\n <tr> </tr>\r\n <tr>\r\n <td></td>\r\n <td class=\"contentsubtitle\">" . __("IP Address") . "</td>\r\n <td class=\"contentsubtitle\">" . __("Hostname") . "</td>\r\n <td class=\"contentsubtitle\">" . __("Domain") . "</td>\r\n <td class=\"contentsubtitle\">" . __("OS") . "</td>\r\n <td class=\"contentsubtitle\">" . __("Type") . "</td>\r\n <td class=\"contentsubtitle\">" . __("Date Audited") . "</td>\r\n </tr>\n"; do { $bgcolor = change_row_color($bgcolor, $bg1, $bg2); echo "<tr style=\"bgcolor:" . $bgcolor . ";\">\r\n <td width=\"5%\"><input type=\"checkbox\" name=" . $myrow["system_uuid"] . " id=" . $myrow["system_uuid"] . " value=" . $myrow["system_uuid"] . "></td>\r\n <td><a href=\"system.php?pc=" . $myrow["system_uuid"] . "&view=summary\">" . ip_trans($myrow["net_ip_address"]) . "</a></td>\r\n <td><a href=\"system.php?pc=" . $myrow["system_uuid"] . "&view=summary\">" . $myrow["system_name"] . "</a></td>\r\n <td>" . $myrow["net_domain"] . "</td>\r\n <td>" . determine_os($myrow["system_os_name"]) . "</td>\r\n <td>" . determine_img($myrow["system_os_name"], $myrow["system_system_type"]) . "</td>\r\n <td>" . return_date_time($myrow["system_timestamp"]) . "</td>\r\n </tr>\n"; } while ($myrow = mysql_fetch_array($result)); echo " </table>\r\n </form>"; } else { echo "<p class=\"content\">No Systems in database.</p>\n"; } echo "</div>\n"; echo "</td>\n";
function GetDetectedXpAvData($id) { global $db; $tr_class = 'npb_highlight_row'; $sql = "SELECT system_name, net_ip_address, system_uuid, virus_name, virus_uptodate FROM system "; $sql .= "WHERE (virus_name = '' OR virus_uptodate = 'False') AND system_service_pack = '2.0' AND system_os_name LIKE 'Microsoft Windows XP%' "; $sql .= "ORDER BY system_name"; $result = mysql_query($sql, $db) or die(mysql_error()); $count = mysql_numrows($result); echo "<div class='npb_content_data' id='" . $id . "' style='display: none;'>"; if ($myrow = mysql_fetch_array($result)) { echo "<table>"; echo " <tr>"; echo "\t\t<th>" . __("IP Address") . "</td>"; echo " \t<th>" . __("Hostname") . "</td>"; echo " \t<th>" . __("AntiVirus Program") . "</td>"; echo " \t<th>" . __("AntiVirus Up To Date") . "</td>"; echo "</tr>"; do { echo "<tr class='" . alternate_tr_class($tr_class) . "'>"; echo "\t<td>" . ip_trans($myrow["net_ip_address"]) . "</td>"; echo "\t<td><a href=\"system.php?pc=" . $myrow["system_uuid"] . "&view=summary\">" . $myrow["system_name"] . "</a></td>"; echo "\t<td>" . $myrow["virus_name"] . "</td>"; echo "\t<td>" . $myrow["virus_uptodate"] . "</td>"; echo "\t</tr>"; } while ($myrow = mysql_fetch_array($result)); } echo "</table>"; echo "</div>"; echo "<p class='npb_section_summary'>" . __("Systems") . ": " . $count . "</p>"; return; }
do { echo "<div class=\"main_each\">"; echo "<table border=\"0\" cellpadding=\"2\" cellspacing=\"0\" width=\"100%\" class=\"content\">"; echo "<tr><td colspan=\"2\" class=\"contenthead\"><img src=\"images/other_devices/" . url_clean($myrow["other_type"]) . ".png\" width=\"32\" height=\"32\" alt=\"\" /> " . $myrow["other_name"] . "</td></tr>"; echo "<tr><td>Name: </td><td>" . $myrow["other_name"] . "</td></tr>"; echo "<tr><td>Type: </td><td>" . $myrow["other_type"] . "</td></tr>"; $SQL2 = "select * from system WHERE system_uuid = '" . $myrow["other_linked_pc"] . "'"; $result2 = mysql_query($SQL2, $db); if ($myrow2 = mysql_fetch_array($result2)) { do { echo "<tr><td>Associated with PC: </td><td>" . $myrow2["net_ip_address"] . " - " . $myrow2["system_name"] . "</td></tr>\n"; } while ($myrow2 = mysql_fetch_array($result2)); } else { echo "<tr><td>Associated with PC: </td><td>" . $myrow["other_linked_pc"] . "</td></tr>\n"; } echo "<tr><td>IP Address: </td><td>" . ip_trans($myrow["other_ip"]) . "</td></tr>\n"; echo "<tr><td>MAC Address: </td><td>" . $myrow["other_mac_address"] . "</td></tr>\n"; echo "<tr><td>Date Discovered: </td><td>" . $myrow["other_date_detected"] . "</td></tr>\n"; echo "<tr><td>Manufacturer: </td><td>" . $myrow["other_manufacturer"] . "</td></tr>\n"; echo "<tr><td>Model Number: </td><td>" . $myrow["other_model"] . "</td></tr>\n"; echo "<tr><td>Serial Number: </td><td>" . $myrow["other_serial"] . "</td></tr>\n"; echo "<tr><td>Physical Location: </td><td>" . $myrow["other_location"] . "</td></tr>\n"; echo "<tr><td>Date of Purchase: (yyyy-mm-dd) </td><td>" . $myrow["other_date_purchase"] . "</td></tr>\n"; echo "<tr><td>Dollar Value: </td><td>\$" . $myrow["other_value"] . "</td></tr>\n"; echo "<tr><td valign=\"top\">Description: </td><td>" . $myrow["other_description"] . "</td></tr>\n"; echo "<tr><td><form action=\"other_edit.php?other=" . $_GET['other'] . "\" method=\"post\"><input name=\"Submit\" value=\" Edit \" type=\"submit\" class=\"content\" /></form></td></tr>\n"; $SQL2 = "SELECT * from nmap_other_ports WHERE nmap_other_id = '" . $myrow["other_mac_address"] . "' ORDER BY nmap_port_number"; $result2 = mysql_query($SQL2, $db); echo "<tr><td class=\"contenthead\" colspan=\"2\"><br /><img src=\"images/inv_nmap" . $pic_style . ".png\" width=\"32\" height=\"32\" alt=\"\" /> Nmap detected open ports</td></tr>\n"; echo "<tr><td>Port Number</td><td>Port Name</td></tr>\n"; if ($myrow2 = mysql_fetch_array($result2)) {
<?php $sql = ""; $page = "other"; include "include.php"; $SQL = "SELECT * FROM printer WHERE printer_id = '" . $_GET['printer'] . "'"; $result = mysql_query($SQL, $db); if ($myrow = mysql_fetch_array($result)) { echo "<div class=\"main_each\">"; echo "<form action=\"other_edit_2.php?sub=no&other=" . $_GET['printer'] . "\" method=\"post\">"; echo "<table border=\"0\" cellpadding=\"2\" cellspacing=\"0\" width=\"100%\" class=\"content\">"; echo "<tr><td colspan=\"2\" class=\"contenthead\"><img src=\"images/inv_printer" . $pic_style . ".png\" width=\"64\" height=\"64\" alt=\"\" /> " . $myrow["printer_caption"] . "</td></tr>"; echo "<tr><td>Name: </td><td><input type=\"text\" name=\"name\" size=\"30\" value=\"" . $myrow['printer_caption'] . "\" class=\"content\" /></td></tr>"; echo "<tr><td>Location: </td><td><input type=\"text\" name=\"location\" size=\"30\" value=\"" . $myrow['printer_location'] . "\" class=\"content\" /></td></tr>"; if ($myrow["printer_ip"]) { echo "<tr><td>Network Address: </td><td><input type=\"text\" name=\"ip\" size=\"30\" value=\"" . ip_trans($myrow["printer_ip"]) . "\" class=\"content\" /></td></tr>"; echo "<tr><td>MAC Address: </td><td>" . $myrow['printer_mac_address'] . "</td></tr>\n"; } else { echo "<tr><td>Attached with PC: </td><td>" . $myrow["printer_system_name"] . "</td></tr>\n"; } echo "<tr><td>Date Discovered: </td><td>" . return_date($myrow["printer_first_timestamp"]) . "</td></tr>\n"; echo "<tr><td>Manufacturer: </td><td><input type=\"text\" name=\"manufacturer\" size=\"30\" value=\"" . $myrow['printer_manufacturer'] . "\" class=\"content\" /></td></tr>\n"; echo "<tr><td>Model Number: </td><td><input type=\"text\" name=\"model\" size=\"30\" value=\"" . $myrow['printer_model'] . "\" class=\"content\" /></td></tr>\n"; echo "<tr><td>Serial Number: </td><td><input type=\"text\" name=\"serial\" size=\"30\" value=\"" . $myrow['printer_serial'] . "\" class=\"content\" /></td></tr>\n"; echo "<tr><td>Physical Location: </td><td><input type=\"text\" name=\"location\" size=\"30\" value=\"" . $myrow['printer_location'] . "\" class=\"content\" /></td></tr>\n"; echo "<tr><td>Date of Purchase: (yyyy-mm-dd) </td><td><input type=\"text\" name=\"date_purchased\" size=\"30\" value=\"" . $myrow['printer_date_purchased'] . "\" class=\"content\" /> (yyyy-mm-dd)</td></tr>\n"; echo "<tr><td>Dollar Value: </td><td>\$<input type=\"text\" name=\"value\" size=\"29\" value=\"" . $myrow['printer_value'] . "\" class=\"content\" /></td></tr>\n"; echo "<tr><td valign=\"top\">Description: </td><td><input type=\"text\" name=\"description\" size=\"30\" value=\"" . $myrow['printer_description'] . "\" class=\"content\" /></td></tr>\n"; echo "<tr><td><input name=\"Submit\" value=\"Submit\" type=\"Submit\" /></td></tr>\n"; } else { }
$bgcolor = "#F1F1F1"; } echo "<tr><td colspan=\"2\"><b>Nmap discovered on Other equipment</b></td></tr>\n"; echo "<tr bgcolor=\"" . $bgcolor . "\">\n"; echo "<td width=\"150\"><b>IP Address</b></td>\n"; echo "<td width=\"150\"><b>Name</b></td>\n"; echo "</tr>\n"; do { $count = $count + 1; if ($bgcolor == "#F1F1F1") { $bgcolor = "#FFFFFF"; } else { $bgcolor = "#F1F1F1"; } echo "<tr bgcolor=\"" . $bgcolor . "\">\n"; echo "<td>" . ip_trans($myrow["other_ip"]) . " </td>\n"; echo "<td><a href=\"other_summary.php?other=" . $myrow["other_id"] . "&sub=1\">" . $myrow["other_name"] . "</a> </td>\n"; echo "<td></td>\n"; echo "</tr>\n"; } while ($myrow = mysql_fetch_array($result)); echo "<tr><td><br /> </td></tr>\n"; } else { } echo "</table>\n"; echo "</div>\n"; echo "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" class=\"content\">\n"; echo "<tr><td colspan=\"3\"><b>VNC Servers: " . $count . "</b></td></tr>\n"; echo "</table>\n"; echo "</div>\n"; } else { }
echo "</tr>\n"; #$sql = "SELECT system_uuid, system_name, network_card.net_ip_address FROM system, network_card WHERE system_uuid = net_uuid ORDER BY system_name"; $sql = "SELECT system_uuid, system_name, net_ip_address FROM system ORDER BY system_name"; mysql_connect($mysql_server, $mysql_user, $mysql_password) or die("Could not connect"); mysql_select_db($mysql_database) or die("Could not select database"); $result = mysql_query($sql); if ($myrow = mysql_fetch_array($result)) { do { if ($bgcolor == "#F1F1F1") { $bgcolor = "#FFFFFF"; } else { $bgcolor = "#F1F1F1"; } echo "<tr bgcolor=\"" . $bgcolor . "\">\n"; echo " <td>" . $myrow['system_name'] . "</td>\n"; echo " <td align=\"center\"><input type=\"text\" id=\"ip_" . $myrow['system_uuid'] . "\" name=\"ip_" . $myrow['system_uuid'] . "\" value=\"" . ip_trans($myrow['net_ip_address']) . "\" size=\"12\" /></td>\n"; echo " <td align=\"center\">\n"; echo " <select id=\"type_" . $myrow['system_uuid'] . "\"> name=\"type_" . $myrow['system_uuid'] . "\">\n"; echo " <option value=\"port\" selected>PortScan</option>\n"; echo " </select>\n"; echo " </td>\n"; echo " <td align=\"center\"><input type=\"text\" id=\"detail_" . $myrow['system_uuid'] . "\" name=\"detail_" . $myrow['system_uuid'] . "\" value=\"25\" size=\"4\" /></td>\n"; echo " <td align=\"center\">\n"; echo " <select id=\"time_" . $myrow['system_uuid'] . "\"> name=\"time_" . $myrow['system_uuid'] . "\">\n"; echo " <option value=\"1\">1</option>\n"; echo " <option value=\"5\" selected>5</option>\n"; echo " <option value=\"10\">10</option>\n"; echo " <option value=\"15\">15</option>\n"; echo " <option value=\"20\">20</option>\n"; echo " <option value=\"30\">30</option>\n"; echo " <option value=\"45\">45</option>\n";
include $language_file; } else { die("Language-File not found: " . $language_file); } $db = mysql_connect($mysql_server, $mysql_user, $mysql_password) or die('Could not connect: ' . mysql_error()); mysql_select_db($mysql_database, $db); $sql = "SELECT * FROM other WHERE (other_ip_address <> '' AND "; $sql .= "other_first_timestamp > '" . adjustdate(0, 0, -$other_detected) . "000000') ORDER BY other_ip_address"; $result = mysql_query($sql, $db); $bgcolor = "#FFFFFF"; echo '<rss version="2.0">' . "\n"; echo '<channel>' . "\n"; echo '<image>' . "\n"; echo '<url>' . $sitename . 'favicon.ico</url>' . "\n"; echo '</image>' . "\n"; echo '<title>' . $sitename . '</title>' . "\n"; echo '<link>' . $sitebaseurl . '</link>' . "\n"; echo '<description>' . $sitedescription . '</description>' . "\n"; if ($myrow = mysql_fetch_array($result)) { // system.php?other=&view=other_system& do { echo '<item>' . "\n"; echo "<guid isPermaLink=\"false\">openauditnewsys-" . $myrow["other_ip_address"] . "</guid>\n"; echo '<title>' . $myrow["other_network_name"] . '</title>' . "\n"; echo '<link>' . $sitebaseurl . 'system.php?other=' . $myrow["other_id"] . '&view=other_system</link>' . "\n"; echo '<description>' . $myrow["other_network_name"] . ' ' . ip_trans($myrow["other_ip_address"]) . ' ' . return_datetime($myrow["other_first_timestamp"]) . '</description>' . "\n"; echo '</item>' . "\n"; } while ($myrow = mysql_fetch_array($result)); } echo '</channel>' . "\n"; echo '</rss>' . "\n";
<?php include "include_config.php"; include "include_functions.php"; if (isset($_GET["application"])) { $application = $_GET["application"]; } if (isset($_GET["hostname"])) { $hostname = ip_trans($_GET["hostname"]); } if (isset($_GET["ext"])) { $ext = $_GET["ext"]; } switch ($application) { case "http": case "https": case "ftp": header("Location: " . $application . "://" . $hostname); break; default: //Reading the template $buffer = file("launch_filedef_" . $application . ".txt"); $buffer = implode("", $buffer); //Replacing Hostname $buffer = str_replace("NAME", $hostname, $buffer); //Send to Browser header("Content-type: application/force-download"); header("Content-Transfer-Encoding: Binary"); $filename = $hostname . "." . $ext; header("Content-disposition: attachment; filename=\"" . $filename . "\""); echo trim($buffer);
<?php $page = ""; include "include.php"; $time_start = microtime_float(); if (!empty($_POST['Perform'])) { foreach ($_POST as $id) { $query = "DELETE FROM other WHERE other_id = '" . $id . "'"; $result = mysql_query($query) or die("Query failed at delete stage. groups"); $query = "DELETE FROM nmap_ports WHERE nmap_other_id = '" . $id . "'"; $result = mysql_query($query) or die("Query failed at delete stage. nmap_ports"); } } $sql = "SELECT other_id, other_ip_address, other_network_name, other_description, other_type, other_timestamp FROM other ORDER BY other_ip_address "; $result = mysql_query($sql, $db); $bgcolor = "#FFFFFF"; echo "<td valign=\"top\">\r\n <div class=\"main_each\">"; if ($myrow = mysql_fetch_array($result)) { echo "<form name=\"DeleteList\" id=\"DeleteList\" method=\"post\" action=\"" . $_SERVER["PHP_SELF"] . "\" >\r\n \r\n <script language=\"JavaScript\" TYPE=\"text/javascript\">\r\n function CheckUncheckAll(form){\r\n if(!form)\r\n return;\r\n var objElements = form.elements;\r\n if(!objElements)\r\n return;\r\n var countElements = objElements.length;\r\n if(!countElements)\r\n return;\r\n else\r\n for (var i = 1; i < countElements; i++){ \r\n eval(\"objElements[\" + i + \"].checked = objElements[1].checked\"); \r\n }\r\n }\r\n </script>\r\n \r\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">\r\n <tr>\r\n <td class=\"contenthead\">" . __("Delete other Equipments") . "<br /> </td>\r\n </tr>\r\n </table>\r\n \r\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">\r\n <tr>\r\n <td width=\"30%\"><input type=\"submit\" name=\"Perform\" id=\"Perform\" value=\"Delete selected other equipments\" onclick=\"return confirm('Do you really want to DELETE all selected other equipments?')\"></td>\r\n <td width=\"70%\"><input type=\"checkbox\" name=\"SetUnset\" id=\"SetUnset\" onClick=\"CheckUncheckAll(this.form);\" />Check/Uncheck all<br /></td> \r\n </tr>\r\n </table>\r\n\r\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">\r\n <tr> </tr>\r\n <tr>\r\n <td></td>\r\n <td class=\"contentsubtitle\">" . __("IP Address") . "</td>\r\n <td class=\"contentsubtitle\">" . __("Hostname") . "</td>\r\n <td class=\"contentsubtitle\">" . __("Description") . "</td>\r\n <td class=\"contentsubtitle\">" . __("Type") . "</td>\r\n <td class=\"contentsubtitle\">" . __("Date Audited") . "</td>\r\n </tr>\n"; do { $bgcolor = change_row_color($bgcolor, $bg1, $bg2); echo "<tr style=\"bgcolor:" . $bgcolor . ";\">\r\n <td width=\"5%\"><input type=\"checkbox\" name=" . $myrow["other_id"] . " id=" . $myrow["other_id"] . " value=" . $myrow["other_id"] . "></td>\r\n <td><a href=\"system.php?other=" . $myrow["other_id"] . "&view=other_system\">" . ip_trans($myrow["other_ip_address"]) . "</a></td>\r\n <td>" . $myrow["other_network_name"] . "</td>\r\n <td>" . $myrow["other_description"] . "</td>\r\n <td><img src=\"images/o_" . str_replace(" ", "_", $myrow["other_type"]) . ".png\" alt=\"\" border=\"0\" width=\"16\" height=\"16\" /></td>\r\n <td>" . return_date_time($myrow["other_timestamp"]) . "</td>\r\n </tr>\n"; } while ($myrow = mysql_fetch_array($result)); echo " </table>\r\n </form>"; } else { echo "<p class=\"content\">No Other Systems in database.</p>\n"; } echo "</div>\n"; echo __("This Page was generated in") . " " . number_format(microtime_float() - $time_start, 2) . " " . __("Seconds") . "."; echo "</td>\n"; include "include_right_column.php";
echo "<tr bgcolor=\"{$bg1}\"><td>Daylight Savings Zone:</td><td>" . $myrow["time_daylight"] . "</td></tr>\n"; echo "<tr><td>DirectX Version:</td><td>{$version_dx}</td></tr>\n"; echo "<tr bgcolor=\"{$bg1}\"><td>Windows Media Player Version:</td><td>{$version_wmp}</td></tr>\n"; echo "<tr><td>IE Version:</td><td>{$version_ie}</td></tr>\n"; } while ($myrow = mysql_fetch_array($result)); } else { } } else { } if ($sub == "ne" or $sub == "all") { $opt_count = 0; $SQL = "SELECT * FROM network_card WHERE net_uuid = '{$pc}' AND net_timestamp = '{$timestamp}' AND net_ip_address <> '000.000.000.000'"; $result = mysql_query($SQL, $db); echo "<tr><td class=\"contenthead\" colspan=\"2\"><img src=\"images/inv_network_info{$pic_style}.png\" width=\"64\" height=\"64\" alt=\"\" />Network Settings</td></tr>"; if ($myrow = mysql_fetch_array($result)) { echo "<tr><td>IP Address / Subnet:</td><td>" . ip_trans($myrow["net_ip_address"]) . " / " . $myrow["net_ip_subnet"] . "</td></tr>\n"; echo "<tr bgcolor=\"{$bg1}\"><td>DHCP Enabled / DCHP Server:</td><td>" . $myrow["net_dhcp_enabled"] . " / " . $myrow["net_dhcp_server"] . "</td></tr>\n"; echo "<tr><td>DNS Server:</td><td>" . $myrow["net_dns_server"] . "</td></tr>\n"; echo "<tr bgcolor=\"{$bg1}\"><td>WINS Server:</td><td>" . $myrow["net_wins_primary"] . "</td></tr>\n"; } else { } $SQL = "SELECT * FROM system WHERE system_uuid = '{$pc}' AND system_timestamp = '{$timestamp}'"; $result = mysql_query($SQL, $db); if ($myrow = mysql_fetch_array($result)) { do { echo "<tr><td>Domain Name / AD Site Name:</td><td>" . $myrow["net_domain"] . " / " . $myrow["net_client_site_name"] . "</td></tr>\n"; echo "<tr bgcolor=\"{$bg1}\"><td>Domain Controller:</td><td>" . $myrow["net_domain_controller_name"] . "</td></tr>\n"; echo "<tr><td>Current User:</td><td>" . $myrow["net_user_name"] . "</td></tr>\n"; } while ($myrow = mysql_fetch_array($result)); } else { }