Changed database access to PDO using prepared statements

master
Thomas Hooge 1 year ago
parent a4ecd1bff7
commit 7c300e0a8f
  1. 50
      asset.php
  2. 21
      assetadd.php
  3. 19
      assetclass.php
  4. 19
      assetclassdel.php
  5. 22
      assetclassedit.php
  6. 17
      assetclassgroup.php
  7. 20
      assetclassgroupdel.php
  8. 24
      assetclassgroupedit.php
  9. 43
      assetclassgroupview.php
  10. 47
      assetclassview.php
  11. 33
      assetdel.php
  12. 21
      assetedit.php
  13. 50
      assetview.php
  14. 20
      assigniptonode.php
  15. 27
      assignnodetoasset.php
  16. 5
      dbconnect.php
  17. 54
      index.php
  18. 2
      lang/en.php
  19. 73
      lib.php
  20. 3
      lib/functions.php
  21. 14
      location.php
  22. 16
      locationadd.php
  23. 15
      locationdel.php
  24. 50
      locationedit.php
  25. 17
      locationsubnetadd.php
  26. 27
      locationsubnetdel.php
  27. 17
      locationsubnetedit.php
  28. 83
      locationview.php
  29. 93
      login.php
  30. 26
      natadd.php
  31. 43
      natdel.php
  32. 15
      natedit.php
  33. 48
      node.php
  34. 5
      nodeadd.php
  35. 19
      nodedel.php
  36. 38
      nodeedit.php
  37. 114
      nodeview.php
  38. 214
      search.php
  39. 1062
      submit.php
  40. 21
      subnet.php
  41. 16
      subnetadd.php
  42. 38
      subnetdel.php
  43. 33
      subnetedit.php
  44. 23
      subnetlocationadd.php
  45. 44
      subnetlocationdel.php
  46. 19
      subnetlocationedit.php
  47. 207
      subnetview.php
  48. 49
      subnetvlanadd.php
  49. 41
      subnetvlandel.php
  50. 19
      subnetvlanedit.php
  51. 296
      tpl/about.tpl
  52. 4
      tpl/asset.tpl
  53. 140
      tpl/assetadd.tpl
  54. 108
      tpl/assetclassadd.tpl
  55. 72
      tpl/assetclassdel.tpl
  56. 110
      tpl/assetclassedit.tpl
  57. 84
      tpl/assetclassgroupadd.tpl
  58. 76
      tpl/assetclassgroupdel.tpl
  59. 88
      tpl/assetclassgroupedit.tpl
  60. 121
      tpl/assetclassgroupview.tpl
  61. 12
      tpl/assetclassview.tpl
  62. 116
      tpl/assetdel.tpl
  63. 144
      tpl/assetedit.tpl
  64. 178
      tpl/assetview.tpl
  65. 126
      tpl/assigniptonode.tpl
  66. 210
      tpl/assignnodetoasset.tpl
  67. 46
      tpl/comments.tpl
  68. 18
      tpl/footer.tpl
  69. 122
      tpl/index.tpl
  70. 126
      tpl/locationadd.tpl
  71. 78
      tpl/locationdel.tpl
  72. 128
      tpl/locationedit.tpl
  73. 106
      tpl/locationsubnetadd.tpl
  74. 106
      tpl/locationsubnetdel.tpl
  75. 108
      tpl/locationsubnetedit.tpl
  76. 176
      tpl/locationview.tpl
  77. 136
      tpl/login.tpl
  78. 122
      tpl/natadd.tpl
  79. 8
      tpl/natdel.tpl
  80. 104
      tpl/natedit.tpl
  81. 3
      tpl/node.tpl
  82. 266
      tpl/nodeadd.tpl
  83. 76
      tpl/nodedel.tpl
  84. 252
      tpl/nodeedit.tpl
  85. 26
      tpl/nodeview.tpl
  86. 68
      tpl/options.tpl
  87. 220
      tpl/optionseditdisplay.tpl
  88. 102
      tpl/optionseditpassword.tpl
  89. 268
      tpl/search.tpl
  90. 158
      tpl/subnetadd.tpl
  91. 106
      tpl/subnetdel.tpl
  92. 168
      tpl/subnetedit.tpl
  93. 110
      tpl/subnetlocationadd.tpl
  94. 110
      tpl/subnetlocationdel.tpl
  95. 112
      tpl/subnetlocationedit.tpl
  96. 376
      tpl/subnetview.tpl
  97. 108
      tpl/subnetvlanadd.tpl
  98. 106
      tpl/subnetvlandel.tpl
  99. 108
      tpl/subnetvlanedit.tpl
  100. 64
      tpl/user.tpl
  101. Some files were not shown because too many files have changed in this diff Show More

@ -13,41 +13,33 @@ include("header.php");
// create letter links // create letter links
$query = "SELECT $sql = "SELECT DISTINCT SUBSTRING(UPPER(asset_name),1,1) AS asset_letter
SUBSTRING(UPPER(asset.asset_name),1,1) AS asset_letter FROM asset
FROM ORDER BY asset_letter";
asset $sth = $dbh->query($sql);
GROUP BY
asset_letter
ORDER BY
asset_letter";
$alphabet = $db->db_select($query); $alphabet = $sth->fetchAll();
$smarty->assign("alphabet", $alphabet); $smarty->assign("alphabet", $alphabet);
// setup current letter // total asset count
if(isset($_GET['asset_letter'])) { $sth = $dbh->query("SELECT COUNT(*) FROM asset");
$asset_letter = sanitize($_GET['asset_letter']); $smarty->assign("assetcount", $sth->fetchColumn());
// assetf for current letter
if (isset($_GET['asset_letter'])) {
$asset_letter = sanitize($_GET['asset_letter']);
} else { } else {
$asset_letter = $alphabet[0]['asset_letter']; $asset_letter = $alphabet[0]['asset_letter'];
} }
$query = "SELECT $sql = "SELECT a.asset_id, IF(LENGTH(a.asset_name)>0, a.asset_name, '...') AS asset_name,
a.asset_id, a.asset_info, c.assetclass_id, c.assetclass_name
IF(LENGTH(a.asset_name)>0, a.asset_name, '...') AS asset_name, FROM asset AS a LEFT OUTER JOIN assetclass AS c USING (assetclass_id)
a.asset_info, WHERE SUBSTRING(a.asset_name,1,1)=?
c.assetclass_id, ORDER BY a.asset_name";
c.assetclass_name $sth = $dbh->prepare($sql);
FROM $sth->execute([$asset_letter]);
asset AS a LEFT OUTER JOIN assetclass AS c USING (assetclass_id) $smarty->assign("assets", $sth->fetchAll());
WHERE
SUBSTRING(a.asset_name,1,1) = '" . $asset_letter . "'
ORDER BY
a.asset_name";
$assets = $db->db_select($query);
$smarty->assign("assets", $assets);
$smarty->display("asset.tpl"); $smarty->display("asset.tpl");

@ -12,18 +12,15 @@ include("includes.php");
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 = "");
include("header.php"); include("header.php");
$query = "SELECT $sql = "SELECT assetclass_id, assetclass_name
assetclass_id, FROM assetclass
assetclass_name ORDER BY assetclass_name";
FROM $sth = $dbh->query($sql);
assetclass
ORDER BY $assetclass_options = array();
assetclass_name"; foreach ($sth->fetchAll(PDO::FETCH_NUM) as $rec) {
$assetclass_options[$rec[0]] = $rec[1];
$assetclasses = $db->db_select($query);
foreach ($assetclasses as $assetclass) {
$assetclass_options[$assetclass['assetclass_id']] = $assetclass['assetclass_name'];
} }
$smarty->assign("assetclass_options", $assetclass_options); $smarty->assign("assetclass_options", $assetclass_options);

@ -10,20 +10,13 @@ SPDX-License-Identifier: GPL-3.0-or-later
include("includes.php"); include("includes.php");
include("header.php"); include("header.php");
$query = "SELECT $sql = "SELECT a.assetclass_id, a.assetclass_name, g.assetclassgroup_id,
a.assetclass_id, g.assetclassgroup_name, g.assetclassgroup_color
a.assetclass_name, FROM assetclass AS a LEFT OUTER JOIN assetclassgroup AS g USING (assetclassgroup_id)
g.assetclassgroup_id, ORDER BY a.assetclass_name";
g.assetclassgroup_name, $sth = $dbh->query($sql);
g.assetclassgroup_color $smarty->assign("assetclasses", $sth->fetchAll(PDO::FETCH_ASSOC));
FROM
assetclass AS a LEFT OUTER JOIN assetclassgroup AS g USING (assetclassgroup_id)
ORDER BY
a.assetclass_name";
$assetclasses = $db->db_select($query);
$smarty->assign("assetclasses", $assetclasses);
$smarty->display("assetclass.tpl"); $smarty->display("assetclass.tpl");
include("footer.php"); include("footer.php");

@ -13,18 +13,13 @@ $assetclass_id = sanitize($_GET['assetclass_id']);
include("header.php"); include("header.php");
$query = "SELECT $sql = "SELECT assetclass_id, assetclass_name
assetclass_id, FROM assetclass
assetclass_name WHERE assetclass_id=?";
FROM
assetclass $sth = $dbh->prepare($sql);
WHERE $sth->execute([$assetclass_id]);
assetclass_id=" . $assetclass_id; $smarty->assign("assetclass", $sth->fetch(PDO::FETCH_OBJ));
$assetclass = $db->db_select($query);
$smarty->assign("assetclass_id", $assetclass[0]['assetclass_id']);
$smarty->assign("assetclass_name", $assetclass[0]['assetclass_name']);
$smarty->display("assetclassdel.tpl"); $smarty->display("assetclassdel.tpl");

@ -12,22 +12,16 @@ include("includes.php");
$assetclass_id = sanitize($_GET['assetclass_id']); $assetclass_id = sanitize($_GET['assetclass_id']);
include("header.php"); include("header.php");
$query = "SELECT $sql = "SELECT assetclass_id AS id, assetclass_name AS name,
assetclass_id, assetclassgroup_id AS group_id
assetclass_name, FROM assetclass
assetclassgroup_id WHERE assetclass_id=?";
FROM $sth = $dbh->prepare($sql);
assetclass $sth->execute([$assetclass_id]);
WHERE
assetclass_id=" . $assetclass_id;
$assetclass = $db->db_select($query); $smarty->assign("assetclass", $sth->fetch(PDO::FETCH_OBJ));
$smarty->assign("assetclass_id", $assetclass[0]['assetclass_id']); $smarty->assign("assetclassgroup_options", db_get_options_assetclass());
$smarty->assign("assetclass_name", $assetclass[0]['assetclass_name']);
$smarty->assign("assetclassgroup_id", $assetclass[0]['assetclassgroup_id']);
$smarty->assign("assetclassgroup_options", $db->options_assetclassgroup());
$smarty->display("assetclassedit.tpl"); $smarty->display("assetclassedit.tpl");

@ -8,21 +8,14 @@ SPDX-License-Identifier: GPL-3.0-or-later
*****************************************************************************/ *****************************************************************************/
include("includes.php"); include("includes.php");
include("header.php"); include("header.php");
$query = "SELECT $sql = "SELECT assetclassgroup_id, assetclassgroup_name, assetclassgroup_color
assetclassgroup_id, FROM assetclassgroup
assetclassgroup_name, ORDER BY assetclassgroup_name";
assetclassgroup_color $sth = $dbh->query($sql);
FROM $smarty->assign('assetclassgroups', $sth->fetchAll(PDO::FETCH_ASSOC));
assetclassgroup
ORDER BY
assetclassgroup_name";
$assetclassgroups = $db->db_select($query);
$smarty->assign("assetclassgroups", $assetclassgroups);
$smarty->display("assetclassgroup.tpl"); $smarty->display("assetclassgroup.tpl");
include("footer.php"); include("footer.php");

@ -13,20 +13,12 @@ $assetclassgroup_id = sanitize($_GET['assetclassgroup_id']);
include("header.php"); include("header.php");
$smarty->assign($lang); $sql = "SELECT assetclassgroup_id AS id, assetclassgroup_name AS name
FROM assetclassgroup
$query = "SELECT WHERE assetclassgroup_id=?";
assetclassgroup_id, $sth = $dbh->prepare($sql);
assetclassgroup_name $sth->execute([$assetclassgroup_id]);
FROM $smarty->assign("assetclassgroup", $sth->fetch(PDO::FETCH_OBJ));
assetclassgroup
WHERE
assetclassgroup_id=" . $assetclassgroup_id;
$assetclassgroup = $db->db_select($query);
$smarty->assign("assetclassgroup_id", $assetclassgroup[0]['assetclassgroup_id']);
$smarty->assign("assetclassgroup_name", $assetclassgroup[0]['assetclassgroup_name']);
$smarty->display("assetclassgroupdel.tpl"); $smarty->display("assetclassgroupdel.tpl");

@ -14,22 +14,14 @@ $assetclassgroup_id = sanitize($_GET['assetclassgroup_id']);
$smarty->assign("scripts", 'jscolor.js'); $smarty->assign("scripts", 'jscolor.js');
include("header.php"); include("header.php");
$smarty->assign($lang); $sql = "SELECT assetclassgroup_id AS id, assetclassgroup_name AS name,
assetclassgroup_color AS color
$query = "SELECT FROM assetclassgroup
assetclassgroup_id, WHERE assetclassgroup_id=?";
assetclassgroup_name, $sth = $dbh->prepare($sql);
assetclassgroup_color $sth->execute([$assetclassgroup_id]);
FROM
assetclassgroup $smarty->assign("assetclassgroup", $sth->fetch(PDO::FETCH_OBJ));
WHERE
assetclassgroup_id=" . $assetclassgroup_id;
$assetclassgroup = $db->db_select($query);
$smarty->assign("assetclassgroup_id", $assetclassgroup[0]['assetclassgroup_id']);
$smarty->assign("assetclassgroup_name", $assetclassgroup[0]['assetclassgroup_name']);
$smarty->assign("assetclassgroup_color", $assetclassgroup[0]['assetclassgroup_color']);
$smarty->display("assetclassgroupedit.tpl"); $smarty->display("assetclassgroupedit.tpl");

@ -13,33 +13,22 @@ $assetclassgroup_id = sanitize($_GET['assetclassgroup_id']);
include("header.php"); include("header.php");
$query = "SELECT $sql = "SELECT assetclassgroup_id AS id,
assetclassgroup_id, assetclassgroup_name AS name,
assetclassgroup_name, assetclassgroup_color AS color
assetclassgroup_color FROM assetclassgroup
FROM WHERE assetclassgroup_id=?";
assetclassgroup $sth = $dbh->prepare($sql);
WHERE $sth->execute([$assetclassgroup_id]);
assetclassgroup_id=" . $assetclassgroup_id; $smarty->assign("assetclassgroup", $sth->fetch(PDO::FETCH_OBJ));
$assetclassgroup = $db->db_select($query); $sql = "SELECT assetclass_id, assetclass_name
FROM assetclass
$smarty->assign("assetclassgroup_id", $assetclassgroup[0]['assetclassgroup_id']); WHERE assetclassgroup_id=?
$smarty->assign("assetclassgroup_name", $assetclassgroup[0]['assetclassgroup_name']); ORDER BY assetclass_name";
$smarty->assign("assetclassgroup_color", $assetclassgroup[0]['assetclassgroup_color']); $sth = $dbh->prepare($sql);
$sth->execute([$assetclassgroup_id]);
$query = "SELECT $smarty->assign("assetclasses", $sth->fetchAll(PDO::FETCH_ASSOC));
assetclass_id,
assetclass_name
FROM
assetclass
WHERE
assetclassgroup_id=" . $assetclassgroup_id . "
ORDER BY
assetclass_name";
$assetclasses = $db->db_select($query);
$smarty->assign("assetclasses", $assetclasses);
$smarty->display("assetclassgroupview.tpl"); $smarty->display("assetclassgroupview.tpl");

@ -13,37 +13,22 @@ $assetclass_id = sanitize($_GET['assetclass_id']);
include("header.php"); include("header.php");
$query = "SELECT $sql = "SELECT a.assetclass_id, a.assetclass_name, g.assetclassgroup_id,
a.assetclass_id, a.assetclass_name, g.assetclassgroup_name, g.assetclassgroup_color
g.assetclassgroup_id, g.assetclassgroup_name, g.assetclassgroup_color FROM assetclass AS a LEFT OUTER JOIN assetclassgroup AS g USING (assetclassgroup_id)
FROM WHERE a.assetclass_id=?";
assetclass AS a LEFT OUTER JOIN assetclassgroup AS g USING (assetclassgroup_id) $sth = $dbh->prepare($sql);
WHERE $sth->execute([$assetclass_id]);
a.assetclass_id=" . $assetclass_id; $smarty->assign("assetclass", $sth->fetch(PDO::FETCH_OBJ));
$assetclass = $db->db_select($query); $sql = "SELECT asset_id, asset_name,
CONCAT(LEFT(asset_info, 80), IF(CHAR_LENGTH(asset_info)>80,'...','')) AS asset_info
$smarty->assign("assetclass_id", $assetclass[0]['assetclass_id']); FROM asset
$smarty->assign("assetclass_name", $assetclass[0]['assetclass_name']); WHERE assetclass_id=?
$smarty->assign("assetclass_selected", ""); ORDER BY asset_name";
$sth = $dbh->prepare($sql);
$smarty->assign("assetclassgroup_id", $assetclass[0]['assetclassgroup_id']); $sth->execute([$assetclass_id]);
$smarty->assign("assetclassgroup_name", $assetclass[0]['assetclassgroup_name']); $smarty->assign("assets", $sth->fetchAll(PDO::FETCH_ASSOC));
$smarty->assign("assetclassgroup_color", $assetclass[0]['assetclassgroup_color']);
$query = "SELECT
asset_id,
asset_name,
CONCAT(LEFT(asset_info, 80), IF(CHAR_LENGTH(asset_info)>80,'...','')) AS asset_info
FROM
asset
WHERE
assetclass_id='" . $assetclass_id . "'
ORDER BY
asset_name";
$assets = $db->db_select($query);
$smarty->assign("assets", $assets);
$smarty->display("assetclassview.tpl"); $smarty->display("assetclassview.tpl");

@ -12,31 +12,18 @@ include("includes.php");
$asset_id = sanitize($_GET['asset_id']); $asset_id = sanitize($_GET['asset_id']);
include("header.php"); include("header.php");
$query = "SELECT
asset_name
FROM
asset
WHERE
asset_id=" . $asset_id;
$asset = $db->db_select($query);
// asset to delete
$sth = $dbh->prepare("SELECT asset_name FROM asset WHERE asset_id=?");
$sth->execute([$asset_id]);
$smarty->assign("asset_id", $asset_id); $smarty->assign("asset_id", $asset_id);
$smarty->assign("asset_name", $asset[0]['asset_name']); $smarty->assign("asset_name", $sth->fetchColumn());
$query = "SELECT // nodes to delete
node_id, $sql = "SELECT node_id, node_ip FROM node WHERE asset_id=? ORDER BY INET_ATON(node_ip)";
node_ip $sth = $dbh->prepare($sql);
FROM $sth->execute([$asset_id]);
node $smarty->assign("nodes", $sth->fetchAll(PDO::FETCH_ASSOC));
WHERE
asset_id=" . $asset_id . "
ORDER BY
INET_ATON(node_ip)";
$nodes = $db->db_select($query);
$smarty->assign("nodes", $nodes);
$smarty->display("assetdel.tpl"); $smarty->display("assetdel.tpl");

@ -13,21 +13,14 @@ $asset_id = sanitize($_GET['asset_id']);
include("header.php"); include("header.php");
$query = "SELECT $sql = "SELECT asset_id, asset_name, asset_hostname, asset_info, assetclass_id
asset_id, FROM asset
asset_name, WHERE asset_id=?";
asset_hostname, $sth = $dbh->prepare($sql);
asset_info, $sth->execute([$asset_id]);
assetclass_id $smarty->assign("asset", $sth->fetch(PDO::FETCH_OBJ));
FROM
asset
WHERE
asset_id=" . $asset_id;
$asset = $db->db_select($query); $smarty->assign("assetclass_options", db_get_options_assetclass());
$smarty->assign("asset", $asset[0]);
$smarty->assign("assetclass_options", $db->options_assetclass());
$smarty->display("assetedit.tpl"); $smarty->display("assetedit.tpl");

@ -13,40 +13,22 @@ $asset_id = sanitize($_GET['asset_id']);
include("header.php"); include("header.php");
$query = "SELECT $sql = "SELECT a.asset_id, a.asset_name, a.asset_hostname, a.asset_info,
a.asset_name, c.assetclass_id, c.assetclass_name
a.asset_hostname, FROM asset AS a LEFT OUTER JOIN assetclass AS c USING (assetclass_id)
a.asset_info, WHERE a.asset_id=?";
c.assetclass_id, $sth = $dbh->prepare($sql);
c.assetclass_name $sth->execute([$asset_id]);
FROM $asset = $sth->fetch(PDO::FETCH_OBJ);
asset AS a LEFT OUTER JOIN assetclass AS c USING (assetclass_id) $smarty->assign("asset", $asset);
WHERE
a.asset_id=" . $asset_id; $sql = "SELECT node_id, node_ip, LEFT(node_info, 40) as node_info
FROM node
$asset = $db->db_select($query); WHERE asset_id=?
ORDER BY INET_ATON(node_ip)";
$smarty->assign("asset_id", $asset_id); $sth = $dbh->prepare($sql);
$smarty->assign("asset_name", $asset[0]['asset_name']); $sth->execute([$asset_id]);
$smarty->assign("asset_hostname", $asset[0]['asset_hostname']); $smarty->assign("nodes", $sth->fetchAll(PDO::FETCH_ASSOC));
$smarty->assign("asset_info", nl2br($asset[0]['asset_info']));
$smarty->assign("assetclass_id", $asset[0]['assetclass_id']);
$smarty->assign("assetclass_name", $asset[0]['assetclass_name']);
$query = "SELECT
node_id,
node_ip,
LEFT(node_info, 40) as node_info
FROM
node
WHERE
asset_id=" . $asset_id . "
ORDER BY
INET_ATON(node_ip)";
$nodes = $db->db_select($query);
$smarty->assign("nodes", $nodes);
$smarty->display("assetview.tpl"); $smarty->display("assetview.tpl");

@ -14,19 +14,13 @@ $subnet_id = sanitize($_GET['subnet_id']);
include("header.php"); include("header.php");
$query = "SELECT $sql = "SELECT subnet_id AS id, subnet_address AS address, subnet_mask AS mask
subnet_address, FROM subnet
subnet_mask WHERE subnet_id=?";
FROM $sth = $dbh->prepare($sql);
subnet $sth->execute([$subnet_id]);
WHERE
subnet_id=" . $subnet_id; $smarty->assign("subnet", $sth->fetch(PDO::FETCH_OBJ));
$subnet = $db->db_select($query);
$smarty->assign("subnet_id", $subnet_id);
$smarty->assign("subnet_address", $subnet[0]['subnet_address']);
$smarty->assign("subnet_mask", $subnet[0]['subnet_mask']);
$smarty->assign("node_ip", $node_ip); $smarty->assign("node_ip", $node_ip);
$smarty->display("assigniptonode.tpl"); $smarty->display("assigniptonode.tpl");

@ -17,31 +17,10 @@ include("header.php");
$smarty->assign("node_ip", $node_ip); $smarty->assign("node_ip", $node_ip);
$smarty->assign("asset_id", $asset_id); $smarty->assign("asset_id", $asset_id);
$smarty->assign("subnet_id", $subnet_id);
$query = "SELECT $smarty->assign("asset_options", db_get_options_asset());
asset_id, $smarty->assign("subnet_options", db_get_options_subnet());
asset_name
FROM
asset
ORDER BY
asset_name";
$assets = $db->db_select($query);
foreach ($assets as $asset) {
$asset_options[$asset['asset_id']] = $asset['asset_name'];
}
$smarty->assign("asset_options", $asset_options);
$query = "SELECT subnet_id,
CONCAT_WS('/', subnet_address, subnet_mask) AS subnet_name
FROM subnet
ORDER BY INET_ATON(subnet_address)";
$subnets = $db->db_select($query);
foreach ($subnets as $subnet) {
$subnet_options[$subnet['subnet_id']] = $subnet['subnet_name'];
}
$smarty->assign("subnet_options", $subnet_options);
$smarty->display("assignnodetoasset.tpl"); $smarty->display("assignnodetoasset.tpl");

@ -7,7 +7,8 @@ Copyright (C) 2011-2023 Thomas Hooge
SPDX-License-Identifier: GPL-3.0-or-later SPDX-License-Identifier: GPL-3.0-or-later
*****************************************************************************/ *****************************************************************************/
$dblink = mysqli_connect($config_mysql_host,$config_mysql_username,$config_mysql_password); $dbh = new PDO("mysql:host=$config_mysql_host;dbname=$config_mysql_dbname;charset=utf8", $config_mysql_username, $config_mysql_password);
mysqli_select_db($dblink, $config_mysql_dbname); $dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$dbh->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_ASSOC);
?> ?>

@ -11,57 +11,31 @@ include("includes.php");
include("header.php"); include("header.php");
// asset // Statistics
$query = "SELECT
COUNT(asset_id) AS asset_counter
FROM
asset";
$assets = $db->db_select($query); // asset
$smarty->assign("asset_counter", $assets[0]['asset_counter']); $sth = $dbh->query("SELECT COUNT(asset_id) AS asset_counter FROM asset");
$smarty->assign("asset_counter", $sth->fetchColumn());
// location // location
$query = "SELECT $sth = $dbh->query("SELECT COUNT(location_id) AS location_counter FROM location");
COUNT(location_id) AS location_counter $smarty->assign("location_counter", $sth->fetchColumn());
FROM
location";
$locations = $db->db_select($query);
$smarty->assign("location_counter", $locations[0]['location_counter']);
// node // node
$query = "SELECT $sth = $dbh->query("SELECT COUNT(node_id) AS node_counter FROM node");
COUNT(node_id) AS node_counter $smarty->assign("node_counter", $sth->fetchColumn());
FROM
node";
$nodes = $db->db_select($query);
$smarty->assign("node_counter", $nodes[0]['node_counter']);
// subnet // subnet
$query = "SELECT $sth = $dbh->query("SELECT COUNT(subnet_id) AS subnet_counter FROM subnet");
COUNT(subnet_id) AS subnet_counter $smarty->assign("subnet_counter", $sth->fetchColumn());
FROM
subnet";
$subnets = $db->db_select($query);
$smarty->assign("subnet_counter", $subnets[0]['subnet_counter']);
// vlan // vlan
$query = "SELECT $sth = $dbh->query("SELECT COUNT(vlan_id) AS vlan_counter FROM vlan");
COUNT(vlan_id) AS vlan_counter $smarty->assign("vlan_counter", $sth->fetchColumn());
FROM
vlan";
$vlans = $db->db_select($query);
$smarty->assign("vlan_counter", $vlans[0]['vlan_counter']);
// zone // zone
$query = "SELECT $sth = $dbh->query("SELECT COUNT(zone_id) AS zone_counter FROM zone");
COUNT(zone_id) AS zone_counter $smarty->assign("zone_counter", $sth->fetchColumn());
FROM
zone";
$zones = $db->db_select($query);
$smarty->assign("zone_counter", $zones[0]['zone_counter']);
$smarty->display("index.tpl"); $smarty->display("index.tpl");

