Changes adopted from version 0.5

This commit is contained in:
2023-02-13 10:42:09 +01:00
parent faf5f368f5
commit 76ccecca7f
198 changed files with 10261 additions and 5068 deletions

View File

@@ -1,7 +1,7 @@
<?php
/*****************************************************************************
IP Reg, a PHP/MySQL IPAM tool
Copyright (C) 2008 Wietse Warendorff
Copyright (C) 2007-2009 Wietse Warendorff
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -20,34 +20,45 @@
or contact me at wietsew@users.sourceforge.net
*****************************************************************************/
// includes
include("includes.php");
// get id
$node_id = $_GET['node_id'];
// check authorisation
$auth = auth("node", $config_auth_nodedel, $node_id);
// start output
include("header.php");
// set template
$tp = new Template("tpl/nodedel.tpl");
// set language variables
$tp->setvars($lang);
// get asset info
$result = mysql_query("SELECT ip, asset_id FROM node WHERE node_id='$node_id'") or die(mysql_error());
$row=mysql_fetch_object($result);
$tp->set("node_id", $node_id);
$tp->set("asset_id", $row->asset_id);
$tp->set("ip", $row->ip);
// output
$tp->parse();
$tp->spit();
// start page
// includes
include("includes.php");
include("footer.php");
// get id
$node_id = sanitize($_GET['node_id']);
// start output
include("header.php");
// set template
$tp = new Template("tpl/nodedel.tpl", $config_yapter_error);
// set language variables
$tp->setvars($lang);
// setup node
// build query
$query = "SELECT
node.asset_id AS asset_id,
node.node_ip AS node_ip
FROM
node
WHERE
node.node_id=" . $node_id;
// run query
$node = $db->db_select($query);
// send to tpl
$tp->set("node_id", $node_id);
$tp->set("asset_id", $node[0]['asset_id']);
$tp->set("node_ip", $node[0]['node_ip']);
// end page
// output
$tp->parse();
$tp->spit();
// end output
include("footer.php");
?>