Remove footer.php and some small improvements

This commit is contained in:
2023-03-10 19:31:07 +01:00
parent bfbdc16036
commit 8c61638485
23 changed files with 74 additions and 61 deletions

View File

@@ -55,10 +55,13 @@ switch ($submit = form_get_action()) {
assetclass_id=?, asset_intf=?, asset_type=?
WHERE asset_id=?";
$sth = $dbh->prepare($sql);
$sth->execute([$asset_name, $asset_info, $asset_hostname,
$assetclass_id, $asset_intf, $asset_type,
$id]);
try {
$sth->execute([$asset_name, $asset_info, $asset_hostname,
$assetclass_id, $asset_intf, $asset_type,
$id]);
} catch (PDOException $e) {
$g_error->Add($e->getMessage());
}
// Ext. links
if ($config_ext['zabbix']['enabled'] and isset($_POST['x_zbx_host'])) {
$zbx_host = sanitize($_POST['x_zbx_host']);
@@ -83,8 +86,11 @@ switch ($submit = form_get_action()) {
$sth = $dbh->prepare("DELETE FROM asset WHERE asset_id=?");
$sth->execute([$id]);
$sth = $dbh->prepare("DELETE FROM node WHERE asset_id=?");
$sth->execute([$id]);
$action = ACT_DEFAULT;
try {
$sth->execute([$id]);
} catch (PDOException $e) {
$g_error->Add($e->getMessage());
} $action = ACT_DEFAULT;
break;
default:
@@ -246,4 +252,3 @@ endif; // $action == ...
// ========== END OF VARIANTS =================================================
$smarty->display('footer.tpl');
?>