@ -62,7 +62,7 @@ $lang = array(
'lang_assetclassgroup_add' => 'Add assetclassgroup', 'lang_assetclassgroup_add' => 'Add assetclassgroup',
'lang_assetclassgroup_del' => 'Delete assetclassgroup', 'lang_assetclassgroup_del' => 'Delete assetclassgroup',
'lang_assetclassgroup_edit' => 'Modify assetclassgroup', 'lang_assetclassgroup_edit' => 'Modify assetclassgroup',
'lang_assetclassgroup_name' => 'Assetclass Groupname', 'lang_assetclassgroup_name' => 'Assetclassgroup Name',
'lang_assetclassgroup_none' => 'There are no assetclassegroups defined', 'lang_assetclassgroup_none' => 'There are no assetclassegroups defined',
'lang_assignnodetoasset' => 'Assign node to asset', 'lang_assignnodetoasset' => 'Assign node to asset',

@ -15,11 +15,11 @@ $config_lang = array('de', 'en');
include("lib/functions.php"); include("lib/functions.php");
require("lib/db.class.php"); //require("lib/db.class.php");
$db = new Db($dblink); //$db = new Db($dblink);
require("lib/user.class.php"); //require("lib/user.class.php");
$user = new User(); // $user = new User();
require_once('smarty3/Smarty.class.php'); require_once('smarty3/Smarty.class.php');
$smarty = new Smarty(); $smarty = new Smarty();
@ -29,4 +29,69 @@ $smarty->registerPlugin('function', 'treelist', 'print_tree');
$smarty->assign("suser_tooltips", $_SESSION['suser_tooltips'] ?? 'off'); $smarty->assign("suser_tooltips", $_SESSION['suser_tooltips'] ?? 'off');
// ========== DATABASE FUCTIONS ===============================================
function db_get_options_asset() {
global $dbh;
$sql = "SELECT asset_id, asset_name FROM asset ORDER BY asset_name";
$sth = $dbh->query($sql);
foreach ($sth->fetchAll(PDO::FETCH_NUM) as $rec) {
$options[$rec[0]] = $rec[1];
}
return $options;
}
function db_get_options_assetclass() {
global $dbh;
$sql = "SELECT assetclass_id, assetclass_name FROM assetclass ORDER BY assetclass_name";
$sth = $dbh->query($sql);
foreach ($sth->fetchAll(PDO::FETCH_NUM) as $rec) {
$options[$rec[0]] = $rec[1];
}
return $options;
}
function db_get_options_assetclassgroup() {
global $dbh;
$sql = "SELECT assetclassgroup_id, assetclassgroup_name FROM assetclassgroup ORDER BY assetclassgroup_name";
$sth = $dbh->query($sql);
foreach ($sth->fetchAll(PDO::FETCH_NUM) as $rec) {
$options[$rec[0]] = $rec[1];
}
return $options;
}
function db_get_options_location() {
global $dbh;
$sql = "SELECT location_id, location_name FROM location ORDER BY location_name";
$sth = $dbh->query($sql);
foreach ($sth->fetchAll(PDO::FETCH_NUM) as $rec) {
$options[$rec[0]] = $rec[1];
}
return $options;
}
function db_get_options_subnet() {
global $dbh;
$sql = "SELECT subnet_id,
CONCAT_WS('/', subnet_address, subnet_mask) AS subnet_name
FROM subnet
ORDER BY INET_ATON(subnet_address)";
$sth = $dbh->query($sql);
foreach ($sth->fetchAll(PDO::FETCH_NUM) as $rec) {
$options[$rec[0]] = $rec[1];
}
return $options;
}
function db_get_options_vlan() {
global $dbh;
$sql = "SELECT vlan_id, vlan_name FROM vlan ORDER BY vlan_name";
$sth = $dbh->query($sql);
foreach ($sth->fetchAll(PDO::FETCH_NUM) as $rec) {
$options[$rec[0]] = $rec[1];
}
return $options;
}
?> ?>

@ -74,9 +74,6 @@ function sanitize($input) {
// convert special chars // convert special chars
$input = htmlentities($input,ENT_QUOTES,'UTF-8'); $input = htmlentities($input,ENT_QUOTES,'UTF-8');
// make sql ready
$input = mysqli_real_escape_string($dblink, $input);
// and return // and return
return $input; return $input;
} }

@ -11,15 +11,11 @@ include("includes.php");
include("header.php"); include("header.php");
$query = "SELECT $sql = "SELECT location_id AS id, location_name AS value, location_parent AS parent_id
location_id AS id, FROM location
location_name AS value, ORDER BY location_parent, location_sort, location_name";
location_parent AS parent_id $sth = $dbh->query($sql);
FROM $locations = $sth->fetchAll();
location
ORDER BY location_parent, location_sort, location_name";
$locations = $db->db_select($query);
// function for recursion // function for recursion
function build_tree($parent_id, $level) { function build_tree($parent_id, $level) {

@ -16,18 +16,16 @@ include("header.php");
// ************* <option value="0">{$lang_option_none}</option> // ************* <option value="0">{$lang_option_none}</option>
$query = "SELECT location_id, location_name, location_parent, location_sort $sql = "SELECT location_id AS 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";
$sth = $dbh->query($sql);
$locations = $sth->fetchAll();
$locations = $db->db_select($query);
$location_counter = count($locations); $location_counter = count($locations);
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'];
} }
@ -36,7 +34,6 @@ if ($location_counter>0) {
// look for parents // look for parents
// function to look for parents and create a new array for every child // function to look for parents and create a new array for every child
function location($parents, $parent = 0) { function location($parents, $parent = 0) {
// loop array to check
foreach ($parents[$parent] as $child) { foreach ($parents[$parent] as $child) {
if (isset($parents[$child])) { if (isset($parents[$child])) {
// element has children // element has children
@ -47,7 +44,6 @@ function location($parents, $parent = 0) {
} }
} }
// and again...
return $children; return $children;
} }

@ -13,17 +13,10 @@ $location_id = sanitize($_GET['location_id']);
include("header.php"); include("header.php");
$query = "SELECT $sql = "SELECT location_name FROM location WHERE location_id=?";
location_name $sth = $dbh->prepare($sql);
FROM $sth->execute([$location_id]);
location $smarty->assign("location", $sth->fetch(PDO::FETCH_OBJ));
WHERE
location_id=" . $location_id;
$location = $db->db_select($query);
$smarty->assign("location_id", $location_id);
$smarty->assign("location_name", $location[0]['location_name']);
$smarty->display("locationdel.tpl"); $smarty->display("locationdel.tpl");

@ -14,39 +14,33 @@ $location_id = sanitize($_GET['location_id']);
include("header.php"); include("header.php");
// location // location
$query = "SELECT $sql = "SELECT location_name AS name, location_parent AS parent,
location_name, location_info AS info, location_sort AS sort
location_parent, FROM location
location_info, WHERE location_id=?";
location_sort $sth = $dbh->prepare($sql);
FROM $sth->execute([$location_id]);
location $location = $sth->fetch(PDO::FETCH_OBJ);
WHERE
location_id=" . $location_id;
$location = $db->db_select($query); $location_parent = $location->parent;
$location_parent = $location[0]['location_parent']; $smarty->assign("location", $location);
$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']); */
// parent location // parent location
$query = "SELECT $sql = "SELECT location_id, location_name, location_parent
location_id, FROM location
location_name, WHERE location_id != ?
location_parent ORDER BY location_name";
FROM $sth = $dbh->prepare($sql);
location $sth->execute([$location_id]);
WHERE
location_id != " . $location_id . " $locations = $sth->fetchAll();
ORDER BY
location_name";
$locations = $db->db_select($query);
$location_counter = count($locations); $location_counter = count($locations);
$smarty->assign("location_counter", $location_counter); $smarty->assign("location_counter", $location_counter);

@ -13,18 +13,15 @@ $location_id = sanitize($_GET['location_id']);
include("header.php"); include("header.php");
$query = "SELECT $sql = "SELECT location_id AS id, location_name AS name
location_name FROM location
FROM WHERE location_id=?";
location $sth = $dbh->prepare($sql);
WHERE $sth->execute([$location_id]);
location_id=" . $location_id; $smarty->assign("location", $sth->fetch(PDO::FETCH_OBJ));
$location = $db->db_select($query);
$smarty->assign("location_id", $location_id);
$smarty->assign("location_name", $location[0]['location_name']);
$smarty->assign("subnet_options", $db->options_subnet()); $smarty->assign("subnet_options", $db->options_subnet());
$smarty->display("locationsubnetadd.tpl"); $smarty->display("locationsubnetadd.tpl");
include("footer.php"); include("footer.php");

@ -14,32 +14,29 @@ $location_id = sanitize($_GET['location_id']);
include("header.php"); include("header.php");
// location // location
$query = "SELECT $sql = "SELECT location_id AS id, location_name AS name
location_name FROM location
FROM WHERE location_id=?";
location $sth = $dbh->prepare($sql);
WHERE $sth->execute([$location_id]);
location_id=" . $location_id; $smarty->assign("location", $sth->fetch(PDO::FETCH_OBJ));
$location = $db->db_select($query);
$smarty->assign("location_id", $location_id);
$smarty->assign("location_name", $location[0]['location_name']);
// subnet // subnet
$query = "SELECT $sql = "SELECT
s.subnet_id, s.subnet_id,
s.subnet_address, s.subnet_address,
s.subnet_mask s.subnet_mask
FROM FROM
subnetlocation AS l LEFT JOIN subnet AS s USING (subnet_id) subnetlocation AS l LEFT JOIN subnet AS s USING (subnet_id)
WHERE WHERE
l.location_id=" . $location_id . " l.location_id=?
ORDER BY ORDER BY
INET_ATON(s.subnet_address)"; INET_ATON(s.subnet_address)";
$sth = $dbh->prepare($sql);
$sth->execute([$location_id]);
$subnets = $db->db_select($query); $smarty->assign($sth->fetchAll());
$smarty->assign($subnets);
$smarty->display("locationsubnetdel.tpl"); $smarty->display("locationsubnetdel.tpl");

@ -12,18 +12,13 @@ include("includes.php");
$location_id = sanitize($_GET['location_id']); $location_id = sanitize($_GET['location_id']);
include("header.php"); include("header.php");
// location
$query = "SELECT
location_name
FROM
location
WHERE
location_id=" . $location_id;
$location = $db->db_select($query); $sql = "SELECT location_id AS id, location_name AS name
FROM location
$smarty->assign("location_id", $location_id); WHERE location_id=?";
$smarty->assign("location_name", $location[0]['location_name']); $sth = $dbh->prepare($sql);
$sth->execute([$zone_id]);
$smarty->assign("location", $sth->fetch(PDO::FETCH_OBJ));
$smarty->display("locationsubnetedit.tpl"); $smarty->display("locationsubnetedit.tpl");

@ -15,64 +15,53 @@ include("header.php");
// locationcrumb // locationcrumb
$sql = "SELECT location_id AS id, location_name AS name,
location_parent AS parent_id, location_info AS info,
CONCAT('locationview.php?location_id=', location_id) AS url
FROM location
WHERE location_id=?";
$sth = $dbh->prepare($sql);
$sth->execute([$location_id]);
$location = $sth->fetch(PDO::FETCH_OBJ);
$query = "SELECT location_id AS id, $crumbs[] = $location;
location_name AS name,
location_parent AS parent_id,
location_info
FROM location
WHERE location_id=" . $location_id;
$location = $db->db_select($query);
$location[0]['url'] = 'locationview.php?location_id=' . $location[0]['id'];
$crumbs[] = $location[0];
$level = 1; $level = 1;
while ($crumbs[0]['parent_id'] != 0) { $sql = "SELECT location_id AS id, location_name AS name,
$query = "SELECT location_id AS id, location_parent AS parent_id,
location_name AS name, CONCAT('locationview.php?location_id=', location_id) AS url
location_parent AS parent_id
FROM location FROM location
WHERE location_id=" . $crumbs[0]['parent_id']; WHERE location_id=?";
$result = $db->db_select($query); $sth = $dbh->prepare($sql);
$result[0]['url'] = 'locationview.php?location_id=' . $result[0]['id']; while ($crumbs[0]->parent_id != 0) {
array_unshift($crumbs, $result[0]); $sth->execute([$crumbs[0]->parent_id]);
$result = $sth->fetch(PDO::FETCH_OBJ);
array_unshift($crumbs, $result);
$level++; $level++;
} }
$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->info));
$smarty->assign("crumbs", $crumbs); $smarty->assign("crumbs", $crumbs);
// sublocations // sublocations
$query = "SELECT $sql = "SELECT location_id AS sublocation_id, location_name AS sublocation_name,
location_id AS sublocation_id, LEFT(location_info, 40) AS info_short,
location_name AS sublocation_name, CHAR_LENGTH(location_info) AS info_length
LEFT(location_info, 40) AS info_short, FROM location
CHAR_LENGTH(location_info) AS info_length WHERE location_parent=?
FROM ORDER BY location_name";
location $sth = $dbh->prepare($sql);
WHERE $sth->execute([$location_id]);
location_parent=" . $location_id . " $smarty->assign("sublocations", $sth->fetchAll());
ORDER BY
location_name";
$sublocations = $db->db_select($query);
$smarty->assign("sublocations", $sublocations);
// subnets // subnets
$query = "SELECT $sql = "SELECT s.subnet_id, s.subnet_address, s.subnet_mask
s.subnet_id, FROM subnet AS s LEFT JOIN subnetlocation AS l USING (subnet_id)
s.subnet_address, WHERE l.location_id=?
s.subnet_mask ORDER BY INET_ATON(s.subnet_address)";
FROM $sth = $dbh->prepare($sql);
subnet AS s LEFT JOIN subnetlocation USING (subnet_id) $sth->execute([$location_id]);
WHERE $smarty->assign("subnets", $sth->fetchAll());
subnetlocation.location_id=" . $location_id . "
ORDER BY
INET_ATON(s.subnet_address)";
$subnets = $db->db_select($query);
$smarty->assign("subnets", $subnets);
$smarty->display("locationview.tpl"); $smarty->display("locationview.tpl");

@ -12,35 +12,86 @@ session_start();
include("config.php"); include("config.php");
include("dbconnect.php"); include("dbconnect.php");
include("lib.php"); include("lib.php");
// include language file function user_login($user_name, $user_pass) {
global $dbh;
if (strlen($user_name) < 1) {
return FALSE;
}
if (strlen($user_pass) < 1) {
return FALSE;
}
$sql = "SELECT user_id, user_pass, user_displayname, user_language,
user_imagesize, user_imagecount, user_mac, user_dateformat,
user_dns1suffix, user_dns2suffix, user_menu_assets,
user_menu_assetclasses, user_menu_assetclassgroups,
user_menu_locations, user_menu_nodes, user_menu_subnets,
user_menu_users, user_menu_vlans, user_menu_zones,
user_tooltips
FROM user
WHERE user_name=?";
$sth = $dbh->prepare($sql);
$sth->execute([$user_name]);
if (!$user = $sth->fetch(PDO::FETCH_OBJ)) {
// no user record found
return FALSE;
}
// TODO use secure algo with salt!
if (strcmp(md5($user_pass), $user->user_pass) != 0) {
// password does not match
return FALSE;
}
// all ok: user is logged in, register session data
$_SESSION['suser_id'] = $user->user_id;
$_SESSION['suser_displayname'] = $user->user_displayname;
$_SESSION['suser_language'] = $user->user_language;
$_SESSION['suser_imagesize'] = $user->user_imagesize;
$_SESSION['suser_imagecount'] = $user->user_imagecount;
$_SESSION['suser_mac'] = $user->user_mac;
$_SESSION['suser_dateformat'] = $user->user_dateformat;
$_SESSION['suser_dns1suffix'] = $user->user_dns1suffix;
$_SESSION['suser_dns2suffix'] = $user->user_dns2suffix;
$_SESSION['suser_menu_assets'] = $user->user_menu_assets;
$_SESSION['suser_menu_assetclasses'] = $user->user_menu_assetclasses;
$_SESSION['suser_menu_assetclassgroups'] = $user->user_menu_assetclassgroups;
$_SESSION['suser_menu_locations'] = $user->user_menu_locations;
$_SESSION['suser_menu_nodes'] = $user->user_menu_nodes;
$_SESSION['suser_menu_subnets'] = $user->user_menu_subnets;
$_SESSION['suser_menu_users'] = $user->user_menu_users;
$_SESSION['suser_menu_vlans'] = $user->user_menu_vlans;
$_SESSION['suser_menu_zones'] = $user->user_menu_zones;
$_SESSION['suser_tooltips'] = $user->user_tooltips;
return TRUE;
}
// No header included, this page has no menu
$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');
// check for submit
if ($_SERVER['REQUEST_METHOD']=="POST" ) { if ($_SERVER['REQUEST_METHOD']=="POST" ) {
/// get post info
$user_name = sanitize($_POST['user_name']); $user_name = sanitize($_POST['user_name']);
$user_pass = sanitize($_POST['user_pass']); $user_pass = sanitize($_POST['user_pass']);
// login if (user_login($user_name, $user_pass) == TRUE) {
$login = $user->user_login($user_name, $user_pass); header_location("index.php");
} else {
if($login==TRUE) { $_SESSION = array();
// redirect session_destroy();
header_location("index.php"); }
} else {
// not ok, break session
$_SESSION = array();
session_destroy();
}
} }
$smarty->assign("config_version", $config_version); $smarty->assign("config_version", $config_version);
$smarty->assign($lang); $smarty->assign($lang);
$smarty->display("login.tpl"); $smarty->display("login.tpl");
include("footer.php"); include("footer.php");

@ -14,20 +14,19 @@ $node_id = sanitize($_GET['node_id']);
include("header.php"); include("header.php");
// node_ext // node_ext
$query = "SELECT $sql = "SELECT node_ip AS node_ip_ext
node_ip AS node_ip_ext FROM node
FROM WHERE node_id=?";
node $sth = $dbh->prepare($sql);
WHERE $sth->execute([$node_id]);
node_id=" . $node_id;
$node = $db->db_select($query); $node = $sth->fetch(PDO::FETCH_OBJ);
$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->node_ip_ext);
// node_int // node_int
$query = "SELECT $sql = "SELECT
a.asset_name, a.asset_name,
n.node_id AS node_id_int, n.node_id AS node_id_int,
n.node_ip AS node_ip_int n.node_ip AS node_ip_int
@ -40,13 +39,16 @@ $query = "SELECT
FROM FROM
nat nat
WHERE WHERE
nat_ext=" . $node_id . " nat_ext=?
) )
AND n.node_id!=" . $node_id . " AND n.node_id!=?
ORDER BY ORDER BY
INET_ATON(n.node_ip)"; INET_ATON(n.node_ip)";
$sth = $dbh->prepare($sql);
$sth->execute([$node_id, $node_id]);
$nodes = $sth->fetchAll();
$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'];
} }

@ -14,39 +14,24 @@ $node_id = sanitize($_GET['node_id']);
include("header.php"); include("header.php");
// node_ext // node_ext
$query = "SELECT $sth = $dbh->prepare("SELECT node_id AS id_ext, node_ip AS ip_ext FROM node WHERE node_id=?");
node_ip AS node_ip_ext $sth->execute([$node_id]);
FROM $smarty->assign("node", $sth->fetch(PDO::FETCH_OBJ));
node
WHERE
node_id=" . $node_id;
$node = $db->db_select($query);
$smarty->assign("node_id_ext", $node_id);
$smarty->assign("node_ip_ext", $node[0]['node_ip_ext']);
// options // options
$query = "SELECT $sql = "SELECT x.nat_id, n.node_ip, a.asset_name
a.asset_name, FROM nat AS x
n.node_ip, LEFT JOIN node AS n ON (x.nat_int=n.node_id)
x.nat_ext LEFT JOIN asset AS a USING (asset_id)
FROM WHERE x.nat_ext=?
asset AS a, ORDER BY INET_ATON(n.node_ip)";
nat AS x, $sth = $dbh->prepare($sql);
node AS n $sth->execute([$node_id]);
WHERE $nats = $sth->fetchAll();
x.nat_ext=" . $node_id . "
AND n.node_id=x.nat_int
AND a.asset_id=n.asset_id
ORDER BY
INET_ATON(n.node_ip)";
$nodes = $db->db_select($query);
$options = array(); $options = array();
foreach ($nodes as $rec) { foreach ($nats as $rec) {
$options[$rec['nat_ext']] = $rec['node_ip'] . '/' . $rec['asset_name']; $options[$rec['nat_id']] = $rec['node_ip'] . '/' . $rec['asset_name'];
} }
$smarty->assign("nat_options", $options); $smarty->assign("nat_options", $options);
$smarty->display("natdel.tpl"); $smarty->display("natdel.tpl");

@ -13,18 +13,11 @@ $node_id = sanitize($_GET['node_id']);
include("header.php"); include("header.php");
$query = "SELECT $sql = "SELECT node_id AS id, node_ip AS ip FROM node WHERE node.node_id=?";
node_ip $sth = $dbh->prepare($sql);
FROM $sth->execute([$node_id]);
node $smarty->assign("node", $sth->fetch(PDO::FETCH_OBJ));
WHERE
node.node_id=" . $node_id;
$node = $db->db_select($query);
$smarty->assign("node_id", $node_id);
$smarty->assign("node_ip", $node[0]['node_ip']);
$smarty->display("natedit.tpl"); $smarty->display("natedit.tpl");
include("footer.php"); include("footer.php");

@ -10,31 +10,43 @@ SPDX-License-Identifier: GPL-3.0-or-later
include("includes.php"); include("includes.php");
include("header.php"); include("header.php");
// filter preparation
$p = array();
$w = array();
if(isset($_GET['subnet_id'])) { if(isset($_GET['subnet_id'])) {
$subnet_id = sanitize($_GET['subnet_id']); $subnet_id = sanitize($_GET['subnet_id']);
$subnet_view = "WHERE node.subnet_id=" . $subnet_id; $w[] = "n.subnet_id=?";
$p[] = $subnet_id;
$smarty->assign("subnet_id", $subnet_id); $smarty->assign("subnet_id", $subnet_id);
// get subnet details for title
$sql = "SELECT CONCAT_WS('/',subnet_address,subnet_mask) AS subnet
FROM subnet
WHERE subnet_id=?";
$sth = $dbh->prepare($sql);
$sth->execute([$subnet_id]);
$smarty->assign("subnet", $sth->fetchColumn());
} else { } else {
$smarty->assign("subnet_id", ''); $smarty->assign("subnet_id", '');
$subnet_view = '';
} }
$query = "SELECT // create sql with optional filter
asset.asset_id, $where = join(' AND ', $w);
REPLACE(asset.asset_name, ' ', '&nbsp;') AS asset_name,
asset.asset_info, $sql = "SELECT a.asset_id, a.asset_info,
node.node_id, REPLACE(a.asset_name, ' ', '&nbsp;') AS asset_name,
node.node_ip n.node_id, n.node_ip
FROM FROM asset AS a LEFT JOIN node AS n USING (asset_id)";
asset LEFT JOIN node USING (asset_id) if ($where) {
" . $subnet_view . " $sql .= ' WHERE ' . $where;
GROUP BY }
node.node_id $sql .= "GROUP BY n.node_id ORDER BY INET_ATON(n.node_ip)";
ORDER BY $sth = $dbh->prepare($sql);
INET_ATON(node.node_ip)"; $sth->execute($p);
$smarty->assign("nodes", $sth->fetchAll());
$nodes = $db->db_select($query);
$smarty->assign("nodes", $nodes);
$smarty->display("node.tpl"); $smarty->display("node.tpl");
include("footer.php"); include("footer.php");

@ -17,9 +17,10 @@ include("header.php");
$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);
$smarty->assign("subnet_id", $subnet_id);
$smarty->assign("subnet_options", $db->options_subnet()); $smarty->assign("subnet_options", db_get_options_subnet());
$smarty->assign("assetclass_options", $db->options_assetclass()); $smarty->assign("assetclass_options", db_get_options_assetclass());
$smarty->display("nodeadd.tpl"); $smarty->display("nodeadd.tpl");
include("footer.php"); include("footer.php");

@ -13,21 +13,10 @@ $node_id = sanitize($_GET['node_id']);
include("header.php"); include("header.php");
$query = "SELECT $sql = "SELECT node_id AS id, node_ip AS ip, asset_id FROM node WHERE node_id=?";
asset_id, $sth = $dbh->prepare($sql);
node_ip $sth->execute([$node_id]);
FROM $smarty->assign("node", $sth->fetch(PDO::FETCH_OBJ));
node
WHERE
node_id=" . $node_id;
// run query
$node = $db->db_select($query);
// send to tpl
$smarty->assign("node_id", $node_id);
$smarty->assign("asset_id", $node[0]['asset_id']);
$smarty->assign("node_ip", $node[0]['node_ip']);
$smarty->display("nodedel.tpl"); $smarty->display("nodedel.tpl");

@ -12,37 +12,15 @@ include("includes.php");
$node_id = sanitize($_GET['node_id']); $node_id = sanitize($_GET['node_id']);
include("header.php"); include("header.php");
$query = "SELECT
a.asset_id,
n.node_id,
n.node_ip,
n.node_mac,
n.node_dns1,
n.node_dns2,
n.node_info,
s.subnet_id,
n.zone_id
FROM
asset AS a,
node AS n,
subnet AS s
WHERE
a.asset_id=n.asset_id
AND n.node_id=" . $node_id . "
AND s.subnet_id=n.subnet_id";
$node = $db->db_select($query);
$smarty->assign("node_id", $node[0]['node_id']); $sql = "SELECT node_id AS id, node_ip AS ip, node_mac AS mac,
$smarty->assign("node_ip", $node[0]['node_ip']); node_dns1 AS dns1, node_dns2 AS dns2, node_info AS info,
$smarty->assign("node_mac", write_mac($node[0]['node_mac'])); zone_id, asset_id, subnet_id
$smarty->assign("node_dns1", $node[0]['node_dns1']); FROM node
$smarty->assign("node_dns2", $node[0]['node_dns2']); WHERE node_id=?";
$smarty->assign("node_info", $node[0]['node_info']); $sth = $dbh->prepare($sql);
$smarty->assign("asset_id", $node[0]['asset_id']); $sth->execute([$node_id]);
$smarty->assign("subnet_id", $node[0]['subnet_id']); $smarty->assign("node", $sth->fetch(PDO::FETCH_OBJ));
$smarty->assign("zone_id", $node[0]['zone_id']);
$smarty->assign("asset_options", $db->options_asset()); $smarty->assign("asset_options", $db->options_asset());
$smarty->assign("subnet_options", $db->options_subnet()); $smarty->assign("subnet_options", $db->options_subnet());

