} } /* echo printComputers($computersTcp); echo printComputers($computersIcmp); echo printComputers($computersJavascript); */ $mergedComputers = array(); foreach ($computersTcp->computer as $computer) { addComputer($computer, "tcp"); } foreach ($computersJavascript->computer as $computer) { addComputer($computer, "javascript"); } foreach ($computersIcmp->computer as $computer) { addComputer($computer, "icmp"); } // echo serialize($mergedComputers); echo "<span style='position: absolute; top: 120px; right: 10px'><a href='javascript:fold(100)'>[+/-]</a></span>"; $i = 100; /* foreach ($computers->computer as $computer) { if (isset($computer->identity)) { echo "<b><font color='green'><a href=\"javascript:aktual('", $i, "')\">", $computer->address, "</a></font></b><br />"; echo "<div id='", $i, "'>"; echo "<form method='post' action='", $_SERVER['PHP_SELF'], "'>"; echo "<table>"; echo "<tr><td width='40%'>Skew:</td><td>", $computer["skew"], "</td></tr>"; echo "<tr><td>Packets:</td><td>", $computer->packets, "</td></tr>"; foreach ($computer->identity as $identity) { echo "<tr><td>Similar skew:</td><td>", $identity->name, "</td></tr>";
* but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with MMC; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ require "localSidebar.php"; require "graph/navbar.inc.php"; require_once "modules/base/includes/computers.inc.php"; $err = false; if (isset($_POST["bcreate"])) { if (checkComputerName($_POST["computername"])) { if (isComputerNameAvailable($_POST["location_uuid"], $_POST["computername"])) { addComputer($_POST); if (!isXMLRPCError()) { new NotifyWidgetSuccess(_("Computer successfully added")); header("Location: " . urlStrRedirect("base/computers/index")); exit; } } else { $err = new ErrorMessage(_("The computer name is already taken.")); } } else { $err = new ErrorMessage(_("Invalid computer name.")); } } $p = new PageGenerator(); if ($_GET["action"] == "add") { $title = _("Add a computer");
function submitAddComputer() { $data = processComputerInput(); addComputer($data); #print "<H2>Add Computer</H2>\n"; #print "The computer has been added."; clearPrivCache(); viewComputers(); }