Changes adopted from version 0.5
This commit is contained in:
@@ -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,33 +20,43 @@
|
||||
or contact me at wietsew@users.sourceforge.net
|
||||
*****************************************************************************/
|
||||
|
||||
// includes
|
||||
include("includes.php");
|
||||
|
||||
// get id
|
||||
$location_id = $_GET['location_id'];
|
||||
|
||||
// check authorisation
|
||||
$auth = auth("location", $config_auth_locationdel, $location_id);
|
||||
|
||||
// start output
|
||||
include("header.php");
|
||||
|
||||
// set template
|
||||
$tp = new Template("tpl/locationdel.tpl");
|
||||
|
||||
// set language variables
|
||||
$tp->setvars($lang);
|
||||
|
||||
// get location info
|
||||
$result = mysql_query("SELECT location_name FROM location WHERE location_id='$location_id'") or die(mysql_error());
|
||||
$row=mysql_fetch_object($result);
|
||||
$tp->set("location_id", $location_id);
|
||||
$tp->set("location_name", $row->location_name);
|
||||
// start page
|
||||
// includes
|
||||
include("includes.php");
|
||||
|
||||
// output
|
||||
$tp->parse();
|
||||
$tp->spit();
|
||||
// get id
|
||||
$location_id = sanitize($_GET['location_id']);
|
||||
|
||||
include("footer.php");
|
||||
// start output
|
||||
include("header.php");
|
||||
|
||||
// set template
|
||||
$tp = new Template("tpl/locationdel.tpl", $config_yapter_error);
|
||||
|
||||
// set language variables
|
||||
$tp->setvars($lang);
|
||||
|
||||
// setup location
|
||||
// build query
|
||||
$query = "SELECT
|
||||
location.location_name AS location_name
|
||||
FROM
|
||||
location
|
||||
WHERE
|
||||
location.location_id=" . $location_id;
|
||||
|
||||
// run query
|
||||
$location = $db->db_select($query);
|
||||
|
||||
// send to tpl
|
||||
$tp->set("location_id", $location_id);
|
||||
$tp->set("location_name", $location[0]['location_name']);
|
||||
|
||||
// end page
|
||||
// output
|
||||
$tp->parse();
|
||||
$tp->spit();
|
||||
|
||||
// footer
|
||||
include("footer.php");
|
||||
?>
|
||||
Reference in New Issue
Block a user