@ -18,66 +18,70 @@ if (isset($_GET['node_id']) && (!empty($_GET['node_id']))) {
} }
include("header.php"); include("header.php");
// node // node
$query = "SELECT $sql = "SELECT
asset.asset_id, asset.asset_id,
asset.asset_name, asset.asset_name,
node.node_id, node.node_id AS id,
node.node_ip, node.node_ip AS ip,
node.node_mac, node.node_mac AS mac,
node.node_dns1, node.node_dns1 AS dns1,
node.node_dns2, node.node_dns2 AS dns2,
node.node_info, node.node_info AS info,
node.node_type, node.node_type AS type,
subnet.subnet_id, subnet.subnet_id,
subnet.subnet_address, subnet.subnet_address,
subnet.subnet_mask, subnet.subnet_mask,
zone.zone_origin zone.zone_origin
FROM FROM
node node
JOIN asset USING (asset_id) JOIN asset USING (asset_id)
JOIN subnet USING (subnet_id) JOIN subnet USING (subnet_id)
LEFT JOIN zone USING (zone_id) LEFT JOIN zone USING (zone_id)
WHERE WHERE
node.node_id=" . $node_id; node.node_id=?";
$sth = $dbh->prepare($sql);
$sth->execute([$node_id]);
$node = $db->db_select($query); $node = $sth->fetch(PDO::FETCH_OBJ);
$node[0]['node_mac'] = write_mac($node[0]['node_mac']); $node->mac = write_mac($node->mac);
$smarty->assign("node", $node[0]); $smarty->assign("node", $node);
// nat // nat
$query = "SELECT $sql = "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,
asset_ext.asset_name AS asset_name_ext, asset_ext.asset_name AS asset_name_ext,
asset_int.asset_name AS asset_name_int, asset_int.asset_name AS asset_name_int,
nat.nat_id AS nat_id, nat.nat_id AS nat_id,
nat.nat_type AS nat_type, nat.nat_type AS nat_type,
nat.nat_ext AS nat_ext, nat.nat_ext AS nat_ext,
nat.nat_int AS nat_int, nat.nat_int AS nat_int,
node_ext.node_ip AS node_ip_ext, node_ext.node_ip AS node_ip_ext,
node_int.node_ip AS node_ip_int, node_int.node_ip AS node_ip_int,
node_int.node_id AS node_id_int, node_int.node_id AS node_id_int,
node_ext.node_id AS node_id_ext node_ext.node_id AS node_id_ext
FROM FROM
asset AS asset_ext, asset AS asset_ext,
asset AS asset_int, asset AS asset_int,
nat, nat,
node AS node_ext, node AS node_ext,
node AS node_int node AS node_int
WHERE WHERE
(nat.nat_ext=" . $node_id . " (nat.nat_ext=:node_id OR nat.nat_int=:node_id)
OR nat.nat_int=" . $node_id . ") AND node_ext.node_id=nat.nat_ext
AND node_ext.node_id=nat.nat_ext AND node_int.node_id=nat.nat_int
AND node_int.node_id=nat.nat_int AND asset_ext.asset_id=node_ext.asset_id
AND asset_ext.asset_id=node_ext.asset_id AND asset_int.asset_id=node_int.asset_id
AND asset_int.asset_id=node_int.asset_id ORDER BY
ORDER BY INET_ATON(node_ext.node_ip),
INET_ATON(node_ext.node_ip), INET_ATON(node_int.node_ip)";
INET_ATON(node_int.node_ip)";
$sth = $dbh->prepare($sql);
$sth->execute(['node_id' => $node_id]);
$natrules = $db->db_select($query); $smarty->assign("natrules", $sth->fetchAll());
$smarty->assign("natrules", $natrules);
$smarty->display("nodeview.tpl"); $smarty->display("nodeview.tpl");

@ -15,130 +15,100 @@ include("header.php");
if (empty($search)) { if (empty($search)) {
// parse nosearch box // parse nosearch box
$smarty->assign("nosearch", TRUE); $smarty->assign("nosearch", TRUE);
} else { $smarty->display("search.tpl");
// hide nosearch box include("footer.php");
$smarty->assign("nosearch", FALSE); exit;
$smarty->assign("search", $search);
// set needle
$needle = '%' . $search . '%';
// set counter
$resultcounter = 0;
// asset
$query = "SELECT
asset_id AS id,
asset_name AS name,
asset_info AS description
FROM
asset
WHERE
asset_name LIKE '" . $needle . "'
OR asset_hostname LIKE '" . $needle . "'
OR asset_info LIKE '" . $needle . "'
ORDER BY
asset_name";
$assets = $db->db_select($query);
$resultcounter += count($assets);
$smarty->assign("assets", $assets);
// location
$query = "SELECT
location_id AS id,
location_name AS name
FROM
location
WHERE
location_name LIKE '" . $needle . "'
OR location_info LIKE '" . $needle . "'
ORDER BY
location_name";
$locations = $db->db_select($query);
$resultcounter += count($locations);
$smarty->assign("locations", $locations);
// node
$query = "SELECT
node_id AS id,
node_ip AS ip
FROM
node
WHERE
node_ip LIKE '" . $needle . "'
OR node_mac LIKE '" . $needle . "'
OR node_dns1 LIKE '" . $needle . "'
OR node_dns2 LIKE '" . $needle . "'
OR node_info LIKE '" . $needle . "'
ORDER BY
node_ip";
$nodes = $db->db_select($query);
$resultcounter += count($nodes);
$smarty->assign("nodes", $nodes);
// subnet
$query = "SELECT
subnet_id AS id,
subnet_address AS address
FROM
subnet
WHERE
subnet_address LIKE '" . $needle . "'
OR subnet_info LIKE '" . $needle . "'
ORDER BY
subnet_address";
// run query
$subnets = $db->db_select($query);
$resultcounter += count($subnets);
$smarty->assign("subnets", $subnets);
// vlan
$query = "SELECT
vlan_id AS id,
vlan_name AS name
FROM
vlan
WHERE
vlan_name LIKE '" . $needle . "'
OR vlan_info LIKE '" . $needle . "'
ORDER BY
vlan_name";
$vlans = $db->db_select($query);
$resultcounter += count($vlans);
$smarty->assign("vlans", $vlans);
// setup zone
$query = "SELECT
zone_id AS id,
zone_origin AS origin
FROM
zone
WHERE
zone_origin LIKE '" . $needle . "'
OR zone_soa LIKE '" . $needle . "'
OR zone_hostmaster LIKE '" . $needle . "'
OR zone_ns1 LIKE '" . $needle . "'
OR zone_ns2 LIKE '" . $needle . "'
OR zone_ns3 LIKE '" . $needle . "'
OR zone_mx1 LIKE '" . $needle . "'
OR zone_mx2 LIKE '" . $needle . "'
OR zone_info LIKE '" . $needle . "'
ORDER BY
zone_origin";
$zones = $db->db_select($query);
$resultcounter += count($zones);
$smarty->assign("zones", $zones);
// grand totals
$smarty->assign("resultcounter", $resultcounter);
} }
// hide nosearch box
$smarty->assign("nosearch", FALSE);
$smarty->assign("search", $search);
$needle = '%' . $search . '%';
$resultcounter = 0;
// asset
$sql = "SELECT asset_id AS id, asset_name AS name, asset_info AS description
FROM asset
WHERE asset_name LIKE :needle OR asset_hostname LIKE :needle
OR asset_info LIKE :needle
ORDER BY asset_name";
$sth = $dbh->prepare($sql);
$sth->execute(['needle' => $needle]);
$assets = $sth->fetchAll();
$resultcounter += count($assets);
$smarty->assign("assets", $assets);
// location
$sql = "SELECT location_id AS id, location_name AS name
FROM location
WHERE location_name LIKE :needle OR location_info LIKE :needle
ORDER BY location_name";
$sth = $dbh->prepare($sql);
$sth->execute(['needle' => $needle]);
$locations = $sth->fetchAll();
$resultcounter += count($locations);
$smarty->assign("locations", $locations);
// node
$sql = "SELECT node_id AS id, node_ip AS ip
FROM node
WHERE node_ip LIKE :needle OR node_mac LIKE :needle
OR node_dns1 LIKE :needle OR node_dns2 LIKE :needle
OR node_info LIKE :needle
ORDER BY node_ip";
$sth = $dbh->prepare($sql);
$sth->execute(['needle' => $needle]);
$nodes = $sth->fetchAll();
$resultcounter += count($nodes);
$smarty->assign("nodes", $nodes);
// subnet
$sql = "SELECT subnet_id AS id, subnet_address AS address
FROM subnet
WHERE subnet_address LIKE :needle OR subnet_info LIKE :needle
ORDER BY subnet_address";
$sth = $dbh->prepare($sql);
$sth->execute(['needle' => $needle]);
$subnets = $sth->fetchAll();
$resultcounter += count($subnets);
$smarty->assign("subnets", $subnets);
// vlan
$sql = "SELECT vlan_id AS id, vlan_name AS name
FROM vlan
WHERE vlan_name LIKE :needle OR vlan_info LIKE :needle
ORDER BY vlan_name";
$sth = $dbh->prepare($sql);
$sth->execute(['needle' => $needle]);
$vlans = $sth->fetchAll();
$resultcounter += count($vlans);
$smarty->assign("vlans", $vlans);
// setup zone
$sql = "SELECT zone_id AS id, zone_origin AS origin
FROM zone
WHERE zone_origin LIKE :needle OR zone_soa LIKE :needle
OR zone_hostmaster LIKE :needle OR zone_ns1 LIKE :needle
OR zone_ns2 LIKE :needle OR zone_ns3 LIKE :needle
OR zone_mx1 LIKE :needle OR zone_mx2 LIKE :needle
OR zone_info LIKE :needle
ORDER BY zone_origin";
$sth = $dbh->prepare($sql);
$sth->execute(['needle' => $needle]);
$zones = $sth->fetchAll();
$resultcounter += count($zones);
$smarty->assign("zones", $zones);
// grand totals
$smarty->assign("resultcounter", $resultcounter);
$smarty->display("search.tpl"); $smarty->display("search.tpl");
include("footer.php"); include("footer.php");

File diff suppressed because it is too large Load Diff

@ -10,24 +10,17 @@ SPDX-License-Identifier: GPL-3.0-or-later
include("includes.php"); include("includes.php");
include("header.php"); include("header.php");
$query = "SELECT $sql = "SELECT s.subnet_id, s.subnet_address, s.subnet_mask,
s.subnet_id, s.ntp_server, LEFT(s.subnet_info, 40) AS subnet_info,
s.subnet_address,
s.subnet_mask,
s.ntp_server,
LEFT(s.subnet_info, 40) AS subnet_info,
CHAR_LENGTH(s.subnet_info) AS subnet_length, CHAR_LENGTH(s.subnet_info) AS subnet_length,
COUNT(node.subnet_id) AS node_counter COUNT(node.subnet_id) AS node_counter
FROM FROM subnet AS s LEFT JOIN node USING (subnet_id)
subnet AS s LEFT JOIN node USING (subnet_id) GROUP BY s.subnet_id
GROUP BY ORDER BY INET_ATON(s.subnet_address)";
s.subnet_id $sth = $dbh->query($sql);
ORDER BY
INET_ATON(s.subnet_address)";
$subnets = $db->db_select($query); $smarty->assign("subnets", $sth->fetchAll());
$smarty->assign("subnets", $subnets);
$smarty->display("subnet.tpl"); $smarty->display("subnet.tpl");
include("footer.php"); include("footer.php");

@ -13,21 +13,7 @@ if((isset($_GET['vlan_id'])) ? $vlan_id = sanitize($_GET['vlan_id']) : $vlan_id
include("header.php"); include("header.php");
$query = "SELECT $smarty->assign("vlan_options", db_get_options_vlan());
vlan_id,
vlan_number,
vlan_name
FROM
vlan
ORDER BY
vlan_name";
$vlans = $db->db_select($query);
$vlan_options[0] = $lang['lang_option_none'];
foreach ($vlans as $vlan) {
$vlan_options[$vlan['vlan_id']] = $vlan['vlan_name'];
}
$smarty->assign("vlan_options", $vlan_options);
$smarty->display("subnetadd.tpl"); $smarty->display("subnetadd.tpl");

@ -14,34 +14,22 @@ $subnet_id = sanitize($_GET['subnet_id']);
include("header.php"); include("header.php");
// subnet // subnet
$query = "SELECT $sql = "SELECT subnet_id AS id, subnet_address AS address, subnet_mask AS mask
subnet_address, FROM subnet
subnet_mask WHERE subnet_id=?";
FROM $sth = $dbh->prepare($sql);
subnet $sth->execute([$subnet_id]);
WHERE $smarty->assign("subnet", $sth->fetch(PDO::FETCH_OBJ));
subnet_id=" . $subnet_id;
$subnet = $db->db_select($query);
$smarty->assign("subnet_id", $subnet_id);
$smarty->assign("subnet_address", $subnet[0]['subnet_address']);
$smarty->assign("subnet_mask", $subnet[0]['subnet_mask']);
// node // node
$query = "SELECT $sql = "SELECT node_id AS id, node_ip AS ip
node_id, FROM node
node_ip WHERE subnet_id=?
FROM ORDER BY INET_ATON(node_ip)";
node $sth = $dbh->prepare($sql);
WHERE $sth->execute([$subnet_id]);
subnet_id=" . $subnet_id . " $smarty->assign("nodes", $sth->fetchAll());
ORDER BY
INET_ATON(node_ip)";
$nodes = $db->db_select($query);
$smarty->assign("nodes", $nodes);
$smarty->display("subnetdel.tpl"); $smarty->display("subnetdel.tpl");
include("footer.php"); include("footer.php");

@ -13,29 +13,16 @@ $subnet_id = sanitize($_GET['subnet_id']);
include("header.php"); include("header.php");
$query = "SELECT $sql = "SELECT subnet_address AS address, subnet_mask AS mask,
subnet_address, protocol_version AS proto_vers,
subnet_mask, subnet_dhcp_start AS dhcp_start, subnet_dhcp_end AS dhcp_end,
protocol_version, ntp_server, subnet_info AS info
subnet_dhcp_start, FROM subnet
subnet_dhcp_end, WHERE subnet_id=?";
ntp_server, $sth = $dbh->prepare($sql);
subnet_info AS subnet_info $sth->execute([$subnet_id]);
FROM
subnet $smarty->assign("subnet", $sth->fetch(PDO::FETCH_OBJ));
WHERE
subnet_id=" . $subnet_id;
$subnet = $db->db_select($query);
$smarty->assign("subnet_id", $subnet_id);
$smarty->assign("subnet_address", $subnet[0]['subnet_address']);
$smarty->assign("subnet_mask", $subnet[0]['subnet_mask']);
$smarty->assign("subnet_proto_vers", $subnet[0]['protocol_version']);
$smarty->assign("subnet_dhcpstart", $subnet[0]['subnet_dhcp_start']);
$smarty->assign("subnet_dhcpend", $subnet[0]['subnet_dhcp_end']);
$smarty->assign("subnet_ntp_server", $subnet[0]['ntp_server']);
$smarty->assign("subnet_info", $subnet[0]['subnet_info']);
$smarty->display("subnetedit.tpl"); $smarty->display("subnetedit.tpl");

@ -13,21 +13,16 @@ $subnet_id = sanitize($_GET['subnet_id']);
include("header.php"); include("header.php");
$query = "SELECT $sql = "SELECT subnet_id AS id, subnet_address AS address,
subnet_address, subnet_mask AS mask
subnet_mask FROM subnet
FROM WHERE subnet_id=?";
subnet $sth = $dbh->prepare($sql);
WHERE $sth->execute([$zone_id]);
subnet_id=" . $subnet_id; $smarty->assign("subnet", $sth->fetch(PDO::FETCH_OBJ));
$subnet = $db->db_select($query);
$smarty->assign("subnet_id", $subnet_id);
$smarty->assign("subnet_address", $subnet[0]['subnet_address']);
$smarty->assign("subnet_mask", $subnet[0]['subnet_mask']);
$smarty->assign("location_options", $db->options_location()); $smarty->assign("location_options", db_get_options_location());
$smarty->display("subnetlocationadd.tpl"); $smarty->display("subnetlocationadd.tpl");
include("footer.php"); include("footer.php");

@ -14,34 +14,22 @@ $subnet_id = sanitize($_GET['subnet_id']);
include("header.php"); include("header.php");
// subnet // subnet
$query = "SELECT $sql = "SELECT subnet_id AS id, subnet_address AS address, subnet_mask AS mask
subnet_address, FROM subnet
subnet_mask WHERE subnet_id=?";
FROM $sth = $dbh->prepare($sql);
subnet $sth->execute([$subnet_id]);
WHERE $smarty->assign("subnet", $sth->fetch(PDO::FETCH_OBJ));
subnet_id=" . $subnet_id;
// locations for subnet
// run query $sql = "SELECT l.location_id, l.location_name
$subnet = $db->db_select($query); FROM subnetlocation AS s LEFT JOIN location USING (location_id)
WHERE s.subnet_id=?
$smarty->assign("subnet_id", $subnet_id); ORDER BY l.location_name";
$smarty->assign("subnet_address", $subnet[0]['subnet_address']); $sth = $dbh->prepare($sql);
$smarty->assign("subnet_mask", $subnet[0]['subnet_mask']); $sth->execute([$subnet_id]
$records = $sth->fetchAll();
// location
$query = "SELECT
l.location_id,
l.location_name
FROM
subnetlocation AS s LEFT JOIN location USING (location_id)
WHERE
s.subnet_id=" . $subnet_id . "
ORDER BY
l.location_name";
// run query
$records = $db->db_select($query);
$locations = array(); $locations = array();
foreach ($records as $rec) { foreach ($records as $rec) {
$locations[$rec['location_id']] = $rec['location_name']; $locations[$rec['location_id']] = $rec['location_name'];

@ -13,20 +13,13 @@ $subnet_id = sanitize($_GET['subnet_id']);
include("header.php"); include("header.php");
$query = "SELECT $sql = "SELECT subnet_id AS id, subnet_address AS address, subnet_mask AS mask
subnet_address, FROM subnet
subnet_mask WHERE subnet_id=?";
FROM $sth = $dbh->prepare($sql);
subnet $sth->execute([$subnet_id]);
WHERE
subnet_id=" . $subnet_id;
// run query $smarty->assign("subnet", $sth->fetch(PDO::FETCH_OBJ));
$subnet = $db->db_select($query);
$smarty->assign("subnet_id", $subnet_id);
$smarty->assign("subnet_address", $subnet[0]['subnet_address']);
$smarty->assign("subnet_mask", $subnet[0]['subnet_mask']);
$smarty->display("subnetlocationedit.tpl"); $smarty->display("subnetlocationedit.tpl");

@ -19,45 +19,42 @@ $smarty->assign("scripts",'changetext.js');
include("header.php"); include("header.php");
// subnet // subnet
$query = "SELECT $sql = "SELECT
s.subnet_address, s.subnet_id AS id,
s.subnet_mask, s.subnet_address AS address,
s.subnet_dhcp_start, s.subnet_mask AS mask,
s.subnet_dhcp_end, s.subnet_dhcp_start AS dhcp_start,
s.subnet_info, s.subnet_dhcp_end AS dhcp_end,
s.protocol_version, s.subnet_info AS info,
s.ntp_server, s.protocol_version AS proto_vers,
COUNT(node.subnet_id) AS node_counter s.ntp_server,
FROM COUNT(node.subnet_id) AS node_counter
subnet AS s LEFT JOIN node USING (subnet_id) FROM
WHERE subnet AS s LEFT JOIN node USING (subnet_id)
s.subnet_id=" . $subnet_id . " WHERE
GROUP BY s.subnet_id=?
s.subnet_id"; GROUP BY
s.subnet_id";
$sth = $dbh->prepare($sql);
$sth->execute([$subnet_id]);
$subnet = $sth->fetch(PDO::FETCH_OBJ);
$subnet = $db->db_select($query); $smarty->assign("subnet", $subnet);
// set needed variables // set needed variables
$subnet_address = $subnet[0]['subnet_address']; $subnet_address = $subnet->address;
$subnet_mask = $subnet[0]['subnet_mask']; $subnet_mask = $subnet->mask;
$subnet_dhcpstart = $subnet[0]['subnet_dhcp_start']; $subnet_dhcpstart = $subnet->dhcp_start;
$subnet_dhcpend = $subnet[0]['subnet_dhcp_end']; $subnet_dhcpend = $subnet->dhcp_end;
$subnet_proto_vers = $subnet[0]['protocol_version']; $subnet_proto_vers = $subnet->protocol_version;
$subnet_ntp_server = $subnet[0]['ntp_server']; $subnet_ntp_server = $subnet->ntp_server;
// set counters // set counters
$host_counter = pow(2,(32-$subnet_mask)); $host_counter = pow(2,(32-$subnet_mask));
$node_counter = $subnet[0]['node_counter']; $node_counter = $subnet->node_counter;
$subnet_usedpercentage = round((($node_counter/($host_counter-2))*100), 1); $subnet_usedpercentage = round((($node_counter/($host_counter-2))*100), 1);
$smarty->assign("subnet_id", $subnet_id);
$smarty->assign("subnet_address", $subnet_address);
$smarty->assign("subnet_mask", $subnet_mask);
$smarty->assign("subnet_dhcpstart", $subnet_dhcpstart);
$smarty->assign("subnet_dhcpend", $subnet_dhcpend);
$smarty->assign("subnet_info", nl2br($subnet[0]['subnet_info']));
$smarty->assign("subnet_proto_vers", $subnet_proto_vers);
$smarty->assign("subnet_ntp_server", $subnet_ntp_server);
$smarty->assign("node_counter", $node_counter); $smarty->assign("node_counter", $node_counter);
$smarty->assign("subnet_usedpercentage", $subnet_usedpercentage); $smarty->assign("subnet_usedpercentage", $subnet_usedpercentage);
$smarty->assign("config_color_unused", $config_color_unused); $smarty->assign("config_color_unused", $config_color_unused);
@ -67,25 +64,25 @@ $smarty->assign("free_counter", (($host_counter-2)-$node_counter));
// subnet // subnet
// split up the range // split up the range
$iprange = explode('.', $subnet_address); $iprange = explode('.', $subnet->address);
$iprange1 = $iprange[0]; $iprange1 = $iprange[0];
$iprange2 = $iprange[1]; $iprange2 = $iprange[1];
$iprange3 = $iprange[2]; $iprange3 = $iprange[2];
$iprange4 = $iprange[3]; $iprange4 = $iprange[3];
// create empty subnet-array // create empty subnet-array
$subnet = array(); $subnetdata = array();
// determine range (Class A/B/C) // determine range (Class A/B/C)
if ($subnet_mask>=24) { if ($subnet_mask >= 24) {
// Class C // Class C
// fill subnet-array with addresses we want to see // fill subnet-array with addresses we want to see
for($i=0;$i<$host_counter;$i++) { for($i=0; $i<$host_counter; $i++) {
// build ip // build ip
$ip = $iprange1 . '.' . $iprange2 . '.' . $iprange3 . '.' . ($iprange4+$i); $ip = $iprange1 . '.' . $iprange2 . '.' . $iprange3 . '.' . ($iprange4+$i);
// fill subnet-array // fill subnet-array
$subnet[$ip] = array(); $subnetdata[$ip] = array();
} }
// calculate broadcast address // calculate broadcast address
@ -121,7 +118,7 @@ if ($subnet_mask>=24) {
$ip = $iprange1 . '.' . $iprange2 . '.' . $page2 . '.' . $i; $ip = $iprange1 . '.' . $iprange2 . '.' . $page2 . '.' . $i;
// fill subnet-array // fill subnet-array
$subnet[$ip] = array(); $subnetdata[$ip] = array();
} }
// calculate broadcast address // calculate broadcast address
@ -162,18 +159,18 @@ if ($subnet_mask>=24) {
} else { } else {
// Class A // Class A
// which part do we want to see? // which part do we want to see?
if((empty($page)) ? $page=$subnet_address : $page=$page); if ((empty($page)) ? $page = $subnet_address : $page = $page);
$page = explode('.', $page); $page = explode('.', $page);
$page2 = $page[1]; $page2 = $page[1];
$page3 = $page[2]; $page3 = $page[2];
// fill subnet-array with addresses we want to see // fill subnet-array with addresses we want to see
for($i=0;$i<256;$i++) { for($i=0; $i<256; $i++) {
// build ip // build ip
$ip = $iprange1 . '.' . $page2 . '.' . $page3 . '.' . $i; $ip = $iprange1 . '.' . $page2 . '.' . $page3 . '.' . $i;
// fill subnet-array // fill subnet-array
$subnet[$ip] = array(); $subnetdata[$ip] = array();
} }
// calculate broadcast address // calculate broadcast address
@ -192,7 +189,7 @@ if ($subnet_mask>=24) {
$smarty->assign("iprange4", $iprange4); $smarty->assign("iprange4", $iprange4);
// set select box // set select box
if($i==$page2) { if($i == $page2) {
$smarty->assign("row1_selected", "selected"); $smarty->assign("row1_selected", "selected");
} else { } else {
@ -204,7 +201,7 @@ if ($subnet_mask>=24) {
} }
// loop addresses in range 3 // loop addresses in range 3
for($i=0;$i<256;$i++) { for($i=0; $i<256; $i++) {
// send to tpl // send to tpl
$smarty->assign("iprange1", $iprange1); $smarty->assign("iprange1", $iprange1);
$smarty->assign("iprange2", $page2); $smarty->assign("iprange2", $page2);
@ -238,7 +235,7 @@ if ($subnet_mask>=24) {
} }
// get nodes for this subnetview and implement the values into the array // get nodes for this subnetview and implement the values into the array
$query = "SELECT $sql = "SELECT
asset.asset_name, asset.asset_name,
assetclassgroup.assetclassgroup_color, assetclassgroup.assetclassgroup_color,
node.node_id, node.node_id,
@ -249,34 +246,38 @@ $query = "SELECT
assetclassgroup, assetclassgroup,
node node
WHERE WHERE
node.node_ip IN ('".implode("','",array_keys($subnet))."') node.node_ip IN ('".implode("','",array_keys($subnetdata))."')
AND node.subnet_id='$subnet_id' AND node.subnet_id=?
AND asset.asset_id=node.asset_id AND asset.asset_id=node.asset_id
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";
$nodes = $db->db_select($query); $sth = $dbh->prepare($sql);
$sth->execute([$subnet_id]);
$smarty->assign("locations", $sth->fetchAll());
$nodes = $sth->fetchAll();
$node_counter = count($nodes); $node_counter = count($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; $subnetdata[$node['node_ip']] = $node;
} }
} }
// replace ip's in subnet-array (if necessary) // replace ip's in subnet-array (if necessary)
// check for subnet address // check for subnet address
if(array_key_exists($subnet_address, $subnet)) { if (array_key_exists($subnet_address, $subnet)) {
// replace // replace
$subnet[$subnet_address] = array("subnet_address"); $subnetdata[$subnet_address] = array("subnet_address");
} }
// check for broadcast address // check for broadcast address
if(array_key_exists($broadcast_address, $subnet)) { if (array_key_exists($broadcast_address, $subnet)) {
// replace // replace
$subnet[$broadcast_address] = array("broadcast_address"); $subnetdata[$broadcast_address] = array("broadcast_address");
} }
$dhcpstart = 0; $dhcpstart = 0;
@ -289,13 +290,13 @@ if ($subnet_dhcpstart && $subnet_dhcpend) {
// start counter // start counter
// $i=1; // $i=1;
// loop subnet-array // loop subnet-array
foreach ($subnet AS $node_ip => $node) { foreach ($subnetdata AS $node_ip => $node) {
// make new line? // make new line?
// 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; $subnetdata[$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)) {
@ -306,28 +307,28 @@ foreach ($subnet AS $node_ip => $node) {
// check node // check node
if (empty($node)) { if (empty($node)) {
// empty node to tpl // empty node to tpl
$subnet[$node_ip]["url"] = 'assigniptonode.php?subnet_id=' . $subnet_id . '&amp;node_ip='. $node_ip; $subnetdata[$node_ip]["url"] = 'assigniptonode.php?subnet_id=' . $subnet_id . '&amp;node_ip='. $node_ip;
$subnet[$node_ip]["remotetext"] = $node_ip; $subnetdata[$node_ip]["remotetext"] = $node_ip;
if ($subnet[$node_ip]["dynamic"]) { if ($subnetdata[$node_ip]["dynamic"]) {
$subnet[$node_ip]["assetclassgroup_color"] = $config_color_dynamic; $subnetdata[$node_ip]["assetclassgroup_color"] = $config_color_dynamic;
} else { } else {
$subnet[$node_ip]["assetclassgroup_color"] = $config_color_unused; $subnetdata[$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"] = ""; $subnetdata[$node_ip]["url"] = "";
$subnet[$node_ip]["remotetext"] = $node_ip . '&nbsp;' . $lang['lang_subnet_subnetaddress']; $subnetdata[$node_ip]["remotetext"] = $node_ip . '&nbsp;' . $lang['lang_subnet_subnetaddress'];
$subnet[$node_ip]["assetclassgroup_color"] = $config_color_blocked; $subnetdata[$node_ip]["assetclassgroup_color"] = $config_color_blocked;
} else if (array_key_exists(0, $node) && $node[0]=="broadcast_address") { } else if (array_key_exists(0, $node) && $node[0]=="broadcast_address") {
// broadcast address to tpl // broadcast address to tpl
$subnet[$node_ip]["url"] = ""; $subnetdata[$node_ip]["url"] = "";
$subnet[$node_ip]["remotetext"] = $node_ip . '&nbsp;' . $lang['lang_subnet_broadcastaddress']; $subnetdata[$node_ip]["remotetext"] = $node_ip . '&nbsp;' . $lang['lang_subnet_broadcastaddress'];
$subnet[$node_ip]["assetclassgroup_color"] = $config_color_blocked; $subnetdata[$node_ip]["assetclassgroup_color"] = $config_color_blocked;
} else { } else {
// node to tpl // node to tpl
$subnet[$node_ip]["url"] = 'nodeview.php?node_id=' . $node['node_id']; $subnetdata[$node_ip]["url"] = 'nodeview.php?node_id=' . $node['node_id'];
$subnet[$node_ip]["remotetext"] = $node_ip . '&nbsp;' . $node['asset_name']; $subnetdata[$node_ip]["remotetext"] = $node_ip . '&nbsp;' . $node['asset_name'];
$subnet[$node_ip]["assetclassgroup_color"] = $node['assetclassgroup_color']; $subnetdata[$node_ip]["assetclassgroup_color"] = $node['assetclassgroup_color'];
} }
// update counter // update counter
@ -335,43 +336,30 @@ foreach ($subnet AS $node_ip => $node) {
} // foreach } // foreach
$smarty->assign("subnet", $subnet); $smarty->assign("subnetdata", $subnetdata);
$smarty->assign("imagewrap", $_SESSION['suser_imagecount']); $smarty->assign("imagewrap", $_SESSION['suser_imagecount']);
// vlan // vlans
$query = "SELECT $sql = "SELECT v.vlan_id AS id, v.vlan_name AS name,
vlan.vlan_id AS vlan_id, v.vlan_number AS number
vlan.vlan_name AS vlan_name, FROM subnetvlan AS s JOIN vlan AS v USING (vlan_id)
vlan.vlan_number AS vlan_number WHERE s.subnet_id=?
FROM ORDER BY v.vlan_name";
subnetvlan, $sth = $dbh->prepare($sql);
vlan $sth->execute([$subnet_id]);
WHERE $smarty->assign("vlans", $sth->fetchAll());
subnetvlan.subnet_id=" . $subnet_id . "
AND vlan.vlan_id=subnetvlan.vlan_id // locations
ORDER BY $sql = "SELECT l.location_id, l.location_name
vlan.vlan_name"; FROM location AS l LEFT JOIN subnetlocation AS s USING (location_id)
WHERE s.subnet_id=?
// run query ORDER BY l.location_name";
$vlans = $db->db_select($query); $sth = $dbh->prepare($sql);
$smarty->assign("vlans", $vlans); $sth->execute([$subnet_id]);
$smarty->assign("locations", $sth->fetchAll());
// location
$query = "SELECT // assetclassgroups
l.location_id, $sql = "SELECT
l.location_name
FROM
location AS l LEFT JOIN subnetlocation AS s USING (location_id)
WHERE
s.subnet_id=". $subnet_id . "
ORDER BY
l.location_name";
$locations = $db->db_select($query);
$smarty->assign("locations", $locations);
// assetclassgroup
$query = "SELECT
assetclassgroup_id AS id, assetclassgroup_id AS id,
assetclassgroup_name AS name, assetclassgroup_name AS name,
assetclassgroup_color AS color, assetclassgroup_color AS color,
@ -381,13 +369,12 @@ $query = "SELECT
LEFT JOIN asset USING (asset_id) LEFT JOIN asset USING (asset_id)
LEFT JOIN assetclass USING (assetclass_id) LEFT JOIN assetclass USING (assetclass_id)
LEFT JOIN assetclassgroup USING (assetclassgroup_id) LEFT JOIN assetclassgroup USING (assetclassgroup_id)
WHERE subnet_id=" . $subnet_id . " WHERE subnet_id=?
GROUP BY assetclass_id GROUP BY assetclass_id
ORDER BY counter DESC"; ORDER BY counter DESC";
$sth = $dbh->prepare($sql);
// run query $sth->execute([$subnet_id]);
$assetclassgroups = $db->db_select($query); $smarty->assign("assetclassgroups", $sth->fetchAll());
$smarty->assign("assetclassgroups", $assetclassgroups);
$smarty->display("subnetview.tpl"); $smarty->display("subnetview.tpl");

@ -13,44 +13,25 @@ $subnet_id = sanitize($_GET['subnet_id']);
include("header.php"); include("header.php");
$sql = "SELECT subnet_id AS id, subnet_address AS address, subnet_mask AS mask
// subnet FROM subnet
// build query WHERE subnet_id=?";
$query = "SELECT $sth = $dbh->prepare($sql);
subnet_address, $sth->execute([$subnet_id]);
subnet_mask
FROM
subnet
WHERE
subnet_id=" . $subnet_id;
// run query
$subnet = $db->db_select($query);
$smarty->assign("subnet_id", $subnet_id); $smarty->assign("subnet", $sth->fetch(PDO::FETCH_OBJ));
$smarty->assign("subnet_address", $subnet[0]['subnet_address']);
$smarty->assign("subnet_mask", $subnet[0]['subnet_mask']);
// vlan // vlan
$query = " SELECT $sql = "SELECT vlan_id, vlan_number, vlan_name
vlan_id, FROM vlan
vlan_number, WHERE vlan_id NOT IN (
vlan_name SELECT vlan_id FROM subnetvlan WHERE subnet_id=?
FROM )
vlan ORDER BY vlan_number";
WHERE $sth = $dbh->prepare($sql);
vlan_id NOT IN ( $sth->execute([$subnet_id]);
SELECT
vlan_id
FROM
subnetvlan
WHERE
subnet_id=" . $subnet_id . "
)
ORDER BY
vlan_number";
$vlans = $db->db_select($query); $vlans = $sth->fetchAll();
foreach ($vlans as $vlan) { foreach ($vlans as $vlan) {
$vlan_options[$vlan['vlan_id']] = $vlan['vlan_name']; $vlan_options[$vlan['vlan_id']] = $vlan['vlan_name'];
} }

@ -14,37 +14,22 @@ $subnet_id = sanitize($_GET['subnet_id']);
include("header.php"); include("header.php");
// subnet // subnet
$query = "SELECT $sql = "SELECT subnet_id AS id, subnet_address AS address, subnet_mask AS mask
subnet_address, FROM subnet
subnet_mask WHERE subnet_id=?";
FROM $sth = $dbh->prepare($sql);
subnet $sth->execute([$subnet_id]);
WHERE $smarty->assign("subnet", $sth->fetch(PDO::FETCH_OBJ));
subnet_id=" . $subnet_id;
// run query
$subnet = $db->db_select($query);
$smarty->assign("subnet_id", $subnet_id);
$smarty->assign("subnet_address", $subnet[0]['subnet_address']);
$smarty->assign("subnet_mask", $subnet[0]['subnet_mask']);
// vlan // vlan
$query = "SELECT $sql = "SELECT v.vlan_id, v.vlan_number, v.vlan_name
v.vlan_id, FROM subnetvlan AS s LEFT JOIN vlan AS v USING (vlan_id)
v.vlan_number, WHERE s.subnet_id=?
v.vlan_name ORDER BY v.vlan_number";
FROM $sth = $dbh->prepare($sql);
subnetvlan AS s LEFT JOIN vlan AS v USING (vlan_id) $sth->execute([$subnet_id]);
WHERE $smarty->assign("vlans", $sth->fetchAll());
s.subnet_id=" . $subnet_id . "
ORDER BY
v.vlan_number";
// run query
$vlans = $db->db_select($query);
$smarty->assign("vlans", $vlans);
$smarty->display("subnetvlandel.tpl"); $smarty->display("subnetvlandel.tpl");
include("footer.php"); include("footer.php");

@ -13,19 +13,12 @@ $subnet_id = sanitize($_GET['subnet_id']);
include("header.php"); include("header.php");
$query = "SELECT $sql = "SELECT subnet_address, subnet_mask
subnet_address, FROM subnet
subnet_mask WHERE subnet_id=?";
FROM $sth = $dbh->prepare($sql);
subnet $sth->execute([$subnet_id]);
WHERE $smarty->assign("subnet", $sth->fetch(PDO::FETCH_OBJ));
subnet_id=" . $subnet_id;
$subnet = $db->db_select($query);
$smarty->assign("subnet_id", $subnet_id);
$smarty->assign("subnet_address", $subnet[0]['subnet_address']);
$smarty->assign("subnet_mask", $subnet[0]['subnet_mask']);
$smarty->display("subnetvlanedit.tpl"); $smarty->display("subnetvlanedit.tpl");

@ -1,148 +1,148 @@
<table class="title"> <table class="title">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_about} {$lang_about}
</td> </td>
</tr> </tr>
</table> </table>
<table class="info"> <table class="info">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_ipreg} {$config_version} {$lang_ipreg} {$config_version}
</td> </td>
<td class="header_right"> <td class="header_right">
&nbsp; &nbsp;
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_about_projectpage} {$lang_about_projectpage}
</td> </td>
<td class="value"> <td class="value">
<a href="https://git.piratenpartei-sh.de/thooge/ipreg">https://git.piratenpartei-sh.de/thooge/ipreg</a> <a href="https://git.piratenpartei-sh.de/thooge/ipreg">https://git.piratenpartei-sh.de/thooge/ipreg</a>
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_about_sfprojectpage} {$lang_about_sfprojectpage}
</td> </td>
<td class="value"> <td class="value">
<a href="http://sourceforge.net/projects/ipreg">http://sourceforge.net/projects/ipreg</a> <a href="http://sourceforge.net/projects/ipreg">http://sourceforge.net/projects/ipreg</a>
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_about_license} {$lang_about_license}
</td> </td>
<td class="value"> <td class="value">
<a href="gpl-3.0.txt">{$lang_about_gpl}</a> <a href="gpl-3.0.txt">{$lang_about_gpl}</a>
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_about_smarty} {$lang_about_smarty}
</td> </td>
<td class="value"> <td class="value">
<a href="http://www.smarty.net/">http://www.smarty.net</a> <a href="http://www.smarty.net/">http://www.smarty.net</a>
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_about_iconset} {$lang_about_iconset}
</td> </td>
<td class="value"> <td class="value">
<a href="http://www.famfamfam.com/lab/icons/silk/">http://www.famfamfam.com/lab/icons/silk/</a> <a href="http://www.famfamfam.com/lab/icons/silk/">http://www.famfamfam.com/lab/icons/silk/</a>
</td> </td>
</tr> </tr>
</table> </table>
<p> <p>
<table class="info"> <table class="info">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_about_ipreg_ext} {$lang_about_ipreg_ext}
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_about_license_ext} {$lang_about_license_ext}
</td> </td>
</tr> </tr>
</table> </table>
<p> <p>
<table class="info"> <table class="info">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_about_changelog} {$lang_about_changelog}
</td> </td>
<td class="header_right"> <td class="header_right">
&nbsp; &nbsp;
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_about_changelog_v08} {$lang_about_changelog_v08}
</td> </td>
<td class="value"> <td class="value">
{$lang_about_changelog_v08_ext} {$lang_about_changelog_v08_ext}
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_about_changelog_v07} {$lang_about_changelog_v07}
</td> </td>
<td class="value"> <td class="value">
{$lang_about_changelog_v07_ext} {$lang_about_changelog_v07_ext}
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_about_changelog_v06} {$lang_about_changelog_v06}
</td> </td>
<td class="value"> <td class="value">
{$lang_about_changelog_v06_ext} {$lang_about_changelog_v06_ext}
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_about_changelog_v05} {$lang_about_changelog_v05}
</td> </td>
<td class="value"> <td class="value">
{$lang_about_changelog_v05_ext} {$lang_about_changelog_v05_ext}
</td> </td>
</tr> </tr>
<td class="label"> <td class="label">
{$lang_about_changelog_v04} {$lang_about_changelog_v04}
</td> </td>
<td class="value"> <td class="value">
{$lang_about_changelog_v04_ext} {$lang_about_changelog_v04_ext}
</td> </td>
</tr> </tr>
<td class="label"> <td class="label">
{$lang_about_changelog_v03} {$lang_about_changelog_v03}
</td> </td>
<td class="value"> <td class="value">
{$lang_about_changelog_v03_ext} {$lang_about_changelog_v03_ext}
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_about_changelog_v02} {$lang_about_changelog_v02}
</td> </td>
<td class="value"> <td class="value">
{$lang_about_changelog_v02_ext} {$lang_about_changelog_v02_ext}
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_about_changelog_v01} {$lang_about_changelog_v01}
</td> </td>
<td class="value"> <td class="value">
{$lang_about_changelog_v01_ext} {$lang_about_changelog_v01_ext}
</td> </td>
</tr> </tr>
</table> </table>

