diff --git a/.gitignore b/.gitignore old mode 100644 new mode 100755 diff --git a/400.php b/400.php old mode 100644 new mode 100755 diff --git a/404.php b/404.php old mode 100644 new mode 100755 diff --git a/500.php b/500.php old mode 100644 new mode 100755 diff --git a/LICENSE b/LICENSE old mode 100644 new mode 100755 diff --git a/README.md b/README.md old mode 100644 new mode 100755 diff --git a/TablIP.sql b/TablIP.sql old mode 100644 new mode 100755 diff --git a/addNetwork.php b/addNetwork.php old mode 100644 new mode 100755 index 6d2be57..081e77c --- a/addNetwork.php +++ b/addNetwork.php @@ -4,8 +4,10 @@ $gateway = ip2long(filter_input(INPUT_POST, "gateway", FILTER_VALIDATE_IP)); $mask = ip2long(filter_input(INPUT_POST, "mask", FILTER_VALIDATE_IP)); $siteId = filter_input(INPUT_POST, "siteId", FILTER_VALIDATE_INT); if (!($name && $gateway && $mask && $siteId)) { - header("Location: 400.php"); - exit; + /*header("Location: 400.php"); + exit;*/ + include "400.php"; + die(); } $networkAddress = $gateway & $mask; include "connect.php"; @@ -15,8 +17,7 @@ try { $networkId = $db->lastInsertId(); $insert = $db->exec("INSERT INTO Hosts(IPAddress, NetworkId, Comments) VALUES($gateway, $networkId, 'Passerelle')"); header("Location: network.php?networkId=$networkId"); -} catch(Exception $e) { +} catch (Exception $e) { header("Location: 500.php"); exit; } -?> diff --git a/addSite.php b/addSite.php old mode 100644 new mode 100755 index 622263d..008948d --- a/addSite.php +++ b/addSite.php @@ -1,8 +1,10 @@ setAttribute(PDO::ATTR_EMULATE_PREPARES, false); $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); -} catch(Exception $e) { - header("Location: 500.php"); +} catch (Exception $e) { + //header("Location: 500.php"); + die($e); } -?> \ No newline at end of file diff --git a/css/icons.css b/css/icons.css old mode 100644 new mode 100755 diff --git a/css/materialize.css b/css/materialize.css old mode 100644 new mode 100755 diff --git a/css/style.css b/css/style.css old mode 100644 new mode 100755 diff --git a/fonts/flUhRq6tzZclQEJ-Vdg-IuiaDsNc.woff2 b/fonts/flUhRq6tzZclQEJ-Vdg-IuiaDsNc.woff2 old mode 100644 new mode 100755 diff --git a/index.php b/index.php old mode 100644 new mode 100755 diff --git a/js/materialize.js b/js/materialize.js old mode 100644 new mode 100755 diff --git a/js/script.js b/js/script.js old mode 100644 new mode 100755 diff --git a/network.php b/network.php old mode 100644 new mode 100755 diff --git a/site.php b/site.php old mode 100644 new mode 100755 diff --git a/updateHost.php b/updateHost.php old mode 100644 new mode 100755