Code formatting improved and some bugfixng
This commit is contained in:
parent
808ae831bf
commit
37f4bd4185
|
@ -1,2 +1,3 @@
|
||||||
*~
|
*~
|
||||||
tpl_c/*.php
|
tpl_c/*.php
|
||||||
|
config.php
|
||||||
|
|
33
asset.php
33
asset.php
|
@ -1,37 +1,18 @@
|
||||||
<?php
|
<?php
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
IP Reg, a PHP/MySQL IPAM tool
|
IP Reg, a PHP/MySQL IPAM tool
|
||||||
Copyright (C) 2007-2009 Wietse Warendorff
|
Copyright (C) 2007-2009 Wietse Warendorff (up to v0.5)
|
||||||
|
Copyright (C) 2011-2023 Thomas Hooge
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
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 this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
For more information, visit http://sourceforge.net/projects/ipreg,
|
|
||||||
or contact me at wietsew@users.sourceforge.net
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
// start page
|
|
||||||
// includes
|
|
||||||
include("includes.php");
|
include("includes.php");
|
||||||
|
|
||||||
// start output
|
|
||||||
include("header.php");
|
include("header.php");
|
||||||
|
|
||||||
// set language variables
|
|
||||||
$smarty->assign($lang);
|
|
||||||
|
|
||||||
// create letter links
|
// create letter links
|
||||||
// build query
|
|
||||||
$query = "SELECT
|
$query = "SELECT
|
||||||
SUBSTRING(UPPER(asset.asset_name),1,1) AS asset_letter
|
SUBSTRING(UPPER(asset.asset_name),1,1) AS asset_letter
|
||||||
FROM
|
FROM
|
||||||
|
@ -41,11 +22,9 @@
|
||||||
ORDER BY
|
ORDER BY
|
||||||
asset_letter";
|
asset_letter";
|
||||||
|
|
||||||
// run query
|
|
||||||
$alphabet = $db->db_select($query);
|
$alphabet = $db->db_select($query);
|
||||||
$smarty->assign("alphabet", $alphabet);
|
$smarty->assign("alphabet", $alphabet);
|
||||||
|
|
||||||
// setup asset
|
|
||||||
// setup current letter
|
// setup current letter
|
||||||
if(isset($_GET['asset_letter'])) {
|
if(isset($_GET['asset_letter'])) {
|
||||||
$asset_letter = sanitize($_GET['asset_letter']);
|
$asset_letter = sanitize($_GET['asset_letter']);
|
||||||
|
@ -53,7 +32,6 @@
|
||||||
$asset_letter = $alphabet[0]['asset_letter'];
|
$asset_letter = $alphabet[0]['asset_letter'];
|
||||||
}
|
}
|
||||||
|
|
||||||
// build query
|
|
||||||
$query = "SELECT
|
$query = "SELECT
|
||||||
a.asset_id,
|
a.asset_id,
|
||||||
IF(LENGTH(a.asset_name)>0, a.asset_name, '...') AS asset_name,
|
IF(LENGTH(a.asset_name)>0, a.asset_name, '...') AS asset_name,
|
||||||
|
@ -67,16 +45,11 @@
|
||||||
ORDER BY
|
ORDER BY
|
||||||
a.asset_name";
|
a.asset_name";
|
||||||
|
|
||||||
// run query
|
|
||||||
$assets = $db->db_select($query);
|
$assets = $db->db_select($query);
|
||||||
|
|
||||||
// counter to tpl
|
|
||||||
$smarty->assign("assets", $assets);
|
$smarty->assign("assets", $assets);
|
||||||
|
|
||||||
// end page
|
|
||||||
// output
|
|
||||||
$smarty->display("asset.tpl");
|
$smarty->display("asset.tpl");
|
||||||
|
|
||||||
// end output
|
|
||||||
include("footer.php");
|
include("footer.php");
|
||||||
?>
|
?>
|
||||||
|
|
34
assetadd.php
34
assetadd.php
|
@ -1,40 +1,18 @@
|
||||||
<?php
|
<?php
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
IP Reg, a PHP/MySQL IPAM tool
|
IP Reg, a PHP/MySQL IPAM tool
|
||||||
Copyright (C) 2007-2009 Wietse Warendorff
|
Copyright (C) 2007-2009 Wietse Warendorff (up to v0.5)
|
||||||
|
Copyright (C) 2011-2023 Thomas Hooge
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
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 this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
For more information, visit http://sourceforge.net/projects/ipreg,
|
|
||||||
or contact me at wietsew@users.sourceforge.net
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
// start page
|
|
||||||
// includes
|
|
||||||
include("includes.php");
|
include("includes.php");
|
||||||
|
|
||||||
// get id
|
|
||||||
if((isset($_GET['assetclass_id'])) ? $assetclass_id = sanitize($_GET['assetclass_id']) : $assetclass_id = "");
|
if((isset($_GET['assetclass_id'])) ? $assetclass_id = sanitize($_GET['assetclass_id']) : $assetclass_id = "");
|
||||||
|
|
||||||
// start output
|
|
||||||
include("header.php");
|
include("header.php");
|
||||||
|
|
||||||
// set language variables
|
|
||||||
$smarty->assign($lang);
|
|
||||||
|
|
||||||
// setup assetclass
|
|
||||||
// build query
|
|
||||||
$query = "SELECT
|
$query = "SELECT
|
||||||
assetclass_id,
|
assetclass_id,
|
||||||
assetclass_name
|
assetclass_name
|
||||||
|
@ -43,17 +21,13 @@
|
||||||
ORDER BY
|
ORDER BY
|
||||||
assetclass_name";
|
assetclass_name";
|
||||||
|
|
||||||
// run query
|
|
||||||
$assetclasses = $db->db_select($query);
|
$assetclasses = $db->db_select($query);
|
||||||
foreach ($assetclasses as $assetclass) {
|
foreach ($assetclasses as $assetclass) {
|
||||||
$assetclass_options[$assetclass['assetclass_id']] = $assetclass['assetclass_name'];
|
$assetclass_options[$assetclass['assetclass_id']] = $assetclass['assetclass_name'];
|
||||||
}
|
}
|
||||||
$smarty->assign("assetclass_options", $assetclass_options);
|
|
||||||
|
|
||||||
// end page
|
$smarty->assign("assetclass_options", $assetclass_options);
|
||||||
// output
|
|
||||||
$smarty->display("assetadd.tpl");
|
$smarty->display("assetadd.tpl");
|
||||||
|
|
||||||
// end output
|
|
||||||
include("footer.php");
|
include("footer.php");
|
||||||
?>
|
?>
|
|
@ -1,37 +1,15 @@
|
||||||
<?php
|
<?php
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
IP Reg, a PHP/MySQL IPAM tool
|
IP Reg, a PHP/MySQL IPAM tool
|
||||||
Copyright (C) 2007-2009 Wietse Warendorff
|
Copyright (C) 2007-2009 Wietse Warendorff (up to v0.5)
|
||||||
|
Copyright (C) 2011-2023 Thomas Hooge
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
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 this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
For more information, visit http://sourceforge.net/projects/ipreg,
|
|
||||||
or contact me at wietsew@users.sourceforge.net
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
// start page
|
|
||||||
// includes
|
|
||||||
include("includes.php");
|
include("includes.php");
|
||||||
|
|
||||||
// start output
|
|
||||||
include("header.php");
|
include("header.php");
|
||||||
|
|
||||||
// set language variables
|
|
||||||
$smarty->assign($lang);
|
|
||||||
|
|
||||||
// setup assetclass
|
|
||||||
// build query
|
|
||||||
$query = "SELECT
|
$query = "SELECT
|
||||||
a.assetclass_id,
|
a.assetclass_id,
|
||||||
a.assetclass_name,
|
a.assetclass_name,
|
||||||
|
@ -43,17 +21,10 @@
|
||||||
ORDER BY
|
ORDER BY
|
||||||
a.assetclass_name";
|
a.assetclass_name";
|
||||||
|
|
||||||
// run query
|
|
||||||
$assetclasses = $db->db_select($query);
|
$assetclasses = $db->db_select($query);
|
||||||
|
|
||||||
// counter to tpl
|
|
||||||
$smarty->assign("assetclasses", $assetclasses);
|
$smarty->assign("assetclasses", $assetclasses);
|
||||||
|
|
||||||
|
|
||||||
// end page
|
|
||||||
// output
|
|
||||||
$smarty->display("assetclass.tpl");
|
$smarty->display("assetclass.tpl");
|
||||||
|
|
||||||
// end output
|
|
||||||
include("footer.php");
|
include("footer.php");
|
||||||
?>
|
?>
|
|
@ -1,45 +1,20 @@
|
||||||
<?php
|
<?php
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
IP Reg, a PHP/MySQL IPAM tool
|
IP Reg, a PHP/MySQL IPAM tool
|
||||||
Copyright (C) 2007-2009 Wietse Warendorff
|
Copyright (C) 2007-2009 Wietse Warendorff (up to v0.5)
|
||||||
|
Copyright (C) 2011-2023 Thomas Hooge
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
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 this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
For more information, visit http://sourceforge.net/projects/ipreg,
|
|
||||||
or contact me at wietsew@users.sourceforge.net
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
// start page
|
|
||||||
// includes
|
|
||||||
include("includes.php");
|
include("includes.php");
|
||||||
|
|
||||||
// get id
|
|
||||||
if((isset($_GET['assetclassgroup_id'])) ? $assetclassgroup_id = sanitize($_GET['assetclassgroup_id']) : $assetclassgroup_id = "");
|
if((isset($_GET['assetclassgroup_id'])) ? $assetclassgroup_id = sanitize($_GET['assetclassgroup_id']) : $assetclassgroup_id = "");
|
||||||
|
|
||||||
// start output
|
|
||||||
include("header.php");
|
include("header.php");
|
||||||
|
|
||||||
// set language variables
|
|
||||||
$smarty->assign($lang);
|
|
||||||
|
|
||||||
// setup assetclassgroup
|
|
||||||
$smarty->assign("assetclassgroup_options", $db->options_assetclassgroup());
|
$smarty->assign("assetclassgroup_options", $db->options_assetclassgroup());
|
||||||
|
|
||||||
// end page
|
|
||||||
// output
|
|
||||||
$smarty->display("assetclassadd.tpl");
|
$smarty->display("assetclassadd.tpl");
|
||||||
|
|
||||||
// end output
|
|
||||||
include("footer.php");
|
include("footer.php");
|
||||||
?>
|
?>
|
|
@ -1,40 +1,18 @@
|
||||||
<?php
|
<?php
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
IP Reg, a PHP/MySQL IPAM tool
|
IP Reg, a PHP/MySQL IPAM tool
|
||||||
Copyright (C) 2007-2009 Wietse Warendorff
|
Copyright (C) 2007-2009 Wietse Warendorff (up to v0.5)
|
||||||
|
Copyright (C) 2011-2023 Thomas Hooge
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
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 this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
For more information, visit http://sourceforge.net/projects/ipreg,
|
|
||||||
or contact me at wietsew@users.sourceforge.net
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
// start page
|
|
||||||
// includes
|
|
||||||
include("includes.php");
|
include("includes.php");
|
||||||
|
|
||||||
// get id
|
|
||||||
$assetclass_id = sanitize($_GET['assetclass_id']);
|
$assetclass_id = sanitize($_GET['assetclass_id']);
|
||||||
|
|
||||||
// start output
|
|
||||||
include("header.php");
|
include("header.php");
|
||||||
|
|
||||||
// set language variables
|
|
||||||
$smarty->assign($lang);
|
|
||||||
|
|
||||||
// setup assetclass
|
|
||||||
// build query
|
|
||||||
$query = "SELECT
|
$query = "SELECT
|
||||||
assetclass_id,
|
assetclass_id,
|
||||||
assetclass_name
|
assetclass_name
|
||||||
|
@ -43,17 +21,12 @@
|
||||||
WHERE
|
WHERE
|
||||||
assetclass_id=" . $assetclass_id;
|
assetclass_id=" . $assetclass_id;
|
||||||
|
|
||||||
// run query
|
|
||||||
$assetclass = $db->db_select($query);
|
$assetclass = $db->db_select($query);
|
||||||
|
|
||||||
// send to tpl
|
|
||||||
$smarty->assign("assetclass_id", $assetclass[0]['assetclass_id']);
|
$smarty->assign("assetclass_id", $assetclass[0]['assetclass_id']);
|
||||||
$smarty->assign("assetclass_name", $assetclass[0]['assetclass_name']);
|
$smarty->assign("assetclass_name", $assetclass[0]['assetclass_name']);
|
||||||
|
|
||||||
// end page
|
|
||||||
// output
|
|
||||||
$smarty->display("assetclassdel.tpl");
|
$smarty->display("assetclassdel.tpl");
|
||||||
|
|
||||||
// end output
|
|
||||||
include("footer.php");
|
include("footer.php");
|
||||||
?>
|
?>
|
|
@ -1,40 +1,17 @@
|
||||||
<?php
|
<?php
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
IP Reg, a PHP/MySQL IPAM tool
|
IP Reg, a PHP/MySQL IPAM tool
|
||||||
Copyright (C) 2007-2009 Wietse Warendorff
|
Copyright (C) 2007-2009 Wietse Warendorff (up to v0.5)
|
||||||
|
Copyright (C) 2011-2023 Thomas Hooge
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
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 this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
For more information, visit http://sourceforge.net/projects/ipreg,
|
|
||||||
or contact me at wietsew@users.sourceforge.net
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
// start page
|
|
||||||
// includes
|
|
||||||
include("includes.php");
|
include("includes.php");
|
||||||
|
|
||||||
// get id
|
|
||||||
$assetclass_id = sanitize($_GET['assetclass_id']);
|
$assetclass_id = sanitize($_GET['assetclass_id']);
|
||||||
|
|
||||||
// start output
|
|
||||||
include("header.php");
|
include("header.php");
|
||||||
|
|
||||||
// set language variables
|
|
||||||
$smarty->assign($lang);
|
|
||||||
|
|
||||||
// setup assetclass
|
|
||||||
// build query
|
|
||||||
$query = "SELECT
|
$query = "SELECT
|
||||||
assetclass_id,
|
assetclass_id,
|
||||||
assetclass_name,
|
assetclass_name,
|
||||||
|
@ -44,22 +21,15 @@
|
||||||
WHERE
|
WHERE
|
||||||
assetclass_id=" . $assetclass_id;
|
assetclass_id=" . $assetclass_id;
|
||||||
|
|
||||||
// run query
|
|
||||||
$assetclass = $db->db_select($query);
|
$assetclass = $db->db_select($query);
|
||||||
|
|
||||||
// send to tpl
|
|
||||||
$smarty->assign("assetclass_id", $assetclass[0]['assetclass_id']);
|
$smarty->assign("assetclass_id", $assetclass[0]['assetclass_id']);
|
||||||
$smarty->assign("assetclass_name", $assetclass[0]['assetclass_name']);
|
$smarty->assign("assetclass_name", $assetclass[0]['assetclass_name']);
|
||||||
$smarty->assign("assetclassgroup_id", $assetclass[0]['assetclassgroup_id']);
|
$smarty->assign("assetclassgroup_id", $assetclass[0]['assetclassgroup_id']);
|
||||||
|
|
||||||
// setup assetclassgroup
|
|
||||||
// build query
|
|
||||||
$smarty->assign("assetclassgroup_options", $db->options_assetclassgroup());
|
$smarty->assign("assetclassgroup_options", $db->options_assetclassgroup());
|
||||||
|
|
||||||
// end page
|
|
||||||
// output
|
|
||||||
$smarty->display("assetclassedit.tpl");
|
$smarty->display("assetclassedit.tpl");
|
||||||
|
|
||||||
// end output
|
|
||||||
include("footer.php");
|
include("footer.php");
|
||||||
?>
|
?>
|
|
@ -1,37 +1,16 @@
|
||||||
<?php
|
<?php
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
IP Reg, a PHP/MySQL IPAM tool
|
IP Reg, a PHP/MySQL IPAM tool
|
||||||
Copyright (C) 2007-2009 Wietse Warendorff
|
Copyright (C) 2007-2009 Wietse Warendorff (up to v0.5)
|
||||||
|
Copyright (C) 2011-2023 Thomas Hooge
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
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 this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
For more information, visit http://sourceforge.net/projects/ipreg,
|
|
||||||
or contact me at wietsew@users.sourceforge.net
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
// start page
|
|
||||||
// includes
|
|
||||||
include("includes.php");
|
include("includes.php");
|
||||||
|
|
||||||
// start output
|
|
||||||
include("header.php");
|
include("header.php");
|
||||||
|
|
||||||
// set language variables
|
|
||||||
$smarty->assign($lang);
|
|
||||||
|
|
||||||
// setup assetclassgroup
|
|
||||||
// build query
|
|
||||||
$query = "SELECT
|
$query = "SELECT
|
||||||
assetclassgroup_id,
|
assetclassgroup_id,
|
||||||
assetclassgroup_name,
|
assetclassgroup_name,
|
||||||
|
@ -41,14 +20,10 @@
|
||||||
ORDER BY
|
ORDER BY
|
||||||
assetclassgroup_name";
|
assetclassgroup_name";
|
||||||
|
|
||||||
// run query
|
|
||||||
$assetclassgroups = $db->db_select($query);
|
$assetclassgroups = $db->db_select($query);
|
||||||
$smarty->assign("assetclassgroups", $assetclassgroups);
|
|
||||||
|
|
||||||
// end page
|
$smarty->assign("assetclassgroups", $assetclassgroups);
|
||||||
// output
|
|
||||||
$smarty->display("assetclassgroup.tpl");
|
$smarty->display("assetclassgroup.tpl");
|
||||||
|
|
||||||
// end output
|
|
||||||
include("footer.php");
|
include("footer.php");
|
||||||
?>
|
?>
|
|
@ -1,39 +1,16 @@
|
||||||
<?php
|
<?php
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
IP Reg, a PHP/MySQL IPAM tool
|
IP Reg, a PHP/MySQL IPAM tool
|
||||||
Copyright (C) 2007-2009 Wietse Warendorff
|
Copyright (C) 2007-2009 Wietse Warendorff (up to v0.5)
|
||||||
|
Copyright (C) 2011-2023 Thomas Hooge
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
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 this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
For more information, visit http://sourceforge.net/projects/ipreg,
|
|
||||||
or contact me at wietsew@users.sourceforge.net
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
// start page
|
|
||||||
// includes
|
|
||||||
include("includes.php");
|
include("includes.php");
|
||||||
|
|
||||||
// start output
|
|
||||||
include("header.php");
|
include("header.php");
|
||||||
|
|
||||||
// set language variables
|
|
||||||
$smarty->assign($lang);
|
|
||||||
|
|
||||||
// end page
|
|
||||||
// output
|
|
||||||
$smarty->display("assetclassgroupadd.tpl");
|
$smarty->display("assetclassgroupadd.tpl");
|
||||||
|
|
||||||
// end output
|
|
||||||
include("footer.php");
|
include("footer.php");
|
||||||
?>
|
?>
|
|
@ -1,40 +1,20 @@
|
||||||
<?php
|
<?php
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
IP Reg, a PHP/MySQL IPAM tool
|
IP Reg, a PHP/MySQL IPAM tool
|
||||||
Copyright (C) 2007-2009 Wietse Warendorff
|
Copyright (C) 2007-2009 Wietse Warendorff (up to v0.5)
|
||||||
|
Copyright (C) 2011-2023 Thomas Hooge
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
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 this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
For more information, visit http://sourceforge.net/projects/ipreg,
|
|
||||||
or contact me at wietsew@users.sourceforge.net
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
// start page
|
|
||||||
// includes
|
|
||||||
include("includes.php");
|
include("includes.php");
|
||||||
|
|
||||||
// get id
|
|
||||||
$assetclassgroup_id = sanitize($_GET['assetclassgroup_id']);
|
$assetclassgroup_id = sanitize($_GET['assetclassgroup_id']);
|
||||||
|
|
||||||
// start output
|
|
||||||
include("header.php");
|
include("header.php");
|
||||||
|
|
||||||
// set language variables
|
|
||||||
$smarty->assign($lang);
|
$smarty->assign($lang);
|
||||||
|
|
||||||
// setup assetclassgroup
|
|
||||||
// build query
|
|
||||||
$query = "SELECT
|
$query = "SELECT
|
||||||
assetclassgroup_id,
|
assetclassgroup_id,
|
||||||
assetclassgroup_name
|
assetclassgroup_name
|
||||||
|
@ -43,17 +23,12 @@
|
||||||
WHERE
|
WHERE
|
||||||
assetclassgroup_id=" . $assetclassgroup_id;
|
assetclassgroup_id=" . $assetclassgroup_id;
|
||||||
|
|
||||||
// run query
|
|
||||||
$assetclassgroup = $db->db_select($query);
|
$assetclassgroup = $db->db_select($query);
|
||||||
|
|
||||||
// send to tpl
|
|
||||||
$smarty->assign("assetclassgroup_id", $assetclassgroup[0]['assetclassgroup_id']);
|
$smarty->assign("assetclassgroup_id", $assetclassgroup[0]['assetclassgroup_id']);
|
||||||
$smarty->assign("assetclassgroup_name", $assetclassgroup[0]['assetclassgroup_name']);
|
$smarty->assign("assetclassgroup_name", $assetclassgroup[0]['assetclassgroup_name']);
|
||||||
|
|
||||||
// end page
|
|
||||||
// output
|
|
||||||
$smarty->display("assetclassgroupdel.tpl");
|
$smarty->display("assetclassgroupdel.tpl");
|
||||||
|
|
||||||
// end output
|
|
||||||
include("footer.php");
|
include("footer.php");
|
||||||
?>
|
?>
|
|
@ -1,62 +1,37 @@
|
||||||
<?php
|
<?php
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
IP Reg, a PHP/MySQL IPAM tool
|
IP Reg, a PHP/MySQL IPAM tool
|
||||||
Copyright (C) 2007-2009 Wietse Warendorff
|
Copyright (C) 2007-2009 Wietse Warendorff (up to v0.5)
|
||||||
|
Copyright (C) 2011-2023 Thomas Hooge
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
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 this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
For more information, visit http://sourceforge.net/projects/ipreg,
|
|
||||||
or contact me at wietsew@users.sourceforge.net
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
// start page
|
|
||||||
// includes
|
|
||||||
include("includes.php");
|
include("includes.php");
|
||||||
|
|
||||||
// get id
|
|
||||||
$assetclassgroup_id = sanitize($_GET['assetclassgroup_id']);
|
$assetclassgroup_id = sanitize($_GET['assetclassgroup_id']);
|
||||||
|
|
||||||
// start output
|
|
||||||
$smarty->assign("scripts", 'jscolor.js');
|
$smarty->assign("scripts", 'jscolor.js');
|
||||||
include("header.php");
|
include("header.php");
|
||||||
|
|
||||||
// set language variables
|
|
||||||
$smarty->assign($lang);
|
$smarty->assign($lang);
|
||||||
|
|
||||||
// setup assetclassgroup
|
|
||||||
// build query
|
|
||||||
$query = "SELECT
|
$query = "SELECT
|
||||||
assetclassgroup.assetclassgroup_id AS assetclassgroup_id,
|
assetclassgroup_id,
|
||||||
assetclassgroup.assetclassgroup_name AS assetclassgroup_name,
|
assetclassgroup_name,
|
||||||
assetclassgroup.assetclassgroup_color AS assetclassgroup_color
|
assetclassgroup_color
|
||||||
FROM
|
FROM
|
||||||
assetclassgroup
|
assetclassgroup
|
||||||
WHERE
|
WHERE
|
||||||
assetclassgroup.assetclassgroup_id=" . $assetclassgroup_id;
|
assetclassgroup_id=" . $assetclassgroup_id;
|
||||||
|
|
||||||
// run query
|
|
||||||
$assetclassgroup = $db->db_select($query);
|
$assetclassgroup = $db->db_select($query);
|
||||||
|
|
||||||
// send to tpl
|
|
||||||
$smarty->assign("assetclassgroup_id", $assetclassgroup[0]['assetclassgroup_id']);
|
$smarty->assign("assetclassgroup_id", $assetclassgroup[0]['assetclassgroup_id']);
|
||||||
$smarty->assign("assetclassgroup_name", $assetclassgroup[0]['assetclassgroup_name']);
|
$smarty->assign("assetclassgroup_name", $assetclassgroup[0]['assetclassgroup_name']);
|
||||||
$smarty->assign("assetclassgroup_color", $assetclassgroup[0]['assetclassgroup_color']);
|
$smarty->assign("assetclassgroup_color", $assetclassgroup[0]['assetclassgroup_color']);
|
||||||
|
|
||||||
// end page
|
|
||||||
// output
|
|
||||||
$smarty->display("assetclassgroupedit.tpl");
|
$smarty->display("assetclassgroupedit.tpl");
|
||||||
|
|
||||||
// end output
|
|
||||||
include("footer.php");
|
include("footer.php");
|
||||||
?>
|
?>
|
|
@ -1,40 +1,18 @@
|
||||||
<?php
|
<?php
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
IP Reg, a PHP/MySQL IPAM tool
|
IP Reg, a PHP/MySQL IPAM tool
|
||||||
Copyright (C) 2007-2009 Wietse Warendorff
|
Copyright (C) 2007-2009 Wietse Warendorff (up to v0.5)
|
||||||
|
Copyright (C) 2011-2023 Thomas Hooge
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
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 this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
For more information, visit http://sourceforge.net/projects/ipreg,
|
|
||||||
or contact me at wietsew@users.sourceforge.net
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
// start page
|
|
||||||
// includes
|
|
||||||
include("includes.php");
|
include("includes.php");
|
||||||
|
|
||||||
// get id
|
|
||||||
$assetclassgroup_id = sanitize($_GET['assetclassgroup_id']);
|
$assetclassgroup_id = sanitize($_GET['assetclassgroup_id']);
|
||||||
|
|
||||||
// start output
|
|
||||||
include("header.php");
|
include("header.php");
|
||||||
|
|
||||||
// set language variables
|
|
||||||
$smarty->assign($lang);
|
|
||||||
|
|
||||||
// setup assetclassgroup
|
|
||||||
// build query
|
|
||||||
$query = "SELECT
|
$query = "SELECT
|
||||||
assetclassgroup_id,
|
assetclassgroup_id,
|
||||||
assetclassgroup_name,
|
assetclassgroup_name,
|
||||||
|
@ -44,16 +22,12 @@
|
||||||
WHERE
|
WHERE
|
||||||
assetclassgroup_id=" . $assetclassgroup_id;
|
assetclassgroup_id=" . $assetclassgroup_id;
|
||||||
|
|
||||||
// run query
|
|
||||||
$assetclassgroup = $db->db_select($query);
|
$assetclassgroup = $db->db_select($query);
|
||||||
|
|
||||||
// send to tpl
|
|
||||||
$smarty->assign("assetclassgroup_id", $assetclassgroup[0]['assetclassgroup_id']);
|
$smarty->assign("assetclassgroup_id", $assetclassgroup[0]['assetclassgroup_id']);
|
||||||
$smarty->assign("assetclassgroup_name", $assetclassgroup[0]['assetclassgroup_name']);
|
$smarty->assign("assetclassgroup_name", $assetclassgroup[0]['assetclassgroup_name']);
|
||||||
$smarty->assign("assetclassgroup_color", $assetclassgroup[0]['assetclassgroup_color']);
|
$smarty->assign("assetclassgroup_color", $assetclassgroup[0]['assetclassgroup_color']);
|
||||||
|
|
||||||
// setup assetclass
|
|
||||||
// build query
|
|
||||||
$query = "SELECT
|
$query = "SELECT
|
||||||
assetclass_id,
|
assetclass_id,
|
||||||
assetclass_name
|
assetclass_name
|
||||||
|
@ -64,14 +38,10 @@
|
||||||
ORDER BY
|
ORDER BY
|
||||||
assetclass_name";
|
assetclass_name";
|
||||||
|
|
||||||
// run query
|
|
||||||
$assetclasses = $db->db_select($query);
|
$assetclasses = $db->db_select($query);
|
||||||
$smarty->assign("assetclasses", $assetclasses);
|
$smarty->assign("assetclasses", $assetclasses);
|
||||||
|
|
||||||
// end page
|
|
||||||
// output
|
|
||||||
$smarty->display("assetclassgroupview.tpl");
|
$smarty->display("assetclassgroupview.tpl");
|
||||||
|
|
||||||
// end output
|
|
||||||
include("footer.php");
|
include("footer.php");
|
||||||
?>
|
?>
|
|
@ -1,40 +1,18 @@
|
||||||
<?php
|
<?php
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
IP Reg, a PHP/MySQL IPAM tool
|
IP Reg, a PHP/MySQL IPAM tool
|
||||||
Copyright (C) 2007-2009 Wietse Warendorff
|
Copyright (C) 2007-2009 Wietse Warendorff (up to v0.5)
|
||||||
|
Copyright (C) 2011-2023 Thomas Hooge
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
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 this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
For more information, visit http://sourceforge.net/projects/ipreg,
|
|
||||||
or contact me at wietsew@users.sourceforge.net
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
// start page
|
|
||||||
// includes
|
|
||||||
include("includes.php");
|
include("includes.php");
|
||||||
|
|
||||||
// get id
|
|
||||||
$assetclass_id = sanitize($_GET['assetclass_id']);
|
$assetclass_id = sanitize($_GET['assetclass_id']);
|
||||||
|
|
||||||
// start output
|
|
||||||
include("header.php");
|
include("header.php");
|
||||||
|
|
||||||
// set language variables
|
|
||||||
$smarty->assign($lang);
|
|
||||||
|
|
||||||
// setup assetclass
|
|
||||||
// build query
|
|
||||||
$query = "SELECT
|
$query = "SELECT
|
||||||
a.assetclass_id, a.assetclass_name,
|
a.assetclass_id, a.assetclass_name,
|
||||||
g.assetclassgroup_id, g.assetclassgroup_name, g.assetclassgroup_color
|
g.assetclassgroup_id, g.assetclassgroup_name, g.assetclassgroup_color
|
||||||
|
@ -43,10 +21,8 @@
|
||||||
WHERE
|
WHERE
|
||||||
a.assetclass_id=" . $assetclass_id;
|
a.assetclass_id=" . $assetclass_id;
|
||||||
|
|
||||||
// run query
|
|
||||||
$assetclass = $db->db_select($query);
|
$assetclass = $db->db_select($query);
|
||||||
|
|
||||||
// send to tpl
|
|
||||||
$smarty->assign("assetclass_id", $assetclass[0]['assetclass_id']);
|
$smarty->assign("assetclass_id", $assetclass[0]['assetclass_id']);
|
||||||
$smarty->assign("assetclass_name", $assetclass[0]['assetclass_name']);
|
$smarty->assign("assetclass_name", $assetclass[0]['assetclass_name']);
|
||||||
$smarty->assign("assetclass_selected", "");
|
$smarty->assign("assetclass_selected", "");
|
||||||
|
@ -55,9 +31,6 @@
|
||||||
$smarty->assign("assetclassgroup_name", $assetclass[0]['assetclassgroup_name']);
|
$smarty->assign("assetclassgroup_name", $assetclass[0]['assetclassgroup_name']);
|
||||||
$smarty->assign("assetclassgroup_color", $assetclass[0]['assetclassgroup_color']);
|
$smarty->assign("assetclassgroup_color", $assetclass[0]['assetclassgroup_color']);
|
||||||
|
|
||||||
// send to tpl
|
|
||||||
// setup asset
|
|
||||||
// build query
|
|
||||||
$query = "SELECT
|
$query = "SELECT
|
||||||
asset_id,
|
asset_id,
|
||||||
asset_name,
|
asset_name,
|
||||||
|
@ -69,14 +42,10 @@
|
||||||
ORDER BY
|
ORDER BY
|
||||||
asset_name";
|
asset_name";
|
||||||
|
|
||||||
// run query
|
|
||||||
$assets = $db->db_select($query);
|
$assets = $db->db_select($query);
|
||||||
$smarty->assign("assets", $assets);
|
$smarty->assign("assets", $assets);
|
||||||
|
|
||||||
// end page
|
|
||||||
// output
|
|
||||||
$smarty->display("assetclassview.tpl");
|
$smarty->display("assetclassview.tpl");
|
||||||
|
|
||||||
// footer
|
|
||||||
include("footer.php");
|
include("footer.php");
|
||||||
?>
|
?>
|
||||||
|
|
36
assetdel.php
36
assetdel.php
|
@ -1,40 +1,18 @@
|
||||||
<?php
|
<?php
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
IP Reg, a PHP/MySQL IPAM tool
|
IP Reg, a PHP/MySQL IPAM tool
|
||||||
Copyright (C) 2007-2009 Wietse Warendorff
|
Copyright (C) 2007-2009 Wietse Warendorff (up to v0.5)
|
||||||
|
Copyright (C) 2011-2023 Thomas Hooge
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
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 this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
For more information, visit http://sourceforge.net/projects/ipreg,
|
|
||||||
or contact me at wietsew@users.sourceforge.net
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
// start page
|
|
||||||
// includes
|
|
||||||
include("includes.php");
|
include("includes.php");
|
||||||
|
|
||||||
// get id
|
|
||||||
$asset_id = sanitize($_GET['asset_id']);
|
$asset_id = sanitize($_GET['asset_id']);
|
||||||
|
|
||||||
// start output
|
|
||||||
include("header.php");
|
include("header.php");
|
||||||
|
|
||||||
// set language variables
|
|
||||||
$smarty->assign($lang);
|
|
||||||
|
|
||||||
// setup asset
|
|
||||||
// build query
|
|
||||||
$query = "SELECT
|
$query = "SELECT
|
||||||
asset_name
|
asset_name
|
||||||
FROM
|
FROM
|
||||||
|
@ -42,15 +20,11 @@
|
||||||
WHERE
|
WHERE
|
||||||
asset_id=" . $asset_id;
|
asset_id=" . $asset_id;
|
||||||
|
|
||||||
// run query
|
|
||||||
$asset = $db->db_select($query);
|
$asset = $db->db_select($query);
|
||||||
|
|
||||||
// send to tpl
|
|
||||||
$smarty->assign("asset_id", $asset_id);
|
$smarty->assign("asset_id", $asset_id);
|
||||||
$smarty->assign("asset_name", $asset[0]['asset_name']);
|
$smarty->assign("asset_name", $asset[0]['asset_name']);
|
||||||
|
|
||||||
// setup node
|
|
||||||
// build query
|
|
||||||
$query = "SELECT
|
$query = "SELECT
|
||||||
node_id,
|
node_id,
|
||||||
node_ip
|
node_ip
|
||||||
|
@ -61,14 +35,10 @@
|
||||||
ORDER BY
|
ORDER BY
|
||||||
INET_ATON(node_ip)";
|
INET_ATON(node_ip)";
|
||||||
|
|
||||||
// run query
|
|
||||||
$nodes = $db->db_select($query);
|
$nodes = $db->db_select($query);
|
||||||
$smarty->assign("nodes", $nodes);
|
$smarty->assign("nodes", $nodes);
|
||||||
|
|
||||||
// end page
|
|
||||||
// output
|
|
||||||
$smarty->display("assetdel.tpl");
|
$smarty->display("assetdel.tpl");
|
||||||
|
|
||||||
// footer
|
|
||||||
include("footer.php");
|
include("footer.php");
|
||||||
?>
|
?>
|
|
@ -1,40 +1,18 @@
|
||||||
<?php
|
<?php
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
IP Reg, a PHP/MySQL IPAM tool
|
IP Reg, a PHP/MySQL IPAM tool
|
||||||
Copyright (C) 2007-2009 Wietse Warendorff
|
Copyright (C) 2007-2009 Wietse Warendorff (up to v0.5)
|
||||||
|
Copyright (C) 2011-2023 Thomas Hooge
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
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 this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
For more information, visit http://sourceforge.net/projects/ipreg,
|
|
||||||
or contact me at wietsew@users.sourceforge.net
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
// start page
|
|
||||||
// includes
|
|
||||||
include("includes.php");
|
include("includes.php");
|
||||||
|
|
||||||
// get id
|
|
||||||
$asset_id = sanitize($_GET['asset_id']);
|
$asset_id = sanitize($_GET['asset_id']);
|
||||||
|
|
||||||
// start output
|
|
||||||
include("header.php");
|
include("header.php");
|
||||||
|
|
||||||
// set language variables
|
|
||||||
$smarty->assign($lang);
|
|
||||||
|
|
||||||
// setup asset
|
|
||||||
// build query
|
|
||||||
$query = "SELECT
|
$query = "SELECT
|
||||||
asset_id,
|
asset_id,
|
||||||
asset_name,
|
asset_name,
|
||||||
|
@ -46,17 +24,12 @@
|
||||||
WHERE
|
WHERE
|
||||||
asset_id=" . $asset_id;
|
asset_id=" . $asset_id;
|
||||||
|
|
||||||
// run query
|
|
||||||
$asset = $db->db_select($query);
|
$asset = $db->db_select($query);
|
||||||
$smarty->assign("asset", $asset[0]);
|
$smarty->assign("asset", $asset[0]);
|
||||||
|
|
||||||
// setup assetclass
|
|
||||||
$smarty->assign("assetclass_options", $db->options_assetclass());
|
$smarty->assign("assetclass_options", $db->options_assetclass());
|
||||||
|
|
||||||
// end page
|
|
||||||
// output
|
|
||||||
$smarty->display("assetedit.tpl");
|
$smarty->display("assetedit.tpl");
|
||||||
|
|
||||||
// footer
|
|
||||||
include("footer.php");
|
include("footer.php");
|
||||||
?>
|
?>
|
|
@ -1,40 +1,18 @@
|
||||||
<?php
|
<?php
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
IP Reg, a PHP/MySQL IPAM tool
|
IP Reg, a PHP/MySQL IPAM tool
|
||||||
Copyright (C) 2007-2009 Wietse Warendorff
|
Copyright (C) 2007-2009 Wietse Warendorff (up to v0.5)
|
||||||
|
Copyright (C) 2011-2023 Thomas Hooge
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
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 this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
For more information, visit http://sourceforge.net/projects/ipreg,
|
|
||||||
or contact me at wietsew@users.sourceforge.net
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
// start page
|
|
||||||
// includes
|
|
||||||
include("includes.php");
|
include("includes.php");
|
||||||
|
|
||||||
// get id
|
|
||||||
$asset_id = sanitize($_GET['asset_id']);
|
$asset_id = sanitize($_GET['asset_id']);
|
||||||
|
|
||||||
// start output
|
|
||||||
include("header.php");
|
include("header.php");
|
||||||
|
|
||||||
// set language variables
|
|
||||||
$smarty->assign($lang);
|
|
||||||
|
|
||||||
// setup asset
|
|
||||||
// build query
|
|
||||||
$query = "SELECT
|
$query = "SELECT
|
||||||
a.asset_name,
|
a.asset_name,
|
||||||
a.asset_hostname,
|
a.asset_hostname,
|
||||||
|
@ -46,10 +24,8 @@
|
||||||
WHERE
|
WHERE
|
||||||
a.asset_id=" . $asset_id;
|
a.asset_id=" . $asset_id;
|
||||||
|
|
||||||
// run query
|
|
||||||
$asset = $db->db_select($query);
|
$asset = $db->db_select($query);
|
||||||
|
|
||||||
// send to tpl
|
|
||||||
$smarty->assign("asset_id", $asset_id);
|
$smarty->assign("asset_id", $asset_id);
|
||||||
$smarty->assign("asset_name", $asset[0]['asset_name']);
|
$smarty->assign("asset_name", $asset[0]['asset_name']);
|
||||||
$smarty->assign("asset_hostname", $asset[0]['asset_hostname']);
|
$smarty->assign("asset_hostname", $asset[0]['asset_hostname']);
|
||||||
|
@ -58,8 +34,6 @@
|
||||||
$smarty->assign("assetclass_id", $asset[0]['assetclass_id']);
|
$smarty->assign("assetclass_id", $asset[0]['assetclass_id']);
|
||||||
$smarty->assign("assetclass_name", $asset[0]['assetclass_name']);
|
$smarty->assign("assetclass_name", $asset[0]['assetclass_name']);
|
||||||
|
|
||||||
// setup node
|
|
||||||
// build query
|
|
||||||
$query = "SELECT
|
$query = "SELECT
|
||||||
node_id,
|
node_id,
|
||||||
node_ip,
|
node_ip,
|
||||||
|
@ -71,14 +45,10 @@
|
||||||
ORDER BY
|
ORDER BY
|
||||||
INET_ATON(node_ip)";
|
INET_ATON(node_ip)";
|
||||||
|
|
||||||
// run query
|
|
||||||
$nodes = $db->db_select($query);
|
$nodes = $db->db_select($query);
|
||||||
$smarty->assign("nodes", $nodes);
|
$smarty->assign("nodes", $nodes);
|
||||||
|
|
||||||
// end page
|
|
||||||
// output
|
|
||||||
$smarty->display("assetview.tpl");
|
$smarty->display("assetview.tpl");
|
||||||
|
|
||||||
// footer
|
|
||||||
include("footer.php");
|
include("footer.php");
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -1,40 +1,19 @@
|
||||||
<?php
|
<?php
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
IP Reg, a PHP/MySQL IPAM tool
|
IP Reg, a PHP/MySQL IPAM tool
|
||||||
Copyright (C) 2007-2009 Wietse Warendorff
|
Copyright (C) 2007-2009 Wietse Warendorff (up to v0.5)
|
||||||
|
Copyright (C) 2011-2023 Thomas Hooge
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
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 this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
For more information, visit http://sourceforge.net/projects/ipreg,
|
|
||||||
or contact me at wietsew@users.sourceforge.net
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
// start page
|
|
||||||
// includes
|
|
||||||
include("includes.php");
|
include("includes.php");
|
||||||
|
|
||||||
// get ip and id
|
|
||||||
$node_ip = sanitize($_GET['node_ip']);
|
$node_ip = sanitize($_GET['node_ip']);
|
||||||
$subnet_id = sanitize($_GET['subnet_id']);
|
$subnet_id = sanitize($_GET['subnet_id']);
|
||||||
|
|
||||||
// start output
|
|
||||||
include("header.php");
|
include("header.php");
|
||||||
|
|
||||||
// set language variables
|
|
||||||
$smarty->assign($lang);
|
|
||||||
|
|
||||||
// build query
|
|
||||||
$query = "SELECT
|
$query = "SELECT
|
||||||
subnet_address,
|
subnet_address,
|
||||||
subnet_mask
|
subnet_mask
|
||||||
|
@ -43,19 +22,14 @@
|
||||||
WHERE
|
WHERE
|
||||||
subnet_id=" . $subnet_id;
|
subnet_id=" . $subnet_id;
|
||||||
|
|
||||||
// run query
|
|
||||||
$subnet = $db->db_select($query);
|
$subnet = $db->db_select($query);
|
||||||
|
|
||||||
// send to tpl
|
|
||||||
$smarty->assign("subnet_id", $subnet_id);
|
$smarty->assign("subnet_id", $subnet_id);
|
||||||
$smarty->assign("subnet_address", $subnet[0]['subnet_address']);
|
$smarty->assign("subnet_address", $subnet[0]['subnet_address']);
|
||||||
$smarty->assign("subnet_mask", $subnet[0]['subnet_mask']);
|
$smarty->assign("subnet_mask", $subnet[0]['subnet_mask']);
|
||||||
$smarty->assign("node_ip", $node_ip);
|
$smarty->assign("node_ip", $node_ip);
|
||||||
|
|
||||||
// end page
|
|
||||||
// output
|
|
||||||
$smarty->display("assigniptonode.tpl");
|
$smarty->display("assigniptonode.tpl");
|
||||||
|
|
||||||
// end output
|
|
||||||
include("footer.php");
|
include("footer.php");
|
||||||
?>
|
?>
|
|
@ -1,46 +1,23 @@
|
||||||
<?php
|
<?php
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
IP Reg, a PHP/MySQL IPAM tool
|
IP Reg, a PHP/MySQL IPAM tool
|
||||||
Copyright (C) 2007-2009 Wietse Warendorff
|
Copyright (C) 2007-2009 Wietse Warendorff (up to v0.5)
|
||||||
|
Copyright (C) 2011-2023 Thomas Hooge
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
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 this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
For more information, visit http://sourceforge.net/projects/ipreg,
|
|
||||||
or contact me at wietsew@users.sourceforge.net
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
// start page
|
|
||||||
// includes
|
|
||||||
include("includes.php");
|
include("includes.php");
|
||||||
|
|
||||||
// get id
|
|
||||||
$asset_id = sanitize($_GET['asset_id']);
|
$asset_id = sanitize($_GET['asset_id']);
|
||||||
$node_ip = sanitize($_GET['node_ip']);
|
$node_ip = sanitize($_GET['node_ip']);
|
||||||
$subnet_id = sanitize($_GET['subnet_id']);
|
$subnet_id = sanitize($_GET['subnet_id']);
|
||||||
|
|
||||||
// start output
|
|
||||||
include("header.php");
|
include("header.php");
|
||||||
|
|
||||||
// set language variables
|
|
||||||
$smarty->assign($lang);
|
|
||||||
|
|
||||||
// to tpl
|
|
||||||
$smarty->assign("node_ip", $node_ip);
|
$smarty->assign("node_ip", $node_ip);
|
||||||
|
|
||||||
// setup asset
|
|
||||||
$smarty->assign("asset_id", $asset_id);
|
$smarty->assign("asset_id", $asset_id);
|
||||||
// build query
|
|
||||||
$query = "SELECT
|
$query = "SELECT
|
||||||
asset_id,
|
asset_id,
|
||||||
asset_name
|
asset_name
|
||||||
|
@ -49,31 +26,24 @@
|
||||||
ORDER BY
|
ORDER BY
|
||||||
asset_name";
|
asset_name";
|
||||||
|
|
||||||
// run query
|
|
||||||
$assets = $db->db_select($query);
|
$assets = $db->db_select($query);
|
||||||
foreach ($assets as $asset) {
|
foreach ($assets as $asset) {
|
||||||
$asset_options[$asset['asset_id']] = $asset['asset_name'];
|
$asset_options[$asset['asset_id']] = $asset['asset_name'];
|
||||||
}
|
}
|
||||||
$smarty->assign("asset_options", $asset_options);
|
$smarty->assign("asset_options", $asset_options);
|
||||||
|
|
||||||
// setup subnet
|
|
||||||
// build query
|
|
||||||
$query = "SELECT subnet_id,
|
$query = "SELECT subnet_id,
|
||||||
CONCAT_WS('/', subnet_address, subnet_mask) AS subnet_name
|
CONCAT_WS('/', subnet_address, subnet_mask) AS subnet_name
|
||||||
FROM subnet
|
FROM subnet
|
||||||
ORDER BY INET_ATON(subnet_address)";
|
ORDER BY INET_ATON(subnet_address)";
|
||||||
|
|
||||||
// run query
|
|
||||||
$subnets = $db->db_select($query);
|
$subnets = $db->db_select($query);
|
||||||
foreach ($subnets as $subnet) {
|
foreach ($subnets as $subnet) {
|
||||||
$subnet_options[$subnet['subnet_id']] = $subnet['subnet_name'];
|
$subnet_options[$subnet['subnet_id']] = $subnet['subnet_name'];
|
||||||
}
|
}
|
||||||
$smarty->assign("subnet_options", $subnet_options);
|
$smarty->assign("subnet_options", $subnet_options);
|
||||||
|
|
||||||
// end page
|
|
||||||
// output
|
|
||||||
$smarty->display("assignnodetoasset.tpl");
|
$smarty->display("assignnodetoasset.tpl");
|
||||||
|
|
||||||
// end output
|
|
||||||
include("footer.php");
|
include("footer.php");
|
||||||
?>
|
?>
|
26
comments.php
26
comments.php
|
@ -1,41 +1,21 @@
|
||||||
<?php
|
<?php
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
IP Reg, a PHP/MySQL IPAM tool
|
IP Reg, a PHP/MySQL IPAM tool
|
||||||
Copyright (C) 2007-2009 Wietse Warendorff
|
Copyright (C) 2007-2009 Wietse Warendorff (up to v0.5)
|
||||||
|
Copyright (C) 2011-2023 Thomas Hooge
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
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 this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
For more information, visit http://sourceforge.net/projects/ipreg,
|
|
||||||
or contact me at wietsew@users.sourceforge.net
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
// includes
|
|
||||||
include("includes.php");
|
include("includes.php");
|
||||||
|
|
||||||
// start output
|
|
||||||
include("header.php");
|
include("header.php");
|
||||||
|
|
||||||
// set language variables
|
|
||||||
$smarty->assign($lang);
|
|
||||||
|
|
||||||
// get error
|
|
||||||
$comments = sanitize($_GET['comments']);
|
$comments = sanitize($_GET['comments']);
|
||||||
|
|
||||||
// set veriables
|
|
||||||
$smarty->assign("comments", $lang['lang_comments_' . $comments]);
|
$smarty->assign("comments", $lang['lang_comments_' . $comments]);
|
||||||
|
|
||||||
// output
|
|
||||||
$smarty->display("comments.tpl");
|
$smarty->display("comments.tpl");
|
||||||
|
|
||||||
include("footer.php");
|
include("footer.php");
|
||||||
|
|
41
config.php
41
config.php
|
@ -1,41 +0,0 @@
|
||||||
<?php
|
|
||||||
/*****************************************************************************
|
|
||||||
IP Reg, a PHP/MySQL IPAM tool
|
|
||||||
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
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
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 this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
For more information, visit http://sourceforge.net/projects/ipreg,
|
|
||||||
or contact me at wietsew@users.sourceforge.net
|
|
||||||
*****************************************************************************/
|
|
||||||
|
|
||||||
// version
|
|
||||||
$config_version = 'v0.7';
|
|
||||||
|
|
||||||
// db connection
|
|
||||||
$config_mysql_host = 'localhost';
|
|
||||||
$config_mysql_username = 'ipreg';
|
|
||||||
$config_mysql_password = 'changeme!';
|
|
||||||
$config_mysql_dbname = 'ipreg';
|
|
||||||
|
|
||||||
// default values for IP blocks
|
|
||||||
$config_color_blocked = 'dcdcdc';
|
|
||||||
$config_color_unused = 'ffffff';
|
|
||||||
$config_color_dynamic = 'e0e0e0';
|
|
||||||
|
|
||||||
// language
|
|
||||||
$config_lang = array('de', 'en');
|
|
||||||
$config_lang_default = 'en';
|
|
||||||
|
|
||||||
?>
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
<?php
|
||||||
|
/*****************************************************************************
|
||||||
|
IP Reg, a PHP/MySQL IPAM tool
|
||||||
|
Copyright (C) 2007-2009 Wietse Warendorff (up to v0.5)
|
||||||
|
Copyright (C) 2011-2023 Thomas Hooge
|
||||||
|
|
||||||
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
|
// version
|
||||||
|
$config_version = 'v0.7';
|
||||||
|
|
||||||
|
// db connection
|
||||||
|
$config_mysql_host = 'localhost';
|
||||||
|
$config_mysql_username = 'ipreg';
|
||||||
|
$config_mysql_password = 'changeme!';
|
||||||
|
$config_mysql_dbname = 'ipreg';
|
||||||
|
|
||||||
|
// default values for IP blocks
|
||||||
|
$config_color_blocked = 'dcdcdc';
|
||||||
|
$config_color_unused = 'ffffff';
|
||||||
|
$config_color_dynamic = 'e0e0e0';
|
||||||
|
|
||||||
|
// language
|
||||||
|
$config_lang = array('de', 'en');
|
||||||
|
$config_lang_default = 'en';
|
||||||
|
|
||||||
|
?>
|
|
@ -1,28 +1,13 @@
|
||||||
<?php
|
<?php
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
IP Reg, a PHP/MySQL IPAM tool
|
IP Reg, a PHP/MySQL IPAM tool
|
||||||
Copyright (C) 2007-2009 Wietse Warendorff
|
Copyright (C) 2007-2009 Wietse Warendorff (up to v0.5)
|
||||||
|
Copyright (C) 2011-2023 Thomas Hooge
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
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 this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
For more information, visit http://sourceforge.net/projects/ipreg,
|
|
||||||
or contact me at wietsew@users.sourceforge.net
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
// build connection
|
|
||||||
$dblink = mysqli_connect($config_mysql_host,$config_mysql_username,$config_mysql_password);
|
$dblink = mysqli_connect($config_mysql_host,$config_mysql_username,$config_mysql_password);
|
||||||
|
|
||||||
// select db
|
|
||||||
mysqli_select_db($dblink, $config_mysql_dbname);
|
mysqli_select_db($dblink, $config_mysql_dbname);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
24
footer.php
24
footer.php
|
@ -1,31 +1,13 @@
|
||||||
<?php
|
<?php
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
IP Reg, a PHP/MySQL IPAM tool
|
IP Reg, a PHP/MySQL IPAM tool
|
||||||
Copyright (C) 2007-2009 Wietse Warendorff
|
Copyright (C) 2007-2009 Wietse Warendorff (up to v0.5)
|
||||||
|
Copyright (C) 2011-2023 Thomas Hooge
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
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 this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
For more information, visit http://sourceforge.net/projects/ipreg,
|
|
||||||
or contact me at wietsew@users.sourceforge.net
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
// start page
|
|
||||||
|
|
||||||
// get version for the footer-stamp
|
|
||||||
$smarty->assign("config_version", $config_version);
|
$smarty->assign("config_version", $config_version);
|
||||||
|
|
||||||
// end page
|
|
||||||
// output
|
|
||||||
$smarty->display("footer.tpl");
|
$smarty->display("footer.tpl");
|
||||||
?>
|
?>
|
34
header.php
34
header.php
|
@ -1,53 +1,27 @@
|
||||||
<?php
|
<?php
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
IP Reg, a PHP/MySQL IPAM tool
|
IP Reg, a PHP/MySQL IPAM tool
|
||||||
Copyright (C) 2007-2009 Wietse Warendorff
|
Copyright (C) 2007-2009 Wietse Warendorff (up to v0.5)
|
||||||
|
Copyright (C) 2011-2023 Thomas Hooge
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
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 this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
For more information, visit http://sourceforge.net/projects/ipreg,
|
|
||||||
or contact me at wietsew@users.sourceforge.net
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
// start page
|
|
||||||
// include language file
|
|
||||||
include('lang/' . $_SESSION['suser_language'] . '.php');
|
include('lang/' . $_SESSION['suser_language'] . '.php');
|
||||||
|
|
||||||
// set language variables
|
|
||||||
$smarty->assign($lang);
|
$smarty->assign($lang);
|
||||||
|
|
||||||
// search box
|
// search box
|
||||||
// new search?
|
|
||||||
if (isset($_POST['search'])) {
|
if (isset($_POST['search'])) {
|
||||||
// set var
|
|
||||||
$search = sanitize($_POST['search']);
|
$search = sanitize($_POST['search']);
|
||||||
|
|
||||||
// store var
|
|
||||||
$_SESSION['search'] = $search;
|
$_SESSION['search'] = $search;
|
||||||
} else {
|
} else {
|
||||||
// check for stored var
|
|
||||||
if (isset($_SESSION['search'])) {
|
if (isset($_SESSION['search'])) {
|
||||||
// set var
|
|
||||||
$search = $_SESSION['search'];
|
$search = $_SESSION['search'];
|
||||||
} else {
|
} else {
|
||||||
// empty var
|
|
||||||
$search = '';
|
$search = '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// to tpl
|
|
||||||
// set global template vars
|
|
||||||
$smarty->assign("config_version", $config_version);
|
$smarty->assign("config_version", $config_version);
|
||||||
$smarty->assign("suser_name", $_SESSION['suser_displayname']);
|
$smarty->assign("suser_name", $_SESSION['suser_displayname']);
|
||||||
$smarty->assign("search", $search);
|
$smarty->assign("search", $search);
|
||||||
|
@ -63,7 +37,5 @@
|
||||||
$smarty->assign("menu_vlans", $_SESSION['suser_menu_vlans']=='on');
|
$smarty->assign("menu_vlans", $_SESSION['suser_menu_vlans']=='on');
|
||||||
$smarty->assign("menu_zones", $_SESSION['suser_menu_zones']=='on');
|
$smarty->assign("menu_zones", $_SESSION['suser_menu_zones']=='on');
|
||||||
|
|
||||||
// end page
|
|
||||||
// output
|
|
||||||
$smarty->display("header.tpl");
|
$smarty->display("header.tpl");
|
||||||
?>
|
?>
|
34
image.php
34
image.php
|
@ -1,35 +1,17 @@
|
||||||
<?php
|
<?php
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
IP Reg, a PHP/MySQL IPAM tool
|
IP Reg, a PHP/MySQL IPAM tool
|
||||||
Copyright (C) 2007-2009 Wietse Warendorff
|
Copyright (C) 2007-2009 Wietse Warendorff (up to v0.5)
|
||||||
|
Copyright (C) 2011-2023 Thomas Hooge
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
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 this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
For more information, visit http://sourceforge.net/projects/ipreg,
|
|
||||||
or contact me at wietsew@users.sourceforge.net
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
// start page
|
|
||||||
// includes
|
|
||||||
include("includes.php");
|
include("includes.php");
|
||||||
|
|
||||||
// icon image
|
|
||||||
if(isset($_GET['icon'])) {
|
if(isset($_GET['icon'])) {
|
||||||
// get desired image
|
|
||||||
$icon = sanitize($_GET['icon']);
|
$icon = sanitize($_GET['icon']);
|
||||||
|
|
||||||
// switch selected
|
|
||||||
switch($icon) {
|
switch($icon) {
|
||||||
case ("add") :
|
case ("add") :
|
||||||
$png = 'page_add';
|
$png = 'page_add';
|
||||||
|
@ -72,36 +54,26 @@
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// get image
|
|
||||||
$image = imagecreatefrompng("images/" . $png . ".png");
|
$image = imagecreatefrompng("images/" . $png . ".png");
|
||||||
|
|
||||||
// alpha blending
|
|
||||||
imagealphablending($image, true);
|
imagealphablending($image, true);
|
||||||
|
|
||||||
// save alphablending setting
|
|
||||||
imagesavealpha($image, true);
|
imagesavealpha($image, true);
|
||||||
|
|
||||||
// display image
|
|
||||||
header('Content-type: image/png');
|
header('Content-type: image/png');
|
||||||
imagepng($image);
|
imagepng($image);
|
||||||
imagedestroy($image);
|
imagedestroy($image);
|
||||||
}
|
}
|
||||||
|
|
||||||
// colored block
|
|
||||||
if(isset($_GET['color'])) {
|
if(isset($_GET['color'])) {
|
||||||
// get desired color
|
|
||||||
$color = sanitize($_GET['color']);
|
$color = sanitize($_GET['color']);
|
||||||
|
|
||||||
// create base image
|
|
||||||
$image = imagecreatetruecolor($_SESSION['suser_imagesize'], $_SESSION['suser_imagesize']);
|
$image = imagecreatetruecolor($_SESSION['suser_imagesize'], $_SESSION['suser_imagesize']);
|
||||||
|
|
||||||
// build color
|
|
||||||
$color = imagecolorallocate($image, hexdec(substr($color,0,2)), hexdec(substr($color,2,2)), hexdec(substr($color,4,2)));
|
$color = imagecolorallocate($image, hexdec(substr($color,0,2)), hexdec(substr($color,2,2)), hexdec(substr($color,4,2)));
|
||||||
|
|
||||||
// fill image with color
|
|
||||||
imagefill($image, 0, 0, $color);
|
imagefill($image, 0, 0, $color);
|
||||||
|
|
||||||
// display image
|
|
||||||
header('Content-type: image/png');
|
header('Content-type: image/png');
|
||||||
imagepng($image);
|
imagepng($image);
|
||||||
imagedestroy($image);
|
imagedestroy($image);
|
||||||
|
|
30
includes.php
30
includes.php
|
@ -1,50 +1,26 @@
|
||||||
<?php
|
<?php
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
IP Reg, a PHP/MySQL IPAM tool
|
IP Reg, a PHP/MySQL IPAM tool
|
||||||
Copyright (C) 2007-2009 Wietse Warendorff
|
Copyright (C) 2007-2009 Wietse Warendorff (up to v0.5)
|
||||||
|
Copyright (C) 2011-2023 Thomas Hooge
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
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 this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
For more information, visit http://sourceforge.net/projects/ipreg,
|
|
||||||
or contact me at wietsew@users.sourceforge.net
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
// session
|
|
||||||
// start session
|
|
||||||
session_name('ipreg');
|
session_name('ipreg');
|
||||||
session_start();
|
session_start();
|
||||||
|
|
||||||
// check for user_id, if unnkown, redirect to login
|
// check for user_id, if unnkown, redirect to login
|
||||||
if(empty($_SESSION['suser_id'])) {
|
if(empty($_SESSION['suser_id'])) {
|
||||||
// redirect
|
|
||||||
header("Location: login.php");
|
header("Location: login.php");
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
// headers
|
|
||||||
// raw http headers
|
|
||||||
header("Content-Type: text/html; charset=utf-8");
|
|
||||||
|
|
||||||
// includes
|
|
||||||
// includes
|
|
||||||
include("config.php");
|
include("config.php");
|
||||||
include("dbconnect.php");
|
include("dbconnect.php");
|
||||||
|
|
||||||
// load lib
|
|
||||||
include("lib.php");
|
include("lib.php");
|
||||||
|
|
||||||
// set language
|
|
||||||
$language = lang_getfrombrowser($config_lang, $config_lang_default, null, false);
|
$language = lang_getfrombrowser($config_lang, $config_lang_default, null, false);
|
||||||
|
|
||||||
?>
|
?>
|
67
index.php
67
index.php
|
@ -1,118 +1,69 @@
|
||||||
<?php
|
<?php
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
IP Reg, a PHP/MySQL IPAM tool
|
IP Reg, a PHP/MySQL IPAM tool
|
||||||
Copyright (C) 2007-2009 Wietse Warendorff
|
Copyright (C) 2007-2009 Wietse Warendorff (up to v0.5)
|
||||||
|
Copyright (C) 2011-2023 Thomas Hooge
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
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 this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
For more information, visit http://sourceforge.net/projects/ipreg,
|
|
||||||
or contact me at wietsew@users.sourceforge.net
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
// start page
|
|
||||||
// includes
|
|
||||||
include("includes.php");
|
include("includes.php");
|
||||||
|
|
||||||
// start output
|
|
||||||
include("header.php");
|
include("header.php");
|
||||||
|
|
||||||
// set language variables
|
// asset
|
||||||
$smarty->assign($lang);
|
|
||||||
|
|
||||||
// setup asset
|
|
||||||
// build query
|
|
||||||
$query = "SELECT
|
$query = "SELECT
|
||||||
COUNT(asset_id) AS asset_counter
|
COUNT(asset_id) AS asset_counter
|
||||||
FROM
|
FROM
|
||||||
asset";
|
asset";
|
||||||
|
|
||||||
// run query
|
|
||||||
$assets = $db->db_select($query);
|
$assets = $db->db_select($query);
|
||||||
|
|
||||||
// counter to tpl
|
|
||||||
$smarty->assign("asset_counter", $assets[0]['asset_counter']);
|
$smarty->assign("asset_counter", $assets[0]['asset_counter']);
|
||||||
|
|
||||||
// setup location
|
// location
|
||||||
// build query
|
|
||||||
$query = "SELECT
|
$query = "SELECT
|
||||||
COUNT(location_id) AS location_counter
|
COUNT(location_id) AS location_counter
|
||||||
FROM
|
FROM
|
||||||
location";
|
location";
|
||||||
|
|
||||||
// run query
|
|
||||||
$locations = $db->db_select($query);
|
$locations = $db->db_select($query);
|
||||||
|
|
||||||
// counter to tpl
|
|
||||||
$smarty->assign("location_counter", $locations[0]['location_counter']);
|
$smarty->assign("location_counter", $locations[0]['location_counter']);
|
||||||
|
|
||||||
// setup node
|
// node
|
||||||
// build query
|
|
||||||
$query = "SELECT
|
$query = "SELECT
|
||||||
COUNT(node_id) AS node_counter
|
COUNT(node_id) AS node_counter
|
||||||
FROM
|
FROM
|
||||||
node";
|
node";
|
||||||
|
|
||||||
// run query
|
|
||||||
$nodes = $db->db_select($query);
|
$nodes = $db->db_select($query);
|
||||||
|
|
||||||
// counter to tpl
|
|
||||||
$smarty->assign("node_counter", $nodes[0]['node_counter']);
|
$smarty->assign("node_counter", $nodes[0]['node_counter']);
|
||||||
|
|
||||||
// setup subnet
|
// subnet
|
||||||
// build query
|
|
||||||
$query = "SELECT
|
$query = "SELECT
|
||||||
COUNT(subnet_id) AS subnet_counter
|
COUNT(subnet_id) AS subnet_counter
|
||||||
FROM
|
FROM
|
||||||
subnet";
|
subnet";
|
||||||
|
|
||||||
// run query
|
|
||||||
$subnets = $db->db_select($query);
|
$subnets = $db->db_select($query);
|
||||||
|
|
||||||
// counter to tpl
|
|
||||||
$smarty->assign("subnet_counter", $subnets[0]['subnet_counter']);
|
$smarty->assign("subnet_counter", $subnets[0]['subnet_counter']);
|
||||||
|
|
||||||
// setup vlan
|
// vlan
|
||||||
// build query
|
|
||||||
$query = "SELECT
|
$query = "SELECT
|
||||||
COUNT(vlan_id) AS vlan_counter
|
COUNT(vlan_id) AS vlan_counter
|
||||||
FROM
|
FROM
|
||||||
vlan";
|
vlan";
|
||||||
|
|
||||||
// run query
|
|
||||||
$vlans = $db->db_select($query);
|
$vlans = $db->db_select($query);
|
||||||
|
|
||||||
// counter to tpl
|
|
||||||
$smarty->assign("vlan_counter", $vlans[0]['vlan_counter']);
|
$smarty->assign("vlan_counter", $vlans[0]['vlan_counter']);
|
||||||
|
|
||||||
// setup zone
|
// zone
|
||||||
// build query
|
|
||||||
$query = "SELECT
|
$query = "SELECT
|
||||||
COUNT(zone_id) AS zone_counter
|
COUNT(zone_id) AS zone_counter
|
||||||
FROM
|
FROM
|
||||||
zone";
|
zone";
|
||||||
|
|
||||||
// run query
|
|
||||||
$zones = $db->db_select($query);
|
$zones = $db->db_select($query);
|
||||||
|
|
||||||
// counter to tpl
|
|
||||||
$smarty->assign("zone_counter", $zones[0]['zone_counter']);
|
$smarty->assign("zone_counter", $zones[0]['zone_counter']);
|
||||||
|
|
||||||
|
|
||||||
// end page
|
|
||||||
// output
|
|
||||||
$smarty->display("index.tpl");
|
$smarty->display("index.tpl");
|
||||||
|
|
||||||
// footer
|
|
||||||
include("footer.php");
|
include("footer.php");
|
||||||
?>
|
?>
|
31
lib.php
31
lib.php
|
@ -1,48 +1,25 @@
|
||||||
<?php
|
<?php
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
IP Reg, a PHP/MySQL IPAM tool
|
IP Reg, a PHP/MySQL IPAM tool
|
||||||
Copyright (C) 2007-2009 Wietse Warendorff
|
Copyright (C) 2007-2009 Wietse Warendorff (up to v0.5)
|
||||||
|
Copyright (C) 2011-2023 Thomas Hooge
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
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 this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
For more information, visit http://sourceforge.net/projects/ipreg,
|
|
||||||
or contact me at wietsew@users.sourceforge.net
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
// functions
|
|
||||||
include("lib/functions.php");
|
include("lib/functions.php");
|
||||||
|
|
||||||
// classes
|
|
||||||
// db
|
|
||||||
// load class
|
|
||||||
require("lib/db.class.php");
|
require("lib/db.class.php");
|
||||||
|
|
||||||
// create instance
|
|
||||||
$db = new Db($dblink);
|
$db = new Db($dblink);
|
||||||
|
|
||||||
// user
|
|
||||||
// load class
|
|
||||||
require("lib/user.class.php");
|
require("lib/user.class.php");
|
||||||
|
|
||||||
// create instance
|
|
||||||
$user = new User();
|
$user = new User();
|
||||||
|
|
||||||
// tpl
|
|
||||||
require_once('smarty3/Smarty.class.php');
|
require_once('smarty3/Smarty.class.php');
|
||||||
$smarty = new Smarty();
|
$smarty = new Smarty();
|
||||||
$smarty->template_dir = 'tpl';
|
$smarty->template_dir = 'tpl';
|
||||||
$smarty->compile_dir = 'tpl_c';
|
$smarty->compile_dir = 'tpl_c';
|
||||||
$smarty->registerPlugin('function', 'treelist', 'print_tree');
|
$smarty->registerPlugin('function', 'treelist', 'print_tree');
|
||||||
$smarty->assign("suser_tooltips", $_SESSION['suser_tooltips']);
|
$smarty->assign("suser_tooltips", $_SESSION['suser_tooltips']);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
34
location.php
34
location.php
|
@ -1,38 +1,16 @@
|
||||||
<?php
|
<?php
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
IP Reg, a PHP/MySQL IPAM tool
|
IP Reg, a PHP/MySQL IPAM tool
|
||||||
Copyright (C) 2007-2009 Wietse Warendorff
|
Copyright (C) 2007-2009 Wietse Warendorff (up to v0.5)
|
||||||
|
Copyright (C) 2011-2023 Thomas Hooge
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
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 this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
For more information, visit http://sourceforge.net/projects/ipreg,
|
|
||||||
or contact me at wietsew@users.sourceforge.net
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
// start page
|
|
||||||
// includes
|
|
||||||
include("includes.php");
|
include("includes.php");
|
||||||
|
|
||||||
// start output
|
|
||||||
include("header.php");
|
include("header.php");
|
||||||
|
|
||||||
// set language variables
|
|
||||||
$smarty->assign($lang);
|
|
||||||
|
|
||||||
// start location
|
|
||||||
// look for locations
|
|
||||||
// build query
|
|
||||||
$query = "SELECT
|
$query = "SELECT
|
||||||
location_id AS id,
|
location_id AS id,
|
||||||
location_name AS value,
|
location_name AS value,
|
||||||
|
@ -41,9 +19,9 @@
|
||||||
location
|
location
|
||||||
ORDER BY location_parent, location_sort, location_name";
|
ORDER BY location_parent, location_sort, location_name";
|
||||||
|
|
||||||
// run query
|
|
||||||
$locations = $db->db_select($query);
|
$locations = $db->db_select($query);
|
||||||
|
|
||||||
|
// function for recursion
|
||||||
function build_tree($parent_id, $level) {
|
function build_tree($parent_id, $level) {
|
||||||
global $locations;
|
global $locations;
|
||||||
$children = array();
|
$children = array();
|
||||||
|
@ -58,13 +36,11 @@
|
||||||
}
|
}
|
||||||
return $children;
|
return $children;
|
||||||
}
|
}
|
||||||
|
|
||||||
$tree = build_tree(0, 0);
|
$tree = build_tree(0, 0);
|
||||||
$smarty->assign("locations", $tree);
|
$smarty->assign("locations", $tree);
|
||||||
|
|
||||||
// end page
|
|
||||||
// output
|
|
||||||
$smarty->display("location.tpl");
|
$smarty->display("location.tpl");
|
||||||
|
|
||||||
// footer
|
|
||||||
include("footer.php");
|
include("footer.php");
|
||||||
?>
|
?>
|
|
@ -1,56 +1,29 @@
|
||||||
<?php
|
<?php
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
IP Reg, a PHP/MySQL IPAM tool
|
IP Reg, a PHP/MySQL IPAM tool
|
||||||
Copyright (C) 2007-2009 Wietse Warendorff
|
Copyright (C) 2007-2009 Wietse Warendorff (up to v0.5)
|
||||||
|
Copyright (C) 2011-2023 Thomas Hooge
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
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 this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
For more information, visit http://sourceforge.net/projects/ipreg,
|
|
||||||
or contact me at wietsew@users.sourceforge.net
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
// start page
|
|
||||||
// includes
|
|
||||||
include("includes.php");
|
include("includes.php");
|
||||||
|
|
||||||
// get id
|
|
||||||
$location_parent = sanitize($_GET['location_parent']);
|
$location_parent = sanitize($_GET['location_parent']);
|
||||||
|
|
||||||
// start output
|
|
||||||
include("header.php");
|
include("header.php");
|
||||||
|
|
||||||
// set language variables
|
|
||||||
$smarty->assign($lang);
|
|
||||||
|
|
||||||
|
|
||||||
// ************* <option value="0">{$lang_option_none}</option>
|
// ************* <option value="0">{$lang_option_none}</option>
|
||||||
|
|
||||||
|
|
||||||
// start parent
|
|
||||||
// look for locations
|
|
||||||
// build query
|
|
||||||
$query = "SELECT location_id, location_name, location_parent, location_sort
|
$query = "SELECT location_id, location_name, location_parent, location_sort
|
||||||
FROM location
|
FROM location
|
||||||
ORDER BY location_parent, location_sort, location_name";
|
ORDER BY location_parent, location_sort, location_name";
|
||||||
|
|
||||||
// run query
|
|
||||||
$locations = $db->db_select($query);
|
$locations = $db->db_select($query);
|
||||||
|
|
||||||
// count results
|
|
||||||
$location_counter = count($locations);
|
$location_counter = count($locations);
|
||||||
|
|
||||||
// any loactions?
|
|
||||||
if ($location_counter>0) {
|
if ($location_counter>0) {
|
||||||
// get objects
|
// get objects
|
||||||
foreach ($locations AS $location) {
|
foreach ($locations AS $location) {
|
||||||
|
@ -91,7 +64,6 @@
|
||||||
checkchildren($child, $level+1);
|
checkchildren($child, $level+1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$tree = location($parents);
|
$tree = location($parents);
|
||||||
|
@ -100,10 +72,7 @@
|
||||||
$smarty->assign("location_options", $location_options);
|
$smarty->assign("location_options", $location_options);
|
||||||
$smarty->assign("location_parent", $location_parent);
|
$smarty->assign("location_parent", $location_parent);
|
||||||
|
|
||||||
// end page
|
|
||||||
// output
|
|
||||||
$smarty->display("locationadd.tpl");
|
$smarty->display("locationadd.tpl");
|
||||||
|
|
||||||
// footer
|
|
||||||
include("footer.php");
|
include("footer.php");
|
||||||
?>
|
?>
|
|
@ -1,40 +1,18 @@
|
||||||
<?php
|
<?php
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
IP Reg, a PHP/MySQL IPAM tool
|
IP Reg, a PHP/MySQL IPAM tool
|
||||||
Copyright (C) 2007-2009 Wietse Warendorff
|
Copyright (C) 2007-2009 Wietse Warendorff (up to v0.5)
|
||||||
|
Copyright (C) 2011-2023 Thomas Hooge
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
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 this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
For more information, visit http://sourceforge.net/projects/ipreg,
|
|
||||||
or contact me at wietsew@users.sourceforge.net
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
// start page
|
|
||||||
// includes
|
|
||||||
include("includes.php");
|
include("includes.php");
|
||||||
|
|
||||||
// get id
|
|
||||||
$location_id = sanitize($_GET['location_id']);
|
$location_id = sanitize($_GET['location_id']);
|
||||||
|
|
||||||
// start output
|
|
||||||
include("header.php");
|
include("header.php");
|
||||||
|
|
||||||
// set language variables
|
|
||||||
$smarty->assign($lang);
|
|
||||||
|
|
||||||
// setup location
|
|
||||||
// build query
|
|
||||||
$query = "SELECT
|
$query = "SELECT
|
||||||
location_name
|
location_name
|
||||||
FROM
|
FROM
|
||||||
|
@ -42,17 +20,12 @@
|
||||||
WHERE
|
WHERE
|
||||||
location_id=" . $location_id;
|
location_id=" . $location_id;
|
||||||
|
|
||||||
// run query
|
|
||||||
$location = $db->db_select($query);
|
$location = $db->db_select($query);
|
||||||
|
|
||||||
// send to tpl
|
|
||||||
$smarty->assign("location_id", $location_id);
|
$smarty->assign("location_id", $location_id);
|
||||||
$smarty->assign("location_name", $location[0]['location_name']);
|
$smarty->assign("location_name", $location[0]['location_name']);
|
||||||
|
|
||||||
// end page
|
|
||||||
// output
|
|
||||||
$smarty->display("locationdel.tpl");
|
$smarty->display("locationdel.tpl");
|
||||||
|
|
||||||
// footer
|
|
||||||
include("footer.php");
|
include("footer.php");
|
||||||
?>
|
?>
|
|
@ -1,40 +1,19 @@
|
||||||
<?php
|
<?php
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
IP Reg, a PHP/MySQL IPAM tool
|
IP Reg, a PHP/MySQL IPAM tool
|
||||||
Copyright (C) 2007-2009 Wietse Warendorff
|
Copyright (C) 2007-2009 Wietse Warendorff (up to v0.5)
|
||||||
|
Copyright (C) 2011-2023 Thomas Hooge
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
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 this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
For more information, visit http://sourceforge.net/projects/ipreg,
|
|
||||||
or contact me at wietsew@users.sourceforge.net
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
// start page
|
|
||||||
// includes
|
|
||||||
include("includes.php");
|
include("includes.php");
|
||||||
|
|
||||||
// get id
|
|
||||||
$location_id = sanitize($_GET['location_id']);
|
$location_id = sanitize($_GET['location_id']);
|
||||||
|
|
||||||
// start output
|
|
||||||
include("header.php");
|
include("header.php");
|
||||||
|
|
||||||
// set language variables
|
// location
|
||||||
$smarty->assign($lang);
|
|
||||||
|
|
||||||
// setup location
|
|
||||||
// build query
|
|
||||||
$query = "SELECT
|
$query = "SELECT
|
||||||
location_name,
|
location_name,
|
||||||
location_parent,
|
location_parent,
|
||||||
|
@ -43,23 +22,18 @@
|
||||||
FROM
|
FROM
|
||||||
location
|
location
|
||||||
WHERE
|
WHERE
|
||||||
location.location_id=" . $location_id;
|
location_id=" . $location_id;
|
||||||
|
|
||||||
// run query
|
|
||||||
$location = $db->db_select($query);
|
$location = $db->db_select($query);
|
||||||
|
|
||||||
// get parent
|
|
||||||
$location_parent = $location[0]['location_parent'];
|
$location_parent = $location[0]['location_parent'];
|
||||||
|
|
||||||
// send to tpl
|
|
||||||
$smarty->assign("location_id", $location_id);
|
$smarty->assign("location_id", $location_id);
|
||||||
$smarty->assign("location_name", $location[0]['location_name']);
|
$smarty->assign("location_name", $location[0]['location_name']);
|
||||||
$smarty->assign("location_info", $location[0]['location_info']);
|
$smarty->assign("location_info", $location[0]['location_info']);
|
||||||
$smarty->assign("location_sort", $location[0]['location_sort']);
|
$smarty->assign("location_sort", $location[0]['location_sort']);
|
||||||
|
|
||||||
// setup parent location
|
// parent location
|
||||||
// look for locations
|
|
||||||
// build query
|
|
||||||
$query = "SELECT
|
$query = "SELECT
|
||||||
location_id,
|
location_id,
|
||||||
location_name,
|
location_name,
|
||||||
|
@ -69,22 +43,17 @@
|
||||||
WHERE
|
WHERE
|
||||||
location_id != " . $location_id . "
|
location_id != " . $location_id . "
|
||||||
ORDER BY
|
ORDER BY
|
||||||
location.location_name";
|
location_name";
|
||||||
|
|
||||||
// run query
|
|
||||||
$locations = $db->db_select($query);
|
$locations = $db->db_select($query);
|
||||||
|
|
||||||
// count results
|
|
||||||
$location_counter = count($locations);
|
$location_counter = count($locations);
|
||||||
|
|
||||||
// counter to tpl
|
|
||||||
$smarty->assign("location_counter", $location_counter);
|
$smarty->assign("location_counter", $location_counter);
|
||||||
|
|
||||||
// any loactions?
|
// any loactions?
|
||||||
if ($location_counter>0) {
|
if ($location_counter>0) {
|
||||||
// get objects
|
|
||||||
foreach($locations AS $location) {
|
foreach($locations AS $location) {
|
||||||
// create arrays
|
|
||||||
$location_names[$location['location_id']] = $location['location_name'];
|
$location_names[$location['location_id']] = $location['location_name'];
|
||||||
$parents[$location['location_parent']][] = $location['location_id'];
|
$parents[$location['location_parent']][] = $location['location_id'];
|
||||||
}
|
}
|
||||||
|
@ -129,11 +98,7 @@
|
||||||
$smarty->assign("location_options", $location_options);
|
$smarty->assign("location_options", $location_options);
|
||||||
$smarty->assign("location_parent", $location_parent);
|
$smarty->assign("location_parent", $location_parent);
|
||||||
|
|
||||||
|
|
||||||
// end page
|
|
||||||
// output
|
|
||||||
$smarty->display("locationedit.tpl");
|
$smarty->display("locationedit.tpl");
|
||||||
|
|
||||||
// end output
|
|
||||||
include("footer.php");
|
include("footer.php");
|
||||||
?>
|
?>
|
|
@ -1,40 +1,18 @@
|
||||||
<?php
|
<?php
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
IP Reg, a PHP/MySQL IPAM tool
|
IP Reg, a PHP/MySQL IPAM tool
|
||||||
Copyright (C) 2007-2009 Wietse Warendorff
|
Copyright (C) 2007-2009 Wietse Warendorff (up to v0.5)
|
||||||
|
Copyright (C) 2011-2023 Thomas Hooge
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
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 this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
For more information, visit http://sourceforge.net/projects/ipreg,
|
|
||||||
or contact me at wietsew@users.sourceforge.net
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
// start page
|
|
||||||
// includes
|
|
||||||
include("includes.php");
|
include("includes.php");
|
||||||
|
|
||||||
// get ip and id
|
|
||||||
$location_id = sanitize($_GET['location_id']);
|
$location_id = sanitize($_GET['location_id']);
|
||||||
|
|
||||||
// start output
|
|
||||||
include("header.php");
|
include("header.php");
|
||||||
|
|
||||||
// set language variables
|
|
||||||
$smarty->assign($lang);
|
|
||||||
|
|
||||||
// setup location
|
|
||||||
// build query
|
|
||||||
$query = "SELECT
|
$query = "SELECT
|
||||||
location_name
|
location_name
|
||||||
FROM
|
FROM
|
||||||
|
@ -42,19 +20,12 @@
|
||||||
WHERE
|
WHERE
|
||||||
location_id=" . $location_id;
|
location_id=" . $location_id;
|
||||||
|
|
||||||
// run query
|
|
||||||
$location = $db->db_select($query);
|
$location = $db->db_select($query);
|
||||||
|
|
||||||
$smarty->assign("location_id", $location_id);
|
$smarty->assign("location_id", $location_id);
|
||||||
$smarty->assign("location_name", $location[0]['location_name']);
|
$smarty->assign("location_name", $location[0]['location_name']);
|
||||||
|
|
||||||
// setup subnet
|
|
||||||
$smarty->assign("subnet_options", $db->options_subnet());
|
$smarty->assign("subnet_options", $db->options_subnet());
|
||||||
|
|
||||||
// end page
|
|
||||||
// output
|
|
||||||
$smarty->display("locationsubnetadd.tpl");
|
$smarty->display("locationsubnetadd.tpl");
|
||||||
|
|
||||||
// end output
|
|
||||||
include("footer.php");
|
include("footer.php");
|
||||||
?>
|
?>
|
|
@ -1,76 +1,47 @@
|
||||||
<?php
|
<?php
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
IP Reg, a PHP/MySQL IPAM tool
|
IP Reg, a PHP/MySQL IPAM tool
|
||||||
Copyright (C) 2007-2009 Wietse Warendorff
|
Copyright (C) 2007-2009 Wietse Warendorff (up to v0.5)
|
||||||
|
Copyright (C) 2011-2023 Thomas Hooge
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
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 this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
For more information, visit http://sourceforge.net/projects/ipreg,
|
|
||||||
or contact me at wietsew@users.sourceforge.net
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
// start page
|
|
||||||
// includes
|
|
||||||
include("includes.php");
|
include("includes.php");
|
||||||
|
|
||||||
// get ip and id
|
|
||||||
$location_id = sanitize($_GET['location_id']);
|
$location_id = sanitize($_GET['location_id']);
|
||||||
|
|
||||||
// start output
|
|
||||||
include("header.php");
|
include("header.php");
|
||||||
|
|
||||||
// set language variables
|
// location
|
||||||
$smarty->assign($lang);
|
|
||||||
|
|
||||||
// setup location
|
|
||||||
// build query
|
|
||||||
$query = "SELECT
|
$query = "SELECT
|
||||||
location.location_name AS location_name
|
location_name
|
||||||
FROM
|
FROM
|
||||||
location
|
location
|
||||||
WHERE
|
WHERE
|
||||||
location.location_id=" . $location_id;
|
location_id=" . $location_id;
|
||||||
|
|
||||||
// run query
|
|
||||||
$location = $db->db_select($query);
|
$location = $db->db_select($query);
|
||||||
|
|
||||||
$smarty->assign("location_id", $location_id);
|
$smarty->assign("location_id", $location_id);
|
||||||
$smarty->assign("location_name", $location[0]['location_name']);
|
$smarty->assign("location_name", $location[0]['location_name']);
|
||||||
|
|
||||||
// setup subnet
|
// subnet
|
||||||
// build query
|
|
||||||
$query = "SELECT
|
$query = "SELECT
|
||||||
subnet.subnet_id AS subnet_id,
|
s.subnet_id,
|
||||||
subnet.subnet_address AS subnet_address,
|
s.subnet_address,
|
||||||
subnet.subnet_mask AS subnet_mask
|
s.subnet_mask
|
||||||
FROM
|
FROM
|
||||||
subnetlocation,
|
subnetlocation AS l LEFT JOIN subnet AS s USING (subnet_id)
|
||||||
subnet
|
|
||||||
WHERE
|
WHERE
|
||||||
subnetlocation.location_id=" . $location_id . "
|
l.location_id=" . $location_id . "
|
||||||
AND subnet.subnet_id=subnetlocation.subnet_id
|
|
||||||
ORDER BY
|
ORDER BY
|
||||||
INET_ATON(subnet.subnet_address)";
|
INET_ATON(s.subnet_address)";
|
||||||
|
|
||||||
// run query
|
|
||||||
$subnets = $db->db_select($query);
|
$subnets = $db->db_select($query);
|
||||||
$smarty->assign($subnets);
|
$smarty->assign($subnets);
|
||||||
|
|
||||||
// end page
|
|
||||||
// output
|
|
||||||
$smarty->display("locationsubnetdel.tpl");
|
$smarty->display("locationsubnetdel.tpl");
|
||||||
|
|
||||||
// end output
|
|
||||||
include("footer.php");
|
include("footer.php");
|
||||||
?>
|
?>
|
|
@ -1,40 +1,18 @@
|
||||||
<?php
|
<?php
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
IP Reg, a PHP/MySQL IPAM tool
|
IP Reg, a PHP/MySQL IPAM tool
|
||||||
Copyright (C) 2007-2009 Wietse Warendorff
|
Copyright (C) 2007-2009 Wietse Warendorff (up to v0.5)
|
||||||
|
Copyright (C) 2011-2023 Thomas Hooge
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
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 this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
For more information, visit http://sourceforge.net/projects/ipreg,
|
|
||||||
or contact me at wietsew@users.sourceforge.net
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
// start page
|
|
||||||
// includes
|
|
||||||
include("includes.php");
|
include("includes.php");
|
||||||
|
|
||||||
// get ip and id
|
|
||||||
$location_id = sanitize($_GET['location_id']);
|
$location_id = sanitize($_GET['location_id']);
|
||||||
|
|
||||||
// start output
|
|
||||||
include("header.php");
|
include("header.php");
|
||||||
|
// location
|
||||||
// set language variables
|
|
||||||
$smarty->assign($lang);
|
|
||||||
|
|
||||||
// setup location
|
|
||||||
// build query
|
|
||||||
$query = "SELECT
|
$query = "SELECT
|
||||||
location_name
|
location_name
|
||||||
FROM
|
FROM
|
||||||
|
@ -42,17 +20,12 @@
|
||||||
WHERE
|
WHERE
|
||||||
location_id=" . $location_id;
|
location_id=" . $location_id;
|
||||||
|
|
||||||
// run query
|
|
||||||
$location = $db->db_select($query);
|
$location = $db->db_select($query);
|
||||||
|
|
||||||
// send to tpl
|
|
||||||
$smarty->assign("location_id", $location_id);
|
$smarty->assign("location_id", $location_id);
|
||||||
$smarty->assign("location_name", $location[0]['location_name']);
|
$smarty->assign("location_name", $location[0]['location_name']);
|
||||||
|
|
||||||
// end page
|
|
||||||
// output
|
|
||||||
$smarty->display("locationsubnetedit.tpl");
|
$smarty->display("locationsubnetedit.tpl");
|
||||||
|
|
||||||
// end output
|
|
||||||
include("footer.php");
|
include("footer.php");
|
||||||
?>
|
?>
|
|
@ -1,40 +1,20 @@
|
||||||
<?php
|
<?php
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
IP Reg, a PHP/MySQL IPAM tool
|
IP Reg, a PHP/MySQL IPAM tool
|
||||||
Copyright (C) 2007-2009 Wietse Warendorff
|
Copyright (C) 2007-2009 Wietse Warendorff (up to v0.5)
|
||||||
|
Copyright (C) 2011-2023 Thomas Hooge
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
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 this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
For more information, visit http://sourceforge.net/projects/ipreg,
|
|
||||||
or contact me at wietsew@users.sourceforge.net
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
// start page
|
|
||||||
// includes
|
|
||||||
include("includes.php");
|
include("includes.php");
|
||||||
|
|
||||||
// get id
|
|
||||||
$location_id = sanitize($_GET['location_id']);
|
$location_id = sanitize($_GET['location_id']);
|
||||||
|
|
||||||
// start output
|
|
||||||
include("header.php");
|
include("header.php");
|
||||||
|
|
||||||
// set language variables
|
|
||||||
$smarty->assign($lang);
|
|
||||||
|
|
||||||
// start locationcrumb
|
// locationcrumb
|
||||||
// get location crumbs
|
|
||||||
|
|
||||||
$query = "SELECT location_id AS id,
|
$query = "SELECT location_id AS id,
|
||||||
location_name AS name,
|
location_name AS name,
|
||||||
|
@ -58,14 +38,12 @@
|
||||||
$level++;
|
$level++;
|
||||||
}
|
}
|
||||||
|
|
||||||
// send to tpl
|
|
||||||
$smarty->assign("location_id", $location_id);
|
$smarty->assign("location_id", $location_id);
|
||||||
$smarty->assign("location_info", nl2br($location[0]['location_info']));
|
$smarty->assign("location_info", nl2br($location[0]['location_info']));
|
||||||
$smarty->assign("crumbs", $crumbs);
|
$smarty->assign("crumbs", $crumbs);
|
||||||
|
|
||||||
|
|
||||||
// setup sublocations
|
// sublocations
|
||||||
// build query
|
|
||||||
$query = "SELECT
|
$query = "SELECT
|
||||||
location_id AS sublocation_id,
|
location_id AS sublocation_id,
|
||||||
location_name AS sublocation_name,
|
location_name AS sublocation_name,
|
||||||
|
@ -78,12 +56,10 @@
|
||||||
ORDER BY
|
ORDER BY
|
||||||
location_name";
|
location_name";
|
||||||
|
|
||||||
// run query
|
|
||||||
$sublocations = $db->db_select($query);
|
$sublocations = $db->db_select($query);
|
||||||
$smarty->assign("sublocations", $sublocations);
|
$smarty->assign("sublocations", $sublocations);
|
||||||
|
|
||||||
// setup subnets
|
// subnets
|
||||||
// build query
|
|
||||||
$query = "SELECT
|
$query = "SELECT
|
||||||
s.subnet_id,
|
s.subnet_id,
|
||||||
s.subnet_address,
|
s.subnet_address,
|
||||||
|
@ -95,14 +71,10 @@
|
||||||
ORDER BY
|
ORDER BY
|
||||||
INET_ATON(s.subnet_address)";
|
INET_ATON(s.subnet_address)";
|
||||||
|
|
||||||
// run query
|
|
||||||
$subnets = $db->db_select($query);
|
$subnets = $db->db_select($query);
|
||||||
$smarty->assign("subnets", $subnets);
|
$smarty->assign("subnets", $subnets);
|
||||||
|
|
||||||
// end page
|
|
||||||
// output
|
|
||||||
$smarty->display("locationview.tpl");
|
$smarty->display("locationview.tpl");
|
||||||
|
|
||||||
// footer
|
|
||||||
include("footer.php");
|
include("footer.php");
|
||||||
?>
|
?>
|
36
login.php
36
login.php
|
@ -1,47 +1,24 @@
|
||||||
<?php
|
<?php
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
IP Reg, a PHP/MySQL IPAM tool
|
IP Reg, a PHP/MySQL IPAM tool
|
||||||
Copyright (C) 2007-2009 Wietse Warendorff
|
Copyright (C) 2007-2009 Wietse Warendorff (up to v0.5)
|
||||||
|
Copyright (C) 2011-2023 Thomas Hooge
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
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 this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
For more information, visit http://sourceforge.net/projects/ipreg,
|
|
||||||
or contact me at wietsew@users.sourceforge.net
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
// session
|
|
||||||
// start session
|
|
||||||
session_name('ipreg');
|
session_name('ipreg');
|
||||||
session_start();
|
session_start();
|
||||||
|
|
||||||
// headers
|
|
||||||
// raw http headers
|
|
||||||
header("Content-Type: text/html; charset=utf-8");
|
|
||||||
|
|
||||||
// includes
|
|
||||||
// includes
|
|
||||||
include("config.php");
|
include("config.php");
|
||||||
include("dbconnect.php");
|
include("dbconnect.php");
|
||||||
|
|
||||||
// load lib
|
|
||||||
include("lib.php");
|
include("lib.php");
|
||||||
|
|
||||||
// include language file
|
// include language file
|
||||||
$language = lang_getfrombrowser($config_lang, $config_lang_default, null, false);
|
$language = lang_getfrombrowser($config_lang, $config_lang_default, null, false);
|
||||||
include('lang/' . $language . '.php');
|
include('lang/' . $language . '.php');
|
||||||
|
|
||||||
// try login?
|
|
||||||
// check for submit
|
// check for submit
|
||||||
if ($_SERVER['REQUEST_METHOD']=="POST" ) {
|
if ($_SERVER['REQUEST_METHOD']=="POST" ) {
|
||||||
/// get post info
|
/// get post info
|
||||||
|
@ -61,17 +38,10 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// start output
|
|
||||||
// get version for the footer-stamp
|
|
||||||
$smarty->assign("config_version", $config_version);
|
$smarty->assign("config_version", $config_version);
|
||||||
|
|
||||||
// set language variables
|
|
||||||
$smarty->assign($lang);
|
$smarty->assign($lang);
|
||||||
|
|
||||||
// end page
|
|
||||||
// output
|
|
||||||
$smarty->display("login.tpl");
|
$smarty->display("login.tpl");
|
||||||
|
|
||||||
// end output
|
|
||||||
include("footer.php");
|
include("footer.php");
|
||||||
?>
|
?>
|
28
logout.php
28
logout.php
|
@ -1,33 +1,17 @@
|
||||||
<?php
|
<?php
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
IP Reg, a PHP/MySQL IPAM tool
|
IP Reg, a PHP/MySQL IPAM tool
|
||||||
Copyright (C) 2007-2009 Wietse Warendorff
|
Copyright (C) 2007-2009 Wietse Warendorff (up to v0.5)
|
||||||
|
Copyright (C) 2011-2023 Thomas Hooge
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
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 this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
For more information, visit http://sourceforge.net/projects/ipreg,
|
|
||||||
or contact me at wietsew@users.sourceforge.net
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
// start page
|
|
||||||
// includes
|
|
||||||
include("includes.php");
|
include("includes.php");
|
||||||
|
|
||||||
// logout
|
// user logout: clear session
|
||||||
// user logout
|
$_SESSION = array();
|
||||||
$user->user_logout();
|
|
||||||
|
|
||||||
// redirect
|
// redirect to start page
|
||||||
header("Location: index.php");
|
header("Location: index.php");
|
||||||
?>
|
?>
|
37
natadd.php
37
natadd.php
|
@ -1,40 +1,19 @@
|
||||||
<?php
|
<?php
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
IP Reg, a PHP/MySQL IPAM tool
|
IP Reg, a PHP/MySQL IPAM tool
|
||||||
Copyright (C) 2007-2009 Wietse Warendorff
|
Copyright (C) 2007-2009 Wietse Warendorff (up to v0.5)
|
||||||
|
Copyright (C) 2011-2023 Thomas Hooge
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
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 this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
For more information, visit http://sourceforge.net/projects/ipreg,
|
|
||||||
or contact me at wietsew@users.sourceforge.net
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
// start page
|
|
||||||
// includes
|
|
||||||
include("includes.php");
|
include("includes.php");
|
||||||
|
|
||||||
// get ip and id
|
|
||||||
$node_id = sanitize($_GET['node_id']);
|
$node_id = sanitize($_GET['node_id']);
|
||||||
|
|
||||||
// start output
|
|
||||||
include("header.php");
|
include("header.php");
|
||||||
|
|
||||||
// set language variables
|
// node_ext
|
||||||
$smarty->assign($lang);
|
|
||||||
|
|
||||||
// setup node_ext
|
|
||||||
// build query
|
|
||||||
$query = "SELECT
|
$query = "SELECT
|
||||||
node_ip AS node_ip_ext
|
node_ip AS node_ip_ext
|
||||||
FROM
|
FROM
|
||||||
|
@ -42,14 +21,12 @@
|
||||||
WHERE
|
WHERE
|
||||||
node_id=" . $node_id;
|
node_id=" . $node_id;
|
||||||
|
|
||||||
// run query
|
|
||||||
$node = $db->db_select($query);
|
$node = $db->db_select($query);
|
||||||
|
|
||||||
$smarty->assign("node_id_ext", $node_id);
|
$smarty->assign("node_id_ext", $node_id);
|
||||||
$smarty->assign("node_ip_ext", $node[0]['node_ip_ext']);
|
$smarty->assign("node_ip_ext", $node[0]['node_ip_ext']);
|
||||||
|
|
||||||
// setup node_int
|
// node_int
|
||||||
// build query
|
|
||||||
$query = "SELECT
|
$query = "SELECT
|
||||||
a.asset_name,
|
a.asset_name,
|
||||||
n.node_id AS node_id_int,
|
n.node_id AS node_id_int,
|
||||||
|
@ -69,7 +46,6 @@
|
||||||
ORDER BY
|
ORDER BY
|
||||||
INET_ATON(n.node_ip)";
|
INET_ATON(n.node_ip)";
|
||||||
|
|
||||||
// run query
|
|
||||||
$nodes = $db->db_select($query);
|
$nodes = $db->db_select($query);
|
||||||
foreach ($nodes as $rec) {
|
foreach ($nodes as $rec) {
|
||||||
$node_options[$rec['node_id_int']] = $rec['node_ip_int'] . '/' . $rec['asset_name'];
|
$node_options[$rec['node_id_int']] = $rec['node_ip_int'] . '/' . $rec['asset_name'];
|
||||||
|
@ -81,10 +57,7 @@
|
||||||
$nat_type_options[3] = $lang['lang_nat_type_3'];
|
$nat_type_options[3] = $lang['lang_nat_type_3'];
|
||||||
$smarty->assign("nat_type_options", $nat_type_options);
|
$smarty->assign("nat_type_options", $nat_type_options);
|
||||||
|
|
||||||
// end page
|
|
||||||
// output
|
|
||||||
$smarty->display("natadd.tpl");
|
$smarty->display("natadd.tpl");
|
||||||
|
|
||||||
// end output
|
|
||||||
include("footer.php");
|
include("footer.php");
|
||||||
?>
|
?>
|
38
natdel.php
38
natdel.php
|
@ -1,40 +1,19 @@
|
||||||
<?php
|
<?php
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
IP Reg, a PHP/MySQL IPAM tool
|
IP Reg, a PHP/MySQL IPAM tool
|
||||||
Copyright (C) 2007-2009 Wietse Warendorff
|
Copyright (C) 2007-2009 Wietse Warendorff (up to v0.5)
|
||||||
|
Copyright (C) 2011-2023 Thomas Hooge
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
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 this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
For more information, visit http://sourceforge.net/projects/ipreg,
|
|
||||||
or contact me at wietsew@users.sourceforge.net
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
// start page
|
|
||||||
// includes
|
|
||||||
include("includes.php");
|
include("includes.php");
|
||||||
|
|
||||||
// get ip and id
|
|
||||||
$node_id = sanitize($_GET['node_id']);
|
$node_id = sanitize($_GET['node_id']);
|
||||||
|
|
||||||
// start output
|
|
||||||
include("header.php");
|
include("header.php");
|
||||||
|
|
||||||
// set language variables
|
// node_ext
|
||||||
$smarty->assign($lang);
|
|
||||||
|
|
||||||
// setup node_ext
|
|
||||||
// build query
|
|
||||||
$query = "SELECT
|
$query = "SELECT
|
||||||
node_ip AS node_ip_ext
|
node_ip AS node_ip_ext
|
||||||
FROM
|
FROM
|
||||||
|
@ -42,14 +21,12 @@
|
||||||
WHERE
|
WHERE
|
||||||
node_id=" . $node_id;
|
node_id=" . $node_id;
|
||||||
|
|
||||||
// run query
|
|
||||||
$node = $db->db_select($query);
|
$node = $db->db_select($query);
|
||||||
|
|
||||||
$smarty->assign("node_id_ext", $node_id);
|
$smarty->assign("node_id_ext", $node_id);
|
||||||
$smarty->assign("node_ip_ext", $node[0]['node_ip_ext']);
|
$smarty->assign("node_ip_ext", $node[0]['node_ip_ext']);
|
||||||
|
|
||||||
// setup options
|
// options
|
||||||
// build query
|
|
||||||
$query = "SELECT
|
$query = "SELECT
|
||||||
a.asset_name,
|
a.asset_name,
|
||||||
n.node_ip,
|
n.node_ip,
|
||||||
|
@ -65,7 +42,6 @@
|
||||||
ORDER BY
|
ORDER BY
|
||||||
INET_ATON(n.node_ip)";
|
INET_ATON(n.node_ip)";
|
||||||
|
|
||||||
// run query
|
|
||||||
$nodes = $db->db_select($query);
|
$nodes = $db->db_select($query);
|
||||||
|
|
||||||
$options = array();
|
$options = array();
|
||||||
|
@ -73,11 +49,7 @@
|
||||||
$options[$rec['nat_ext']] = $rec['node_ip'] . '/' . $rec['asset_name'];
|
$options[$rec['nat_ext']] = $rec['node_ip'] . '/' . $rec['asset_name'];
|
||||||
}
|
}
|
||||||
$smarty->assign("nat_options", $options);
|
$smarty->assign("nat_options", $options);
|
||||||
|
|
||||||
// end page
|
|
||||||
// output
|
|
||||||
$smarty->display("natdel.tpl");
|
$smarty->display("natdel.tpl");
|
||||||
|
|
||||||
// end output
|
|
||||||
include("footer.php");
|
include("footer.php");
|
||||||
?>
|
?>
|
34
natedit.php
34
natedit.php
|
@ -1,57 +1,31 @@
|
||||||
<?php
|
<?php
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
IP Reg, a PHP/MySQL IPAM tool
|
IP Reg, a PHP/MySQL IPAM tool
|
||||||
Copyright (C) 2007-2009 Wietse Warendorff
|
Copyright (C) 2007-2009 Wietse Warendorff (up to v0.5)
|
||||||
|
Copyright (C) 2011-2023 Thomas Hooge
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
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 this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
For more information, visit http://sourceforge.net/projects/ipreg,
|
|
||||||
or contact me at wietsew@users.sourceforge.net
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
// start page
|
|
||||||
// includes
|
|
||||||
include("includes.php");
|
include("includes.php");
|
||||||
|
|
||||||
// get id
|
|
||||||
$node_id = sanitize($_GET['node_id']);
|
$node_id = sanitize($_GET['node_id']);
|
||||||
|
|
||||||
// start output
|
|
||||||
include("header.php");
|
include("header.php");
|
||||||
|
|
||||||
// set language variables
|
|
||||||
$smarty->assign($lang);
|
|
||||||
|
|
||||||
// setup node
|
|
||||||
// build query
|
|
||||||
$query = "SELECT
|
$query = "SELECT
|
||||||
node.node_ip AS node_ip
|
node_ip
|
||||||
FROM
|
FROM
|
||||||
node
|
node
|
||||||
WHERE
|
WHERE
|
||||||
node.node_id=" . $node_id;
|
node.node_id=" . $node_id;
|
||||||
|
|
||||||
// run query
|
|
||||||
$node = $db->db_select($query);
|
$node = $db->db_select($query);
|
||||||
|
|
||||||
$smarty->assign("node_id", $node_id);
|
$smarty->assign("node_id", $node_id);
|
||||||
$smarty->assign("node_ip", $node[0]['node_ip']);
|
$smarty->assign("node_ip", $node[0]['node_ip']);
|
||||||
|
|
||||||
// end page
|
|
||||||
// output
|
|
||||||
$smarty->display("natedit.tpl");
|
$smarty->display("natedit.tpl");
|
||||||
|
|
||||||
// end output
|
|
||||||
include("footer.php");
|
include("footer.php");
|
||||||
?>
|
?>
|
48
node.php
48
node.php
|
@ -1,53 +1,23 @@
|
||||||
<?php
|
<?php
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
IP Reg, a PHP/MySQL IPAM tool
|
IP Reg, a PHP/MySQL IPAM tool
|
||||||
Copyright (C) 2007-2009 Wietse Warendorff
|
Copyright (C) 2007-2009 Wietse Warendorff (up to v0.5)
|
||||||
|
Copyright (C) 2011-2023 Thomas Hooge
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
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 this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
For more information, visit http://sourceforge.net/projects/ipreg,
|
|
||||||
or contact me at wietsew@users.sourceforge.net
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
// start page
|
|
||||||
// includes
|
|
||||||
include("includes.php");
|
include("includes.php");
|
||||||
|
|
||||||
// start output
|
|
||||||
include("header.php");
|
include("header.php");
|
||||||
|
|
||||||
// set language variables
|
|
||||||
$smarty->assign($lang);
|
|
||||||
|
|
||||||
// start node
|
|
||||||
// setup view
|
|
||||||
// subnet
|
|
||||||
if(isset($_GET['subnet_id'])) {
|
if(isset($_GET['subnet_id'])) {
|
||||||
// get id
|
|
||||||
$subnet_id = sanitize($_GET['subnet_id']);
|
$subnet_id = sanitize($_GET['subnet_id']);
|
||||||
|
$subnet_view = "WHERE node.subnet_id=" . $subnet_id;
|
||||||
// build query part
|
|
||||||
$subnet_view = "AND node.subnet_id=" . $subnet_id;
|
|
||||||
|
|
||||||
// to tpl
|
|
||||||
$smarty->assign("subnet_id", $subnet_id);
|
$smarty->assign("subnet_id", $subnet_id);
|
||||||
} else {
|
} else {
|
||||||
// to tpl
|
|
||||||
$smarty->assign("subnet_id", "");
|
$smarty->assign("subnet_id", "");
|
||||||
}
|
}
|
||||||
|
|
||||||
// build query
|
|
||||||
$query = "SELECT
|
$query = "SELECT
|
||||||
asset.asset_id,
|
asset.asset_id,
|
||||||
REPLACE(asset.asset_name, ' ', ' ') AS asset_name,
|
REPLACE(asset.asset_name, ' ', ' ') AS asset_name,
|
||||||
|
@ -55,24 +25,16 @@
|
||||||
node.node_id,
|
node.node_id,
|
||||||
node.node_ip
|
node.node_ip
|
||||||
FROM
|
FROM
|
||||||
asset,
|
asset LEFT JOIN node USING (asset_id)
|
||||||
node
|
|
||||||
WHERE
|
|
||||||
asset.asset_id=node.asset_id
|
|
||||||
" . $subnet_view . "
|
" . $subnet_view . "
|
||||||
GROUP BY
|
GROUP BY
|
||||||
node.node_id
|
node.node_id
|
||||||
ORDER BY
|
ORDER BY
|
||||||
INET_ATON(node.node_ip)";
|
INET_ATON(node.node_ip)";
|
||||||
|
|
||||||
// run query
|
|
||||||
$nodes = $db->db_select($query);
|
$nodes = $db->db_select($query);
|
||||||
$smarty->assign("nodes", $nodes);
|
$smarty->assign("nodes", $nodes);
|
||||||
|
|
||||||
// end page
|
|
||||||
// output
|
|
||||||
$smarty->display("node.tpl");
|
$smarty->display("node.tpl");
|
||||||
|
|
||||||
// end output
|
|
||||||
include("footer.php");
|
include("footer.php");
|
||||||
?>
|
?>
|
||||||
|
|
34
nodeadd.php
34
nodeadd.php
|
@ -1,54 +1,26 @@
|
||||||
<?php
|
<?php
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
IP Reg, a PHP/MySQL IPAM tool
|
IP Reg, a PHP/MySQL IPAM tool
|
||||||
Copyright (C) 2007-2009 Wietse Warendorff
|
Copyright (C) 2007-2009 Wietse Warendorff (up to v0.5)
|
||||||
|
Copyright (C) 2011-2023 Thomas Hooge
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
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 this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
For more information, visit http://sourceforge.net/projects/ipreg,
|
|
||||||
or contact me at wietsew@users.sourceforge.net
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
// start page
|
|
||||||
// includes
|
|
||||||
include("includes.php");
|
include("includes.php");
|
||||||
|
|
||||||
// check for set ip and/or subnet_id
|
|
||||||
if ((isset($_GET['node_ip'])) ? $node_ip = sanitize($_GET['node_ip']) : $node_ip = '');
|
if ((isset($_GET['node_ip'])) ? $node_ip = sanitize($_GET['node_ip']) : $node_ip = '');
|
||||||
if ((isset($_GET['subnet_id'])) ? $subnet_id = sanitize($_GET['subnet_id']) : $subnet_id = '');
|
if ((isset($_GET['subnet_id'])) ? $subnet_id = sanitize($_GET['subnet_id']) : $subnet_id = '');
|
||||||
|
|
||||||
// start output
|
|
||||||
include("header.php");
|
include("header.php");
|
||||||
|
|
||||||
// set language variables
|
|
||||||
$smarty->assign($lang);
|
|
||||||
|
|
||||||
// set vars
|
|
||||||
$smarty->assign("user_dns1suffix", $_SESSION['suser_dns1suffix']);
|
$smarty->assign("user_dns1suffix", $_SESSION['suser_dns1suffix']);
|
||||||
$smarty->assign("user_dns2suffix", $_SESSION['suser_dns2suffix']);
|
$smarty->assign("user_dns2suffix", $_SESSION['suser_dns2suffix']);
|
||||||
$smarty->assign("node_ip", $node_ip);
|
$smarty->assign("node_ip", $node_ip);
|
||||||
|
|
||||||
// setup subnet
|
|
||||||
$smarty->assign("subnet_options", $db->options_subnet());
|
$smarty->assign("subnet_options", $db->options_subnet());
|
||||||
|
|
||||||
// setup assetclass
|
|
||||||
$smarty->assign("assetclass_options", $db->options_assetclass());
|
$smarty->assign("assetclass_options", $db->options_assetclass());
|
||||||
|
|
||||||
// end page
|
|
||||||
// output
|
|
||||||
$smarty->display("nodeadd.tpl");
|
$smarty->display("nodeadd.tpl");
|
||||||
|
|
||||||
// end output
|
|
||||||
include("footer.php");
|
include("footer.php");
|
||||||
?>
|
?>
|
31
nodedel.php
31
nodedel.php
|
@ -1,40 +1,18 @@
|
||||||
<?php
|
<?php
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
IP Reg, a PHP/MySQL IPAM tool
|
IP Reg, a PHP/MySQL IPAM tool
|
||||||
Copyright (C) 2007-2009 Wietse Warendorff
|
Copyright (C) 2007-2009 Wietse Warendorff (up to v0.5)
|
||||||
|
Copyright (C) 2011-2023 Thomas Hooge
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
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 this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
For more information, visit http://sourceforge.net/projects/ipreg,
|
|
||||||
or contact me at wietsew@users.sourceforge.net
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
// start page
|
|
||||||
// includes
|
|
||||||
include("includes.php");
|
include("includes.php");
|
||||||
|
|
||||||
// get id
|
|
||||||
$node_id = sanitize($_GET['node_id']);
|
$node_id = sanitize($_GET['node_id']);
|
||||||
|
|
||||||
// start output
|
|
||||||
include("header.php");
|
include("header.php");
|
||||||
|
|
||||||
// set language variables
|
|
||||||
$smarty->assign($lang);
|
|
||||||
|
|
||||||
// setup node
|
|
||||||
// build query
|
|
||||||
$query = "SELECT
|
$query = "SELECT
|
||||||
asset_id,
|
asset_id,
|
||||||
node_ip
|
node_ip
|
||||||
|
@ -51,10 +29,7 @@
|
||||||
$smarty->assign("asset_id", $node[0]['asset_id']);
|
$smarty->assign("asset_id", $node[0]['asset_id']);
|
||||||
$smarty->assign("node_ip", $node[0]['node_ip']);
|
$smarty->assign("node_ip", $node[0]['node_ip']);
|
||||||
|
|
||||||
// end page
|
|
||||||
// output
|
|
||||||
$smarty->display("nodedel.tpl");
|
$smarty->display("nodedel.tpl");
|
||||||
|
|
||||||
// end output
|
|
||||||
include("footer.php");
|
include("footer.php");
|
||||||
?>
|
?>
|
38
nodeedit.php
38
nodeedit.php
|
@ -1,40 +1,18 @@
|
||||||
<?php
|
<?php
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
IP Reg, a PHP/MySQL IPAM tool
|
IP Reg, a PHP/MySQL IPAM tool
|
||||||
Copyright (C) 2007-2009 Wietse Warendorff
|
Copyright (C) 2007-2009 Wietse Warendorff (up to v0.5)
|
||||||
|
Copyright (C) 2011-2023 Thomas Hooge
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
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 this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
For more information, visit http://sourceforge.net/projects/ipreg,
|
|
||||||
or contact me at wietsew@users.sourceforge.net
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
// start page
|
|
||||||
// includes
|
|
||||||
include("includes.php");
|
include("includes.php");
|
||||||
|
|
||||||
// get id
|
|
||||||
$node_id = sanitize($_GET['node_id']);
|
$node_id = sanitize($_GET['node_id']);
|
||||||
|
|
||||||
// start output
|
|
||||||
include("header.php");
|
include("header.php");
|
||||||
|
|
||||||
// set language variables
|
|
||||||
$smarty->assign($lang);
|
|
||||||
|
|
||||||
// setup node
|
|
||||||
// build query
|
|
||||||
$query = "SELECT
|
$query = "SELECT
|
||||||
a.asset_id,
|
a.asset_id,
|
||||||
n.node_id,
|
n.node_id,
|
||||||
|
@ -54,10 +32,8 @@
|
||||||
AND n.node_id=" . $node_id . "
|
AND n.node_id=" . $node_id . "
|
||||||
AND s.subnet_id=n.subnet_id";
|
AND s.subnet_id=n.subnet_id";
|
||||||
|
|
||||||
// run query
|
|
||||||
$node = $db->db_select($query);
|
$node = $db->db_select($query);
|
||||||
|
|
||||||
// send to tpl
|
|
||||||
$smarty->assign("node_id", $node[0]['node_id']);
|
$smarty->assign("node_id", $node[0]['node_id']);
|
||||||
$smarty->assign("node_ip", $node[0]['node_ip']);
|
$smarty->assign("node_ip", $node[0]['node_ip']);
|
||||||
$smarty->assign("node_mac", write_mac($node[0]['node_mac']));
|
$smarty->assign("node_mac", write_mac($node[0]['node_mac']));
|
||||||
|
@ -68,19 +44,11 @@
|
||||||
$smarty->assign("subnet_id", $node[0]['subnet_id']);
|
$smarty->assign("subnet_id", $node[0]['subnet_id']);
|
||||||
$smarty->assign("zone_id", $node[0]['zone_id']);
|
$smarty->assign("zone_id", $node[0]['zone_id']);
|
||||||
|
|
||||||
// setup asset
|
|
||||||
$smarty->assign("asset_options", $db->options_asset());
|
$smarty->assign("asset_options", $db->options_asset());
|
||||||
|
|
||||||
// setup subnet
|
|
||||||
$smarty->assign("subnet_options", $db->options_subnet());
|
$smarty->assign("subnet_options", $db->options_subnet());
|
||||||
|
|
||||||
// setup zone
|
|
||||||
$smarty->assign("zone_options", $db->options_zone("(keine)"));
|
$smarty->assign("zone_options", $db->options_zone("(keine)"));
|
||||||
|
|
||||||
// end page
|
|
||||||
// output
|
|
||||||
$smarty->display("nodeedit.tpl");
|
$smarty->display("nodeedit.tpl");
|
||||||
|
|
||||||
// end output
|
|
||||||
include("footer.php");
|
include("footer.php");
|
||||||
?>
|
?>
|
44
nodeview.php
44
nodeview.php
|
@ -1,40 +1,24 @@
|
||||||
<?php
|
<?php
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
IP Reg, a PHP/MySQL IPAM tool
|
IP Reg, a PHP/MySQL IPAM tool
|
||||||
Copyright (C) 2007-2009 Wietse Warendorff
|
Copyright (C) 2007-2009 Wietse Warendorff (up to v0.5)
|
||||||
|
Copyright (C) 2011-2023 Thomas Hooge
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
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 this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
For more information, visit http://sourceforge.net/projects/ipreg,
|
|
||||||
or contact me at wietsew@users.sourceforge.net
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
// start page
|
|
||||||
// includes
|
|
||||||
include("includes.php");
|
include("includes.php");
|
||||||
|
|
||||||
// get id
|
if (isset($_GET['node_id']) && (!empty($_GET['node_id']))) {
|
||||||
$node_id = sanitize($_GET['node_id']);
|
$node_id = sanitize($_GET['node_id']);
|
||||||
|
} else {
|
||||||
|
// redirect to error page
|
||||||
|
header_location("comments.php?comments=error");
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
// start output
|
|
||||||
include("header.php");
|
include("header.php");
|
||||||
|
// node
|
||||||
// set language variables
|
|
||||||
$smarty->assign($lang);
|
|
||||||
|
|
||||||
// setup node
|
|
||||||
// build query
|
|
||||||
$query = "SELECT
|
$query = "SELECT
|
||||||
asset.asset_id,
|
asset.asset_id,
|
||||||
asset.asset_name,
|
asset.asset_name,
|
||||||
|
@ -57,13 +41,11 @@
|
||||||
WHERE
|
WHERE
|
||||||
node.node_id=" . $node_id;
|
node.node_id=" . $node_id;
|
||||||
|
|
||||||
// run query
|
|
||||||
$node = $db->db_select($query);
|
$node = $db->db_select($query);
|
||||||
$node[0]['node_mac'] = write_mac($node[0]['node_mac']);
|
$node[0]['node_mac'] = write_mac($node[0]['node_mac']);
|
||||||
$smarty->assign("node", $node[0]);
|
$smarty->assign("node", $node[0]);
|
||||||
|
|
||||||
// setup nat
|
// nat
|
||||||
// build query
|
|
||||||
$query = "SELECT
|
$query = "SELECT
|
||||||
asset_ext.asset_id AS asset_id_ext,
|
asset_ext.asset_id AS asset_id_ext,
|
||||||
asset_int.asset_id AS asset_id_int,
|
asset_int.asset_id AS asset_id_int,
|
||||||
|
@ -94,13 +76,9 @@
|
||||||
INET_ATON(node_ext.node_ip),
|
INET_ATON(node_ext.node_ip),
|
||||||
INET_ATON(node_int.node_ip)";
|
INET_ATON(node_int.node_ip)";
|
||||||
|
|
||||||
// run query
|
|
||||||
$natrules = $db->db_select($query);
|
$natrules = $db->db_select($query);
|
||||||
// counter to tpl
|
|
||||||
$smarty->assign("natrules", $natrules);
|
$smarty->assign("natrules", $natrules);
|
||||||
|
|
||||||
// end page
|
|
||||||
// output
|
|
||||||
$smarty->display("nodeview.tpl");
|
$smarty->display("nodeview.tpl");
|
||||||
|
|
||||||
include("footer.php");
|
include("footer.php");
|
||||||
|
|
29
options.php
29
options.php
|
@ -1,39 +1,16 @@
|
||||||
<?php
|
<?php
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
IP Reg, a PHP/MySQL IPAM tool
|
IP Reg, a PHP/MySQL IPAM tool
|
||||||
Copyright (C) 2007-2009 Wietse Warendorff
|
Copyright (C) 2007-2009 Wietse Warendorff (up to v0.5)
|
||||||
|
Copyright (C) 2011-2023 Thomas Hooge
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
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 this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
For more information, visit http://sourceforge.net/projects/ipreg,
|
|
||||||
or contact me at wietsew@users.sourceforge.net
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
// start page
|
|
||||||
// includes
|
|
||||||
include("includes.php");
|
include("includes.php");
|
||||||
|
|
||||||
// start output
|
|
||||||
include("header.php");
|
include("header.php");
|
||||||
|
|
||||||
// set language variables
|
|
||||||
$smarty->assign($lang);
|
|
||||||
|
|
||||||
// end page
|
|
||||||
// output
|
|
||||||
$smarty->display("options.tpl");
|
$smarty->display("options.tpl");
|
||||||
|
|
||||||
// end output
|
|
||||||
include("footer.php");
|
include("footer.php");
|
||||||
?>
|
?>
|
|
@ -1,39 +1,19 @@
|
||||||
<?php
|
<?php
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
IP Reg, a PHP/MySQL IPAM tool
|
IP Reg, a PHP/MySQL IPAM tool
|
||||||
Copyright (C) 2007-2009 Wietse Warendorff
|
Copyright (C) 2007-2009 Wietse Warendorff (up to v0.5)
|
||||||
|
Copyright (C) 2011-2023 Thomas Hooge
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
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 this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
For more information, visit http://sourceforge.net/projects/ipreg,
|
|
||||||
or contact me at wietsew@users.sourceforge.net
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
// start page
|
|
||||||
// includes
|
|
||||||
include("includes.php");
|
include("includes.php");
|
||||||
|
|
||||||
// start output
|
|
||||||
include("header.php");
|
include("header.php");
|
||||||
|
|
||||||
// set language variables
|
|
||||||
$smarty->assign($lang);
|
|
||||||
$smarty->assign("language", $language);
|
$smarty->assign("language", $language);
|
||||||
|
|
||||||
// setup options
|
|
||||||
// set menu checkboxes
|
|
||||||
// assets
|
|
||||||
if($_SESSION['suser_menu_assets']=='on') {
|
if($_SESSION['suser_menu_assets']=='on') {
|
||||||
$user_menu_assets_checked = 'checked';
|
$user_menu_assets_checked = 'checked';
|
||||||
} else {
|
} else {
|
||||||
|
@ -94,7 +74,6 @@
|
||||||
$user_tooltips_checked = '';
|
$user_tooltips_checked = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
// send to tpl
|
|
||||||
$smarty->assign("user_id", $_SESSION['suser_id']);
|
$smarty->assign("user_id", $_SESSION['suser_id']);
|
||||||
$smarty->assign("user_imagesize", $_SESSION['suser_imagesize']);
|
$smarty->assign("user_imagesize", $_SESSION['suser_imagesize']);
|
||||||
$smarty->assign("user_imagecount", $_SESSION['suser_imagecount']);
|
$smarty->assign("user_imagecount", $_SESSION['suser_imagecount']);
|
||||||
|
@ -114,10 +93,7 @@
|
||||||
$smarty->assign("user_menu_zones_checked", $user_menu_zones_checked);
|
$smarty->assign("user_menu_zones_checked", $user_menu_zones_checked);
|
||||||
$smarty->assign("user_tooltips_checked", $user_tooltips_checked);
|
$smarty->assign("user_tooltips_checked", $user_tooltips_checked);
|
||||||
|
|
||||||
// end page
|
|
||||||
// output
|
|
||||||
$smarty->display("optionseditdisplay.tpl");
|
$smarty->display("optionseditdisplay.tpl");
|
||||||
|
|
||||||
// end output
|
|
||||||
include("footer.php");
|
include("footer.php");
|
||||||
?>
|
?>
|
|
@ -1,39 +1,16 @@
|
||||||
<?php
|
<?php
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
IP Reg, a PHP/MySQL IPAM tool
|
IP Reg, a PHP/MySQL IPAM tool
|
||||||
Copyright (C) 2007-2009 Wietse Warendorff
|
Copyright (C) 2007-2009 Wietse Warendorff (up to v0.5)
|
||||||
|
Copyright (C) 2011-2023 Thomas Hooge
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
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 this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
For more information, visit http://sourceforge.net/projects/ipreg,
|
|
||||||
or contact me at wietsew@users.sourceforge.net
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
// start page
|
|
||||||
// includes
|
|
||||||
include("includes.php");
|
include("includes.php");
|
||||||
|
|
||||||
// start output
|
|
||||||
include("header.php");
|
include("header.php");
|
||||||
|
|
||||||
// set language variables
|
|
||||||
$smarty->assign($lang);
|
|
||||||
|
|
||||||
// end page
|
|
||||||
// output
|
|
||||||
$smarty->display("optionseditpassword.tpl");
|
$smarty->display("optionseditpassword.tpl");
|
||||||
|
|
||||||
// end output
|
|
||||||
include("footer.php");
|
include("footer.php");
|
||||||
?>
|
?>
|
109
search.php
109
search.php
|
@ -1,34 +1,15 @@
|
||||||
<?php
|
<?php
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
IP Reg, a PHP/MySQL IPAM tool
|
IP Reg, a PHP/MySQL IPAM tool
|
||||||
Copyright (C) 2007-2009 Wietse Warendorff
|
Copyright (C) 2007-2009 Wietse Warendorff (up to v0.5)
|
||||||
|
Copyright (C) 2011-2023 Thomas Hooge
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
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 this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
For more information, visit http://sourceforge.net/projects/ipreg,
|
|
||||||
or contact me at wietsew@users.sourceforge.net
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
// start page
|
|
||||||
// includes
|
|
||||||
include("includes.php");
|
include("includes.php");
|
||||||
|
|
||||||
// start output
|
|
||||||
include("header.php");
|
include("header.php");
|
||||||
|
|
||||||
// set language variables
|
|
||||||
$smarty->assign($lang);
|
|
||||||
|
|
||||||
// get string that was searched for ($search is already set in header.php)
|
// get string that was searched for ($search is already set in header.php)
|
||||||
if (empty($search)) {
|
if (empty($search)) {
|
||||||
|
@ -45,103 +26,93 @@
|
||||||
// set counter
|
// set counter
|
||||||
$resultcounter = 0;
|
$resultcounter = 0;
|
||||||
|
|
||||||
// setup asset
|
// asset
|
||||||
// build query
|
|
||||||
$query = "SELECT
|
$query = "SELECT
|
||||||
asset.asset_id AS id,
|
asset_id AS id,
|
||||||
asset.asset_name AS name,
|
asset_name AS name,
|
||||||
asset.asset_info AS description
|
asset_info AS description
|
||||||
FROM
|
FROM
|
||||||
asset
|
asset
|
||||||
WHERE
|
WHERE
|
||||||
asset.asset_name LIKE '" . $needle . "'
|
asset_name LIKE '" . $needle . "'
|
||||||
OR asset.asset_hostname LIKE '" . $needle . "'
|
OR asset_hostname LIKE '" . $needle . "'
|
||||||
OR asset.asset_info LIKE '" . $needle . "'
|
OR asset_info LIKE '" . $needle . "'
|
||||||
ORDER BY
|
ORDER BY
|
||||||
asset.asset_name";
|
asset_name";
|
||||||
|
|
||||||
// run query
|
|
||||||
$assets = $db->db_select($query);
|
$assets = $db->db_select($query);
|
||||||
$resultcounter += count($assets);
|
$resultcounter += count($assets);
|
||||||
$smarty->assign("assets", $assets);
|
$smarty->assign("assets", $assets);
|
||||||
|
|
||||||
// setup location
|
// location
|
||||||
// build query
|
|
||||||
$query = "SELECT
|
$query = "SELECT
|
||||||
location.location_id AS id,
|
location_id AS id,
|
||||||
location.location_name AS name
|
location_name AS name
|
||||||
FROM
|
FROM
|
||||||
location
|
location
|
||||||
WHERE
|
WHERE
|
||||||
location.location_name LIKE '" . $needle . "'
|
location_name LIKE '" . $needle . "'
|
||||||
OR location.location_info LIKE '" . $needle . "'
|
OR location_info LIKE '" . $needle . "'
|
||||||
ORDER BY
|
ORDER BY
|
||||||
location.location_name";
|
location_name";
|
||||||
|
|
||||||
// run query
|
|
||||||
$locations = $db->db_select($query);
|
$locations = $db->db_select($query);
|
||||||
$resultcounter += count($locations);
|
$resultcounter += count($locations);
|
||||||
$smarty->assign("locations", $locations);
|
$smarty->assign("locations", $locations);
|
||||||
|
|
||||||
// setup node
|
// node
|
||||||
// build query
|
|
||||||
$query = "SELECT
|
$query = "SELECT
|
||||||
node.node_id AS id,
|
node_id AS id,
|
||||||
node.node_ip AS ip
|
node_ip AS ip
|
||||||
FROM
|
FROM
|
||||||
node
|
node
|
||||||
WHERE
|
WHERE
|
||||||
node.node_ip LIKE '" . $needle . "'
|
node_ip LIKE '" . $needle . "'
|
||||||
OR node.node_mac LIKE '" . $needle . "'
|
OR node_mac LIKE '" . $needle . "'
|
||||||
OR node.node_dns1 LIKE '" . $needle . "'
|
OR node_dns1 LIKE '" . $needle . "'
|
||||||
OR node.node_dns2 LIKE '" . $needle . "'
|
OR node_dns2 LIKE '" . $needle . "'
|
||||||
OR node.node_info LIKE '" . $needle . "'
|
OR node_info LIKE '" . $needle . "'
|
||||||
ORDER BY
|
ORDER BY
|
||||||
node.node_ip";
|
node_ip";
|
||||||
|
|
||||||
// run query
|
|
||||||
$nodes = $db->db_select($query);
|
$nodes = $db->db_select($query);
|
||||||
$resultcounter += count($nodes);
|
$resultcounter += count($nodes);
|
||||||
$smarty->assign("nodes", $nodes);
|
$smarty->assign("nodes", $nodes);
|
||||||
|
|
||||||
// setup subnet
|
// subnet
|
||||||
// build query
|
|
||||||
$query = "SELECT
|
$query = "SELECT
|
||||||
subnet.subnet_id AS id,
|
subnet_id AS id,
|
||||||
subnet.subnet_address AS address
|
subnet_address AS address
|
||||||
FROM
|
FROM
|
||||||
subnet
|
subnet
|
||||||
WHERE
|
WHERE
|
||||||
subnet.subnet_address LIKE '" . $needle . "'
|
subnet_address LIKE '" . $needle . "'
|
||||||
OR subnet.subnet_info LIKE '" . $needle . "'
|
OR subnet_info LIKE '" . $needle . "'
|
||||||
ORDER BY
|
ORDER BY
|
||||||
subnet.subnet_address";
|
subnet_address";
|
||||||
|
|
||||||
// run query
|
// run query
|
||||||
$subnets = $db->db_select($query);
|
$subnets = $db->db_select($query);
|
||||||
$resultcounter += count($subnets);
|
$resultcounter += count($subnets);
|
||||||
$smarty->assign("subnets", $subnets);
|
$smarty->assign("subnets", $subnets);
|
||||||
|
|
||||||
// setup vlan
|
// vlan
|
||||||
// build query
|
|
||||||
$query = "SELECT
|
$query = "SELECT
|
||||||
vlan.vlan_id AS id,
|
vlan_id AS id,
|
||||||
vlan.vlan_name AS name
|
vlan_name AS name
|
||||||
FROM
|
FROM
|
||||||
vlan
|
vlan
|
||||||
WHERE
|
WHERE
|
||||||
vlan.vlan_name LIKE '" . $needle . "'
|
vlan_name LIKE '" . $needle . "'
|
||||||
OR vlan.vlan_info LIKE '" . $needle . "'
|
OR vlan_info LIKE '" . $needle . "'
|
||||||
ORDER BY
|
ORDER BY
|
||||||
vlan.vlan_name";
|
vlan_name";
|
||||||
|
|
||||||
// run query
|
|
||||||
$vlans = $db->db_select($query);
|
$vlans = $db->db_select($query);
|
||||||
$resultcounter += count($vlans);
|
$resultcounter += count($vlans);
|
||||||
$smarty->assign("vlans", $vlans);
|
$smarty->assign("vlans", $vlans);
|
||||||
|
|
||||||
// setup zone
|
// setup zone
|
||||||
// build query
|
|
||||||
$query = "SELECT
|
$query = "SELECT
|
||||||
zone_id AS id,
|
zone_id AS id,
|
||||||
zone_origin AS origin
|
zone_origin AS origin
|
||||||
|
@ -160,7 +131,6 @@
|
||||||
ORDER BY
|
ORDER BY
|
||||||
zone_origin";
|
zone_origin";
|
||||||
|
|
||||||
// run query
|
|
||||||
$zones = $db->db_select($query);
|
$zones = $db->db_select($query);
|
||||||
$resultcounter += count($zones);
|
$resultcounter += count($zones);
|
||||||
$smarty->assign("zones", $zones);
|
$smarty->assign("zones", $zones);
|
||||||
|
@ -169,10 +139,7 @@
|
||||||
$smarty->assign("resultcounter", $resultcounter);
|
$smarty->assign("resultcounter", $resultcounter);
|
||||||
}
|
}
|
||||||
|
|
||||||
// end page
|
|
||||||
// output
|
|
||||||
$smarty->display("search.tpl");
|
$smarty->display("search.tpl");
|
||||||
|
|
||||||
// end output
|
|
||||||
include("footer.php");
|
include("footer.php");
|
||||||
?>
|
?>
|
||||||
|
|
235
submit.php
235
submit.php
File diff suppressed because it is too large
Load Diff
34
subnet.php
34
subnet.php
|
@ -1,37 +1,15 @@
|
||||||
<?php
|
<?php
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
IP Reg, a PHP/MySQL IPAM tool
|
IP Reg, a PHP/MySQL IPAM tool
|
||||||
Copyright (C) 2007-2009 Wietse Warendorff
|
Copyright (C) 2007-2009 Wietse Warendorff (up to v0.5)
|
||||||
|
Copyright (C) 2011-2023 Thomas Hooge
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
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 this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
For more information, visit http://sourceforge.net/projects/ipreg,
|
|
||||||
or contact me at wietsew@users.sourceforge.net
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
// start page
|
|
||||||
// includes
|
|
||||||
include("includes.php");
|
include("includes.php");
|
||||||
|
|
||||||
// start output
|
|
||||||
include("header.php");
|
include("header.php");
|
||||||
|
|
||||||
// set language variables
|
|
||||||
$smarty->assign($lang);
|
|
||||||
|
|
||||||
// setup subnet
|
|
||||||
// build query
|
|
||||||
$query = "SELECT
|
$query = "SELECT
|
||||||
s.subnet_id,
|
s.subnet_id,
|
||||||
s.subnet_address,
|
s.subnet_address,
|
||||||
|
@ -47,14 +25,10 @@
|
||||||
ORDER BY
|
ORDER BY
|
||||||
INET_ATON(s.subnet_address)";
|
INET_ATON(s.subnet_address)";
|
||||||
|
|
||||||
// run query
|
|
||||||
$subnets = $db->db_select($query);
|
$subnets = $db->db_select($query);
|
||||||
$smarty->assign("subnets", $subnets);
|
|
||||||
|
|
||||||
// end page
|
$smarty->assign("subnets", $subnets);
|
||||||
// output
|
|
||||||
$smarty->display("subnet.tpl");
|
$smarty->display("subnet.tpl");
|
||||||
|
|
||||||
// end output
|
|
||||||
include("footer.php");
|
include("footer.php");
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -1,40 +1,18 @@
|
||||||
<?php
|
<?php
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
IP Reg, a PHP/MySQL IPAM tool
|
IP Reg, a PHP/MySQL IPAM tool
|
||||||
Copyright (C) 2007-2009 Wietse Warendorff
|
Copyright (C) 2007-2009 Wietse Warendorff (up to v0.5)
|
||||||
|
Copyright (C) 2011-2023 Thomas Hooge
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
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 this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
For more information, visit http://sourceforge.net/projects/ipreg,
|
|
||||||
or contact me at wietsew@users.sourceforge.net
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
// start page
|
|
||||||
// includes
|
|
||||||
include("includes.php");
|
include("includes.php");
|
||||||
|
|
||||||
// get id
|
|
||||||
if((isset($_GET['vlan_id'])) ? $vlan_id = sanitize($_GET['vlan_id']) : $vlan_id = "");
|
if((isset($_GET['vlan_id'])) ? $vlan_id = sanitize($_GET['vlan_id']) : $vlan_id = "");
|
||||||
|
|
||||||
// start output
|
|
||||||
include("header.php");
|
include("header.php");
|
||||||
|
|
||||||
// set language variables
|
|
||||||
$smarty->assign($lang);
|
|
||||||
|
|
||||||
// setup vlan
|
|
||||||
// build query
|
|
||||||
$query = "SELECT
|
$query = "SELECT
|
||||||
vlan_id,
|
vlan_id,
|
||||||
vlan_number,
|
vlan_number,
|
||||||
|
@ -44,7 +22,6 @@
|
||||||
ORDER BY
|
ORDER BY
|
||||||
vlan_name";
|
vlan_name";
|
||||||
|
|
||||||
// run query
|
|
||||||
$vlans = $db->db_select($query);
|
$vlans = $db->db_select($query);
|
||||||
$vlan_options[0] = $lang['lang_option_none'];
|
$vlan_options[0] = $lang['lang_option_none'];
|
||||||
foreach ($vlans as $vlan) {
|
foreach ($vlans as $vlan) {
|
||||||
|
@ -52,10 +29,7 @@
|
||||||
}
|
}
|
||||||
$smarty->assign("vlan_options", $vlan_options);
|
$smarty->assign("vlan_options", $vlan_options);
|
||||||
|
|
||||||
// end page
|
|
||||||
// output
|
|
||||||
$smarty->display("subnetadd.tpl");
|
$smarty->display("subnetadd.tpl");
|
||||||
|
|
||||||
// end output
|
|
||||||
include("footer.php");
|
include("footer.php");
|
||||||
?>
|
?>
|
|
@ -1,40 +1,19 @@
|
||||||
<?php
|
<?php
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
IP Reg, a PHP/MySQL IPAM tool
|
IP Reg, a PHP/MySQL IPAM tool
|
||||||
Copyright (C) 2007-2009 Wietse Warendorff
|
Copyright (C) 2007-2009 Wietse Warendorff (up to v0.5)
|
||||||
|
Copyright (C) 2011-2023 Thomas Hooge
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
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 this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
For more information, visit http://sourceforge.net/projects/ipreg,
|
|
||||||
or contact me at wietsew@users.sourceforge.net
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
// start page
|
|
||||||
// includes
|
|
||||||
include("includes.php");
|
include("includes.php");
|
||||||
|
|
||||||
// get id
|
|
||||||
$subnet_id = sanitize($_GET['subnet_id']);
|
$subnet_id = sanitize($_GET['subnet_id']);
|
||||||
|
|
||||||
// start output
|
|
||||||
include("header.php");
|
include("header.php");
|
||||||
|
|
||||||
// set language variables
|
// subnet
|
||||||
$smarty->assign($lang);
|
|
||||||
|
|
||||||
// setup subnet
|
|
||||||
// build query
|
|
||||||
$query = "SELECT
|
$query = "SELECT
|
||||||
subnet_address,
|
subnet_address,
|
||||||
subnet_mask
|
subnet_mask
|
||||||
|
@ -43,16 +22,13 @@
|
||||||
WHERE
|
WHERE
|
||||||
subnet_id=" . $subnet_id;
|
subnet_id=" . $subnet_id;
|
||||||
|
|
||||||
// run query
|
|
||||||
$subnet = $db->db_select($query);
|
$subnet = $db->db_select($query);
|
||||||
|
|
||||||
// send to tpl
|
|
||||||
$smarty->assign("subnet_id", $subnet_id);
|
$smarty->assign("subnet_id", $subnet_id);
|
||||||
$smarty->assign("subnet_address", $subnet[0]['subnet_address']);
|
$smarty->assign("subnet_address", $subnet[0]['subnet_address']);
|
||||||
$smarty->assign("subnet_mask", $subnet[0]['subnet_mask']);
|
$smarty->assign("subnet_mask", $subnet[0]['subnet_mask']);
|
||||||
|
|
||||||
// setup node
|
// node
|
||||||
// build query
|
|
||||||
$query = "SELECT
|
$query = "SELECT
|
||||||
node_id,
|
node_id,
|
||||||
node_ip
|
node_ip
|
||||||
|
@ -63,14 +39,10 @@
|
||||||
ORDER BY
|
ORDER BY
|
||||||
INET_ATON(node_ip)";
|
INET_ATON(node_ip)";
|
||||||
|
|
||||||
// run query
|
|
||||||
$nodes = $db->db_select($query);
|
$nodes = $db->db_select($query);
|
||||||
$smarty->assign("nodes", $nodes);
|
|
||||||
|
|
||||||
// end page
|
$smarty->assign("nodes", $nodes);
|
||||||
// output
|
|
||||||
$smarty->display("subnetdel.tpl");
|
$smarty->display("subnetdel.tpl");
|
||||||
|
|
||||||
// footer
|
|
||||||
include("footer.php");
|
include("footer.php");
|
||||||
?>
|
?>
|
|
@ -1,40 +1,18 @@
|
||||||
<?php
|
<?php
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
IP Reg, a PHP/MySQL IPAM tool
|
IP Reg, a PHP/MySQL IPAM tool
|
||||||
Copyright (C) 2007-2009 Wietse Warendorff
|
Copyright (C) 2007-2009 Wietse Warendorff (up to v0.5)
|
||||||
|
Copyright (C) 2011-2023 Thomas Hooge
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
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 this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
For more information, visit http://sourceforge.net/projects/ipreg,
|
|
||||||
or contact me at wietsew@users.sourceforge.net
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
// start page
|
|
||||||
// includes
|
|
||||||
include("includes.php");
|
include("includes.php");
|
||||||
|
|
||||||
// get id
|
|
||||||
$subnet_id = sanitize($_GET['subnet_id']);
|
$subnet_id = sanitize($_GET['subnet_id']);
|
||||||
|
|
||||||
// start output
|
|
||||||
include("header.php");
|
include("header.php");
|
||||||
|
|
||||||
// set language variables
|
|
||||||
$smarty->assign($lang);
|
|
||||||
|
|
||||||
// setup subnet
|
|
||||||
// build query
|
|
||||||
$query = "SELECT
|
$query = "SELECT
|
||||||
subnet_address,
|
subnet_address,
|
||||||
subnet_mask,
|
subnet_mask,
|
||||||
|
@ -48,10 +26,8 @@
|
||||||
WHERE
|
WHERE
|
||||||
subnet_id=" . $subnet_id;
|
subnet_id=" . $subnet_id;
|
||||||
|
|
||||||
// run query
|
|
||||||
$subnet = $db->db_select($query);
|
$subnet = $db->db_select($query);
|
||||||
|
|
||||||
// send to tpl
|
|
||||||
$smarty->assign("subnet_id", $subnet_id);
|
$smarty->assign("subnet_id", $subnet_id);
|
||||||
$smarty->assign("subnet_address", $subnet[0]['subnet_address']);
|
$smarty->assign("subnet_address", $subnet[0]['subnet_address']);
|
||||||
$smarty->assign("subnet_mask", $subnet[0]['subnet_mask']);
|
$smarty->assign("subnet_mask", $subnet[0]['subnet_mask']);
|
||||||
|
@ -61,10 +37,7 @@
|
||||||
$smarty->assign("subnet_ntp_server", $subnet[0]['ntp_server']);
|
$smarty->assign("subnet_ntp_server", $subnet[0]['ntp_server']);
|
||||||
$smarty->assign("subnet_info", $subnet[0]['subnet_info']);
|
$smarty->assign("subnet_info", $subnet[0]['subnet_info']);
|
||||||
|
|
||||||
// end page
|
|
||||||
// output
|
|
||||||
$smarty->display("subnetedit.tpl");
|
$smarty->display("subnetedit.tpl");
|
||||||
|
|
||||||
// end output
|
|
||||||
include("footer.php");
|
include("footer.php");
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -1,63 +1,34 @@
|
||||||
<?php
|
<?php
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
IP Reg, a PHP/MySQL IPAM tool
|
IP Reg, a PHP/MySQL IPAM tool
|
||||||
Copyright (C) 2007-2009 Wietse Warendorff
|
Copyright (C) 2007-2009 Wietse Warendorff (up to v0.5)
|
||||||
|
Copyright (C) 2011-2023 Thomas Hooge
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
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 this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
For more information, visit http://sourceforge.net/projects/ipreg,
|
|
||||||
or contact me at wietsew@users.sourceforge.net
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
// start page
|
|
||||||
// includes
|
|
||||||
include("includes.php");
|
include("includes.php");
|
||||||
|
|
||||||
// get ip and id
|
|
||||||
$subnet_id = sanitize($_GET['subnet_id']);
|
$subnet_id = sanitize($_GET['subnet_id']);
|
||||||
|
|
||||||
// start output
|
|
||||||
include("header.php");
|
include("header.php");
|
||||||
|
|
||||||
// set language variables
|
|
||||||
$smarty->assign($lang);
|
|
||||||
|
|
||||||
// setup subnet
|
|
||||||
// build query
|
|
||||||
$query = "SELECT
|
$query = "SELECT
|
||||||
subnet.subnet_address AS subnet_address,
|
subnet_address,
|
||||||
subnet.subnet_mask AS subnet_mask
|
subnet_mask
|
||||||
FROM
|
FROM
|
||||||
subnet
|
subnet
|
||||||
WHERE
|
WHERE
|
||||||
subnet.subnet_id=" . $subnet_id;
|
subnet_id=" . $subnet_id;
|
||||||
|
|
||||||
// run query
|
|
||||||
$subnet = $db->db_select($query);
|
$subnet = $db->db_select($query);
|
||||||
|
|
||||||
$smarty->assign("subnet_id", $subnet_id);
|
$smarty->assign("subnet_id", $subnet_id);
|
||||||
$smarty->assign("subnet_address", $subnet[0]['subnet_address']);
|
$smarty->assign("subnet_address", $subnet[0]['subnet_address']);
|
||||||
$smarty->assign("subnet_mask", $subnet[0]['subnet_mask']);
|
$smarty->assign("subnet_mask", $subnet[0]['subnet_mask']);
|
||||||
|
|
||||||
// start parent
|
|
||||||
// build query
|
|
||||||
$smarty->assign("location_options", $db->options_location());
|
$smarty->assign("location_options", $db->options_location());
|
||||||
|
|
||||||
// end page
|
|
||||||
// output
|
|
||||||
$smarty->display("subnetlocationadd.tpl");
|
$smarty->display("subnetlocationadd.tpl");
|
||||||
|
|
||||||
// end output
|
|
||||||
include("footer.php");
|
include("footer.php");
|
||||||
?>
|
?>
|
|
@ -1,47 +1,26 @@
|
||||||
<?php
|
<?php
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
IP Reg, a PHP/MySQL IPAM tool
|
IP Reg, a PHP/MySQL IPAM tool
|
||||||
Copyright (C) 2007-2009 Wietse Warendorff
|
Copyright (C) 2007-2009 Wietse Warendorff (up to v0.5)
|
||||||
|
Copyright (C) 2011-2023 Thomas Hooge
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
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 this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
For more information, visit http://sourceforge.net/projects/ipreg,
|
|
||||||
or contact me at wietsew@users.sourceforge.net
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
// start page
|
|
||||||
// includes
|
|
||||||
include("includes.php");
|
include("includes.php");
|
||||||
|
|
||||||
// get ip and id
|
|
||||||
$subnet_id = sanitize($_GET['subnet_id']);
|
$subnet_id = sanitize($_GET['subnet_id']);
|
||||||
|
|
||||||
// start output
|
|
||||||
include("header.php");
|
include("header.php");
|
||||||
|
|
||||||
// set language variables
|
// subnet
|
||||||
$smarty->assign($lang);
|
|
||||||
|
|
||||||
// setup subnet
|
|
||||||
// build query
|
|
||||||
$query = "SELECT
|
$query = "SELECT
|
||||||
subnet.subnet_address AS subnet_address,
|
subnet_address,
|
||||||
subnet.subnet_mask AS subnet_mask
|
subnet_mask
|
||||||
FROM
|
FROM
|
||||||
subnet
|
subnet
|
||||||
WHERE
|
WHERE
|
||||||
subnet.subnet_id=" . $subnet_id;
|
subnet_id=" . $subnet_id;
|
||||||
|
|
||||||
// run query
|
// run query
|
||||||
$subnet = $db->db_select($query);
|
$subnet = $db->db_select($query);
|
||||||
|
@ -50,19 +29,16 @@
|
||||||
$smarty->assign("subnet_address", $subnet[0]['subnet_address']);
|
$smarty->assign("subnet_address", $subnet[0]['subnet_address']);
|
||||||
$smarty->assign("subnet_mask", $subnet[0]['subnet_mask']);
|
$smarty->assign("subnet_mask", $subnet[0]['subnet_mask']);
|
||||||
|
|
||||||
// setup location
|
// location
|
||||||
// build query
|
|
||||||
$query = "SELECT
|
$query = "SELECT
|
||||||
location.location_id AS location_id,
|
l.location_id,
|
||||||
location.location_name AS location_name
|
l.location_name
|
||||||
FROM
|
FROM
|
||||||
subnetlocation,
|
subnetlocation AS s LEFT JOIN location USING (location_id)
|
||||||
location
|
|
||||||
WHERE
|
WHERE
|
||||||
subnetlocation.subnet_id=" . $subnet_id . "
|
s.subnet_id=" . $subnet_id . "
|
||||||
AND location.location_id=subnetlocation.location_id
|
|
||||||
ORDER BY
|
ORDER BY
|
||||||
location.location_name";
|
l.location_name";
|
||||||
|
|
||||||
// run query
|
// run query
|
||||||
$records = $db->db_select($query);
|
$records = $db->db_select($query);
|
||||||
|
@ -72,11 +48,7 @@
|
||||||
}
|
}
|
||||||
$smarty->assign("location_options", $locations);
|
$smarty->assign("location_options", $locations);
|
||||||
|
|
||||||
|
|
||||||
// end page
|
|
||||||
// output
|
|
||||||
$smarty->display("subnetlocationdel.tpl");
|
$smarty->display("subnetlocationdel.tpl");
|
||||||
|
|
||||||
// end output
|
|
||||||
include("footer.php");
|
include("footer.php");
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -1,47 +1,25 @@
|
||||||
<?php
|
<?php
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
IP Reg, a PHP/MySQL IPAM tool
|
IP Reg, a PHP/MySQL IPAM tool
|
||||||
Copyright (C) 2007-2009 Wietse Warendorff
|
Copyright (C) 2007-2009 Wietse Warendorff (up to v0.5)
|
||||||
|
Copyright (C) 2011-2023 Thomas Hooge
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
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 this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
For more information, visit http://sourceforge.net/projects/ipreg,
|
|
||||||
or contact me at wietsew@users.sourceforge.net
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
// start page
|
|
||||||
// includes
|
|
||||||
include("includes.php");
|
include("includes.php");
|
||||||
|
|
||||||
// get ip and id
|
|
||||||
$subnet_id = sanitize($_GET['subnet_id']);
|
$subnet_id = sanitize($_GET['subnet_id']);
|
||||||
|
|
||||||
// start output
|
|
||||||
include("header.php");
|
include("header.php");
|
||||||
|
|
||||||
// set language variables
|
|
||||||
$smarty->assign($lang);
|
|
||||||
|
|
||||||
// setup subnet
|
|
||||||
// build query
|
|
||||||
$query = "SELECT
|
$query = "SELECT
|
||||||
subnet.subnet_address AS subnet_address,
|
subnet_address,
|
||||||
subnet.subnet_mask AS subnet_mask
|
subnet_mask
|
||||||
FROM
|
FROM
|
||||||
subnet
|
subnet
|
||||||
WHERE
|
WHERE
|
||||||
subnet.subnet_id=" . $subnet_id;
|
subnet_id=" . $subnet_id;
|
||||||
|
|
||||||
// run query
|
// run query
|
||||||
$subnet = $db->db_select($query);
|
$subnet = $db->db_select($query);
|
||||||
|
@ -50,10 +28,7 @@
|
||||||
$smarty->assign("subnet_address", $subnet[0]['subnet_address']);
|
$smarty->assign("subnet_address", $subnet[0]['subnet_address']);
|
||||||
$smarty->assign("subnet_mask", $subnet[0]['subnet_mask']);
|
$smarty->assign("subnet_mask", $subnet[0]['subnet_mask']);
|
||||||
|
|
||||||
// end page
|
|
||||||
// output
|
|
||||||
$smarty->display("subnetlocationedit.tpl");
|
$smarty->display("subnetlocationedit.tpl");
|
||||||
|
|
||||||
// end output
|
|
||||||
include("footer.php");
|
include("footer.php");
|
||||||
?>
|
?>
|
|
@ -1,46 +1,24 @@
|
||||||
<?php
|
<?php
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
IP Reg, a PHP/MySQL IPAM tool
|
IP Reg, a PHP/MySQL IPAM tool
|
||||||
Copyright (C) 2007-2009 Wietse Warendorff
|
Copyright (C) 2007-2009 Wietse Warendorff (up to v0.5)
|
||||||
|
Copyright (C) 2011-2023 Thomas Hooge
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
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 this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
For more information, visit http://sourceforge.net/projects/ipreg,
|
|
||||||
or contact me at wietsew@users.sourceforge.net
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
// start page
|
|
||||||
// includes
|
|
||||||
include("includes.php");
|
include("includes.php");
|
||||||
|
|
||||||
// get id
|
|
||||||
$subnet_id = sanitize($_GET['subnet_id']);
|
$subnet_id = sanitize($_GET['subnet_id']);
|
||||||
|
|
||||||
// get page
|
|
||||||
if(isset($_GET['page'])) {
|
if(isset($_GET['page'])) {
|
||||||
$page = sanitize($_GET['page']);
|
$page = sanitize($_GET['page']);
|
||||||
}
|
}
|
||||||
|
|
||||||
// start output
|
|
||||||
$smarty->assign("scripts",'changetext.js');
|
$smarty->assign("scripts",'changetext.js');
|
||||||
include("header.php");
|
include("header.php");
|
||||||
|
|
||||||
// set language variables
|
// subnet
|
||||||
$smarty->assign($lang);
|
|
||||||
|
|
||||||
// setup subnet
|
|
||||||
// build query
|
|
||||||
$query = "SELECT
|
$query = "SELECT
|
||||||
s.subnet_address,
|
s.subnet_address,
|
||||||
s.subnet_mask,
|
s.subnet_mask,
|
||||||
|
@ -57,7 +35,6 @@
|
||||||
GROUP BY
|
GROUP BY
|
||||||
s.subnet_id";
|
s.subnet_id";
|
||||||
|
|
||||||
// run query
|
|
||||||
$subnet = $db->db_select($query);
|
$subnet = $db->db_select($query);
|
||||||
|
|
||||||
// set needed variables
|
// set needed variables
|
||||||
|
@ -73,7 +50,6 @@
|
||||||
$node_counter = $subnet[0]['node_counter'];
|
$node_counter = $subnet[0]['node_counter'];
|
||||||
$subnet_usedpercentage = round((($node_counter/($host_counter-2))*100), 1);
|
$subnet_usedpercentage = round((($node_counter/($host_counter-2))*100), 1);
|
||||||
|
|
||||||
// send to tpl
|
|
||||||
$smarty->assign("subnet_id", $subnet_id);
|
$smarty->assign("subnet_id", $subnet_id);
|
||||||
$smarty->assign("subnet_address", $subnet_address);
|
$smarty->assign("subnet_address", $subnet_address);
|
||||||
$smarty->assign("subnet_mask", $subnet_mask);
|
$smarty->assign("subnet_mask", $subnet_mask);
|
||||||
|
@ -88,7 +64,8 @@
|
||||||
$smarty->assign("host_counter", $host_counter-2);
|
$smarty->assign("host_counter", $host_counter-2);
|
||||||
$smarty->assign("free_counter", (($host_counter-2)-$node_counter));
|
$smarty->assign("free_counter", (($host_counter-2)-$node_counter));
|
||||||
|
|
||||||
// setup subnet
|
// subnet
|
||||||
|
|
||||||
// split up the range
|
// split up the range
|
||||||
$iprange = explode('.', $subnet_address);
|
$iprange = explode('.', $subnet_address);
|
||||||
$iprange1 = $iprange[0];
|
$iprange1 = $iprange[0];
|
||||||
|
@ -261,7 +238,6 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
// get nodes for this subnetview and implement the values into the array
|
// get nodes for this subnetview and implement the values into the array
|
||||||
// build query
|
|
||||||
$query = "SELECT
|
$query = "SELECT
|
||||||
asset.asset_name,
|
asset.asset_name,
|
||||||
assetclassgroup.assetclassgroup_color,
|
assetclassgroup.assetclassgroup_color,
|
||||||
|
@ -279,19 +255,14 @@
|
||||||
AND assetclass.assetclass_id=asset.assetclass_id
|
AND assetclass.assetclass_id=asset.assetclass_id
|
||||||
AND assetclassgroup.assetclassgroup_id=assetclass.assetclassgroup_id";
|
AND assetclassgroup.assetclassgroup_id=assetclass.assetclassgroup_id";
|
||||||
|
|
||||||
// run query
|
|
||||||
$nodes = $db->db_select($query);
|
$nodes = $db->db_select($query);
|
||||||
|
|
||||||
// count results
|
|
||||||
$node_counter = count($nodes);
|
$node_counter = count($nodes);
|
||||||
|
|
||||||
// any nodes?
|
|
||||||
if ($node_counter>0) {
|
if ($node_counter>0) {
|
||||||
// get objects
|
// get objects
|
||||||
foreach($nodes AS $node) {
|
foreach($nodes AS $node) {
|
||||||
// add node-values to ip in subnet-array
|
// add node-values to ip in subnet-array
|
||||||
$subnet[$node['node_ip']] = $node;
|
$subnet[$node['node_ip']] = $node;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -324,11 +295,11 @@
|
||||||
// if(($i%$_SESSION['suser_imagecount']==0 && $i!=$nodes_displayed) ? $tr="</tr><tr>" : $tr="");
|
// if(($i%$_SESSION['suser_imagecount']==0 && $i!=$nodes_displayed) ? $tr="</tr><tr>" : $tr="");
|
||||||
|
|
||||||
// check if node-ip in DHCP-area
|
// check if node-ip in DHCP-area
|
||||||
$subnet[$node_ip]["dynamic"] = False;
|
$subnet[$node_ip]["dynamic"] = false;
|
||||||
if ($dhcpstart > 0) {
|
if ($dhcpstart > 0) {
|
||||||
$ipval = ip2long($node_ip);
|
$ipval = ip2long($node_ip);
|
||||||
if (($ipval >= $dhcpstart) and ($ipval <= $dhcpend)) {
|
if (($ipval >= $dhcpstart) and ($ipval <= $dhcpend)) {
|
||||||
$subnet[$node_ip]["dynamic"] = True;
|
$subnet[$node_ip]["dynamic"] = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -342,7 +313,6 @@
|
||||||
} else {
|
} else {
|
||||||
$subnet[$node_ip]["assetclassgroup_color"] = $config_color_unused;
|
$subnet[$node_ip]["assetclassgroup_color"] = $config_color_unused;
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (array_key_exists(0, $node) && $node[0]=="subnet_address") {
|
} else if (array_key_exists(0, $node) && $node[0]=="subnet_address") {
|
||||||
// subnet address to tpl
|
// subnet address to tpl
|
||||||
$subnet[$node_ip]["url"] = "";
|
$subnet[$node_ip]["url"] = "";
|
||||||
|
@ -360,16 +330,15 @@
|
||||||
$subnet[$node_ip]["assetclassgroup_color"] = $node['assetclassgroup_color'];
|
$subnet[$node_ip]["assetclassgroup_color"] = $node['assetclassgroup_color'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// update counter
|
// update counter
|
||||||
// $i++;
|
// $i++;
|
||||||
}
|
|
||||||
|
} // foreach
|
||||||
|
|
||||||
$smarty->assign("subnet", $subnet);
|
$smarty->assign("subnet", $subnet);
|
||||||
$smarty->assign("imagewrap", $_SESSION['suser_imagecount']);
|
$smarty->assign("imagewrap", $_SESSION['suser_imagecount']);
|
||||||
|
|
||||||
// setup vlan
|
// vlan
|
||||||
// build query
|
|
||||||
$query = "SELECT
|
$query = "SELECT
|
||||||
vlan.vlan_id AS vlan_id,
|
vlan.vlan_id AS vlan_id,
|
||||||
vlan.vlan_name AS vlan_name,
|
vlan.vlan_name AS vlan_name,
|
||||||
|
@ -387,8 +356,7 @@
|
||||||
$vlans = $db->db_select($query);
|
$vlans = $db->db_select($query);
|
||||||
$smarty->assign("vlans", $vlans);
|
$smarty->assign("vlans", $vlans);
|
||||||
|
|
||||||
// setup location
|
// location
|
||||||
// build query
|
|
||||||
$query = "SELECT
|
$query = "SELECT
|
||||||
l.location_id,
|
l.location_id,
|
||||||
l.location_name
|
l.location_name
|
||||||
|
@ -399,12 +367,10 @@
|
||||||
ORDER BY
|
ORDER BY
|
||||||
l.location_name";
|
l.location_name";
|
||||||
|
|
||||||
// run query
|
|
||||||
$locations = $db->db_select($query);
|
$locations = $db->db_select($query);
|
||||||
$smarty->assign("locations", $locations);
|
$smarty->assign("locations", $locations);
|
||||||
|
|
||||||
// setup assetclassgroup
|
// assetclassgroup
|
||||||
// build query
|
|
||||||
$query = "SELECT
|
$query = "SELECT
|
||||||
assetclassgroup_id AS id,
|
assetclassgroup_id AS id,
|
||||||
assetclassgroup_name AS name,
|
assetclassgroup_name AS name,
|
||||||
|
@ -423,10 +389,7 @@
|
||||||
$assetclassgroups = $db->db_select($query);
|
$assetclassgroups = $db->db_select($query);
|
||||||
$smarty->assign("assetclassgroups", $assetclassgroups);
|
$smarty->assign("assetclassgroups", $assetclassgroups);
|
||||||
|
|
||||||
// end page
|
|
||||||
// output
|
|
||||||
$smarty->display("subnetview.tpl");
|
$smarty->display("subnetview.tpl");
|
||||||
|
|
||||||
// end output
|
|
||||||
include("footer.php");
|
include("footer.php");
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -1,47 +1,28 @@
|
||||||
<?php
|
<?php
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
IP Reg, a PHP/MySQL IPAM tool
|
IP Reg, a PHP/MySQL IPAM tool
|
||||||
Copyright (C) 2007-2009 Wietse Warendorff
|
Copyright (C) 2007-2009 Wietse Warendorff (up to v0.5)
|
||||||
|
Copyright (C) 2011-2023 Thomas Hooge
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
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 this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
For more information, visit http://sourceforge.net/projects/ipreg,
|
|
||||||
or contact me at wietsew@users.sourceforge.net
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
// start page
|
|
||||||
// includes
|
|
||||||
include("includes.php");
|
include("includes.php");
|
||||||
|
|
||||||
// get ip and id
|
|
||||||
$subnet_id = sanitize($_GET['subnet_id']);
|
$subnet_id = sanitize($_GET['subnet_id']);
|
||||||
|
|
||||||
// start output
|
|
||||||
include("header.php");
|
include("header.php");
|
||||||
|
|
||||||
// set language variables
|
|
||||||
$smarty->assign($lang);
|
|
||||||
|
|
||||||
// setup subnet
|
// subnet
|
||||||
// build query
|
// build query
|
||||||
$query = "SELECT
|
$query = "SELECT
|
||||||
subnet.subnet_address AS subnet_address,
|
subnet_address,
|
||||||
subnet.subnet_mask AS subnet_mask
|
subnet_mask
|
||||||
FROM
|
FROM
|
||||||
subnet
|
subnet
|
||||||
WHERE
|
WHERE
|
||||||
subnet.subnet_id=" . $subnet_id;
|
subnet_id=" . $subnet_id;
|
||||||
|
|
||||||
// run query
|
// run query
|
||||||
$subnet = $db->db_select($query);
|
$subnet = $db->db_select($query);
|
||||||
|
@ -50,16 +31,15 @@
|
||||||
$smarty->assign("subnet_address", $subnet[0]['subnet_address']);
|
$smarty->assign("subnet_address", $subnet[0]['subnet_address']);
|
||||||
$smarty->assign("subnet_mask", $subnet[0]['subnet_mask']);
|
$smarty->assign("subnet_mask", $subnet[0]['subnet_mask']);
|
||||||
|
|
||||||
// setup vlan
|
// vlan
|
||||||
// build query
|
|
||||||
$query = " SELECT
|
$query = " SELECT
|
||||||
vlan.vlan_id AS vlan_id,
|
vlan_id,
|
||||||
vlan.vlan_number AS vlan_number,
|
vlan_number,
|
||||||
vlan.vlan_name AS vlan_name
|
vlan_name
|
||||||
FROM
|
FROM
|
||||||
vlan
|
vlan
|
||||||
WHERE
|
WHERE
|
||||||
vlan.vlan_id NOT IN (
|
vlan_id NOT IN (
|
||||||
SELECT
|
SELECT
|
||||||
vlan_id
|
vlan_id
|
||||||
FROM
|
FROM
|
||||||
|
@ -68,22 +48,15 @@
|
||||||
subnet_id=" . $subnet_id . "
|
subnet_id=" . $subnet_id . "
|
||||||
)
|
)
|
||||||
ORDER BY
|
ORDER BY
|
||||||
vlan.vlan_number";
|
vlan_number";
|
||||||
|
|
||||||
// run query
|
|
||||||
$vlans = $db->db_select($query);
|
$vlans = $db->db_select($query);
|
||||||
foreach ($vlans as $vlan) {
|
foreach ($vlans as $vlan) {
|
||||||
$vlan_options[$vlan['vlan_id']] = $vlan['vlan_name'];
|
$vlan_options[$vlan['vlan_id']] = $vlan['vlan_name'];
|
||||||
}
|
}
|
||||||
$smarty->assign("vlan_options", $vlan_options);
|
$smarty->assign("vlan_options", $vlan_options);
|
||||||
|
|
||||||
// $smarty->assign("vlans", $vlans);
|
|
||||||
|
|
||||||
|
|
||||||
// end page
|
|
||||||
// output
|
|
||||||
$smarty->display("subnetvlanadd.tpl");
|
$smarty->display("subnetvlanadd.tpl");
|
||||||
|
|
||||||
// end output
|
|
||||||
include("footer.php");
|
include("footer.php");
|
||||||
?>
|
?>
|
|
@ -1,47 +1,26 @@
|
||||||
<?php
|
<?php
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
IP Reg, a PHP/MySQL IPAM tool
|
IP Reg, a PHP/MySQL IPAM tool
|
||||||
Copyright (C) 2007-2009 Wietse Warendorff
|
Copyright (C) 2007-2009 Wietse Warendorff (up to v0.5)
|
||||||
|
Copyright (C) 2011-2023 Thomas Hooge
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
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 this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
For more information, visit http://sourceforge.net/projects/ipreg,
|
|
||||||
or contact me at wietsew@users.sourceforge.net
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
// start page
|
|
||||||
// includes
|
|
||||||
include("includes.php");
|
include("includes.php");
|
||||||
|
|
||||||
// get ip and id
|
|
||||||
$subnet_id = sanitize($_GET['subnet_id']);
|
$subnet_id = sanitize($_GET['subnet_id']);
|
||||||
|
|
||||||
// start output
|
|
||||||
include("header.php");
|
include("header.php");
|
||||||
|
|
||||||
// set language variables
|
// subnet
|
||||||
$smarty->assign($lang);
|
|
||||||
|
|
||||||
// setup subnet
|
|
||||||
// build query
|
|
||||||
$query = "SELECT
|
$query = "SELECT
|
||||||
subnet.subnet_address AS subnet_address,
|
subnet_address,
|
||||||
subnet.subnet_mask AS subnet_mask
|
subnet_mask
|
||||||
FROM
|
FROM
|
||||||
subnet
|
subnet
|
||||||
WHERE
|
WHERE
|
||||||
subnet.subnet_id=" . $subnet_id;
|
subnet_id=" . $subnet_id;
|
||||||
|
|
||||||
// run query
|
// run query
|
||||||
$subnet = $db->db_select($query);
|
$subnet = $db->db_select($query);
|
||||||
|
@ -50,29 +29,23 @@
|
||||||
$smarty->assign("subnet_address", $subnet[0]['subnet_address']);
|
$smarty->assign("subnet_address", $subnet[0]['subnet_address']);
|
||||||
$smarty->assign("subnet_mask", $subnet[0]['subnet_mask']);
|
$smarty->assign("subnet_mask", $subnet[0]['subnet_mask']);
|
||||||
|
|
||||||
// setup vlan
|
// vlan
|
||||||
// build query
|
|
||||||
$query = "SELECT
|
$query = "SELECT
|
||||||
vlan.vlan_id AS vlan_id,
|
v.vlan_id,
|
||||||
vlan.vlan_number AS vlan_number,
|
v.vlan_number,
|
||||||
vlan.vlan_name AS vlan_name
|
v.vlan_name
|
||||||
FROM
|
FROM
|
||||||
subnetvlan,
|
subnetvlan AS s LEFT JOIN vlan AS v USING (vlan_id)
|
||||||
vlan
|
|
||||||
WHERE
|
WHERE
|
||||||
subnetvlan.subnet_id=" . $subnet_id . "
|
s.subnet_id=" . $subnet_id . "
|
||||||
AND vlan.vlan_id=subnetvlan.vlan_id
|
|
||||||
ORDER BY
|
ORDER BY
|
||||||
vlan.vlan_number";
|
v.vlan_number";
|
||||||
|
|
||||||
// run query
|
// run query
|
||||||
$vlans = $db->db_select($query);
|
$vlans = $db->db_select($query);
|
||||||
$smarty->assign("vlans", $vlans);
|
$smarty->assign("vlans", $vlans);
|
||||||
|
|
||||||
// end page
|
|
||||||
// output
|
|
||||||
$smarty->display("subnetvlandel.tpl");
|
$smarty->display("subnetvlandel.tpl");
|
||||||
|
|
||||||
// end output
|
|
||||||
include("footer.php");
|
include("footer.php");
|
||||||
?>
|
?>
|
|
@ -1,59 +1,33 @@
|
||||||
<?php
|
<?php
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
IP Reg, a PHP/MySQL IPAM tool
|
IP Reg, a PHP/MySQL IPAM tool
|
||||||
Copyright (C) 2007-2009 Wietse Warendorff
|
Copyright (C) 2007-2009 Wietse Warendorff (up to v0.5)
|
||||||
|
Copyright (C) 2011-2023 Thomas Hooge
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
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 this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
For more information, visit http://sourceforge.net/projects/ipreg,
|
|
||||||
or contact me at wietsew@users.sourceforge.net
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
// start page
|
|
||||||
// includes
|
|
||||||
include("includes.php");
|
include("includes.php");
|
||||||
|
|
||||||
// get ip and id
|
|
||||||
$subnet_id = sanitize($_GET['subnet_id']);
|
$subnet_id = sanitize($_GET['subnet_id']);
|
||||||
|
|
||||||
// start output
|
|
||||||
include("header.php");
|
include("header.php");
|
||||||
|
|
||||||
// set language variables
|
|
||||||
$smarty->assign($lang);
|
|
||||||
|
|
||||||
// setup subnet
|
|
||||||
// build query
|
|
||||||
$query = "SELECT
|
$query = "SELECT
|
||||||
subnet.subnet_address AS subnet_address,
|
subnet_address,
|
||||||
subnet.subnet_mask AS subnet_mask
|
subnet_mask
|
||||||
FROM
|
FROM
|
||||||
subnet
|
subnet
|
||||||
WHERE
|
WHERE
|
||||||
subnet.subnet_id=" . $subnet_id;
|
subnet_id=" . $subnet_id;
|
||||||
|
|
||||||
// run query
|
|
||||||
$subnet = $db->db_select($query);
|
$subnet = $db->db_select($query);
|
||||||
|
|
||||||
$smarty->assign("subnet_id", $subnet_id);
|
$smarty->assign("subnet_id", $subnet_id);
|
||||||
$smarty->assign("subnet_address", $subnet[0]['subnet_address']);
|
$smarty->assign("subnet_address", $subnet[0]['subnet_address']);
|
||||||
$smarty->assign("subnet_mask", $subnet[0]['subnet_mask']);
|
$smarty->assign("subnet_mask", $subnet[0]['subnet_mask']);
|
||||||
|
|
||||||
// end page
|
|
||||||
// output
|
|
||||||
$smarty->display("subnetvlanedit.tpl");
|
$smarty->display("subnetvlanedit.tpl");
|
||||||
|
|
||||||
// end output
|
|
||||||
include("footer.php");
|
include("footer.php");
|
||||||
?>
|
?>
|
|
@ -2,7 +2,7 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td class="header">
|
<td class="header">
|
||||||
<img class="icon" src="images/user.png" alt="" />
|
<img class="icon" src="images/user.png" alt="" />
|
||||||
{$lang_users} ({$user|@count})
|
{$lang_users} ({$users|@count})
|
||||||
</td>
|
</td>
|
||||||
<td align="right">
|
<td align="right">
|
||||||
<a href="useradd.php"><img src="images/user_add.png" alt="{$lang_user_add}" /></a>
|
<a href="useradd.php"><img src="images/user_add.png" alt="{$lang_user_add}" /></a>
|
||||||
|
|
42
user.php
42
user.php
|
@ -1,54 +1,28 @@
|
||||||
<?php
|
<?php
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
IP Reg, a PHP/MySQL IPAM tool
|
IP Reg, a PHP/MySQL IPAM tool
|
||||||
Copyright (C) 2007-2009 Wietse Warendorff
|
Copyright (C) 2007-2009 Wietse Warendorff (up to v0.5)
|
||||||
|
Copyright (C) 2011-2023 Thomas Hooge
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
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 this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
For more information, visit http://sourceforge.net/projects/ipreg,
|
|
||||||
or contact me at wietsew@users.sourceforge.net
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
// start page
|
|
||||||
// includes
|
|
||||||
include("includes.php");
|
include("includes.php");
|
||||||
|
|
||||||
// start output
|
|
||||||
include("header.php");
|
include("header.php");
|
||||||
|
|
||||||
// set language variables
|
|
||||||
$smarty->assign($lang);
|
|
||||||
|
|
||||||
// setup user
|
|
||||||
// build query
|
|
||||||
$query = "SELECT
|
$query = "SELECT
|
||||||
user.user_id AS user_id,
|
user_id,
|
||||||
user.user_name AS user_name,
|
user_name,
|
||||||
user.user_displayname AS user_displayname
|
user_displayname
|
||||||
FROM
|
FROM
|
||||||
user
|
user
|
||||||
ORDER BY
|
ORDER BY
|
||||||
user.user_name";
|
user_name";
|
||||||
|
|
||||||
// run query
|
|
||||||
$users = $db->db_select($query);
|
$users = $db->db_select($query);
|
||||||
$smarty->assign("users", $users);
|
|
||||||
|
|
||||||
// end page
|
$smarty->assign("users", $users);
|
||||||
// output
|
|
||||||
$smarty->display("user.tpl");
|
$smarty->display("user.tpl");
|
||||||
|
|
||||||
// end output
|
|
||||||
include("footer.php");
|
include("footer.php");
|
||||||
?>
|
?>
|
29
useradd.php
29
useradd.php
|
@ -1,39 +1,16 @@
|
||||||
<?php
|
<?php
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
IP Reg, a PHP/MySQL IPAM tool
|
IP Reg, a PHP/MySQL IPAM tool
|
||||||
Copyright (C) 2007-2009 Wietse Warendorff
|
Copyright (C) 2007-2009 Wietse Warendorff (up to v0.5)
|
||||||
|
Copyright (C) 2011-2023 Thomas Hooge
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
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 this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
For more information, visit http://sourceforge.net/projects/ipreg,
|
|
||||||
or contact me at wietsew@users.sourceforge.net
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
// start page
|
|
||||||
// includes
|
|
||||||
include("includes.php");
|
include("includes.php");
|
||||||
|
|
||||||
// start output
|
|
||||||
include("header.php");
|
include("header.php");
|
||||||
|
|
||||||
// set language variables
|
|
||||||
$smarty->assign($lang);
|
|
||||||
|
|
||||||
// end page
|
|
||||||
// output
|
|
||||||
$smarty->display("useradd.tpl");
|
$smarty->display("useradd.tpl");
|
||||||
|
|
||||||
// end output
|
|
||||||
include("footer.php");
|
include("footer.php");
|
||||||
?>
|
?>
|
37
userdel.php
37
userdel.php
|
@ -1,58 +1,31 @@
|
||||||
<?php
|
<?php
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
IP Reg, a PHP/MySQL IPAM tool
|
IP Reg, a PHP/MySQL IPAM tool
|
||||||
Copyright (C) 2007-2009 Wietse Warendorff
|
Copyright (C) 2007-2009 Wietse Warendorff (up to v0.5)
|
||||||
|
Copyright (C) 2011-2023 Thomas Hooge
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
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 this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
For more information, visit http://sourceforge.net/projects/ipreg,
|
|
||||||
or contact me at wietsew@users.sourceforge.net
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
// start page
|
|
||||||
// includes
|
|
||||||
include("includes.php");
|
include("includes.php");
|
||||||
|
|
||||||
// get id
|
|
||||||
$user_id = sanitize($_GET['user_id']);
|
$user_id = sanitize($_GET['user_id']);
|
||||||
|
|
||||||
// start output
|
|
||||||
include("header.php");
|
include("header.php");
|
||||||
|
|
||||||
// set language variables
|
|
||||||
$smarty->assign($lang);
|
|
||||||
|
|
||||||
// setup user
|
|
||||||
// build query
|
|
||||||
$query = "SELECT
|
$query = "SELECT
|
||||||
user.user_name AS user_name
|
user_name
|
||||||
FROM
|
FROM
|
||||||
user
|
user
|
||||||
WHERE
|
WHERE
|
||||||
user.user_id=" . $user_id;
|
user_id=" . $user_id;
|
||||||
|
|
||||||
// run query
|
|
||||||
$user = $db->db_select($query);
|
$user = $db->db_select($query);
|
||||||
|
|
||||||
// send to tpl
|
|
||||||
$smarty->assign("user_id", $user_id);
|
$smarty->assign("user_id", $user_id);
|
||||||
$smarty->assign("user_name", $user[0]['user_name']);
|
$smarty->assign("user_name", $user[0]['user_name']);
|
||||||
|
|
||||||
// end page
|
|
||||||
// output
|
|
||||||
$smarty->display("userdel.tpl");
|
$smarty->display("userdel.tpl");
|
||||||
|
|
||||||
// footer
|
|
||||||
include("footer.php");
|
include("footer.php");
|
||||||
?>
|
?>
|
39
useredit.php
39
useredit.php
|
@ -1,60 +1,33 @@
|
||||||
<?php
|
<?php
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
IP Reg, a PHP/MySQL IPAM tool
|
IP Reg, a PHP/MySQL IPAM tool
|
||||||
Copyright (C) 2007-2009 Wietse Warendorff
|
Copyright (C) 2007-2009 Wietse Warendorff (up to v0.5)
|
||||||
|
Copyright (C) 2011-2023 Thomas Hooge
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
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 this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
For more information, visit http://sourceforge.net/projects/ipreg,
|
|
||||||
or contact me at wietsew@users.sourceforge.net
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
// start page
|
|
||||||
// includes
|
|
||||||
include("includes.php");
|
include("includes.php");
|
||||||
|
|
||||||
// get id
|
|
||||||
$user_id = sanitize($_GET['user_id']);
|
$user_id = sanitize($_GET['user_id']);
|
||||||
|
|
||||||
// start output
|
|
||||||
include("header.php");
|
include("header.php");
|
||||||
|
|
||||||
// set language variables
|
|
||||||
$smarty->assign($lang);
|
|
||||||
|
|
||||||
// setup user
|
|
||||||
// build query
|
|
||||||
$query = "SELECT
|
$query = "SELECT
|
||||||
user.user_name AS user_name,
|
user_name,
|
||||||
user.user_displayname AS user_displayname
|
user_displayname
|
||||||
FROM
|
FROM
|
||||||
user
|
user
|
||||||
WHERE
|
WHERE
|
||||||
user.user_id=" . $user_id;
|
user_id=" . $user_id;
|
||||||
|
|
||||||
// run query
|
|
||||||
$user = $db->db_select($query);
|
$user = $db->db_select($query);
|
||||||
|
|
||||||
// send to tpl
|
|
||||||
$smarty->assign("user_id", $user_id);
|
$smarty->assign("user_id", $user_id);
|
||||||
$smarty->assign("user_name", $user[0]['user_name']);
|
$smarty->assign("user_name", $user[0]['user_name']);
|
||||||
$smarty->assign("user_displayname", $user[0]['user_displayname']);
|
$smarty->assign("user_displayname", $user[0]['user_displayname']);
|
||||||
|
|
||||||
// end page
|
|
||||||
// output
|
|
||||||
$smarty->display("useredit.tpl");
|
$smarty->display("useredit.tpl");
|
||||||
|
|
||||||
// footer
|
|
||||||
include("footer.php");
|
include("footer.php");
|
||||||
?>
|
?>
|
37
userview.php
37
userview.php
|
@ -1,47 +1,25 @@
|
||||||
<?php
|
<?php
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
IP Reg, a PHP/MySQL IPAM tool
|
IP Reg, a PHP/MySQL IPAM tool
|
||||||
Copyright (C) 2007-2009 Wietse Warendorff
|
Copyright (C) 2007-2009 Wietse Warendorff (up to v0.5)
|
||||||
|
Copyright (C) 2011-2023 Thomas Hooge
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
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 this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
For more information, visit http://sourceforge.net/projects/ipreg,
|
|
||||||
or contact me at wietsew@users.sourceforge.net
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
// start page
|
|
||||||
// includes
|
|
||||||
include("includes.php");
|
include("includes.php");
|
||||||
|
|
||||||
// get id
|
|
||||||
$user_id = sanitize($_GET['user_id']);
|
$user_id = sanitize($_GET['user_id']);
|
||||||
|
|
||||||
// start output
|
|
||||||
include("header.php");
|
include("header.php");
|
||||||
|
|
||||||
// set language variables
|
|
||||||
$smarty->assign($lang);
|
|
||||||
|
|
||||||
// setup user
|
|
||||||
// build query
|
|
||||||
$query = "SELECT
|
$query = "SELECT
|
||||||
user.user_name AS user_name,
|
user_name,
|
||||||
user.user_displayname AS user_displayname
|
user_displayname
|
||||||
FROM
|
FROM
|
||||||
user
|
user
|
||||||
WHERE
|
WHERE
|
||||||
user.user_id=" . $user_id;
|
user_id=" . $user_id;
|
||||||
|
|
||||||
// run query
|
// run query
|
||||||
$user = $db->db_select($query);
|
$user = $db->db_select($query);
|
||||||
|
@ -51,10 +29,7 @@
|
||||||
$smarty->assign("user_name", $user[0]['user_name']);
|
$smarty->assign("user_name", $user[0]['user_name']);
|
||||||
$smarty->assign("user_displayname", $user[0]['user_displayname']);
|
$smarty->assign("user_displayname", $user[0]['user_displayname']);
|
||||||
|
|
||||||
// end page
|
|
||||||
// output
|
|
||||||
$smarty->display("userview.tpl");
|
$smarty->display("userview.tpl");
|
||||||
|
|
||||||
// footer
|
|
||||||
include("footer.php");
|
include("footer.php");
|
||||||
?>
|
?>
|
44
vlan.php
44
vlan.php
|
@ -1,55 +1,29 @@
|
||||||
<?php
|
<?php
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
IP Reg, a PHP/MySQL IPAM tool
|
IP Reg, a PHP/MySQL IPAM tool
|
||||||
Copyright (C) 2007-2009 Wietse Warendorff
|
Copyright (C) 2007-2009 Wietse Warendorff (up to v0.5)
|
||||||
|
Copyright (C) 2011-2023 Thomas Hooge
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
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 this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
For more information, visit http://sourceforge.net/projects/ipreg,
|
|
||||||
or contact me at wietsew@users.sourceforge.net
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
// start page
|
|
||||||
// includes
|
|
||||||
include("includes.php");
|
include("includes.php");
|
||||||
|
|
||||||
// start output
|
|
||||||
include("header.php");
|
include("header.php");
|
||||||
|
|
||||||
// set language variables
|
|
||||||
$smarty->assign($lang);
|
|
||||||
|
|
||||||
// setup vlan
|
|
||||||
// build query
|
|
||||||
$query = "SELECT
|
$query = "SELECT
|
||||||
vlan.vlan_id AS vlan_id,
|
vlan_id,
|
||||||
vlan.vlan_number AS vlan_number,
|
vlan_number,
|
||||||
vlan.vlan_name AS vlan_name,
|
vlan_name,
|
||||||
LEFT(vlan.vlan_info, 60) AS vlan_info
|
LEFT(vlan_info, 60) AS vlan_info
|
||||||
FROM
|
FROM
|
||||||
vlan
|
vlan
|
||||||
ORDER BY
|
ORDER BY
|
||||||
vlan.vlan_number";
|
vlan_number";
|
||||||
|
|
||||||
// run query
|
|
||||||
$vlans = $db->db_select($query);
|
$vlans = $db->db_select($query);
|
||||||
$smarty->assign("vlans", $vlans);
|
|
||||||
|
|
||||||
// end page
|
$smarty->assign("vlans", $vlans);
|
||||||
// output
|
|
||||||
$smarty->display("vlan.tpl");
|
$smarty->display("vlan.tpl");
|
||||||
|
|
||||||
// end output
|
|
||||||
include("footer.php");
|
include("footer.php");
|
||||||
?>
|
?>
|
29
vlanadd.php
29
vlanadd.php
|
@ -1,39 +1,16 @@
|
||||||
<?php
|
<?php
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
IP Reg, a PHP/MySQL IPAM tool
|
IP Reg, a PHP/MySQL IPAM tool
|
||||||
Copyright (C) 2007-2009 Wietse Warendorff
|
Copyright (C) 2007-2009 Wietse Warendorff (up to v0.5)
|
||||||
|
Copyright (C) 2011-2023 Thomas Hooge
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
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 this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
For more information, visit http://sourceforge.net/projects/ipreg,
|
|
||||||
or contact me at wietsew@users.sourceforge.net
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
// start page
|
|
||||||
// includes
|
|
||||||
include("includes.php");
|
include("includes.php");
|
||||||
|
|
||||||
// start output
|
|
||||||
include("header.php");
|
include("header.php");
|
||||||
|
|
||||||
// set language variables
|
|
||||||
$smarty->assign($lang);
|
|
||||||
|
|
||||||
// end page
|
|
||||||
// output
|
|
||||||
$smarty->display("vlanadd.tpl");
|
$smarty->display("vlanadd.tpl");
|
||||||
|
|
||||||
// end output
|
|
||||||
include("footer.php");
|
include("footer.php");
|
||||||
?>
|
?>
|
40
vlandel.php
40
vlandel.php
|
@ -1,60 +1,32 @@
|
||||||
<?php
|
<?php
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
IP Reg, a PHP/MySQL IPAM tool
|
IP Reg, a PHP/MySQL IPAM tool
|
||||||
Copyright (C) 2007-2009 Wietse Warendorff
|
Copyright (C) 2007-2009 Wietse Warendorff (up to v0.5)
|
||||||
|
Copyright (C) 2011-2023 Thomas Hooge
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
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 this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
For more information, visit http://sourceforge.net/projects/ipreg,
|
|
||||||
or contact me at wietsew@users.sourceforge.net
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
// start page
|
|
||||||
// includes
|
|
||||||
include("includes.php");
|
include("includes.php");
|
||||||
|
|
||||||
// get id
|
|
||||||
$vlan_id = sanitize($_GET['vlan_id']);
|
$vlan_id = sanitize($_GET['vlan_id']);
|
||||||
|
|
||||||
// start output
|
|
||||||
include("header.php");
|
include("header.php");
|
||||||
|
|
||||||
// set language variables
|
|
||||||
$smarty->assign($lang);
|
|
||||||
|
|
||||||
// setup vlan
|
|
||||||
// build query
|
|
||||||
$query = "SELECT
|
$query = "SELECT
|
||||||
vlan.vlan_name AS vlan_name,
|
vlan_name,
|
||||||
vlan.vlan_number AS vlan_number
|
vlan_number
|
||||||
FROM
|
FROM
|
||||||
vlan
|
vlan
|
||||||
WHERE
|
WHERE
|
||||||
vlan.vlan_id=" . $vlan_id;
|
vlan_id=" . $vlan_id;
|
||||||
|
|
||||||
// run query
|
|
||||||
$vlan = $db->db_select($query);
|
$vlan = $db->db_select($query);
|
||||||
|
|
||||||
// send to tpl
|
|
||||||
$smarty->assign("vlan_id", $vlan_id);
|
$smarty->assign("vlan_id", $vlan_id);
|
||||||
$smarty->assign("vlan_name", $vlan[0]['vlan_name']);
|
$smarty->assign("vlan_name", $vlan[0]['vlan_name']);
|
||||||
$smarty->assign("vlan_number", $vlan[0]['vlan_number']);
|
$smarty->assign("vlan_number", $vlan[0]['vlan_number']);
|
||||||
|
|
||||||
// end page
|
|
||||||
// output
|
|
||||||
$smarty->display("vlandel.tpl");
|
$smarty->display("vlandel.tpl");
|
||||||
|
|
||||||
// footer
|
|
||||||
include("footer.php");
|
include("footer.php");
|
||||||
?>
|
?>
|
41
vlanedit.php
41
vlanedit.php
|
@ -1,62 +1,35 @@
|
||||||
<?php
|
<?php
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
IP Reg, a PHP/MySQL IPAM tool
|
IP Reg, a PHP/MySQL IPAM tool
|
||||||
Copyright (C) 2007-2009 Wietse Warendorff
|
Copyright (C) 2007-2009 Wietse Warendorff (up to v0.5)
|
||||||
|
Copyright (C) 2011-2023 Thomas Hooge
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
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 this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
For more information, visit http://sourceforge.net/projects/ipreg,
|
|
||||||
or contact me at wietsew@users.sourceforge.net
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
// start page
|
|
||||||
// includes
|
|
||||||
include("includes.php");
|
include("includes.php");
|
||||||
|
|
||||||
// get id
|
|
||||||
$vlan_id = sanitize($_GET['vlan_id']);
|
$vlan_id = sanitize($_GET['vlan_id']);
|
||||||
|
|
||||||
// start output
|
|
||||||
include("header.php");
|
include("header.php");
|
||||||
|
|
||||||
// set language variables
|
|
||||||
$smarty->assign($lang);
|
|
||||||
|
|
||||||
// setup vlan
|
// setup vlan
|
||||||
// build query
|
|
||||||
$query = "SELECT
|
$query = "SELECT
|
||||||
vlan.vlan_name AS vlan_name,
|
vlan_name,
|
||||||
vlan.vlan_number AS vlan_number,
|
vlan_number,
|
||||||
vlan.vlan_info AS vlan_info
|
vlan_info
|
||||||
FROM
|
FROM
|
||||||
vlan
|
vlan
|
||||||
WHERE
|
WHERE
|
||||||
vlan.vlan_id=" . $vlan_id;
|
vlan_id=" . $vlan_id;
|
||||||
|
|
||||||
// run query
|
|
||||||
$vlan = $db->db_select($query);
|
$vlan = $db->db_select($query);
|
||||||
|
|
||||||
// send to tpl
|
|
||||||
$smarty->assign("vlan_id", $vlan_id);
|
$smarty->assign("vlan_id", $vlan_id);
|
||||||
$smarty->assign("vlan_name", $vlan[0]['vlan_name']);
|
$smarty->assign("vlan_name", $vlan[0]['vlan_name']);
|
||||||
$smarty->assign("vlan_number", $vlan[0]['vlan_number']);
|
$smarty->assign("vlan_number", $vlan[0]['vlan_number']);
|
||||||
$smarty->assign("vlan_info", $vlan[0]['vlan_info']);
|
$smarty->assign("vlan_info", $vlan[0]['vlan_info']);
|
||||||
|
|
||||||
// end page
|
|
||||||
// output
|
|
||||||
$smarty->display("vlanedit.tpl");
|
$smarty->display("vlanedit.tpl");
|
||||||
|
|
||||||
// footer
|
|
||||||
include("footer.php");
|
include("footer.php");
|
||||||
?>
|
?>
|
|
@ -1,47 +1,25 @@
|
||||||
<?php
|
<?php
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
IP Reg, a PHP/MySQL IPAM tool
|
IP Reg, a PHP/MySQL IPAM tool
|
||||||
Copyright (C) 2007-2009 Wietse Warendorff
|
Copyright (C) 2007-2009 Wietse Warendorff (up to v0.5)
|
||||||
|
Copyright (C) 2011-2023 Thomas Hooge
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
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 this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
For more information, visit http://sourceforge.net/projects/ipreg,
|
|
||||||
or contact me at wietsew@users.sourceforge.net
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
// start page
|
|
||||||
// includes
|
|
||||||
include("includes.php");
|
include("includes.php");
|
||||||
|
|
||||||
// get ip and id
|
|
||||||
$vlan_id = sanitize($_GET['vlan_id']);
|
$vlan_id = sanitize($_GET['vlan_id']);
|
||||||
|
|
||||||
// start output
|
|
||||||
include("header.php");
|
include("header.php");
|
||||||
|
// vlan
|
||||||
// set language variables
|
|
||||||
$smarty->assign($lang);
|
|
||||||
|
|
||||||
// setup vlan
|
|
||||||
// build query
|
|
||||||
$query = "SELECT
|
$query = "SELECT
|
||||||
vlan.vlan_name AS vlan_name,
|
vlan_name,
|
||||||
vlan.vlan_number AS vlan_number
|
vlan_number
|
||||||
FROM
|
FROM
|
||||||
vlan
|
vlan
|
||||||
WHERE
|
WHERE
|
||||||
vlan.vlan_id=" . $vlan_id;
|
vlan_id=" . $vlan_id;
|
||||||
|
|
||||||
// run query
|
// run query
|
||||||
$vlan = $db->db_select($query);
|
$vlan = $db->db_select($query);
|
||||||
|
@ -50,16 +28,15 @@
|
||||||
$smarty->assign("vlan_name", $vlan[0]['vlan_name']);
|
$smarty->assign("vlan_name", $vlan[0]['vlan_name']);
|
||||||
$smarty->assign("vlan_number", $vlan[0]['vlan_number']);
|
$smarty->assign("vlan_number", $vlan[0]['vlan_number']);
|
||||||
|
|
||||||
// setup subnet
|
// subnet
|
||||||
// build query
|
|
||||||
$query = " SELECT
|
$query = " SELECT
|
||||||
subnet.subnet_id AS subnet_id,
|
subnet_id,
|
||||||
subnet.subnet_address AS subnet_address,
|
subnet_address,
|
||||||
subnet.subnet_mask AS subnet_mask
|
subnet_mask
|
||||||
FROM
|
FROM
|
||||||
subnet
|
subnet
|
||||||
WHERE
|
WHERE
|
||||||
subnet.subnet_id NOT IN (
|
subnet_id NOT IN (
|
||||||
SELECT
|
SELECT
|
||||||
subnet_id
|
subnet_id
|
||||||
FROM
|
FROM
|
||||||
|
@ -68,19 +45,15 @@
|
||||||
vlan_id=" . $vlan_id . "
|
vlan_id=" . $vlan_id . "
|
||||||
)
|
)
|
||||||
ORDER BY
|
ORDER BY
|
||||||
INET_ATON(subnet.subnet_address)";
|
INET_ATON(subnet_address)";
|
||||||
|
|
||||||
// run query
|
|
||||||
$subnets = $db->db_select($query);
|
$subnets = $db->db_select($query);
|
||||||
foreach ($subnets as $subnet) {
|
foreach ($subnets as $subnet) {
|
||||||
$subnet_options[$subnet['subnet_id']] = $subnet['subnet_address'].'/'.$subnet['subnet_mask'];
|
$subnet_options[$subnet['subnet_id']] = $subnet['subnet_address'].'/'.$subnet['subnet_mask'];
|
||||||
}
|
}
|
||||||
$smarty->assign("subnet_options", $subnet_options);
|
$smarty->assign("subnet_options", $subnet_options);
|
||||||
|
|
||||||
// end page
|
|
||||||
// output
|
|
||||||
$smarty->display("vlansubnetadd.tpl");
|
$smarty->display("vlansubnetadd.tpl");
|
||||||
|
|
||||||
// end output
|
|
||||||
include("footer.php");
|
include("footer.php");
|
||||||
?>
|
?>
|
|
@ -1,47 +1,26 @@
|
||||||
<?php
|
<?php
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
IP Reg, a PHP/MySQL IPAM tool
|
IP Reg, a PHP/MySQL IPAM tool
|
||||||
Copyright (C) 2007-2009 Wietse Warendorff
|
Copyright (C) 2007-2009 Wietse Warendorff (up to v0.5)
|
||||||
|
Copyright (C) 2011-2023 Thomas Hooge
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
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 this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
For more information, visit http://sourceforge.net/projects/ipreg,
|
|
||||||
or contact me at wietsew@users.sourceforge.net
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
// start page
|
|
||||||
// includes
|
|
||||||
include("includes.php");
|
include("includes.php");
|
||||||
|
|
||||||
// get ip and id
|
|
||||||
$vlan_id = sanitize($_GET['vlan_id']);
|
$vlan_id = sanitize($_GET['vlan_id']);
|
||||||
|
|
||||||
// start output
|
|
||||||
include("header.php");
|
include("header.php");
|
||||||
|
|
||||||
// set language variables
|
// vlan
|
||||||
$smarty->assign($lang);
|
|
||||||
|
|
||||||
// setup vlan
|
|
||||||
// build query
|
|
||||||
$query = "SELECT
|
$query = "SELECT
|
||||||
vlan.vlan_name AS vlan_name,
|
vlan_name,
|
||||||
vlan.vlan_number AS vlan_number
|
vlan_number
|
||||||
FROM
|
FROM
|
||||||
vlan
|
vlan
|
||||||
WHERE
|
WHERE
|
||||||
vlan.vlan_id=" . $vlan_id;
|
vlan_id=" . $vlan_id;
|
||||||
|
|
||||||
// run query
|
// run query
|
||||||
$vlan = $db->db_select($query);
|
$vlan = $db->db_select($query);
|
||||||
|
@ -51,31 +30,24 @@
|
||||||
$smarty->assign("vlan_number", $vlan[0]['vlan_number']);
|
$smarty->assign("vlan_number", $vlan[0]['vlan_number']);
|
||||||
|
|
||||||
// setup subnet
|
// setup subnet
|
||||||
// build query
|
|
||||||
$query = "SELECT
|
$query = "SELECT
|
||||||
subnet.subnet_id AS subnet_id,
|
s.subnet_id,
|
||||||
subnet.subnet_address AS subnet_address,
|
s.subnet_address,
|
||||||
subnet.subnet_mask AS subnet_mask
|
s.subnet_mask
|
||||||
FROM
|
FROM
|
||||||
subnetvlan,
|
subnetvlan AS v LEFT JOIN subnet AS s USING(subnet_id)
|
||||||
subnet
|
|
||||||
WHERE
|
WHERE
|
||||||
subnetvlan.vlan_id=" . $vlan_id . "
|
v.vlan_id=" . $vlan_id . "
|
||||||
AND subnet.subnet_id=subnetvlan.subnet_id
|
|
||||||
ORDER BY
|
ORDER BY
|
||||||
INET_ATON(subnet.subnet_address)";
|
INET_ATON(s.subnet_address)";
|
||||||
|
|
||||||
// run query
|
|
||||||
$subnets = $db->db_select($query);
|
$subnets = $db->db_select($query);
|
||||||
foreach ($subnets as $subnet) {
|
foreach ($subnets as $subnet) {
|
||||||
$subnet_options[$subnet['subnet_id']] = $subnet['subnet_address'].'/'.$subnet['subnet_mask'];
|
$subnet_options[$subnet['subnet_id']] = $subnet['subnet_address'].'/'.$subnet['subnet_mask'];
|
||||||
}
|
}
|
||||||
$smarty->assign("subnet_options", $subnet_options);
|
$smarty->assign("subnet_options", $subnet_options);
|
||||||
|
|
||||||
// end page
|
|
||||||
// output
|
|
||||||
$smarty->display("vlansubnetdel.tpl");
|
$smarty->display("vlansubnetdel.tpl");
|
||||||
|
|
||||||
// end output
|
|
||||||
include("footer.php");
|
include("footer.php");
|
||||||
?>
|
?>
|
|
@ -1,60 +1,33 @@
|
||||||
<?php
|
<?php
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
IP Reg, a PHP/MySQL IPAM tool
|
IP Reg, a PHP/MySQL IPAM tool
|
||||||
Copyright (C) 2007-2009 Wietse Warendorff
|
Copyright (C) 2007-2009 Wietse Warendorff (up to v0.5)
|
||||||
|
Copyright (C) 2011-2023 Thomas Hooge
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
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 this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
For more information, visit http://sourceforge.net/projects/ipreg,
|
|
||||||
or contact me at wietsew@users.sourceforge.net
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
// start page
|
|
||||||
// includes
|
|
||||||
include("includes.php");
|
include("includes.php");
|
||||||
|
|
||||||
// get ip and id
|
|
||||||
$vlan_id = sanitize($_GET['vlan_id']);
|
$vlan_id = sanitize($_GET['vlan_id']);
|
||||||
|
|
||||||
// start output
|
|
||||||
include("header.php");
|
include("header.php");
|
||||||
|
|
||||||
// set language variables
|
|
||||||
$smarty->assign($lang);
|
|
||||||
|
|
||||||
// setup vlan
|
|
||||||
// build query
|
|
||||||
$query = "SELECT
|
$query = "SELECT
|
||||||
vlan.vlan_name AS vlan_name,
|
vlan_name,
|
||||||
vlan.vlan_number AS vlan_number
|
vlan_number
|
||||||
FROM
|
FROM
|
||||||
vlan
|
vlan
|
||||||
WHERE
|
WHERE
|
||||||
vlan.vlan_id=" . $vlan_id;
|
vlan_id=" . $vlan_id;
|
||||||
|
|
||||||
// run query
|
|
||||||
$vlan = $db->db_select($query);
|
$vlan = $db->db_select($query);
|
||||||
|
|
||||||
// send to tpl
|
|
||||||
$smarty->assign("vlan_id", $vlan_id);
|
$smarty->assign("vlan_id", $vlan_id);
|
||||||
$smarty->assign("vlan_name", $vlan[0]['vlan_name']);
|
$smarty->assign("vlan_name", $vlan[0]['vlan_name']);
|
||||||
$smarty->assign("vlan_number", $vlan[0]['vlan_number']);
|
$smarty->assign("vlan_number", $vlan[0]['vlan_number']);
|
||||||
|
|
||||||
// end page
|
|
||||||
// output
|
|
||||||
$smarty->display("vlansubnetedit.tpl");
|
$smarty->display("vlansubnetedit.tpl");
|
||||||
|
|
||||||
// end output
|
|
||||||
include("footer.php");
|
include("footer.php");
|
||||||
?>
|
?>
|
62
vlanview.php
62
vlanview.php
|
@ -1,82 +1,52 @@
|
||||||
<?php
|
<?php
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
IP Reg, a PHP/MySQL IPAM tool
|
IP Reg, a PHP/MySQL IPAM tool
|
||||||
Copyright (C) 2007-2009 Wietse Warendorff
|
Copyright (C) 2007-2009 Wietse Warendorff (up to v0.5)
|
||||||
|
Copyright (C) 2011-2023 Thomas Hooge
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
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 this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
For more information, visit http://sourceforge.net/projects/ipreg,
|
|
||||||
or contact me at wietsew@users.sourceforge.net
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
// start page
|
|
||||||
// includes
|
|
||||||
include("includes.php");
|
include("includes.php");
|
||||||
|
|
||||||
// get id
|
|
||||||
$vlan_id = sanitize($_GET['vlan_id']);
|
$vlan_id = sanitize($_GET['vlan_id']);
|
||||||
|
|
||||||
// start output
|
|
||||||
include("header.php");
|
include("header.php");
|
||||||
|
|
||||||
// set language variables
|
// vlan
|
||||||
$smarty->assign($lang);
|
|
||||||
|
|
||||||
// setup vlan
|
|
||||||
// build query
|
|
||||||
$query = "SELECT
|
$query = "SELECT
|
||||||
vlan.vlan_name AS vlan_name,
|
vlan_name,
|
||||||
vlan.vlan_number AS vlan_number,
|
vlan_number,
|
||||||
vlan.vlan_info AS vlan_info
|
vlan_info
|
||||||
FROM
|
FROM
|
||||||
vlan
|
vlan
|
||||||
WHERE
|
WHERE
|
||||||
vlan.vlan_id=" . $vlan_id;
|
vlan_id=" . $vlan_id;
|
||||||
|
|
||||||
// run query
|
|
||||||
$vlan = $db->db_select($query);
|
$vlan = $db->db_select($query);
|
||||||
|
|
||||||
// send to tpl
|
|
||||||
$smarty->assign("vlan_id", $vlan_id);
|
$smarty->assign("vlan_id", $vlan_id);
|
||||||
$smarty->assign("vlan_name", $vlan[0]['vlan_name']);
|
$smarty->assign("vlan_name", $vlan[0]['vlan_name']);
|
||||||
$smarty->assign("vlan_number", $vlan[0]['vlan_number']);
|
$smarty->assign("vlan_number", $vlan[0]['vlan_number']);
|
||||||
$smarty->assign("vlan_info", nl2br($vlan[0]['vlan_info']));
|
$smarty->assign("vlan_info", nl2br($vlan[0]['vlan_info']));
|
||||||
|
|
||||||
// setup subnets
|
// subnets
|
||||||
// build query
|
|
||||||
$query = "SELECT
|
$query = "SELECT
|
||||||
subnet.subnet_id,
|
s.subnet_id,
|
||||||
subnet.subnet_address,
|
s.subnet_address,
|
||||||
subnet.subnet_mask,
|
s.subnet_mask,
|
||||||
subnet.subnet_info
|
s.subnet_info
|
||||||
FROM
|
FROM
|
||||||
subnet,
|
subnet AS s LEFT JOIN subnetvlan AS v USING (subnet_id)
|
||||||
subnetvlan
|
|
||||||
WHERE
|
WHERE
|
||||||
subnetvlan.vlan_id=" . $vlan_id . "
|
v.vlan_id=" . $vlan_id . "
|
||||||
AND subnet.subnet_id=subnetvlan.subnet_id
|
|
||||||
ORDER BY
|
ORDER BY
|
||||||
INET_ATON(subnet.subnet_address)";
|
INET_ATON(s.subnet_address)";
|
||||||
|
|
||||||
// run query
|
|
||||||
$subnets = $db->db_select($query);
|
$subnets = $db->db_select($query);
|
||||||
$smarty->assign("subnets", $subnets);
|
$smarty->assign("subnets", $subnets);
|
||||||
|
|
||||||
// end page
|
|
||||||
// output
|
|
||||||
$smarty->display("vlanview.tpl");
|
$smarty->display("vlanview.tpl");
|
||||||
|
|
||||||
// end output
|
|
||||||
include("footer.php");
|
include("footer.php");
|
||||||
?>
|
?>
|
32
zone.php
32
zone.php
|
@ -1,36 +1,16 @@
|
||||||
<?php
|
<?php
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
IP Reg, a PHP/MySQL IPAM tool
|
IP Reg, a PHP/MySQL IPAM tool
|
||||||
Copyright (C) 2007-2009 Wietse Warendorff
|
Copyright (C) 2007-2009 Wietse Warendorff (up to v0.5)
|
||||||
|
Copyright (C) 2011-2023 Thomas Hooge
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
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 this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
For more information, visit http://sourceforge.net/projects/ipreg,
|
|
||||||
or contact me at wietsew@users.sourceforge.net
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
// start page
|
|
||||||
// includes
|
|
||||||
include("includes.php");
|
include("includes.php");
|
||||||
|
|
||||||
// start output
|
|
||||||
include("header.php");
|
include("header.php");
|
||||||
|
|
||||||
// set language variables
|
|
||||||
$smarty->assign($lang);
|
|
||||||
|
|
||||||
// build query
|
|
||||||
$query = "SELECT
|
$query = "SELECT
|
||||||
zone_id,
|
zone_id,
|
||||||
zone_origin,
|
zone_origin,
|
||||||
|
@ -42,14 +22,10 @@
|
||||||
ORDER BY
|
ORDER BY
|
||||||
zone_origin";
|
zone_origin";
|
||||||
|
|
||||||
// run query
|
|
||||||
$zones = $db->db_select($query);
|
$zones = $db->db_select($query);
|
||||||
$smarty->assign("zones", $zones);
|
|
||||||
|
|
||||||
// end page
|
$smarty->assign("zones", $zones);
|
||||||
// output
|
|
||||||
$smarty->display("zone.tpl");
|
$smarty->display("zone.tpl");
|
||||||
|
|
||||||
// end output
|
|
||||||
include("footer.php");
|
include("footer.php");
|
||||||
?>
|
?>
|
29
zoneadd.php
29
zoneadd.php
|
@ -1,39 +1,16 @@
|
||||||
<?php
|
<?php
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
IP Reg, a PHP/MySQL IPAM tool
|
IP Reg, a PHP/MySQL IPAM tool
|
||||||
Copyright (C) 2007-2009 Wietse Warendorff
|
Copyright (C) 2007-2009 Wietse Warendorff (up to v0.5)
|
||||||
|
Copyright (C) 2011-2023 Thomas Hooge
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
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 this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
For more information, visit http://sourceforge.net/projects/ipreg,
|
|
||||||
or contact me at wietsew@users.sourceforge.net
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
// start page
|
|
||||||
// includes
|
|
||||||
include("includes.php");
|
include("includes.php");
|
||||||
|
|
||||||
// start output
|
|
||||||
include("header.php");
|
include("header.php");
|
||||||
|
|
||||||
// set language variables
|
|
||||||
$smarty->assign($lang);
|
|
||||||
|
|
||||||
// end page
|
|
||||||
// output
|
|
||||||
$smarty->display("zoneadd.tpl");
|
$smarty->display("zoneadd.tpl");
|
||||||
|
|
||||||
// end output
|
|
||||||
include("footer.php");
|
include("footer.php");
|
||||||
?>
|
?>
|
35
zonedel.php
35
zonedel.php
|
@ -1,52 +1,23 @@
|
||||||
<?php
|
<?php
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
IP Reg, a PHP/MySQL IPAM tool
|
IP Reg, a PHP/MySQL IPAM tool
|
||||||
Copyright (C) 2007-2009 Wietse Warendorff
|
Copyright (C) 2007-2009 Wietse Warendorff (up to v0.5)
|
||||||
|
Copyright (C) 2011-2023 Thomas Hooge
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
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 this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
For more information, visit http://sourceforge.net/projects/ipreg,
|
|
||||||
or contact me at wietsew@users.sourceforge.net
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
// start page
|
|
||||||
// includes
|
|
||||||
include("includes.php");
|
include("includes.php");
|
||||||
|
|
||||||
// get id
|
|
||||||
$zone_id = sanitize($_GET['zone_id']);
|
$zone_id = sanitize($_GET['zone_id']);
|
||||||
|
|
||||||
// start output
|
|
||||||
include("header.php");
|
include("header.php");
|
||||||
|
|
||||||
// set language variables
|
|
||||||
$smarty->assign($lang);
|
|
||||||
|
|
||||||
// setup vlan
|
|
||||||
// build query
|
|
||||||
$query = "SELECT zone_id, zone_origin, zone_serial FROM zone WHERE zone_id=" . $zone_id;
|
$query = "SELECT zone_id, zone_origin, zone_serial FROM zone WHERE zone_id=" . $zone_id;
|
||||||
|
|
||||||
// run query
|
|
||||||
$zone = $db->db_select($query);
|
$zone = $db->db_select($query);
|
||||||
|
|
||||||
// send to tpl
|
|
||||||
$smarty->assign("zone", $zone[0]);
|
$smarty->assign("zone", $zone[0]);
|
||||||
|
|
||||||
// end page
|
|
||||||
// output
|
|
||||||
$smarty->display("zonedel.tpl");
|
$smarty->display("zonedel.tpl");
|
||||||
|
|
||||||
// footer
|
|
||||||
include("footer.php");
|
include("footer.php");
|
||||||
?>
|
?>
|
35
zoneedit.php
35
zoneedit.php
|
@ -1,40 +1,17 @@
|
||||||
<?php
|
<?php
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
IP Reg, a PHP/MySQL IPAM tool
|
IP Reg, a PHP/MySQL IPAM tool
|
||||||
Copyright (C) 2007-2009 Wietse Warendorff
|
Copyright (C) 2007-2009 Wietse Warendorff (up to v0.5)
|
||||||
|
Copyright (C) 2011-2023 Thomas Hooge
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
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 this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
For more information, visit http://sourceforge.net/projects/ipreg,
|
|
||||||
or contact me at wietsew@users.sourceforge.net
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
// start page
|
|
||||||
// includes
|
|
||||||
include("includes.php");
|
include("includes.php");
|
||||||
|
|
||||||
// get id
|
|
||||||
$zone_id = sanitize($_GET['zone_id']);
|
$zone_id = sanitize($_GET['zone_id']);
|
||||||
|
|
||||||
// start output
|
|
||||||
include("header.php");
|
include("header.php");
|
||||||
|
|
||||||
// set language variables
|
|
||||||
$smarty->assign($lang);
|
|
||||||
|
|
||||||
// setup assetclassgroup
|
|
||||||
// build query
|
|
||||||
$query = "SELECT
|
$query = "SELECT
|
||||||
zone_id, zone_soa, zone_hostmaster, zone_origin, zone_ttl_default,
|
zone_id, zone_soa, zone_hostmaster, zone_origin, zone_ttl_default,
|
||||||
zone_refresh, zone_retry, zone_expire, zone_ttl, zone_serial,
|
zone_refresh, zone_retry, zone_expire, zone_ttl, zone_serial,
|
||||||
|
@ -44,14 +21,10 @@
|
||||||
WHERE
|
WHERE
|
||||||
zone_id=" . $zone_id;
|
zone_id=" . $zone_id;
|
||||||
|
|
||||||
// run query
|
|
||||||
$zone = $db->db_select($query);
|
$zone = $db->db_select($query);
|
||||||
$smarty->assign("zone", $zone[0]);
|
|
||||||
|
|
||||||
// end page
|
$smarty->assign("zone", $zone[0]);
|
||||||
// output
|
|
||||||
$smarty->display("zoneedit.tpl");
|
$smarty->display("zoneedit.tpl");
|
||||||
|
|
||||||
// end output
|
|
||||||
include("footer.php");
|
include("footer.php");
|
||||||
?>
|
?>
|
34
zoneview.php
34
zoneview.php
|
@ -1,40 +1,18 @@
|
||||||
<?php
|
<?php
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
IP Reg, a PHP/MySQL IPAM tool
|
IP Reg, a PHP/MySQL IPAM tool
|
||||||
Copyright (C) 2007-2009 Wietse Warendorff
|
Copyright (C) 2007-2009 Wietse Warendorff (up to v0.5)
|
||||||
|
Copyright (C) 2011-2023 Thomas Hooge
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
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 this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
For more information, visit http://sourceforge.net/projects/ipreg,
|
|
||||||
or contact me at wietsew@users.sourceforge.net
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
// start page
|
|
||||||
// includes
|
|
||||||
include("includes.php");
|
include("includes.php");
|
||||||
|
|
||||||
// get id
|
|
||||||
$zone_id = sanitize($_GET['zone_id']);
|
$zone_id = sanitize($_GET['zone_id']);
|
||||||
|
|
||||||
// start output
|
|
||||||
include("header.php");
|
include("header.php");
|
||||||
|
|
||||||
// set language variables
|
|
||||||
$smarty->assign($lang);
|
|
||||||
|
|
||||||
// setup assetclassgroup
|
|
||||||
// build query
|
|
||||||
$query = "SELECT
|
$query = "SELECT
|
||||||
zone_id, zone_soa, zone_hostmaster, zone_origin, zone_ttl_default,
|
zone_id, zone_soa, zone_hostmaster, zone_origin, zone_ttl_default,
|
||||||
zone_refresh, zone_retry, zone_expire, zone_ttl, zone_serial,
|
zone_refresh, zone_retry, zone_expire, zone_ttl, zone_serial,
|
||||||
|
@ -44,14 +22,10 @@
|
||||||
WHERE
|
WHERE
|
||||||
zone_id=" . $zone_id;
|
zone_id=" . $zone_id;
|
||||||
|
|
||||||
// run query
|
|
||||||
$zone = $db->db_select($query);
|
$zone = $db->db_select($query);
|
||||||
$smarty->assign("zone", $zone[0]);
|
|
||||||
|
|
||||||
// end page
|
$smarty->assign("zone", $zone[0]);
|
||||||
// output
|
|
||||||
$smarty->display("zoneview.tpl");
|
$smarty->display("zoneview.tpl");
|
||||||
|
|
||||||
// end output
|
|
||||||
include("footer.php");
|
include("footer.php");
|
||||||
?>
|
?>
|
Loading…
Reference in New Issue