@ -1,7 +1,7 @@
<table class="title"> <table class="title">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_assets} ({$assets|@count}) {$lang_assets} ({$assets|@count} / {$assetcount})
</td> </td>
<td align="right"> <td align="right">
<a href="assetadd.php"><img src="image.php?icon=add" alt="{$lang_asset_add}" {if $suser_tooltips}title="{$lang_asset_add}" {/if}/></a> <a href="assetadd.php"><img src="image.php?icon=add" alt="{$lang_asset_add}" {if $suser_tooltips}title="{$lang_asset_add}" {/if}/></a>
@ -34,7 +34,7 @@
{foreach item=asset from=$assets} {foreach item=asset from=$assets}
<tr> <tr>
<td class="label"> <td class="label">
<a href="assetview.php?asset.id={$asset.asset_id}">{$asset.asset_name}</a> <a href="assetview.php?asset_id={$asset.asset_id}">{$asset.asset_name}</a>
</td> </td>
<td class="value"> <td class="value">
<a href="assetclassview.php?assetclass_id={$asset.assetclass_id}">{$asset.assetclass_name}</a> <a href="assetclassview.php?assetclass_id={$asset.assetclass_id}">{$asset.assetclass_name}</a>

@ -1,70 +1,70 @@
<form method="POST" action="submit.php"> <form method="POST" action="submit.php">
<input type="hidden" name="add" value="asset"> <input type="hidden" name="add" value="asset">
<table class="title"> <table class="title">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_asset_add} {$lang_asset_add}
</td> </td>
<td align="right"> <td align="right">
<a href="#" onClick="history.go(-1)"><img src="image.php?icon=cancel" alt="{$lang_cancel}" {if $suser_tooltips}title="{$lang_cancel}" {/if}/></a> <a href="#" onClick="history.go(-1)"><img src="image.php?icon=cancel" alt="{$lang_cancel}" {if $suser_tooltips}title="{$lang_cancel}" {/if}/></a>
<input type="image" src="image.php?icon=save" alt="{$lang_submit}" {if $suser_tooltips}title="{$lang_submit}" {/if}/> <input type="image" src="image.php?icon=save" alt="{$lang_submit}" {if $suser_tooltips}title="{$lang_submit}" {/if}/>
</td> </td>
</tr> </tr>
</table> </table>
<table class="info"> <table class="info">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_asset} {$lang_asset}
</td> </td>
<td class="header_right"> <td class="header_right">
&nbsp; &nbsp;
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_asset_name} {$lang_asset_name}
</td> </td>
<td class="value"> <td class="value">
<input type="text" name="asset_name"> <input type="text" name="asset_name">
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_asset_hostname} {$lang_asset_hostname}
</td> </td>
<td class="value"> <td class="value">
<input type="text" name="asset_hostname"> <input type="text" name="asset_hostname">
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_asset_info} {$lang_asset_info}
</td> </td>
<td class="value"> <td class="value">
<textarea name="asset_info" cols="30" rows="10"></textarea> <textarea name="asset_info" cols="30" rows="10"></textarea>
</td> </td>
</tr> </tr>
</table> </table>
<table class="info"> <table class="info">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_assetclass} {$lang_assetclass}
</td> </td>
<td class="header_right"> <td class="header_right">
&nbsp; &nbsp;
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_assetclass_name} {$lang_assetclass_name}
</td> </td>
<td class="value"> <td class="value">
{html_options name=assetclass_id options=$assetclass_options} {html_options name=assetclass_id options=$assetclass_options}
</td> </td>
</tr> </tr>
</table> </table>
</form> </form>

@ -1,54 +1,54 @@
<form method="POST" action="submit.php"> <form method="POST" action="submit.php">
<input type="hidden" name="add" value="assetclass"> <input type="hidden" name="add" value="assetclass">
<table class="title"> <table class="title">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_assetclass_add} {$lang_assetclass_add}
</td> </td>
<td align="right"> <td align="right">
<a href="#" onClick="history.go(-1)"><img src="image.php?icon=cancel" alt="{$lang_cancel}" {if $suser_tooltips}title="{$lang_cancel}" {/if}/></a> <a href="#" onClick="history.go(-1)"><img src="image.php?icon=cancel" alt="{$lang_cancel}" {if $suser_tooltips}title="{$lang_cancel}" {/if}/></a>
<input type="image" src="image.php?icon=save" alt="{$lang_submit}" {if $suser_tooltips}title="{$lang_submit}" {/if}/> <input type="image" src="image.php?icon=save" alt="{$lang_submit}" {if $suser_tooltips}title="{$lang_submit}" {/if}/>
</td> </td>
</tr> </tr>
</table> </table>
<table class="info"> <table class="info">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_assetclass} {$lang_assetclass}
</td> </td>
<td class="header_right"> <td class="header_right">
&nbsp; &nbsp;
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_assetclass_name} {$lang_assetclass_name}
</td> </td>
<td class="value"> <td class="value">
<input type="text" name="assetclass_name"> <input type="text" name="assetclass_name">
</td> </td>
</tr> </tr>
</table> </table>
<table class="info"> <table class="info">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_assetclassgroup} {$lang_assetclassgroup}
</td> </td>
<td class="header_right"> <td class="header_right">
&nbsp; &nbsp;
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_assetclassgroup} {$lang_assetclassgroup}
</td> </td>
<td class="value"> <td class="value">
{html_options name=assetclassgroup_id options=$assetclassgroup_options} {html_options name=assetclassgroup_id options=$assetclassgroup_options}
</td> </td>
</tr> </tr>
</table> </table>
</form> </form>

@ -1,36 +1,36 @@
<form method="POST" action="submit.php"> <form method="POST" action="submit.php">
<input type="hidden" name="del" value="assetclass"> <input type="hidden" name="del" value="assetclass">
<input type="hidden" name="assetclass_id" value="{$assetclass_id}"> <input type="hidden" name="assetclass_id" value="{$assetclass->id}">
<table class="title"> <table class="title">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_assetclass_del} {$lang_assetclass_del}
</td> </td>
<td align="right"> <td align="right">
<a href="#" onClick="history.go(-1)"><img src="image.php?icon=cancel" alt="{$lang_cancel}" {if $suser_tooltips}title="{$lang_cancel}" {/if}/></a> <a href="#" onClick="history.go(-1)"><img src="image.php?icon=cancel" alt="{$lang_cancel}" {if $suser_tooltips}title="{$lang_cancel}" {/if}/></a>
<input type="image" src="image.php?icon=shred" alt="{$lang_assetclass_del}" {if $suser_tooltips}title="{$lang_assetclass_del}" {/if}/> <input type="image" src="image.php?icon=shred" alt="{$lang_assetclass_del}" {if $suser_tooltips}title="{$lang_assetclass_del}" {/if}/>
</td> </td>
</tr> </tr>
</table> </table>
<table class="info"> <table class="info">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_assetclass} {$lang_assetclass}
</td> </td>
<td class="header_right"> <td class="header_right">
&nbsp; &nbsp;
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_assetclass_name} {$lang_assetclass_name}
</td> </td>
<td class="value"> <td class="value">
<a href="assetclassview.php?assetclass_id={$assetclass_id}">{$assetclass_name}</a> <a href="assetclassview.php?assetclass_id={$assetclass->id}">{$assetclass->name}</a>
</td> </td>
</tr> </tr>
</table> </table>
</form> </form>

@ -1,55 +1,55 @@
<form method="POST" action="submit.php"> <form method="POST" action="submit.php">
<input type="hidden" name="edit" value="assetclass"> <input type="hidden" name="edit" value="assetclass">
<input type="hidden" name="assetclass_id" value="{$assetclass_id}"> <input type="hidden" name="assetclass_id" value="{$assetclass->id}">
<table class="title"> <table class="title">
<tr> <tr>
<td class="header"> <td class="header">
{$assetclass_name} {$assetclass->name}
</td> </td>
<td align="right"> <td align="right">
<a href="#" onClick="history.go(-1)"><img src="image.php?icon=back" alt="{$lang_cancel}" {if $suser_tooltips}title="{$lang_cancel}" {/if}/></a> <a href="#" onClick="history.go(-1)"><img src="image.php?icon=back" alt="{$lang_cancel}" {if $suser_tooltips}title="{$lang_cancel}" {/if}/></a>
<input type="image" src="image.php?icon=save" alt="{$lang_submit}" {if $suser_tooltips}title="{$lang_submit}" {/if}/> <input type="image" src="image.php?icon=save" alt="{$lang_submit}" {if $suser_tooltips}title="{$lang_submit}" {/if}/>
</td> </td>
</tr> </tr>
</table> </table>
<table class="info"> <table class="info">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_assetclass} {$lang_assetclass}
</td> </td>
<td class="header_right"> <td class="header_right">
&nbsp; &nbsp;
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_assetclass_name} {$lang_assetclass_name}
</td> </td>
<td class="value"> <td class="value">
<input type="text" name="assetclass_name" value="{$assetclass_name}"> <input type="text" name="assetclass_name" value="{$assetclass->name}">
</td> </td>
</tr> </tr>
</table> </table>
<table class="info"> <table class="info">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_assetclassgroup} {$lang_assetclassgroup}
</td> </td>
<td class="header_right"> <td class="header_right">
&nbsp; &nbsp;
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_assetclassgroup} {$lang_assetclassgroup}
</td> </td>
<td class="value"> <td class="value">
{html_options name=assetclassgroup_id options=$assetclassgroup_options selected=$assetclassgroup_id} {html_options name=assetclassgroup_id options=$assetclassgroup_options selected=$assetclassgroup_id}
</td> </td>
</tr> </tr>
</table> </table>
</form> </form>

@ -1,42 +1,42 @@
<form method="POST" action="submit.php"> <form method="POST" action="submit.php">
<input type="hidden" name="add" value="assetclassgroup"> <input type="hidden" name="add" value="assetclassgroup">
<table class="title"> <table class="title">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_assetclassgroup_add} {$lang_assetclassgroup_add}
</td> </td>
<td align="right"> <td align="right">
<a href="#" onClick="history.go(-1)"><img src="image.php?icon=cancel" alt="{$lang_cancel}" {if $suser_tooltips}title="{$lang_cancel}" {/if}/></a> <a href="#" onClick="history.go(-1)"><img src="image.php?icon=cancel" alt="{$lang_cancel}" {if $suser_tooltips}title="{$lang_cancel}" {/if}/></a>
<input type="image" src="image.php?icon=save" alt="{$lang_submit}" {if $suser_tooltips}title="{$lang_submit}" {/if}/> <input type="image" src="image.php?icon=save" alt="{$lang_submit}" {if $suser_tooltips}title="{$lang_submit}" {/if}/>
</td> </td>
</tr> </tr>
</table> </table>
<table class="info"> <table class="info">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_assetclassgroup} {$lang_assetclassgroup}
</td> </td>
<td class="header_right"> <td class="header_right">
&nbsp; &nbsp;
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_assetclassgroup_name} {$lang_assetclassgroup_name}
</td> </td>
<td class="value"> <td class="value">
<input type="text" name="assetclassgroup_name"> <input type="text" name="assetclassgroup_name">
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_color} {$lang_color}
</td> </td>
<td class="value"> <td class="value">
<input type="text" name="assetclassgroup_color"> <input type="text" name="assetclassgroup_color">
</td> </td>
</tr> </tr>
</table> </table>
</form> </form>

