First commit based on v0.1
This commit is contained in:
23
nodedel.php
Normal file
23
nodedel.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
include("header.php");
|
||||
|
||||
// display only if admin
|
||||
if($_SESSION['suser_level'] >= 2) {
|
||||
|
||||
$node_id = $_GET['node_id'];
|
||||
|
||||
// get asset id
|
||||
$result = mysql_query("SELECT asset_id FROM node WHERE node_id='$node_id'") or die(mysql_error());
|
||||
$asset_id = mysql_result($result, 0, "asset_id");
|
||||
|
||||
// delete node
|
||||
mysql_query("DELETE FROM node WHERE node_id='$node_id'") or die(mysql_error());
|
||||
|
||||
// redirect
|
||||
header("Location: assetview.php?asset_id=" . $asset_id);
|
||||
|
||||
// end display only if admin
|
||||
}
|
||||
|
||||
include("footer.php");
|
||||
?>
|
||||
Reference in New Issue
Block a user