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
$vlan_id = $_GET['vlan_id'];
// check authorisation
$auth = auth("vlan", $config_auth_vlandel, $vlan_id);
// start output
include("header.php");
// set template
$tp = new Template("tpl/vlandel.tpl");
// set language variables
$tp->setvars($lang);
// get vlanclass info
$result = mysql_query("SELECT vlan_id, vlan_name, vlan_number FROM vlan WHERE vlan_id='$vlan_id'") or die(mysql_error());
$row=mysql_fetch_object($result);
$tp->set("vlan_id", $row->vlan_id);
$tp->set("vlan_name", $row->vlan_name);
$tp->set("vlan_number", $row->vlan_number);
// start page
// includes
include("includes.php");
// output
$tp->parse();
$tp->spit();
// get id
$vlan_id = sanitize($_GET['vlan_id']);
include("footer.php");
// start output
include("header.php");
// set template
$tp = new Template("tpl/vlandel.tpl", $config_yapter_error);
// set language variables
$tp->setvars($lang);
// setup vlan
// build query
$query = "SELECT
vlan.vlan_name AS vlan_name,
vlan.vlan_number AS vlan_number
FROM
vlan
WHERE
vlan.vlan_id=" . $vlan_id;
// run query
$vlan = $db->db_select($query);
// send to tpl
$tp->set("vlan_id", $vlan_id);
$tp->set("vlan_name", $vlan[0]['vlan_name']);
$tp->set("vlan_number", $vlan[0]['vlan_number']);
// end page
// output
$tp->parse();
$tp->spit();
// footer
include("footer.php");
?>