@ -1,38 +1,38 @@
<form method="POST" action="submit.php"> <form method="POST" action="submit.php">
<input type="hidden" name="del" value="assetclassgroup"> <input type="hidden" name="del" value="assetclassgroup">
<input type="hidden" name="assetclassgroup_id" value="{$assetclassgroup_id}"> <input type="hidden" name="assetclassgroup_id" value="{$assetclassgroup->id}">
<table class="title"> <table class="title">
<tr> <tr>
<td class="header"> <td class="header">
{$assetclassgroup_name} {$assetclassgroup->name}
</td> </td>
<td align="right"> <td align="right">
<a href="#" onClick="history.go(-1)"><img src="image.php?icon=cancel" alt="{$lang_cancel}" {if $suser_tooltips}title="{$lang_cancel}" {/if}/></a> <a href="#" onClick="history.go(-1)"><img src="image.php?icon=cancel" alt="{$lang_cancel}" {if $suser_tooltips}title="{$lang_cancel}" {/if}/></a>
<input type="image" src="image.php?icon=save" alt="{$lang_submit}" {if $suser_tooltips}title="{$lang_submit}" {/if}/> <input type="image" src="image.php?icon=save" alt="{$lang_submit}" {if $suser_tooltips}title="{$lang_submit}" {/if}/>
</td> </td>
</tr> </tr>
</table> </table>
<p> <p>
<table class="info"> <table class="info">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_assetclassgroup_del} {$lang_assetclassgroup_del}
</td> </td>
<td class="header_right"> <td class="header_right">
&nbsp; &nbsp;
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_assetclassgroup_name} {$lang_assetclassgroup_name}
</td> </td>
<td class="value"> <td class="value">
<a href="assetclassgroupview.php?assetclassgroup_id={$assetclassgroup_id}">{$assetclassgroup_name}</a> <a href="assetclassgroupview.php?assetclassgroup_id={$assetclassgroup->id}">{$assetclassgroup->name}</a>
</td> </td>
</tr> </tr>
</table> </table>
</form> </form>

@ -1,44 +1,44 @@
<form method="POST" action="submit.php"> <form method="POST" action="submit.php">
<input type="hidden" name="edit" value="assetclassgroup"> <input type="hidden" name="edit" value="assetclassgroup">
<input type="hidden" name="assetclassgroup_id" value="{$assetclassgroup_id}"> <input type="hidden" name="assetclassgroup_id" value="{$assetclassgroup->id}">
<table class="title"> <table class="title">
<tr> <tr>
<td class="header"> <td class="header">
{$assetclassgroup_name} {$assetclassgroup->name}
</td> </td>
<td align="right"> <td align="right">
<a href="#" onClick="history.go(-1)"><img src="image.php?icon=back" alt="{$lang_cancel}" {if $suser_tooltips}title="{$lang_cancel}" {/if}/></a> <a href="#" onClick="history.go(-1)"><img src="image.php?icon=back" alt="{$lang_cancel}" {if $suser_tooltips}title="{$lang_cancel}" {/if}/></a>
<input type="image" src="image.php?icon=save" alt="{$lang_submit}" {if $suser_tooltips}title="{$lang_submit}" {/if}/> <input type="image" src="image.php?icon=save" alt="{$lang_submit}" {if $suser_tooltips}title="{$lang_submit}" {/if}/>
</td> </td>
</tr> </tr>
</table> </table>
<table class="info"> <table class="info">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_assetclassgroup} {$lang_assetclassgroup}
</td> </td>
<td class="header_right"> <td class="header_right">
&nbsp; &nbsp;
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_assetclassgroup_name} {$lang_assetclassgroup_name}
</td> </td>
<td class="value"> <td class="value">
<input type="text" name="assetclassgroup_name" value="{$assetclassgroup_name}"> <input type="text" name="assetclassgroup_name" value="{$assetclassgroup->name}">
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_color} {$lang_color}
</td> </td>
<td class="value"> <td class="value">
#<input type="text" {literal}class="color {pickerPosition:'right'}"{/literal} name="assetclassgroup_color" size="6" maxlength="6" value="{$assetclassgroup_color}"> #<input type="text" {literal}class="color {pickerPosition:'right'}"{/literal} name="assetclassgroup_color" size="6" maxlength="6" value="{$assetclassgroup->color}">
</td> </td>
</tr> </tr>
</table> </table>
</form> </form>

@ -1,60 +1,61 @@
<table class="title"> <table class="title">
<tr> <tr>
<td class="header"> <td class="header">
{$assetclassgroup_name} {$assetclassgroup_name}
</td> </td>
<td align="right"> <td align="right">
<a href="assetclassgroupadd.php?assetclassgroup_id={$assetclassgroup_id}"><img src="image.php?icon=add" alt="{$lang_assetclassgroup_add}" {if $suser_tooltips}title="{$lang_assetclassgroup_add}" {/if}/></a> <a href="assetclassgroupadd.php?assetclassgroup_id={$assetclassgroup->id}"><img src="image.php?icon=add" alt="{$lang_assetclassgroup_add}" {if $suser_tooltips}title="{$lang_assetclassgroup_add}" {/if}/></a>
<a href="assetclassgroupedit.php?assetclassgroup_id={$assetclassgroup_id}"><img src="image.php?icon=edit" alt="{$lang_assetclassgroup_edit}" {if $suser_tooltips}title="{$lang_assetclassgroup_edit}" {/if}/></a> <a href="assetclassgroupedit.php?assetclassgroup_id={$assetclassgroup->id}"><img src="image.php?icon=edit" alt="{$lang_assetclassgroup_edit}" {if $suser_tooltips}title="{$lang_assetclassgroup_edit}" {/if}/></a>
<a href="assetclassgroupdel.php?assetclassgroup_id={$assetclassgroup_id}"><img src="image.php?icon=delete" alt="{$lang_assetclassgroup_del}" {if $suser_tooltips}title="{$lang_assetclassgroup_del}" {/if}/></a> <a href="assetclassgroupdel.php?assetclassgroup_id={$assetclassgroup->id}"><img src="image.php?icon=delete" alt="{$lang_assetclassgroup_del}" {if $suser_tooltips}title="{$lang_assetclassgroup_del}" {/if}/></a>
</td> </td>
</tr> </tr>
</table> </table>
<table class="info"> <table class="info">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_assetclassgroup} {$lang_assetclassgroup}
</td> </td>
<td class="header_right"> <td class="header_right">
&nbsp; &nbsp;
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_assetclassgroup_name} {$lang_assetclassgroup_name}
</td> </td>
<td class="value"> <td class="value">
<a href="assetclassgroupview.php?assetclassgroup_id={$assetclassgroup_id}">{$assetclassgroup_name}</a> <a href="assetclassgroupview.php?assetclassgroup_id={$assetclassgroup->id}">{$assetclassgroup->name}</a>
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_color} {$lang_color}
</td> </td>
<td class="value"> <td class="value">
<img src="image.php?color={$assetclassgroup_color}" alt="{$assetclassgroup_color}"> <img src="image.php?color={$assetclassgroup->color}" alt="{$assetclassgroup->color}">
</td> #{$assetclassgroup->color}
</tr> </td>
</table> </tr>
</table>
<table class="info">
<tr> <table class="info">
<td class="header"> <tr>
{$lang_assetclass} <td class="header">
</td> {$lang_assetclass}
<td class="header_right"> </td>
&nbsp; <td class="header_right">
</td> &nbsp;
</tr> </td>
<tr> </tr>
<td class="label"> <tr>
{$lang_assetclasses} ({$assetclasses|@count}) <td class="label">
</td> {$lang_assetclasses} ({$assetclasses|@count})
<td class="value"> </td>
{foreach item=assetclass from=$assetclasses} <td class="value">
<a href="assetclassview.php?assetclass_id={$assetclass.assetclass_id}">{$assetclass.assetclass_name}</a><br> {foreach item=assetclass from=$assetclasses}
{/foreach} <a href="assetclassview.php?assetclass_id={$assetclass.assetclass_id}">{$assetclass.assetclass_name}</a><br>
</td> {/foreach}
</tr> </td>
</table> </tr>
</table>

@ -4,9 +4,9 @@
{$assetclass_name} {$assetclass_name}
</td> </td>
<td align="right"> <td align="right">
<a href="assetadd.php?assetclass_id={$assetclass_id}"><img src="image.php?icon=add" alt="{$lang_asset_add}" {if $suser_tooltips}title="{$lang_asset_add}" {/if}/></a> <a href="assetadd.php?assetclass_id={$assetclass->assetclass_id}"><img src="image.php?icon=add" alt="{$lang_asset_add}" {if $suser_tooltips}title="{$lang_asset_add}" {/if}/></a>
<a href="assetclassedit.php?assetclass_id={$assetclass_id}"><img src="image.php?icon=edit" alt="{$lang_assetclass_edit}" {if $suser_tooltips}title="{$lang_asset_edit}" {/if}/></a> <a href="assetclassedit.php?assetclass_id={$assetclass->assetclass_id}"><img src="image.php?icon=edit" alt="{$lang_assetclass_edit}" {if $suser_tooltips}title="{$lang_asset_edit}" {/if}/></a>
<a href="assetclassdel.php?assetclass_id={$assetclass_id}"><img src="image.php?icon=delete" alt="{$lang_assetclass_add}" {if $suser_tooltips}title="{$lang_asset_delete}" {/if}/></a> <a href="assetclassdel.php?assetclass_id={$assetclass->assetclass_id}"><img src="image.php?icon=delete" alt="{$lang_assetclass_add}" {if $suser_tooltips}title="{$lang_asset_delete}" {/if}/></a>
</td> </td>
</tr> </tr>
</table> </table>
@ -25,7 +25,7 @@
{$lang_assetclass_name} {$lang_assetclass_name}
</td> </td>
<td class="value"> <td class="value">
<a href="assetclassview.php?assetclass_id={$assetclass_id}">{$assetclass_name}</a> <a href="assetclassview.php?assetclass_id={$assetclass->assetclass_id}">{$assetclass->assetclass_name}</a>
</td> </td>
</tr> </tr>
</table> </table>
@ -44,8 +44,8 @@
{$lang_assetclassgroup_name} {$lang_assetclassgroup_name}
</td> </td>
<td class="value"> <td class="value">
<img src="image.php?color={$assetclassgroup_color}" alt="#{$assetclassgroup_color}"> <img src="image.php?color={$assetclass->assetclassgroup_color}" alt="#{$assetclass->assetclassgroup_color}">
<a href="assetclassgroupview.php?assetclassgroup_id={$assetclassgroup_id}">{$assetclassgroup_name}</a><br> <a href="assetclassgroupview.php?assetclassgroup_id={$assetclass->assetclassgroup_id}">{$assetclass->assetclassgroup_name}</a><br>
</td> </td>
</tr> </tr>
</table> </table>

@ -1,58 +1,58 @@
<form method="POST" action="submit.php"> <form method="POST" action="submit.php">
<input type="hidden" name="del" value="asset"> <input type="hidden" name="del" value="asset">
<input type="hidden" name="asset_id" value="{$asset_id}"> <input type="hidden" name="asset_id" value="{$asset_id}">
<table class="title"> <table class="title">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_asset_del} {$lang_asset_del}
</td> </td>
<td align="right"> <td align="right">
<a href="#" onClick="history.go(-1)"><img src="image.php?icon=cancel" alt="{$lang_cancel}" {if $suser_tooltips}title="{$lang_cancel}" {/if}/></a> <a href="#" onClick="history.go(-1)"><img src="image.php?icon=cancel" alt="{$lang_cancel}" {if $suser_tooltips}title="{$lang_cancel}" {/if}/></a>
<input type="image" src="image.php?icon=shred" alt="{$lang_asset_del}" {if $suser_tooltips}title="{$lang_asset_del}" {/if}/> <input type="image" src="image.php?icon=shred" alt="{$lang_asset_del}" {if $suser_tooltips}title="{$lang_asset_del}" {/if}/>
</td> </td>
</tr> </tr>
</table> </table>
</form> </form>
<table class="info"> <table class="info">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_asset} {$lang_asset}
</td> </td>
<td class="header_right"> <td class="header_right">
&nbsp; &nbsp;
</td> </td>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_asset_name} {$lang_asset_name}
</td> </td>
<td class="value"> <td class="value">
<a href="assetview.php?asset_id={$asset_id}">{$asset_name}</a> <a href="assetview.php?asset_id={$asset_id}">{$asset_name}</a>
</td> </td>
</tr> </tr>
</table> </table>
{if $nodes|@count} {if $nodes|@count}
<table class="info"> <table class="info">
<tr> <tr>
<td class="header"> <td class="header">
<img src="image.php?icon=error" alt="{$lang_warning}"> <img src="image.php?icon=error" alt="{$lang_warning}">
</td> </td>
<td class="header_right"> <td class="header_right">
{$lang_comments_asset_del_nodes} {$lang_comments_asset_del_nodes}
</td> </td>
</tr> </tr>
{foreach item=node from=$nodes} {foreach item=node from=$nodes}
<tr> <tr>
<td class="label"> <td class="label">
{$lang_ip} {$lang_ip}
</td> </td>
<td class="value"> <td class="value">
<a href="nodeview.php?node_id={$node.node_id}">{$node.node_ip}</a> <a href="nodeview.php?node_id={$node.node_id}">{$node.node_ip}</a>
</td> </td>
</tr> </tr>
{/foreach} {/foreach}
</table> </table>
{/if} {/if}

@ -1,72 +1,72 @@
<form method="POST" action="submit.php"> <form method="POST" action="submit.php">
<input type="hidden" name="edit" value="asset"> <input type="hidden" name="edit" value="asset">
<input type="hidden" name="asset_id" value="{$asset.asset_id}"> <input type="hidden" name="asset_id" value="{$asset->asset_id}">
<input type="hidden" name="assetclass_id" value="{$asset.assetclass_id}"> <input type="hidden" name="assetclass_id" value="{$asset->assetclass_id}">
<table class="title"> <table class="title">
<tr> <tr>
<td class="header"> <td class="header">
{$asset_name} {$asset_name}
</td> </td>
<td align="right"> <td align="right">
<a href="#" onClick="history.go(-1)"><img src="image.php?icon=back" alt="{$lang_cancel}"></a> <a href="#" onClick="history.go(-1)"><img src="image.php?icon=back" alt="{$lang_cancel}"></a>
<input type="image" src="image.php?icon=save" alt="{$lang_submit}"> <input type="image" src="image.php?icon=save" alt="{$lang_submit}">
</td> </td>
</tr> </tr>
</table> </table>
<table class="info"> <table class="info">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_asset} {$lang_asset}
</td> </td>
<td class="header_right"> <td class="header_right">
&nbsp; &nbsp;
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_asset_name} {$lang_asset_name}
</td> </td>
<td class="value"> <td class="value">
<input type="text" name="asset_name" value="{$asset.asset_name}"> <input type="text" name="asset_name" value="{$asset->asset_name}">
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_asset_hostname} {$lang_asset_hostname}
</td> </td>
<td class="value"> <td class="value">
<input type="text" name="asset_hostname" value="{$asset.asset_hostname}"> <input type="text" name="asset_hostname" value="{$asset->asset_hostname}">
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_asset_info} {$lang_asset_info}
</td> </td>
<td class="value"> <td class="value">
<textarea name="asset_info" cols="30" rows="10">{$asset.asset_info}</textarea> <textarea name="asset_info" cols="30" rows="10">{$asset->asset_info}</textarea>
</td> </td>
</tr> </tr>
</table> </table>
<table class="info"> <table class="info">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_assetclass} {$lang_assetclass}
</td> </td>
<td class="header_right"> <td class="header_right">
&nbsp; &nbsp;
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_assetclass_name} {$lang_assetclass_name}
</td> </td>
<td class="value"> <td class="value">
{html_options name=assetclass_id options=$assetclass_options selected=$asset.assetclass_id} {html_options name=assetclass_id options=$assetclass_options selected=$asset->assetclass_id}
</td> </td>
</tr> </tr>
</table> </table>
</form> </form>

@ -1,89 +1,89 @@
<table class="title"> <table class="title">
<tr> <tr>
<td class="header"> <td class="header">
{$asset_name} {$asset_name}
</td> </td>
<td align="right"> <td align="right">
<a href="assignnodetoasset.php?asset_id={$asset_id}"><img src="image.php?icon=add" alt="{$lang_assignnodetoasset}"></a> <a href="assignnodetoasset.php?asset_id={$asset->asset_id}"><img src="image.php?icon=add" alt="{$lang_assignnodetoasset}"></a>
<a href="assetedit.php?asset_id={$asset_id}"><img src="image.php?icon=edit" alt="{$lang_asset_edit}"></a> <a href="assetedit.php?asset_id={$asset->asset_id}"><img src="image.php?icon=edit" alt="{$lang_asset_edit}"></a>
<a href="assetdel.php?asset_id={$asset_id}"><img src="image.php?icon=delete" alt="{$lang_asset_edit}"></a> <a href="assetdel.php?asset_id={$asset->asset_id}"><img src="image.php?icon=delete" alt="{$lang_asset_edit}"></a>
</td> </td>
</tr> </tr>
</table> </table>
<table class="info"> <table class="info">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_asset} {$lang_asset}
</td> </td>
<td class="header_right"> <td class="header_right">
&nbsp; &nbsp;
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_asset_name} {$lang_asset_name}
</td> </td>
<td class="value"> <td class="value">
<a href="assetview.php?asset_id={$asset_id}">{$asset_name}</a> <a href="assetview.php?asset_id={$asset->asset_id}">{$asset->asset_name}</a>
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_asset_hostname} {$lang_asset_hostname}
</td> </td>
<td class="value"> <td class="value">
{$asset_hostname} {$asset->asset_hostname}
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_asset_info} {$lang_asset_info}
</td> </td>
<td class="value"> <td class="value">
{$asset_info} {$asset->asset_info}
</td> </td>
</tr> </tr>
</table> </table>
<table class="info"> <table class="info">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_assetclass} {$lang_assetclass}
</td> </td>
<td class="header_right"> <td class="header_right">
&nbsp; &nbsp;
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_assetclass_name} {$lang_assetclass_name}
</td> </td>
<td class="value"> <td class="value">
<a href="assetclassview.php?assetclass_id={$assetclass_id}">{$assetclass_name}</a> <a href="assetclassview.php?assetclass_id={$asset->assetclass_id}">{$asset->assetclass_name}</a>
</td> </td>
</tr> </tr>
</table> </table>
<table class="info"> <table class="info">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_nodes} {$lang_nodes}
</td> </td>
<td class="header_right"> <td class="header_right">
<a href="assignnodetoasset.php?asset_id={$asset_id}"><img src="image.php?icon=edit" alt="{$lang_assignnodetoasset}"></a> <a href="assignnodetoasset.php?asset_id={$asset->asset_id}"><img src="image.php?icon=edit" alt="{$lang_assignnodetoasset}"></a>
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_nodes} ({$nodes|@count}) {$lang_nodes} ({$nodes|@count})
</td> </td>
<td class="value"> <td class="value">
{foreach item=node from=$nodes} {foreach item=node from=$nodes}
<a href="nodeview.php?node_id={$node.node_id}">{if $node.node_ip}{$node.node_ip}{else}(leer){/if}</a> <a href="nodeview.php?node_id={$node.node_id}">{if $node.node_ip}{$node.node_ip}{else}(leer){/if}</a>
{if $node.node_info}{$node.node_info}{/if}<br> {if $node.node_info}{$node.node_info}{/if}<br>
{/foreach} {/foreach}
</td> </td>
</tr> </tr>
</table> </table>

@ -1,63 +1,63 @@
<form method="POST" action="submit.php"> <form method="POST" action="submit.php">
<input type="hidden" name="redirect" value="assigniptonode"> <input type="hidden" name="redirect" value="assigniptonode">
<input type="hidden" name="node_ip" value="{$node_ip}"> <input type="hidden" name="node_ip" value="{$node_ip}">
<input type="hidden" name="subnet_id" value="{$subnet_id}"> <input type="hidden" name="subnet_id" value="{$subnet->id}">
<table class="title"> <table class="title">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_assigniptonode} {$lang_assigniptonode}
</td> </td>
<td align="right"> <td align="right">
<a href="#" onClick="history.go(-1)"><img src="image.php?icon=back" alt="{$lang_cancel}"></a> <a href="#" onClick="history.go(-1)"><img src="image.php?icon=back" alt="{$lang_cancel}"></a>
<input type="image" src="image.php?icon=next" alt="{$lang_submit}"> <input type="image" src="image.php?icon=next" alt="{$lang_submit}">
</td> </td>
</tr> </tr>
</table> </table>
<table class="info"> <table class="info">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_ip} {$lang_ip}
</td> </td>
<td class="header_right"> <td class="header_right">
&nbsp; &nbsp;
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_ip} {$lang_ip}
</td> </td>
<td class="value"> <td class="value">
{$node_ip} {$node_ip}
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_subnet} {$lang_subnet}
</td> </td>
<td class="value"> <td class="value">
<a href="subnetview.php?subnet_id={$subnet_id}&page={$node_ip}">{$subnet_address}/{$subnet_mask}</a> <a href="subnetview.php?subnet_id={$subnet_id}&page={$node_ip}">{$subnet->address}/{$subnet->mask}</a>
</td> </td>
</tr> </tr>
</table> </table>
<table class="info"> <table class="info">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_options} {$lang_options}
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="value"> <td class="value">
<input type="radio" name="action" value="assignnodetoasset" checked>&nbsp;{$lang_assignnodetoasset_existing} <input type="radio" name="action" value="assignnodetoasset" checked>&nbsp;{$lang_assignnodetoasset_existing}
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="value"> <td class="value">
<input type="radio" name="action" value="nodeadd">&nbsp;{$lang_assignnodetoasset_new} <input type="radio" name="action" value="nodeadd">&nbsp;{$lang_assignnodetoasset_new}
</td> </td>
</tr> </tr>
</table> </table>
</form> </form>

@ -1,105 +1,105 @@
<form method="POST" action="submit.php"> <form method="POST" action="submit.php">
<input type="hidden" name="add" value="assignnodetoasset"> <input type="hidden" name="add" value="assignnodetoasset">
<table class="title"> <table class="title">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_assignnodetoasset} {$lang_assignnodetoasset}
</td> </td>
<td align="right"> <td align="right">
<a href="#" onClick="history.go(-1)"><img src="image.php?icon=back" alt="{$lang_cancel}"></a> <a href="#" onClick="history.go(-1)"><img src="image.php?icon=back" alt="{$lang_cancel}"></a>
<input type="image" src="image.php?icon=save" alt="{$lang_submit}"> <input type="image" src="image.php?icon=save" alt="{$lang_submit}">
</td> </td>
</tr> </tr>
</table> </table>
<table class="info"> <table class="info">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_node} {$lang_node}
</td> </td>
<td class="header_right"> <td class="header_right">
&nbsp; &nbsp;
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_ip} {$lang_ip}
</td> </td>
<td label="value"> <td label="value">
<input type="text" name="node_ip" value="{$node_ip}"> <input type="text" name="node_ip" value="{$node_ip}">
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_mac} {$lang_mac}
</td> </td>
<td label="value"> <td label="value">
<input type="text" name="node_mac"> <input type="text" name="node_mac">
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_dns1} {$lang_dns1}
</td> </td>
<td label="value"> <td label="value">
<input type="text" name="node_dns1"> <input type="text" name="node_dns1">
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_dns2} {$lang_dns2}
</td> </td>
<td label="value"> <td label="value">
<input type="text" name="node_dns2"> <input type="text" name="node_dns2">
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_node_info} {$lang_node_info}
</td> </td>
<td label="value"> <td label="value">
<textarea name="node_info" cols="30" rows="10"></textarea> <textarea name="node_info" cols="30" rows="10"></textarea>
</td> </td>
</tr> </tr>
</table> </table>
<table class="info"> <table class="info">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_asset} {$lang_asset}
</td> </td>
<td class="header_right"> <td class="header_right">
&nbsp; &nbsp;
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_asset_name} {$lang_asset_name}
</td> </td>
<td label="value"> <td label="value">
{html_options name=asset_id options=$asset_options selected=$asset_id} {html_options name=asset_id options=$asset_options selected=$asset_id}
</td> </td>
</tr> </tr>
</table> </table>
<table class="info"> <table class="info">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_subnet} {$lang_subnet}
</td> </td>
<td class="header_right"> <td class="header_right">
&nbsp; &nbsp;
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_subnet_subnetaddress}/{$lang_subnet_mask} {$lang_subnet_subnetaddress}/{$lang_subnet_mask}
</td> </td>
<td class="value"> <td class="value">
{html_options name=subnet_id options=$subnet_options} {html_options name=subnet_id options=$subnet_options selected=$subnet_id}
</td> </td>
</tr> </tr>
</table> </table>
</form> </form>

@ -1,23 +1,23 @@
<table class="title"> <table class="title">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_comments} {$lang_comments}
</td> </td>
<td align="right"> <td align="right">
<a href="#" onClick="history.go(-1)"><img src="image.php?icon=back" alt="{$lang_cancel}"></a> <a href="#" onClick="history.go(-1)"><img src="image.php?icon=back" alt="{$lang_cancel}"></a>
</td> </td>
</tr> </tr>
</table> </table>
<table class="info"> <table class="info">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_comments} {$lang_comments}
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="value"> <td class="value">
{$comments} {$comments}
</td> </td>
</tr> </tr>
</table> </table>

@ -1,9 +1,9 @@
<table class="footer"> <table class="footer">
<tr> <tr>
<td align="center"> <td align="center">
IP Reg {$config_version} IP Reg {$config_version}
</td> </td>
</tr> </tr>
</table> </table>
</body> </body>
</html> </html>

@ -1,61 +1,61 @@
<p></p> <p></p>
<table class="info"> <table class="info">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_statistics} {$lang_statistics}
</td> </td>
<td class="header_right"> <td class="header_right">
&nbsp; &nbsp;
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_assets} {$lang_assets}
</td> </td>
<td class="value"> <td class="value">
<a href="asset.php">{$asset_counter}</a> <a href="asset.php">{$asset_counter}</a>
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_locations} {$lang_locations}
</td> </td>
<td class="value"> <td class="value">
<a href="location.php">{$location_counter}</a> <a href="location.php">{$location_counter}</a>
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_nodes} {$lang_nodes}
</td> </td>
<td class="value"> <td class="value">
<a href="node.php">{$node_counter}</a> <a href="node.php">{$node_counter}</a>
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_subnets} {$lang_subnets}
</td> </td>
<td class="value"> <td class="value">
<a href="subnet.php">{$subnet_counter}</a> <a href="subnet.php">{$subnet_counter}</a>
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_vlans} {$lang_vlans}
</td> </td>
<td class="value"> <td class="value">
<a href="vlan.php">{$vlan_counter}</a> <a href="vlan.php">{$vlan_counter}</a>
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_zones} {$lang_zones}
</td> </td>
<td class="value"> <td class="value">
<a href="zone.php">{$zone_counter}</a> <a href="zone.php">{$zone_counter}</a>
</td> </td>
</tr> </tr>
</table> </table>

@ -1,63 +1,63 @@
<form method="POST" action="submit.php"> <form method="POST" action="submit.php">
<input type="hidden" name="add" value="location"> <input type="hidden" name="add" value="location">
<table class="title"> <table class="title">
<tr> <tr>
<td class="header"> <td class="header">
<img class="icon" src="images/building.png" alt="" /> <img class="icon" src="images/building.png" alt="" />
{$lang_location_add} {$lang_location_add}
</td> </td>
<td align="right"> <td align="right">
<a href="#" onClick="history.go(-1)"><img src="image.php?icon=cancel" alt="{$lang_cancel}"></a> <a href="#" onClick="history.go(-1)"><img src="image.php?icon=cancel" alt="{$lang_cancel}"></a>
<input type="image" src="image.php?icon=save" alt="{$lang_submit}"> <input type="image" src="image.php?icon=save" alt="{$lang_submit}">
</td> </td>
</tr> </tr>
</table> </table>
<table class="info"> <table class="info">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_location} {$lang_location}
</td> </td>
<td class="header_right"> <td class="header_right">
&nbsp; &nbsp;
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_location_name} {$lang_location_name}
</td> </td>
<td class="value"> <td class="value">
<input type="text" name="location_name"> <input type="text" name="location_name">
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_location_info} {$lang_location_info}
</td> </td>
<td class="value"> <td class="value">
<textarea name="location_info" cols="30" rows="10"></textarea> <textarea name="location_info" cols="30" rows="10"></textarea>
</td> </td>
</tr> </tr>
</table> </table>
<table class="info"> <table class="info">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_location_parent} {$lang_location_parent}
</td> </td>
<td class="header_right"> <td class="header_right">
&nbsp; &nbsp;
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_location_name} {$lang_location_name}
</td> </td>
<td class="value"> <td class="value">
{html_options name=location_parent options=$location_options selected=$location_parent} {html_options name=location_parent options=$location_options selected=$location_parent}
</td> </td>
</tr> </tr>
</table> </table>
</form> </form>

@ -1,39 +1,39 @@
<form method="POST" action="submit.php"> <form method="POST" action="submit.php">
<input type="hidden" name="del" value="location"> <input type="hidden" name="del" value="location">
<input type="hidden" name="location_id" value="{$location_id}"> <input type="hidden" name="location_id" value="{$location->id}">
<table class="title"> <table class="title">
<tr> <tr>
<td class="header"> <td class="header">
<img class="icon" src="images/building.png" alt="" /> <img class="icon" src="images/building.png" alt="" />
{$location_name} {$location_name}
</td> </td>
<td align="right"> <td align="right">
<a href="#" onClick="history.go(-1)"><img src="image.php?icon=cancel" alt="{$lang_cancel}"></a> <a href="#" onClick="history.go(-1)"><img src="image.php?icon=cancel" alt="{$lang_cancel}"></a>
<input type="image" src="images/building_delete.png" alt="{$lang_location_del}"> <input type="image" src="images/building_delete.png" alt="{$lang_location_del}">
</td> </td>
</tr> </tr>
</table> </table>
<p> <p>
<table class="info"> <table class="info">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_location_del} {$lang_location_del}
</td> </td>
<td class="header_right"> <td class="header_right">
&nbsp; &nbsp;
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_location_name} {$lang_location_name}
</td> </td>
<td class="value"> <td class="value">
<a href="locationview.php?location_id={$location_id}">{$location_name}</a> <a href="locationview.php?location_id={$location->id}">{$location->name}</a>
</td> </td>
</tr> </tr>
</table> </table>
</form> </form>

@ -1,64 +1,64 @@
<form method="POST" action="submit.php"> <form method="POST" action="submit.php">
<input type="hidden" name="edit" value="location"> <input type="hidden" name="edit" value="location">
<input type="hidden" name="location_id" value="{$location_id}"> <input type="hidden" name="location_id" value="{$location->id}">
<table class="title"> <table class="title">
<tr> <tr>
<td class="header"> <td class="header">
<img class="icon" src="images/building.png" alt="" /> <img class="icon" src="images/building.png" alt="" />
{$location_name} {$location_name}
</td> </td>
<td align="right"> <td align="right">
<a href="#" onClick="history.go(-1)"><img src="image.php?icon=back" alt="{$lang_cancel}"></a> <a href="#" onClick="history.go(-1)"><img src="image.php?icon=back" alt="{$lang_cancel}"></a>
<input type="image" src="image.php?icon=save" alt="{$lang_submit}"> <input type="image" src="image.php?icon=save" alt="{$lang_submit}">
</td> </td>
</tr> </tr>
</table> </table>
<table class="info"> <table class="info">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_location} {$lang_location}
</td> </td>
<td class="header_right"> <td class="header_right">
&nbsp; &nbsp;
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_location_name} {$lang_location_name}
</td> </td>
<td class="value"> <td class="value">
<input type="text" name="location_name" value="{$location_name}"> <input type="text" name="location_name" value="{$location->name}">
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_location_info} {$lang_location_info}
</td> </td>
<td class="value"> <td class="value">
<textarea name="location_info" cols="30" rows="10">{$location_info}</textarea> <textarea name="location_info" cols="30" rows="10">{$location->info}</textarea>
</td> </td>
</tr> </tr>
</table> </table>
<table class="info"> <table class="info">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_location_parent} {$lang_location_parent}
</td> </td>
<td class="header_right"> <td class="header_right">
&nbsp; &nbsp;
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_location_parent} {$lang_location_parent}
</td> </td>
<td class="value"> <td class="value">
{html_options name=parentlocation_id options=$location_options selected=$location_parent} {html_options name=parentlocation_id options=$location_options selected=$location->parent}
</td> </td>
</tr> </tr>
</table> </table>
</form> </form>

@ -1,53 +1,53 @@
<form method="POST" action="submit.php"> <form method="POST" action="submit.php">
<input type="hidden" name="add" value="locationsubnet"> <input type="hidden" name="add" value="locationsubnet">
<input type="hidden" name="location_id" value="{$location_id}"> <input type="hidden" name="location_id" value="{$location->id}">
<table class="title"> <table class="title">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_locationsubnet} {$lang_locationsubnet}
</td> </td>
<td align="right"> <td align="right">
<a href="#" onClick="history.go(-1)"><img src="image.php?icon=back" alt="{$lang_cancel}"></a> <a href="#" onClick="history.go(-1)"><img src="image.php?icon=back" alt="{$lang_cancel}"></a>
<input type="image" src="image.php?icon=save" alt="{$lang_submit}"> <input type="image" src="image.php?icon=save" alt="{$lang_submit}">
</td> </td>
</tr> </tr>
</table> </table>
<table class="info"> <table class="info">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_location} {$lang_location}
</td> </td>
<td class="header_right"> <td class="header_right">
&nbsp; &nbsp;
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_location_name} {$lang_location_name}
</td> </td>
<td class="value"> <td class="value">
<a href="locationview.php?location_id={$location_id}">{$location_name}</a> <a href="locationview.php?location_id={$location->id}">{$location->name}</a>
</td> </td>
</tr> </tr>
</table> </table>
<table class="info"> <table class="info">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_subnet_add} {$lang_subnet_add}
</td> </td>
<td class="header_right"> <td class="header_right">
&nbsp; &nbsp;
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_subnet} {$lang_subnet}
</td> </td>
<td class="value"> <td class="value">
{html_options name=subnet_id options=$subnet_options} {html_options name=subnet_id options=$subnet_options}
</td> </td>
</tr> </tr>
</table> </table>

@ -1,53 +1,53 @@
<form method="POST" action="submit.php"> <form method="POST" action="submit.php">
<input type="hidden" name="del" value="locationsubnet"> <input type="hidden" name="del" value="locationsubnet">
<input type="hidden" name="location_id" value="{$location_id}"> <input type="hidden" name="location_id" value="{$location_id}">
<table class="title"> <table class="title">
<tr> <tr>
<td class="header"> <td class="header">
{lang_locationsubnet} {lang_locationsubnet}
</td> </td>
<td align="right"> <td align="right">
<a href="#" onClick="history.go(-1)"><img src="image.php?icon=back" alt="{$lang_cancel}"></a> <a href="#" onClick="history.go(-1)"><img src="image.php?icon=back" alt="{$lang_cancel}"></a>
<input type="image" src="image.php?icon=save" alt="{$lang_submit}"> <input type="image" src="image.php?icon=save" alt="{$lang_submit}">
</td> </td>
</tr> </tr>
</table> </table>
<table class="info"> <table class="info">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_location} {$lang_location}
</td> </td>
<td class="header_right"> <td class="header_right">
&nbsp; &nbsp;
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_location_name} {$lang_location_name}
</td> </td>
<td class="value"> <td class="value">
<a href="locationview.php?location_id={$location_id}">{$location_name}</a> <a href="locationview.php?location_id={$location_id}">{$location_name}</a>
</td> </td>
</tr> </tr>
</table> </table>
<table class="info"> <table class="info">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_subnet_del} {$lang_subnet_del}
</td> </td>
<td class="header_right"> <td class="header_right">
&nbsp; &nbsp;
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_subnet} {$lang_subnet}
</td> </td>
<td class="value"> <td class="value">
{html_options name=subnet_id options=$subnet_options} {html_options name=subnet_id options=$subnet_options}
</td> </td>
</tr> </tr>
</table> </table>

@ -1,54 +1,54 @@
<form method="POST" action="submit.php"> <form method="POST" action="submit.php">
<input type="hidden" name="redirect" value="locationsubnet"> <input type="hidden" name="redirect" value="locationsubnet">
<input type="hidden" name="location_id" value="{$location_id}"> <input type="hidden" name="location_id" value="{$location_id}">
<table class="title"> <table class="title">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_locationsubnet} {$lang_locationsubnet}
</td> </td>
<td align="right"> <td align="right">
<a href="#" onClick="history.go(-1)"><img src="image.php?icon=back" alt="{$lang_cancel}"></a> <a href="#" onClick="history.go(-1)"><img src="image.php?icon=back" alt="{$lang_cancel}"></a>
<input type="image" src="image.php?icon=next" alt="{$lang_submit}"> <input type="image" src="image.php?icon=next" alt="{$lang_submit}">
</td> </td>
</tr> </tr>
</table> </table>
<table class="info"> <table class="info">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_location} {$lang_location}
</td> </td>
<td class="header_right"> <td class="header_right">
&nbsp; &nbsp;
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_location_name} {$lang_location_name}
</td> </td>
<td class="value"> <td class="value">
<a href="locationview.php?location_id={$location_id}">{$location_name}</a> <a href="locationview.php?location_id={$location_id}">{$location_name}</a>
</td> </td>
</tr> </tr>
</table> </table>
<table class="info"> <table class="info">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_subnet} {$lang_subnet}
</td> </td>
<td class="header_right"> <td class="header_right">
&nbsp; &nbsp;
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_options} {$lang_options}
</td> </td>
<td class="value"> <td class="value">
<input type="radio" name="action" value="locationsubnetadd" checked>&nbsp;{$lang_subnet_add}<br> <input type="radio" name="action" value="locationsubnetadd" checked>&nbsp;{$lang_subnet_add}<br>
<input type="radio" name="action" value="locationsubnetdel">&nbsp;{$lang_subnet_del} <input type="radio" name="action" value="locationsubnetdel">&nbsp;{$lang_subnet_del}
</td> </td>
</tr> </tr>
</table> </table>

@ -1,88 +1,88 @@
<table class="title"> <table class="title">
<tr> <tr>
<td class="header"> <td class="header">
<img class="icon" src="images/building.png" alt="" /> <img class="icon" src="images/building.png" alt="" />
{$location_name} {$location_name}
</td> </td>
<td align="right"> <td align="right">
<a href="locationadd.php?location_parent={$location_id}"><img src="images/building_add.png" alt="{$lang_sublocation_add}"></a> <a href="locationadd.php?location_parent={$location->id}"><img src="images/building_add.png" alt="{$lang_sublocation_add}"></a>
<a href="locationedit.php?location_id={$location_id}"><img src="images/building_edit.png" alt="{$lang_location_edit}"></a> <a href="locationedit.php?location_id={$location->id}"><img src="images/building_edit.png" alt="{$lang_location_edit}"></a>
<a href="locationdel.php?location_id={$location_id}"><img src="images/building_delete.png" alt="{$lang_location_del}"></a> <a href="locationdel.php?location_id={$location->id}"><img src="images/building_delete.png" alt="{$lang_location_del}"></a>
</td> </td>
</tr> </tr>
</table> </table>
<table class="info"> <table class="info">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_location} {$lang_location}
</td> </td>
<td class="header_right"> <td class="header_right">
&nbsp; &nbsp;
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_location_name} {$lang_location_name}
</td> </td>
<td class="value"> <td class="value">
<ol id="breadcrumbs"> <ol id="breadcrumbs">
{foreach item=breadcrumb from=$crumbs name=breadcrumbs} {foreach item=breadcrumb from=$crumbs name=breadcrumbs}
<li{if $smarty.foreach.breadcrumbs.first} class="first"{/if}><a href="{$breadcrumb.url}">{$breadcrumb.name}</a></li> <li{if $smarty.foreach.breadcrumbs.first} class="first"{/if}><a href="{$breadcrumb->url}">{$breadcrumb->name}</a></li>
{/foreach} {/foreach}
</ol> </ol>
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_location_info} {$lang_location_info}
</td> </td>
<td class="value"> <td class="value">
{$location_info} {$location_info}
</td> </td>
</tr> </tr>
</table> </table>
<table class="info"> <table class="info">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_sublocation} {$lang_sublocation}
</td> </td>
<td class="header_right"> <td class="header_right">
&nbsp; &nbsp;
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_sublocations} ({$sublocations|@count}) {$lang_sublocations} ({$sublocations|@count})
</td> </td>
<td class="value"> <td class="value">
{foreach item=sublocation from=$sublocations} {foreach item=sublocation from=$sublocations}
<a href="locationview.php?location_id={$sublocation.sublocation_id}">{$sublocation.sublocation_name}</a> <a href="locationview.php?location_id={$sublocation.sublocation_id}">{$sublocation.sublocation_name}</a>
{$sublocation.info_short}{if $sublocation.info_length>40}&hellip;{/if} {$sublocation.info_short}{if $sublocation.info_length>40}&hellip;{/if}
<br> <br>
{/foreach} {/foreach}
</td> </td>
</tr> </tr>
</table> </table>
<table class="info"> <table class="info">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_subnet} {$lang_subnet}
</td> </td>
<td class="header_right"> <td class="header_right">
<a href="locationsubnetedit.php?location_id={$location_id}"><img src="image.php?icon=edit" alt="{$lang_locationsubnet_edit}"></a> <a href="locationsubnetedit.php?location_id={$location_id}"><img src="image.php?icon=edit" alt="{$lang_locationsubnet_edit}"></a>
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_subnets} ({$subnets|@count}) {$lang_subnets} ({$subnets|@count})
</td> </td>
<td class="value"> <td class="value">
{foreach item=subnet from=$subnets} {foreach item=subnet from=$subnets}
<a href="subnetview.php?subnet_id={$subnet.subnet_id}">{$subnet.subnet_address}/{$subnet.subnet_mask}</a><br> <a href="subnetview.php?subnet_id={$subnet.subnet_id}">{$subnet.subnet_address}/{$subnet.subnet_mask}</a><br>
{/foreach} {/foreach}
</td> </td>
</tr> </tr>
</table> </table>

@ -1,68 +1,68 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html> <html>
<head> <head>
<title>{$lang_ipreg}</title> <title>{$lang_ipreg}</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<link rel="stylesheet" href="tpl/style.css" type="text/css"> <link rel="stylesheet" href="tpl/style.css" type="text/css">
<link rel="shortcut icon" href="images/shield.ico"> <link rel="shortcut icon" href="images/shield.ico">
</head> </head>
<body onload="document.login.user_name.focus();"> <body onload="document.login.user_name.focus();">
<table class="menu"> <table class="menu">
<tr> <tr>
<td> <td>
&nbsp; &nbsp;
</td> </td>
</tr> </tr>
</table> </table>
<table class="header"> <table class="header">
<tr> <tr>
<td> <td>
{$lang_ipreg} {$lang_ipreg}
</td> </td>
</tr> </tr>
</table> </table>
<form name="login" method="POST" action="login.php"> <form name="login" method="POST" action="login.php">
<table class="title"> <table class="title">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_ipreg}&nbsp;{$config_version} {$lang_ipreg}&nbsp;{$config_version}
</td> </td>
<td align="right"> <td align="right">
<input type="image" src="images/control_fastforward_blue.png" alt="{$lang_login}"> <input type="image" src="images/control_fastforward_blue.png" alt="{$lang_login}">
</td> </td>
</tr> </tr>
</table> </table>
<table class="info"> <table class="info">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_login} {$lang_login}
</td> </td>
<td class="header_right"> <td class="header_right">
&nbsp; &nbsp;
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_user_name} {$lang_user_name}
</td> </td>
<td class="value"> <td class="value">
<input type="text" name="user_name" /> <input type="text" name="user_name" />
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_user_password} {$lang_user_password}
</td> </td>
<td class="value"> <td class="value">
<input type="password" name="user_pass" /> <input type="password" name="user_pass" />
</td> </td>
</tr> </tr>
</table> </table>
</form> </form>

@ -1,61 +1,61 @@
<form method="POST" action="submit.php"> <form method="POST" action="submit.php">
<input type="hidden" name="add" value="nat"> <input type="hidden" name="add" value="nat">
<input type="hidden" name="node_id_ext" value="{$node_id_ext}"> <input type="hidden" name="node_id_ext" value="{$node_id_ext}">
<table class="title"> <table class="title">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_nat} {$lang_nat}
</td> </td>
<td align="right"> <td align="right">
<a href="#" onClick="history.go(-1)"><img src="image.php?icon=back" alt="{$lang_cancel}"></a> <a href="#" onClick="history.go(-1)"><img src="image.php?icon=back" alt="{$lang_cancel}"></a>
<input type="image" src="image.php?icon=save" alt="{$lang_submit}"> <input type="image" src="image.php?icon=save" alt="{$lang_submit}">
</td> </td>
</tr> </tr>
</table> </table>
<table class="info"> <table class="info">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_node} {$lang_node}
</td> </td>
<td class="header_right"> <td class="header_right">
&nbsp; &nbsp;
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_ip} {$lang_ip}
</td> </td>
<td class="value"> <td class="value">
<a href="nodeview.php?node_id={$node_id_ext}">{$node_ip_ext}</a> <a href="nodeview.php?node_id={$node_id_ext}">{$node_ip_ext}</a>
</td> </td>
</tr> </tr>
</table> </table>
<table class="info"> <table class="info">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_nat_add} {$lang_nat_add}
</td> </td>
<td class="header_right"> <td class="header_right">
&nbsp; &nbsp;
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_ip} {$lang_ip}
</td> </td>
<td class="value"> <td class="value">
{html_options name=node_id_int options=$node_options} {html_options name=node_id_int options=$node_options}
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_nat_type} {$lang_nat_type}
</td> </td>
<td class="value"> <td class="value">
{html_options name=nat_type options=$nat_type_options} {html_options name=nat_type options=$nat_type_options}
</td> </td>
</tr> </tr>
</table> </table>

@ -1,6 +1,6 @@
<form method="POST" action="submit.php"> <form method="POST" action="submit.php">
<input type="hidden" name="del" value="nat"> <input type="hidden" name="del" value="nat">
<input type="hidden" name="node_id_ext" value="{$node_id_ext}"> <input type="hidden" name="node_id_ext" value="{$node->id_ext}">
<table class="title"> <table class="title">
<tr> <tr>
@ -10,7 +10,7 @@
<td align="right"> <td align="right">
<a href="#" onClick="history.go(-1)"><img src="image.php?icon=back" alt="{$lang_cancel}"></a> <a href="#" onClick="history.go(-1)"><img src="image.php?icon=back" alt="{$lang_cancel}"></a>
{if $nat_options} {if $nat_options}
<input type="image" src="image.php?icon=save" alt="{$lang_submit}"> <input type="image" src="image.php?icon=delete" alt="{$lang_submit}">
{/if} {/if}
</td> </td>
</tr> </tr>
@ -30,7 +30,7 @@
{$lang_ip} {$lang_ip}
</td> </td>
<td class="value"> <td class="value">
<a href="nodeview.php?node_id={$node_id_ext}">{$node_ip_ext}</a> <a href="nodeview.php?node_id={$node->id_ext}">{$node->ip_ext}</a>
</td> </td>
</tr> </tr>
</table> </table>
@ -50,7 +50,7 @@
{$lang_node} {$lang_node}
</td> </td>
<td class="value"> <td class="value">
{html_options name=nat_ext options=$nat_options} {html_options name=nat_id options=$nat_options}
</td> </td>
{else} {else}
<td colspan="2"> <td colspan="2">

@ -1,52 +1,52 @@
<form method="POST" action="submit.php"> <form method="POST" action="submit.php">
<input type="hidden" name="redirect" value="nat"> <input type="hidden" name="redirect" value="nat">
<input type="hidden" name="node_id" value="{$node_id}"> <input type="hidden" name="node_id" value="{$node->id}">
<table class="title"> <table class="title">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_nat} {$lang_nat}
</td> </td>
<td align="right"> <td align="right">
<a href="#" onClick="history.go(-1)"><img src="image.php?icon=back" alt="{$lang_cancel}"></a> <a href="#" onClick="history.go(-1)"><img src="image.php?icon=back" alt="{$lang_cancel}"></a>
<input type="image" src="image.php?icon=next" alt="{$lang_submit}"> <input type="image" src="image.php?icon=next" alt="{$lang_submit}">
</td> </td>
</tr> </tr>
</table> </table>
<table class="info"> <table class="info">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_node} {$lang_node}
</td> </td>
<td class="header_right"> <td class="header_right">
&nbsp; &nbsp;
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_ip} {$lang_ip}
</td> </td>
<td class="value"> <td class="value">
<a href="nodeview.php?node_id={$node_id}">{$node_ip}</a> <a href="nodeview.php?node_id={$node->id}">{$node->ip}</a>
</td> </td>
</tr> </tr>
</table> </table>
<table class="info"> <table class="info">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_options} {$lang_options}
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="value"> <td class="value">
<input type="radio" name="action" value="natadd" checked>&nbsp;{$lang_nat_add} <input type="radio" name="action" value="natadd" checked>&nbsp;{$lang_nat_add}
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="value"> <td class="value">
<input type="radio" name="action" value="natdel">&nbsp;{$lang_nat_del} <input type="radio" name="action" value="natdel">&nbsp;{$lang_nat_del}
</td> </td>
</tr> </tr>
</table> </table>

@ -2,14 +2,13 @@
<tr> <tr>
<td class="header"> <td class="header">
<img class="icon" src="images/network-ethernet.png" alt="" /> <img class="icon" src="images/network-ethernet.png" alt="" />
{$lang_nodes} ({$nodes|@count}) {$lang_nodes} {if $subnet_id}in {$subnet}{/if} ({$nodes|@count})
</td> </td>
<td align="right"> <td align="right">
<a href="nodeadd.php?subnet_id={$subnet_id}"><img src="image.php?icon=add" alt="{$lang_node_add}"></a> <a href="nodeadd.php?subnet_id={$subnet_id}"><img src="image.php?icon=add" alt="{$lang_node_add}"></a>
</td> </td>
</tr> </tr>
</table> </table>
<table class="info"> <table class="info">
<tr> <tr>
<td class="header"> <td class="header">

@ -1,133 +1,133 @@
<form method="POST" action="submit.php"> <form method="POST" action="submit.php">
<input type="hidden" name="add" value="node"> <input type="hidden" name="add" value="node">
<table class="title"> <table class="title">
<tr> <tr>
<td class="header"> <td class="header">
<img class="icon" src="images/network-ethernet.png" alt="" /> <img class="icon" src="images/network-ethernet.png" alt="" />
{$lang_node_add} {$lang_node_add}
</td> </td>
<td align="right"> <td align="right">
<a href="#" onClick="history.go(-1)"><img src="image.php?icon=cancel" alt="{$lang_cancel}"></a> <a href="#" onClick="history.go(-1)"><img src="image.php?icon=cancel" alt="{$lang_cancel}"></a>
<input type="image" src="image.php?icon=save" alt="{$lang_submit}"> <input type="image" src="image.php?icon=save" alt="{$lang_submit}">
</td> </td>
</tr> </tr>
</table> </table>
<table class="info"> <table class="info">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_node} {$lang_node}
</td> </td>
<td class="header_right"> <td class="header_right">
&nbsp; &nbsp;
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_ip} {$lang_ip}
</td> </td>
<td class="value"> <td class="value">
<input type="text" name="node_ip" value="{$node_ip}"> <input type="text" name="node_ip" value="{$node_ip}">
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_mac} {$lang_mac}
</td> </td>
<td class="value"> <td class="value">
<input type="text" name="node_mac"> <input type="text" name="node_mac">
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_dns1} {$lang_dns1}
</td> </td>
<td class="value"> <td class="value">
<input type="text" name="node_dns1">&nbsp;<input type="checkbox" name="node_dns1suffix" checked>{$user_dns1suffix} <input type="text" name="node_dns1">&nbsp;<input type="checkbox" name="node_dns1suffix" checked>{$user_dns1suffix}
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_dns2} {$lang_dns2}
</td> </td>
<td class="value"> <td class="value">
<input type="text" name="node_dns2">&nbsp;<input type="checkbox" name="dns2suffix" checked>{$user_dns2suffix} <input type="text" name="node_dns2">&nbsp;<input type="checkbox" name="dns2suffix" checked>{$user_dns2suffix}
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_node_info} {$lang_node_info}
</td> </td>
<td class="value"> <td class="value">
<textarea name="node_info" cols="30" rows="10"></textarea> <textarea name="node_info" cols="30" rows="10"></textarea>
</td> </td>
</tr> </tr>
</table> </table>
<table class="info"> <table class="info">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_asset} {$lang_asset}
</td> </td>
<td class="header_right"> <td class="header_right">
&nbsp; &nbsp;
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_asset_name} {$lang_asset_name}
</td> </td>
<td class="value"> <td class="value">
<input type="text" name="asset_name"> <input type="text" name="asset_name">
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_asset_hostname} {$lang_asset_hostname}
</td> </td>
<td class="value"> <td class="value">
<input type="text" name="asset_hostname"> <input type="text" name="asset_hostname">
</td> </td>
</tr> </tr>
</table> </table>
<table class="info"> <table class="info">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_assetclass} {$lang_assetclass}
</td> </td>
<td class="header_right"> <td class="header_right">
&nbsp; &nbsp;
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_assetclass_name} {$lang_assetclass_name}
</td> </td>
<td class="value"> <td class="value">
{html_options name=assetclass_id options=$assetclass_options} {html_options name=assetclass_id options=$assetclass_options}
</td> </td>
</tr> </tr>
</table> </table>
<table class="info"> <table class="info">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_subnet} {$lang_subnet}
</td> </td>
<td class="header_right"> <td class="header_right">
&nbsp; &nbsp;
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_subnet_subnetaddress}/{$lang_subnet_mask} {$lang_subnet_subnetaddress}/{$lang_subnet_mask}
</td> </td>
<td class="value"> <td class="value">
{html_options name=subnet_id options=$subnet_options} {html_options name=subnet_id options=$subnet_options selected=$subnet_id}
</td> </td>
</tr> </tr>
</table> </table>
</form> </form>

@ -1,38 +1,38 @@
<form method="POST" action="submit.php"> <form method="POST" action="submit.php">
<input type="hidden" name="del" value="node"> <input type="hidden" name="del" value="node">
<input type="hidden" name="node_id" value="{$node_id}"> <input type="hidden" name="node_id" value="{$node->id}">
<input type="hidden" name="asset_id" value="{$asset_id}"> <input type="hidden" name="asset_id" value="{$node->asset_id}">
<table class="title"> <table class="title">
<tr> <tr>
<td class="header"> <td class="header">
<img class="icon" src="images/network-ethernet.png" alt="" /> <img class="icon" src="images/network-ethernet.png" alt="" />
{$node_ip} {$node->ip}
</td> </td>
<td align="right"> <td align="right">
<a href="#" onClick="history.go(-1)"><img src="image.php?icon=cancel" alt="{$lang_cancel}"></a> <a href="#" onClick="history.go(-1)"><img src="image.php?icon=cancel" alt="{$lang_cancel}"></a>
<input type="image" src="image.php?icon=delete" alt="{$lang_submit}"> <input type="image" src="image.php?icon=delete" alt="{$lang_submit}">
</td> </td>
</tr> </tr>
</table> </table>
<table class="info"> <table class="info">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_node_del} {$lang_node_del}
</td> </td>
<td class="header_right"> <td class="header_right">
&nbsp; &nbsp;
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_ip} {$lang_ip}
</td> </td>
<td class="value"> <td class="value">
<a href="nodeview.php?node_id={$node_id}">{$node_ip}</a> <a href="nodeview.php?node_id={$node->id}">{$node->ip}</a>
</td> </td>
</tr> </tr>
</table> </table>
</form> </form>

@ -1,126 +1,126 @@
<form method="POST" action="submit.php"> <form method="POST" action="submit.php">
<input type="hidden" name="edit" value="node"> <input type="hidden" name="edit" value="node">
<input type="hidden" name="node_id" value="{$node_id}"> <input type="hidden" name="node_id" value="{$node->id}">
<table class="title"> <table class="title">
<tr> <tr>
<td class="header"> <td class="header">
<img class="icon" src="images/network-ethernet.png" alt="" /> <img class="icon" src="images/network-ethernet.png" alt="" />
{$node_ip} {$node_ip}
</td> </td>
<td align="right"> <td align="right">
<a href="#" onClick="history.go(-1)"><img src="image.php?icon=back" alt="{$lang_cancel}"></a> <a href="#" onClick="history.go(-1)"><img src="image.php?icon=back" alt="{$lang_cancel}"></a>
<input type="image" src="image.php?icon=save" alt="{$lang_submit}"> <input type="image" src="image.php?icon=save" alt="{$lang_submit}">
</td> </td>
</tr> </tr>
</table> </table>
<table class="info"> <table class="info">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_node} {$lang_node}
</td> </td>
<td class="header_right"> <td class="header_right">
&nbsp; &nbsp;
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_ip} {$lang_ip}
</td> </td>
<td label="value"> <td label="value">
<input type="text" name="node_ip" value="{$node_ip}"> <input type="text" name="node_ip" value="{$node->ip}">
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_mac} {$lang_mac}
</td> </td>
<td label="value"> <td label="value">
<input type="text" name="node_mac" value="{$node_mac}"> <input type="text" name="node_mac" value="{$node->mac}">
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_dns1} {$lang_dns1}
</td> </td>
<td label="value"> <td label="value">
<input type="text" name="node_dns1" value="{$node_dns1}"> <input type="text" name="node_dns1" value="{$node->dns1}">
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_dns2} {$lang_dns2}
</td> </td>
<td label="value"> <td label="value">
<input type="text" name="node_dns2" value="{$node_dns2}"> <input type="text" name="node_dns2" value="{$node->dns2}">
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_node_info} {$lang_node_info}
</td> </td>
<td label="value"> <td label="value">
<textarea name="node_info">{$node_info}</textarea> <textarea name="node_info">{$node->info}</textarea>
</td> </td>
</tr> </tr>
</table> </table>
<table class="info"> <table class="info">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_asset} {$lang_asset}
</td> </td>
<td class="header_right"> <td class="header_right">
&nbsp; &nbsp;
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_asset_name} {$lang_asset_name}
</td> </td>
<td label="value"> <td label="value">
{html_options name=asset_id options=$asset_options selected=$asset_id} {html_options name=asset_id options=$asset_options selected=$node->asset_id}
</td> </td>
</tr> </tr>
</table> </table>
<table class="info"> <table class="info">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_subnet} {$lang_subnet}
</td> </td>
<td class="header_right"> <td class="header_right">
&nbsp; &nbsp;
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_subnet_subnetaddress}/{$lang_subnet_mask} {$lang_subnet_subnetaddress}/{$lang_subnet_mask}
</td> </td>
<td class="value"> <td class="value">
{html_options name=subnet_id options=$subnet_options selected=$subnet_id} {html_options name=subnet_id options=$subnet_options selected=$node->subnet_id}
</td> </td>
</tr> </tr>
</table> </table>
<table class="info"> <table class="info">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_zone} {$lang_zone}
</td> </td>
<td class="header_right"> <td class="header_right">
&nbsp; &nbsp;
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
Origin Origin
</td> </td>
<td class="value"> <td class="value">
{html_options name=zone_id options=$zone_options selected=$zone_id} {html_options name=zone_id options=$zone_options selected=$node->zone_id}
</td> </td>
</tr> </tr>
</table> </table>
</form> </form>

@ -2,11 +2,11 @@
<tr> <tr>
<td class="header"> <td class="header">
<img class="icon" src="images/network-ethernet.png" alt="" /> <img class="icon" src="images/network-ethernet.png" alt="" />
{$node_ip} {$node->ip}
</td> </td>
<td align="right"> <td align="right">
<a href="nodeedit.php?node_id={$node.node_id}"><img src="image.php?icon=edit" alt="{$lang_node_edit}"></a> <a href="nodeedit.php?node_id={$node->id}"><img src="image.php?icon=edit" alt="{$lang_node_edit}"></a>
<a href="nodedel.php?node_id={$node.node_id}"><img src="image.php?icon=delete" alt="{$lang_node_del}"></a> <a href="nodedel.php?node_id={$node->id}"><img src="image.php?icon=delete" alt="{$lang_node_del}"></a>
</td> </td>
</tr> </tr>
</table> </table>
@ -25,7 +25,7 @@
{$lang_ip} {$lang_ip}
</td> </td>
<td class="value"> <td class="value">
<a href="nodeview.php?node_id={$node.node_id}">{$node.node_ip}</a> <a href="nodeview.php?node_id={$node->id}">{$node->ip}</a>
</td> </td>
</tr> </tr>
<tr> <tr>
@ -33,7 +33,7 @@
{$lang_proto_vers} {$lang_proto_vers}
</td> </td>
<td class="value"> <td class="value">
{$node.node_type} {$node->type}
</td> </td>
</tr> </tr>
<tr> <tr>
@ -41,7 +41,7 @@
{$lang_mac} {$lang_mac}
</td> </td>
<td class="value"> <td class="value">
{$node.node_mac} {$node->mac}
</td> </td>
</tr> </tr>
<tr> <tr>
@ -49,7 +49,7 @@
{$lang_dns1} {$lang_dns1}
</td> </td>
<td class="value"> <td class="value">
{$node.node_dns1} {$node->dns1}
</td> </td>
</tr> </tr>
<tr> <tr>
@ -57,7 +57,7 @@
{$lang_dns2} {$lang_dns2}
</td> </td>
<td class="value"> <td class="value">
{$node.node_dns2} {$node->dns2}
</td> </td>
</tr> </tr>
<tr> <tr>
@ -65,7 +65,7 @@
{$lang_node_info} {$lang_node_info}
</td> </td>
<td class="value"> <td class="value">
{$node.node_info} {$node->info}
</td> </td>
</tr> </tr>
<tr> <tr>
@ -73,7 +73,7 @@
{$lang_zone} {$lang_zone}
</td> </td>
<td class="value"> <td class="value">
{$node.zone_origin} {$node->zone_origin}
</td> </td>
</tr> </tr>
</table> </table>
@ -92,7 +92,7 @@
{$lang_asset_name} {$lang_asset_name}
</td> </td>
<td class="value"> <td class="value">
<a href="assetview.php?asset_id={$node.asset_id}">{$node.asset_name}</a> <a href="assetview.php?asset_id={$node->asset_id}">{$node->asset_name}</a>
</td> </td>
</tr> </tr>
</table> </table>
@ -111,7 +111,7 @@
{$lang_subnet_subnetaddress}/{$lang_subnet_mask} {$lang_subnet_subnetaddress}/{$lang_subnet_mask}
</td> </td>
<td class="value"> <td class="value">
<a href="subnetview.php?subnet_id={$node.subnet_id}&page={$node.node_ip}">{$node.subnet_address}/{$node.subnet_mask}</a> <a href="subnetview.php?subnet_id={$node->subnet_id}&page={$node->ip}">{$node->subnet_address}/{$node->subnet_mask}</a>
</td> </td>
</tr> </tr>
</table> </table>
@ -122,7 +122,7 @@
{$lang_nat} {$lang_nat}
</td> </td>
<td class="header_right"> <td class="header_right">
<a href="natedit.php?node_id={$node.node_id}"><img src="image.php?icon=edit" alt="{$lang_nat_edit}"></a> <a href="natedit.php?node_id={$node->id}"><img src="image.php?icon=edit" alt="{$lang_nat_edit}"></a>
</td> </td>
</tr> </tr>
<tr> <tr>

@ -1,34 +1,34 @@
<table class="title"> <table class="title">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_options} {$lang_options}
</td> </td>
<td align="right"> <td align="right">
&nbsp; &nbsp;
</td> </td>
</tr> </tr>
</table> </table>
<table class="info"> <table class="info">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_options_ipreg} {$lang_options_ipreg}
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
<a href="optionseditpassword.php">{$lang_options_password}</a> <a href="optionseditpassword.php">{$lang_options_password}</a>
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
<a href="optionseditdisplay.php">{$lang_options_display}</a> <a href="optionseditdisplay.php">{$lang_options_display}</a>
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
<a href="user.php">{$lang_users}</a> <a href="user.php">{$lang_users}</a>
</td> </td>
</tr> </tr>
</table> </table>

@ -1,110 +1,110 @@
<form method="POST" action="submit.php"> <form method="POST" action="submit.php">
<input type="hidden" name="edit" value="optionsdisplay"> <input type="hidden" name="edit" value="optionsdisplay">
<table class="title"> <table class="title">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_options} {$lang_options}
</td> </td>
<td align="right"> <td align="right">
<a href="#" onClick="history.go(-1)"><img src="image.php?icon=back" alt="{$lang_cancel}"></a> <a href="#" onClick="history.go(-1)"><img src="image.php?icon=back" alt="{$lang_cancel}"></a>
<input type="image" src="image.php?icon=save" alt="{$lang_submit}"> <input type="image" src="image.php?icon=save" alt="{$lang_submit}">
</td> </td>
</tr> </tr>
</table> </table>
<p> <p>
<table class="info"> <table class="info">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_options_display} {$lang_options_display}
</td> </td>
<td class="header_right"> <td class="header_right">
&nbsp; &nbsp;
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
<span class="help" title="{$lang_options_language_help}">{$lang_user_language}</span> <span class="help" title="{$lang_options_language_help}">{$lang_user_language}</span>
</td> </td>
<td class="value"> <td class="value">
<input type="text" name="user_language" value="{$user_language}" size="2"> <input type="text" name="user_language" value="{$user_language}" size="2">
({$language}) ({$language})
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
<span class="help" title="{$lang_options_imagesize_help}">{$lang_options_imagesize}</span> <span class="help" title="{$lang_options_imagesize_help}">{$lang_options_imagesize}</span>
</td> </td>
<td class="value"> <td class="value">
<input type="text" name="user_imagesize" value="{$user_imagesize}" size="3"> <input type="text" name="user_imagesize" value="{$user_imagesize}" size="3">
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
<span class="help" title="{$lang_options_imagecount_help}">{$lang_options_imagecount}</span> <span class="help" title="{$lang_options_imagecount_help}">{$lang_options_imagecount}</span>
</td> </td>
<td class="value"> <td class="value">
<input type="text" name="user_imagecount" value="{$user_imagecount}" size="3"> <input type="text" name="user_imagecount" value="{$user_imagecount}" size="3">
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
<span class="help" title="{$lang_options_mac_help}">{$lang_options_mac}</span> <span class="help" title="{$lang_options_mac_help}">{$lang_options_mac}</span>
</td> </td>
<td class="value"> <td class="value">
<input type="text" name="user_mac" value="{$user_mac}"> <input type="text" name="user_mac" value="{$user_mac}">
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
<span class="help" title="{$lang_options_dateformat_help}">{$lang_options_dateformat}</span> <span class="help" title="{$lang_options_dateformat_help}">{$lang_options_dateformat}</span>
</td> </td>
<td class="value"> <td class="value">
<input type="text" name="user_dateformat" value="{$user_dateformat}"> <input type="text" name="user_dateformat" value="{$user_dateformat}">
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
<span class="help" title="{$lang_options_dns1suffix_help}">{$lang_options_dns1suffix}</span> <span class="help" title="{$lang_options_dns1suffix_help}">{$lang_options_dns1suffix}</span>
</td> </td>
<td class="value"> <td class="value">
<input type="text" name="user_dns1suffix" value="{$user_dns1suffix}"> <input type="text" name="user_dns1suffix" value="{$user_dns1suffix}">
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
<span class="help" title="{$lang_options_dns2suffix_help}">{$lang_options_dns2suffix}</span> <span class="help" title="{$lang_options_dns2suffix_help}">{$lang_options_dns2suffix}</span>
</td> </td>
<td class="value"> <td class="value">
<input type="text" name="user_dns2suffix" value="{$user_dns2suffix}"> <input type="text" name="user_dns2suffix" value="{$user_dns2suffix}">
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
<span class="help" title="{$lang_options_menu_help}">{$lang_menu}</span> <span class="help" title="{$lang_options_menu_help}">{$lang_menu}</span>
</td> </td>
<td class="value"> <td class="value">
<input type="checkbox" name="user_menu_assets" {$user_menu_assets_checked}>{$lang_assets}<br /> <input type="checkbox" name="user_menu_assets" {$user_menu_assets_checked}>{$lang_assets}<br />
<input type="checkbox" name="user_menu_assetclasses" {$user_menu_assetclasses_checked}>{$lang_assetclasses}<br /> <input type="checkbox" name="user_menu_assetclasses" {$user_menu_assetclasses_checked}>{$lang_assetclasses}<br />
<input type="checkbox" name="user_menu_assetclassgroups" {$user_menu_assetclassgroups_checked}>{$lang_assetclassgroups}<br /> <input type="checkbox" name="user_menu_assetclassgroups" {$user_menu_assetclassgroups_checked}>{$lang_assetclassgroups}<br />
<input type="checkbox" name="user_menu_locations" {$user_menu_locations_checked}>{$lang_locations}<br /> <input type="checkbox" name="user_menu_locations" {$user_menu_locations_checked}>{$lang_locations}<br />
<input type="checkbox" name="user_menu_nodes" {$user_menu_nodes_checked}>{$lang_nodes}<br /> <input type="checkbox" name="user_menu_nodes" {$user_menu_nodes_checked}>{$lang_nodes}<br />
<input type="checkbox" name="user_menu_subnets" {$user_menu_subnets_checked}>{$lang_subnets}<br /> <input type="checkbox" name="user_menu_subnets" {$user_menu_subnets_checked}>{$lang_subnets}<br />
<input type="checkbox" name="user_menu_users" {$user_menu_users_checked}>{$lang_users}<br /> <input type="checkbox" name="user_menu_users" {$user_menu_users_checked}>{$lang_users}<br />
<input type="checkbox" name="user_menu_vlans" {$user_menu_vlans_checked}>{$lang_vlans}<br /> <input type="checkbox" name="user_menu_vlans" {$user_menu_vlans_checked}>{$lang_vlans}<br />
<input type="checkbox" name="user_menu_zones" {$user_menu_zones_checked}>{$lang_zones} <input type="checkbox" name="user_menu_zones" {$user_menu_zones_checked}>{$lang_zones}
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
<span class="help" title="{$lang_options_tooltips_help}">{$lang_tooltips}</span> <span class="help" title="{$lang_options_tooltips_help}">{$lang_tooltips}</span>
</td> </td>
<td class="value"> <td class="value">
<input type="checkbox" name="user_tooltips" {$user_tooltips_checked}>{$lang_tooltips}<br> <input type="checkbox" name="user_tooltips" {$user_tooltips_checked}>{$lang_tooltips}<br>
</td> </td>
</tr> </tr>
</table> </table>
</form> </form>

@ -1,51 +1,51 @@
<form method="POST" action="submit.php"> <form method="POST" action="submit.php">
<input type="hidden" name="edit" value="optionspassword"> <input type="hidden" name="edit" value="optionspassword">
<table class="title"> <table class="title">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_options} {$lang_options}
</td> </td>
<td align="right"> <td align="right">
<a href="#" onClick="history.go(-1)"><img src="image.php?icon=back" alt="{$lang_cancel}"></a> <a href="#" onClick="history.go(-1)"><img src="image.php?icon=back" alt="{$lang_cancel}"></a>
<input type="image" src="image.php?icon=save" alt="{$lang_submit}"> <input type="image" src="image.php?icon=save" alt="{$lang_submit}">
</td> </td>
</tr> </tr>
</table> </table>
<table class="info"> <table class="info">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_options_password} {$lang_options_password}
</td> </td>
<td class="header_right"> <td class="header_right">
&nbsp; &nbsp;
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
<span class="help" title="{$lang_options_currentpassword_help}">{$lang_options_currentpassword}</span> <span class="help" title="{$lang_options_currentpassword_help}">{$lang_options_currentpassword}</span>
</td> </td>
<td class="value"> <td class="value">
<input type="password" name="user_currentpass"> <input type="password" name="user_currentpass">
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
<span class="help" title="{$lang_options_newpassword1_help}">{$lang_options_newpassword1}</span> <span class="help" title="{$lang_options_newpassword1_help}">{$lang_options_newpassword1}</span>
</td> </td>
<td class="value"> <td class="value">
<input type="password" name="user_newpass1"> <input type="password" name="user_newpass1">
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
<span class="help" title="{$lang_options_newpassword2_help}">{$lang_options_newpassword2}</span> <span class="help" title="{$lang_options_newpassword2_help}">{$lang_options_newpassword2}</span>
</td> </td>
<td class="value"> <td class="value">
<input type="password" name="user_newpass2"> <input type="password" name="user_newpass2">
</td> </td>
</tr> </tr>
</table> </table>
</form> </form>

@ -1,134 +1,134 @@
<table class="info"> <table class="info">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_search} ({$search}) {$lang_search} ({$search})
</td> </td>
</tr> </tr>
</table> </table>
{if $nosearch eq TRUE} {if $nosearch eq TRUE}
<table class="info"> <table class="info">
<tr> <tr>
<td class="value"> <td class="value">
<img src="image.php?icon=error" alt="{$lang_comments}">&nbsp;{$lang_comments_search_nosearch} <img src="image.php?icon=error" alt="{$lang_comments}">&nbsp;{$lang_comments_search_nosearch}
</td> </td>
</tr> </tr>
</table> </table>
{else} {else}
<table class="info"> <table class="info">
<tr> <tr>
<td class="value"> <td class="value">
{$lang_search_results_found}&nbsp;{$resultcounter} {$lang_search_results_found}&nbsp;{$resultcounter}
</td> </td>
</tr> </tr>
</table> </table>
{if $assets|@count > 0} {if $assets|@count > 0}
<table class="info"> <table class="info">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_assets} ({$assets|@count}) {$lang_assets} ({$assets|@count})
</td> </td>
<td class="header"></td> <td class="header"></td>
</tr> </tr>
{foreach item=asset from=$assets} {foreach item=asset from=$assets}
<tr> <tr>
<td class="value"> <td class="value">
<a href="assetview.php?asset_id={$asset.id}">{$asset.name}</a> <a href="assetview.php?asset_id={$asset.id}">{$asset.name}</a>
</td> </td>
<td class="value"> <td class="value">
{$asset.description} {$asset.description}
</td> </td>
</tr> </tr>
{/foreach} {/foreach}
</table> </table>
{/if} {/if}
{if $locations|@count > 0} {if $locations|@count > 0}
<table class="info"> <table class="info">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_locations} ({$locations|@count}) {$lang_locations} ({$locations|@count})
</td> </td>
</tr> </tr>
{foreach item=location from=$locations} {foreach item=location from=$locations}
<tr> <tr>
<td class="value"> <td class="value">
<a href="locationview.php?location_id={$location.id}">{$location.name}</a> <a href="locationview.php?location_id={$location.id}">{$location.name}</a>
</td> </td>
</tr> </tr>
{/foreach} {/foreach}
</table> </table>
{/if} {/if}
{if $nodes|@count > 0} {if $nodes|@count > 0}
<table class="info"> <table class="info">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_nodes} ({$nodes|@count}) {$lang_nodes} ({$nodes|@count})
</td> </td>
</tr> </tr>
{foreach item=node from=$nodes} {foreach item=node from=$nodes}
<tr> <tr>
<td class="value"> <td class="value">
<a href="nodeview.php?node_id={$node.id}">{$node.ip}</a> <a href="nodeview.php?node_id={$node.id}">{$node.ip}</a>
</td> </td>
</tr> </tr>
{/foreach} {/foreach}
</table> </table>
{/if} {/if}
{if $subnets|@count > 0} {if $subnets|@count > 0}
<table class="info"> <table class="info">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_subnets} ({$subnets|@count}) {$lang_subnets} ({$subnets|@count})
</td> </td>
</tr> </tr>
{foreach item=subnet from=$subnets} {foreach item=subnet from=$subnets}
<tr> <tr>
<td class="value"> <td class="value">
<a href="subnetview.php?subnet_id={$subnet.id}">{$subnet.address}</a> <a href="subnetview.php?subnet_id={$subnet.id}">{$subnet.address}</a>
</td> </td>
</tr> </tr>
{/foreach} {/foreach}
</table> </table>
{/if} {/if}
{if $vlans|@count > 0} {if $vlans|@count > 0}
<table class="info"> <table class="info">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_vlans} ({$vlans|@count}) {$lang_vlans} ({$vlans|@count})
</td> </td>
</tr> </tr>
{foreach item=vlan from=$vlans} {foreach item=vlan from=$vlans}
<tr> <tr>
<td class="value"> <td class="value">
<a href="vlanview.php?vlan_id={$vlan.id}">{$vlan.name}</a> <a href="vlanview.php?vlan_id={$vlan.id}">{$vlan.name}</a>
</td> </td>
</tr> </tr>
{/foreach} {/foreach}
</table> </table>
{/if} {/if}
{if $zones|@count > 0} {if $zones|@count > 0}
<table class="info"> <table class="info">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_zones} ({$zones|@count}) {$lang_zones} ({$zones|@count})
</td> </td>
</tr> </tr>
{foreach item=zone from=$zones} {foreach item=zone from=$zones}
<tr> <tr>
<td class="value"> <td class="value">
<a href="zoneview.php?zone_id={$zone.id}">{$zone.origin}</a> <a href="zoneview.php?zone_id={$zone.id}">{$zone.origin}</a>
</td> </td>
</tr> </tr>
{/foreach} {/foreach}
</table> </table>
{/if} {/if}
{/if} {/if}

@ -1,79 +1,79 @@
<form method="POST" action="submit.php"> <form method="POST" action="submit.php">
<input type="hidden" name="add" value="subnet"> <input type="hidden" name="add" value="subnet">
<table class="title"> <table class="title">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_subnet_add} {$lang_subnet_add}
</td> </td>
<td align="right"> <td align="right">
<a href="#" onClick="history.go(-1)"><img src="image.php?icon=cancel" alt="{$lang_cancel}"></a> <a href="#" onClick="history.go(-1)"><img src="image.php?icon=cancel" alt="{$lang_cancel}"></a>
<input type="image" src="image.php?icon=save" alt="{$lang_submit}"> <input type="image" src="image.php?icon=save" alt="{$lang_submit}">
</td> </td>
</tr> </tr>
</table> </table>
<table class="info"> <table class="info">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_subnet} {$lang_subnet}
</td> </td>
<td class="header_right"> <td class="header_right">
&nbsp; &nbsp;
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_subnet_subnetaddress} {$lang_subnet_subnetaddress}
</td> </td>
<td class="value"> <td class="value">
<input type="text" name="subnet_address"> <input type="text" name="subnet_address">
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_subnet_mask} {$lang_subnet_mask}
</td> </td>
<td class="value"> <td class="value">
<input type="text" name="subnet_mask" size="2">&nbsp;(8-30) <input type="text" name="subnet_mask" size="2">&nbsp;(8-30)
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_subnet_dhcp} {$lang_subnet_dhcp}
</td> </td>
<td class="value"> <td class="value">
<input type="text" name="subnet_dhcp_start"> - <input type="text" name="subnet_dhcp_start"> -
<input type="text" name="subnet_dhcp_end"> <input type="text" name="subnet_dhcp_end">
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_subnet_info} {$lang_subnet_info}
</td> </td>
<td class="value"> <td class="value">
<textarea name="subnet_info" cols="30" rows="10"></textarea> <textarea name="subnet_info" cols="30" rows="10"></textarea>
</td> </td>
</tr> </tr>
</table> </table>
<table class="info"> <table class="info">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_vlan} {$lang_vlan}
</td> </td>
<td class="header_right"> <td class="header_right">
&nbsp; &nbsp;
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_vlan} {$lang_vlan}
</td> </td>
<td class="value"> <td class="value">
{html_options name=vlan_id options=$vlan_options} {html_options name=vlan_id options=$vlan_options}
</td> </td>
</tr> </tr>
</table> </table>
</form> </form>

@ -1,53 +1,53 @@
<form method="POST" action="submit.php"> <form method="POST" action="submit.php">
<input type="hidden" name="del" value="subnet"> <input type="hidden" name="del" value="subnet">
<input type="hidden" name="subnet_id" value="{$subnet_id}"> <input type="hidden" name="subnet_id" value="{$subnet->id}">
<table class="title"> <table class="title">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_subnet_del} {$lang_subnet_del}
</td> </td>
<td align="right"> <td align="right">
<a href="#" onClick="history.go(-1)"><img src="image.php?icon=cancel" alt="{$lang_cancel}"></a> <a href="#" onClick="history.go(-1)"><img src="image.php?icon=cancel" alt="{$lang_cancel}"></a>
<input type="image" src="image.php?icon=delete" alt="{$lang_submit}"> <input type="image" src="image.php?icon=delete" alt="{$lang_submit}">
</td> </td>
</tr> </tr>
</table> </table>
<table class="info"> <table class="info">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_subnet} {$lang_subnet}
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_subnet_subnetaddress}/{$lang_subnet_mask} {$lang_subnet_subnetaddress}/{$lang_subnet_mask}
</td> </td>
<td class="value"> <td class="value">
<a href="subnetview.php?subnet_id={$subnet_id}">{$subnet_address}/{$subnet_mask}</a> <a href="subnetview.php?subnet_id={$subnet->id}">{$subnet->address}/{$subnet->mask}</a>
</td> </td>
</tr> </tr>
</table> </table>
{if $nodes} {if $nodes}
<table class="info"> <table class="info">
<tr> <tr>
<td class="header" colspan="2"> <td class="header" colspan="2">
<img src="image.php?icon=comment" alt="{$lang_comments}">&nbsp;{$lang_comments_asset_del_nodes} <img src="image.php?icon=comment" alt="{$lang_comments}">&nbsp;{$lang_comments_asset_del_nodes}
</td> </td>
</tr> </tr>
{foreach item=node from=$nodes} {foreach item=node from=$nodes}
<tr> <tr>
<td class="label"> <td class="label">
{$lang_ip} {$lang_ip}
</td> </td>
<td class="value"> <td class="value">
<a href="nodeview.php?node_id={$node.node_id}">{$node.node_ip}</a> <a href="nodeview.php?node_id={$node.node_id}">{$node.node_ip}</a>
</td> </td>
</tr> </tr>
{/foreach} {/foreach}
</table> </table>
{/if} {/if}
</form> </form>

@ -1,84 +1,84 @@
<form method="POST" action="submit.php"> <form method="POST" action="submit.php">
<input type="hidden" name="edit" value="subnet"> <input type="hidden" name="edit" value="subnet">
<input type="hidden" name="subnet_id" value="{$subnet_id}"> <input type="hidden" name="subnet_id" value="{$subnet_id}">
<table class="title"> <table class="title">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_subnet_edit} {$lang_subnet_edit}
</td> </td>
<td align="right"> <td align="right">
<a href="#" onClick="history.go(-1)"><img src="image.php?icon=back" alt="{$lang_cancel}"></a> <a href="#" onClick="history.go(-1)"><img src="image.php?icon=back" alt="{$lang_cancel}"></a>
<input type="image" src="image.php?icon=save" alt="{$lang_submit}"> <input type="image" src="image.php?icon=save" alt="{$lang_submit}">
</td> </td>
</tr> </tr>
</table> </table>
<table class="info"> <table class="info">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_subnet} {$lang_subnet}
</td> </td>
<td class="header_right"> <td class="header_right">
&nbsp; &nbsp;
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_subnet_subnetaddress} {$lang_subnet_subnetaddress}
</td> </td>
<td class="value"> <td class="value">
<input type="text" name="subnet_address" value="{$subnet_address}"> <input type="text" name="subnet_address" value="{$subnet_address}">
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_subnet_mask} {$lang_subnet_mask}
</td> </td>
<td class="value"> <td class="value">
<input type="text" name="subnet_mask" size="2" value="{$subnet_mask}"> <input type="text" name="subnet_mask" size="2" value="{$subnet_mask}">
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_proto_vers} {$lang_proto_vers}
</td> </td>
<td class="value"> <td class="value">
<input type="text" name="subnet_proto_vers" size="2" value="{$subnet_proto_vers}"> <input type="text" name="subnet_proto_vers" size="2" value="{$subnet_proto_vers}">
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_subnet_dhcpstart} {$lang_subnet_dhcpstart}
</td> </td>
<td class="value"> <td class="value">
<input type="text" name="subnet_dhcpstart" size="15" value="{$subnet_dhcpstart}"> <input type="text" name="subnet_dhcpstart" size="15" value="{$subnet_dhcpstart}">
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_subnet_dhcpend} {$lang_subnet_dhcpend}
</td> </td>
<td class="value"> <td class="value">
<input type="text" name="subnet_dhcpend" size="15" value="{$subnet_dhcpend}"> <input type="text" name="subnet_dhcpend" size="15" value="{$subnet_dhcpend}">
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
NTP Server NTP Server
</td> </td>
<td class="value"> <td class="value">
<input type="text" name="subnet_ntp_server" size="45" value="{$subnet_ntp_server}"> <input type="text" name="subnet_ntp_server" size="45" value="{$subnet_ntp_server}">
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_subnet_info} {$lang_subnet_info}
</td> </td>
<td class="value"> <td class="value">
<textarea name="subnet_info" cols="30" rows="10">{$subnet_info}</textarea> <textarea name="subnet_info" cols="30" rows="10">{$subnet_info}</textarea>
</td> </td>
</tr> </tr>
</table> </table>
</form> </form>

@ -1,55 +1,55 @@
<form method="POST" action="submit.php"> <form method="POST" action="submit.php">
<input type="hidden" name="add" value="subnetlocation"> <input type="hidden" name="add" value="subnetlocation">
<input type="hidden" name="subnet_id" value="{$subnet_id}"> <input type="hidden" name="subnet_id" value="{$subnet_id}">
<table class="title"> <table class="title">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_subnetlocation} {$lang_subnetlocation}
</td> </td>
<td align="right"> <td align="right">
<a href="#" onClick="history.go(-1)"><img src="image.php?icon=back" alt="{$lang_cancel}"></a> <a href="#" onClick="history.go(-1)"><img src="image.php?icon=back" alt="{$lang_cancel}"></a>
<input type="image" src="image.php?icon=save" alt="{$lang_submit}"> <input type="image" src="image.php?icon=save" alt="{$lang_submit}">
</td> </td>
</tr> </tr>
</table> </table>
<p> <p>
<table class="info"> <table class="info">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_subnet} {$lang_subnet}
</td> </td>
<td class="header_right"> <td class="header_right">
&nbsp; &nbsp;
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_subnet_subnetaddress}/{$lang_subnet_mask} {$lang_subnet_subnetaddress}/{$lang_subnet_mask}
</td> </td>
<td class="value"> <td class="value">
<a href="subnetview.php?subnet_id={$subnet_id}">{$subnet_address}/{$subnet_mask}</a> <a href="subnetview.php?subnet_id={$subnet_id}">{$subnet_address}/{$subnet_mask}</a>
</td> </td>
</tr> </tr>
</table> </table>
<table class="info"> <table class="info">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_location_add} {$lang_location_add}
</td> </td>
<td class="header_right"> <td class="header_right">
&nbsp; &nbsp;
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_location} {$lang_location}
</td> </td>
<td class="value"> <td class="value">
{html_options name=location_id options=$location_options} {html_options name=location_id options=$location_options}
</td> </td>
</tr> </tr>
</table> </table>

@ -1,55 +1,55 @@
<form method="POST" action="submit.php"> <form method="POST" action="submit.php">
<input type="hidden" name="del" value="subnetlocation"> <input type="hidden" name="del" value="subnetlocation">
<input type="hidden" name="subnet_id" value="{$subnet_id}"> <input type="hidden" name="subnet_id" value="{$subnet->id}">
<table class="title"> <table class="title">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_subnetlocation} {$lang_subnetlocation}
</td> </td>
<td align="right"> <td align="right">
<a href="#" onClick="history.go(-1)"><img src="image.php?icon=back" alt="{$lang_cancel}"></a> <a href="#" onClick="history.go(-1)"><img src="image.php?icon=back" alt="{$lang_cancel}"></a>
<input type="image" src="image.php?icon=save" alt="{$lang_submit}"> <input type="image" src="image.php?icon=save" alt="{$lang_submit}">
</td> </td>
</tr> </tr>
</table> </table>
<table class="info"> <table class="info">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_subnet} {$lang_subnet}
</td> </td>
<td class="header_right"> <td class="header_right">
&nbsp; &nbsp;
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_subnet_subnetaddress}/{$lang_subnet_mask} {$lang_subnet_subnetaddress}/{$lang_subnet_mask}
</td> </td>
<td class="value"> <td class="value">
<a href="subnetview.php?subnet_id={$subnet_id}">{$subnet_address}/{$subnet_mask}</a> <a href="subnetview.php?subnet_id={$subnet->id}">{$subnet->address}/{$subnet->mask}</a>
</td> </td>
</tr> </tr>
</table> </table>
<table class="info"> <table class="info">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_location_del} {$lang_location_del}
</td> </td>
<td class="header_right"> <td class="header_right">
&nbsp; &nbsp;
{$locations} {$locations}
{$locations2} {$locations2}
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_location} {$lang_location}
</td> </td>
<td class="value"> <td class="value">
{html_options name=location_id options=$location_options} {html_options name=location_id options=$location_options}
</td> </td>
</tr> </tr>
</table> </table>

@ -1,56 +1,56 @@
<form method="POST" action="submit.php"> <form method="POST" action="submit.php">
<input type="hidden" name="redirect" value="subnetlocation"> <input type="hidden" name="redirect" value="subnetlocation">
<input type="hidden" name="subnet_id" value="{$subnet_id}"> <input type="hidden" name="subnet_id" value="{$subnet_id}">
<table class="title"> <table class="title">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_subnetlocation} {$lang_subnetlocation}
</td> </td>
<td align="right"> <td align="right">
<a href="#" onClick="history.go(-1)"><img src="image.php?icon=back" alt="{$lang_cancel}"></a> <a href="#" onClick="history.go(-1)"><img src="image.php?icon=back" alt="{$lang_cancel}"></a>
<input type="image" src="image.php?icon=next" alt="{$lang_submit}"> <input type="image" src="image.php?icon=next" alt="{$lang_submit}">
</td> </td>
</tr> </tr>
</table> </table>
<table class="info"> <table class="info">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_subnet} {$lang_subnet}
</td> </td>
<td class="header_right"> <td class="header_right">
&nbsp; &nbsp;
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_subnet_subnetaddress}/{$lang_subnet_mask} {$lang_subnet_subnetaddress}/{$lang_subnet_mask}
</td> </td>
<td class="value"> <td class="value">
<a href="subnetview.php?subnet_id={$subnet_id}">{$subnet_address}/{$subnet_mask}</a> <a href="subnetview.php?subnet_id={$subnet_id}">{$subnet_address}/{$subnet_mask}</a>
</td> </td>
</tr> </tr>
</table> </table>
<table class="info"> <table class="info">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_location} {$lang_location}
</td> </td>
<td class="header_right"> <td class="header_right">
&nbsp; &nbsp;
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_options} {$lang_options}
</td> </td>
<td class="value"> <td class="value">
<input type="radio" name="action" value="subnetlocationadd" checked>&nbsp;{$lang_location_add}<br> <input type="radio" name="action" value="subnetlocationadd" checked>&nbsp;{$lang_location_add}<br>
<input type="radio" name="action" value="subnetlocationdel">&nbsp;{$lang_location_del} <input type="radio" name="action" value="subnetlocationdel">&nbsp;{$lang_location_del}
</td> </td>
</tr> </tr>
</table> </table>
</form> </form>

@ -1,188 +1,188 @@
<table class="title"> <table class="title">
<tr> <tr>
<td class="header"> <td class="header">
{$subnet_address}/{$subnet_mask} {$subnet->address}/{$subnet->mask}
</td> </td>
<td align="right"> <td align="right">
<a href="subnetedit.php?subnet_id={$subnet_id}"><img src="image.php?icon=edit" alt="{$lang_subnet_edit}"></a> <a href="subnetedit.php?subnet_id={$subnet->id}"><img src="image.php?icon=edit" alt="{$lang_subnet_edit}"></a>
<a href="subnetdel.php?subnet_id={$subnet_id}"><img src="image.php?icon=delete" alt="{$lang_subnet_del}"></a> <a href="subnetdel.php?subnet_id={$subnet->id}"><img src="image.php?icon=delete" alt="{$lang_subnet_del}"></a>
</td> </td>
</tr> </tr>
</table> </table>
<table class="info"> <table class="info">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_subnet} {$lang_subnet}
</td> </td>
<td class="header" align="right"> <td class="header" align="right">
{if $noselect eq TRUE} {if $noselect eq TRUE}
{$subnet_address} {$subnet->address}
{/if} {/if}
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label" colspan="2"> <td class="label" colspan="2">
{if $subnet_proto_vers eq 4} {if $subnet->proto_vers eq 4}
{foreach name=iptable item=adr from=$subnet} {foreach name=iptable item=adr from=$subnetdata}
<a href="{$adr.url}" onMouseOver="changetext('remotetext','{$adr.remotetext}')" onMouseOut="changetext('remotetext','&nbsp;')"><img src="image.php?color={$adr.assetclassgroup_color}" alt="{$adr.remotetext}"></a> <a href="{$adr.url}" onMouseOver="changetext('remotetext','{$adr.remotetext}')" onMouseOut="changetext('remotetext','&nbsp;')"><img src="image.php?color={$adr.assetclassgroup_color}" alt="{$adr.remotetext}"></a>
{if $smarty.foreach.iptable.iteration % $imagewrap eq 0} {if $smarty.foreach.iptable.iteration % $imagewrap eq 0}
<br /> <br />
{/if} {/if}
{/foreach} {/foreach}
{else} {else}
Für IPv6 steht keine Graphik zur Verfügung. F&uuml;r IPv6 steht keine Graphik zur Verf&uuml;gung.
{/if} {/if}
</td> </td>
</tr> </tr>
{if $subnet_proto_vers eq 4} {if $subnet->proto_vers eq 4}
<tr> <tr>
<td colspan="2"> <td colspan="2">
<a id="remotetext">&nbsp;</a> <a id="remotetext">&nbsp;</a>
</td> </td>
</tr> </tr>
{/if} {/if}
<tr> <tr>
<td class="label"> <td class="label">
{$lang_subnet_subnetaddress} {$lang_subnet_subnetaddress}
</td> </td>
<td class="value"> <td class="value">
{if $subnet_proto_vers eq 4} {if $subnet_proto_vers eq 4}
<a href="subnetview.php?subnet_id={$subnet_id}">{$subnet_address}</a> <a href="subnetview.php?subnet_id={$subnet->id}">{$subnet->address}</a>
{else} {else}
{$subnet_address}&nbsp;/&nbsp;{$subnet_mask} {$subnet->address}&nbsp;/&nbsp;{$subnet->mask}
{/if} {/if}
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_proto_vers} {$lang_proto_vers}
</td> </td>
<td class="value"> <td class="value">
{$subnet_proto_vers} {$subnet->proto_vers}
</td> </td>
</tr> </tr>
{if $subnet_proto_vers eq 4} {if $subnet_proto_vers eq 4}
<tr> <tr>
<td class="label"> <td class="label">
{$lang_subnet_mask} {$lang_subnet_mask}
</td> </td>
<td class="value"> <td class="value">
{$subnetmask1}.{$subnetmask2}.{$subnetmask3}.{$subnetmask4} {$subnetmask1}.{$subnetmask2}.{$subnetmask3}.{$subnetmask4}
</td> </td>
</tr> </tr>
{/if} {/if}
{if $subnet_dhcpstart} {if $subnet->dhcp_start}
<tr> <tr>
<td class="label"> <td class="label">
{$lang_subnet_dhcp} {$lang_subnet_dhcp}
</td> </td>
<td class="value"> <td class="value">
{$subnet_dhcpstart} - {$subnet_dhcpend} {$subnet->dhcp_start} - {$subnet->dhcp_end}
</td> </td>
</tr> </tr>
{/if} {/if}
<tr> <tr>
<td class="label"> <td class="label">
{$lang_subnet_nodesinsubnet} {$lang_subnet_nodesinsubnet}
</td> </td>
<td class="value"> <td class="value">
{if $subnet_proto_vers eq 4} {if $subnet->proto_vers eq 4}
<a href="node.php?subnet_id={$subnet_id}">{$node_counter}</a>&nbsp;/&nbsp;{$host_counter}&nbsp;({$subnet_usedpercentage}&#37;) <a href="node.php?subnet_id={$subnet->id}">{$node_counter}</a>&nbsp;/&nbsp;{$host_counter}&nbsp;({$subnet_usedpercentage}&#37;)
{else} {else}
<a href="node.php?subnet_id={$subnet_id}">{$node_counter}</a> <a href="node.php?subnet_id={$subnet->id}">{$node_counter}</a>
{/if} {/if}
</td> </td>
</tr> </tr>
{if $subnet_ntp_server} {if $subnet->ntp_server}
<tr> <tr>
<td class="label"> <td class="label">
NTP Server NTP Server
</td> </td>
<td class="value"> <td class="value">
{$subnet_ntp_server} {$subnet->ntp_server}
</td> </td>
</tr> </tr>
{/if} {/if}
<tr> <tr>
<td class="label"> <td class="label">
{$lang_subnet_info} {$lang_subnet_info}
</td> </td>
<td class="value"> <td class="value">
{$subnet_info} {$subnet->info}
</td> </td>
</tr> </tr>
</table> </table>
<table class="info"> <table class="info">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_assetclasses} {$lang_assetclasses}
</td> </td>
<td class="header_right"> <td class="header_right">
&nbsp; &nbsp;
</td> </td>
</tr> </tr>
{if $subnet_proto_vers eq 4} {if $subnet->proto_vers eq 4}
<tr> <tr>
<td class="label"> <td class="label">
<img src="image.php?color={$config_color_unused}" alt="{$lang_unassigned}">&nbsp;{$lang_unassigned} <img src="image.php?color={$config_color_unused}" alt="{$lang_unassigned}">&nbsp;{$lang_unassigned}
</td> </td>
<td> <td>
{$free_counter} {$free_counter}
</td> </td>
</tr> </tr>
{/if} {/if}
{foreach item=assetclassgroup from=$assetclassgroups} {foreach item=assetclassgroup from=$assetclassgroups}
<tr> <tr>
<td class="label"> <td class="label">
<img src="image.php?color={$assetclassgroup.color}" alt="{$assetclassgroup.name}">&nbsp;<a href="assetclassgroupview.php?assetclassgroup_id={$assetclassgroup.id}">{$assetclassgroup.name}</a> <img src="image.php?color={$assetclassgroup.color}" alt="{$assetclassgroup.name}">&nbsp;<a href="assetclassgroupview.php?assetclassgroup_id={$assetclassgroup.id}">{$assetclassgroup.name}</a>
</td> </td>
<td> <td>
{$assetclassgroup.counter} {$assetclassgroup.counter}
</td> </td>
</tr> </tr>
{/foreach} {/foreach}
</table> </table>
<table class="info"> <table class="info">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_vlans} {$lang_vlans}
</td> </td>
<td class="header_right"> <td class="header_right">
<a href="subnetvlanedit.php?subnet_id={$subnet_id}"><img src="image.php?icon=edit" alt="{$lang_subnetvlan_edit}"></a> <a href="subnetvlanedit.php?subnet_id={$subnet->id}"><img src="image.php?icon=edit" alt="{$lang_subnetvlan_edit}"></a>
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_vlans} ({$vlans|@count}) {$lang_vlans} ({$vlans|@count})
</td> </td>
<td class="value"> <td class="value">
{foreach item=vlan from=$vlans} {foreach item=vlan from=$vlans}
<a href="vlanview.php?vlan_id={$vlan.vlan_id}">{$vlan.vlan_name} ({$vlan.vlan_number})</a><br> <a href="vlanview.php?vlan_id={$vlan.id}">{$vlan.name} ({$vlan.number})</a><br>
{/foreach} {/foreach}
</td> </td>
</tr> </tr>
</table> </table>
<table class="info"> <table class="info">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_locations} {$lang_locations}
</td> </td>
<td class="header" align="right"> <td class="header" align="right">
<a href="subnetlocationedit.php?subnet_id={$subnet_id}"><img src="image.php?icon=edit" alt="{$lang_location_edit}"></a> <a href="subnetlocationedit.php?subnet_id={$subnet->id}"><img src="image.php?icon=edit" alt="{$lang_location_edit}"></a>
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_locations} ({$locations|@count}) {$lang_locations} ({$locations|@count})
</td> </td>
<td class="value"> <td class="value">
{foreach item=location from=$locations} {foreach item=location from=$locations}
<a href="locationview.php?location_id={$location.location_id}">{$location.location_name}</a><br> <a href="locationview.php?location_id={$location.location_id}">{$location.location_name}</a><br>
{/foreach} {/foreach}
</td> </td>
</tr> </tr>
</table> </table>

@ -1,54 +1,54 @@
<form method="POST" action="submit.php"> <form method="POST" action="submit.php">
<input type="hidden" name="add" value="subnetvlan"> <input type="hidden" name="add" value="subnetvlan">
<input type="hidden" name="subnet_id" value="{$subnet_id}"> <input type="hidden" name="subnet_id" value="{$subnet_id}">
<table class="title"> <table class="title">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_subnetvlan} {$lang_subnetvlan}
</td> </td>
<td align="right"> <td align="right">
<a href="#" onClick="history.go(-1)"><img src="image.php?icon=back" alt="{$lang_cancel}"></a> <a href="#" onClick="history.go(-1)"><img src="image.php?icon=back" alt="{$lang_cancel}"></a>
<input type="image" src="image.php?icon=save" alt="{$lang_submit}"> <input type="image" src="image.php?icon=save" alt="{$lang_submit}">
</td> </td>
</tr> </tr>
</table> </table>
<table class="info"> <table class="info">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_subnet} {$lang_subnet}
</td> </td>
<td class="header_right"> <td class="header_right">
&nbsp; &nbsp;
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_subnet_subnetaddress}/{$lang_subnet_mask} {$lang_subnet_subnetaddress}/{$lang_subnet_mask}
</td> </td>
<td class="value"> <td class="value">
<a href="subnetview.php?subnet_id={$subnet_id}">{$subnet_address}/{$subnet_mask}</a> <a href="subnetview.php?subnet_id={$subnet_id}">{$subnet_address}/{$subnet_mask}</a>
</td> </td>
</tr> </tr>
</table> </table>
<table class="info"> <table class="info">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_vlan_add} {$lang_vlan_add}
</td> </td>
<td class="header_right"> <td class="header_right">
&nbsp; &nbsp;
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_vlan} {$lang_vlan}
</td> </td>
<td class="value"> <td class="value">
{html_options name=vlan_id options=$vlan_options} {html_options name=vlan_id options=$vlan_options}
</td> </td>
</tr> </tr>
</table> </table>

@ -1,53 +1,53 @@
<form method="POST" action="submit.php"> <form method="POST" action="submit.php">
<input type="hidden" name="del" value="subnetvlan"> <input type="hidden" name="del" value="subnetvlan">
<input type="hidden" name="subnet_id" value="{$subnet_id}"> <input type="hidden" name="subnet_id" value="{$subnet_id}">
<table class="title"> <table class="title">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_subnetvlan} {$lang_subnetvlan}
</td> </td>
<td align="right"> <td align="right">
<a href="#" onClick="history.go(-1)"><img src="image.php?icon=back" alt="{$lang_cancel}"></a> <a href="#" onClick="history.go(-1)"><img src="image.php?icon=back" alt="{$lang_cancel}"></a>
<input type="image" src="image.php?icon=save" alt="{$lang_submit}"> <input type="image" src="image.php?icon=save" alt="{$lang_submit}">
</td> </td>
</tr> </tr>
</table> </table>
<table class="info"> <table class="info">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_subnet} {$lang_subnet}
</td> </td>
<td class="header_right"> <td class="header_right">
&nbsp; &nbsp;
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_subnet_subnetaddress}/{$lang_subnet_mask} {$lang_subnet_subnetaddress}/{$lang_subnet_mask}
</td> </td>
<td class="value"> <td class="value">
<a href="subnetview.php?subnet_id={$subnet_id}">{$subnet_address}/{$subnet_mask}</a> <a href="subnetview.php?subnet_id={$subnet_id}">{$subnet_address}/{$subnet_mask}</a>
</td> </td>
</tr> </tr>
</table> </table>
<table class="info"> <table class="info">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_vlan_del} {$lang_vlan_del}
</td> </td>
<td class="header_right"> <td class="header_right">
&nbsp; &nbsp;
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_vlan} {$lang_vlan}
</td> </td>
<td class="value"> <td class="value">
{html_options name=vlan_id options=$vlan_options} {html_options name=vlan_id options=$vlan_options}
</td> </td>
</tr> </tr>
</table> </table>

@ -1,54 +1,54 @@
<form method="POST" action="submit.php"> <form method="POST" action="submit.php">
<input type="hidden" name="redirect" value="subnetvlan"> <input type="hidden" name="redirect" value="subnetvlan">
<input type="hidden" name="subnet_id" value="{$subnet_id}"> <input type="hidden" name="subnet_id" value="{$subnet_id}">
<table class="title"> <table class="title">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_subnetvlan} {$lang_subnetvlan}
</td> </td>
<td align="right"> <td align="right">
<a href="#" onClick="history.go(-1)"><img src="image.php?icon=back" alt="{$lang_cancel}"></a> <a href="#" onClick="history.go(-1)"><img src="image.php?icon=back" alt="{$lang_cancel}"></a>
<input type="image" src="image.php?icon=next" alt="{$lang_submit}"> <input type="image" src="image.php?icon=next" alt="{$lang_submit}">
</td> </td>
</tr> </tr>
</table> </table>
<table class="info"> <table class="info">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_subnet} {$lang_subnet}
</td> </td>
<td class="header_right"> <td class="header_right">
&nbsp; &nbsp;
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_subnet_subnetaddress}/{$lang_subnet_mask} {$lang_subnet_subnetaddress}/{$lang_subnet_mask}
</td> </td>
<td class="value"> <td class="value">
<a href="subnetview.php?subnet_id={$subnet_id}">{$subnet_address}/{$subnet_mask}</a> <a href="subnetview.php?subnet_id={$subnet_id}">{$subnet_address}/{$subnet_mask}</a>
</td> </td>
</tr> </tr>
</table> </table>
<table class="info"> <table class="info">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_vlan} {$lang_vlan}
</td> </td>
<td class="header_right"> <td class="header_right">
&nbsp; &nbsp;
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"> <td class="label">
{$lang_options} {$lang_options}
</td> </td>
<td class="value"> <td class="value">
<input type="radio" name="action" value="subnetvlanadd" checked>&nbsp;{$lang_vlan_add}<br> <input type="radio" name="action" value="subnetvlanadd" checked>&nbsp;{$lang_vlan_add}<br>
<input type="radio" name="action" value="subnetvlandel">&nbsp;{$lang_vlan_del} <input type="radio" name="action" value="subnetvlandel">&nbsp;{$lang_vlan_del}
</td> </td>
</tr> </tr>
</table> </table>

@ -1,32 +1,32 @@
<table class="title"> <table class="title">
<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} ({$users|@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>
</td> </td>
</tr> </tr>
</table> </table>
<table class="info"> <table class="info">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_user_name} {$lang_user_name}
</td> </td>
<td class="header"> <td class="header">
{$lang_user_displayname} {$lang_user_displayname}
</td> </td>
</tr> </tr>
{foreach item=user from=$users} {foreach item=user from=$users}
<tr> <tr>
<td class="label"> <td class="label">
<a href="userview.php?user_id={$user.user_id}">{$user.user_name}</a> <a href="userview.php?user_id={$user.id}">{$user.name}</a>
</td> </td>
<td class="value"> <td class="value">
{$user.user_displayname} {$user.displayname}
</td> </td>
</tr> </tr>
{/foreach} {/foreach}
</table> </table>

Some files were not shown because too many files have changed in this diff Show More