Refactored user, vlan and zone
This commit is contained in:
26
submit.php
26
submit.php
@@ -119,7 +119,7 @@ if (isset($_POST['add'])) {
|
||||
|
||||
header_location("assetview.php?asset_id=" . $dbh->lastInsertId());
|
||||
break;
|
||||
/* refactored
|
||||
/*
|
||||
case ("assetclass") :
|
||||
$name = sanitize($_POST['assetclass_name']);
|
||||
$description = sanitize($_POST['assetclass_description']);
|
||||
@@ -304,7 +304,7 @@ if (isset($_POST['add'])) {
|
||||
header_location("subnetview.php?subnet_id=" . $subnet_id);
|
||||
break;
|
||||
|
||||
case ("user") :
|
||||
/* case ("user") :
|
||||
$user_name = strtolower(sanitize($_POST['user_name']));
|
||||
$user_displayname = sanitize($_POST['user_displayname']);
|
||||
$user_password = md5(sanitize($_POST['user_password']));
|
||||
@@ -338,7 +338,7 @@ if (isset($_POST['add'])) {
|
||||
$sth->execute([$vlan_name, $vlan_number, $vlan_color, $vlan_info]);
|
||||
|
||||
header_location("vlanview.php?vlan_id=" . $dbh->lastInsertId());
|
||||
break;
|
||||
break; */
|
||||
|
||||
case ("vlansubnet") :
|
||||
$subnet_id = sanitize($_POST['subnet_id']);
|
||||
@@ -352,7 +352,7 @@ if (isset($_POST['add'])) {
|
||||
header_location("vlanview.php?vlan_id=" . $vlan_id);
|
||||
break;
|
||||
|
||||
case ("zone") :
|
||||
/* case ("zone") :
|
||||
$zone_origin = sanitize($_POST['zone_origin']);
|
||||
$zone_ttl_default = sanitize($_POST['zone_ttl_default']);
|
||||
$zone_soa = sanitize($_POST['zone_soa']);
|
||||
@@ -380,7 +380,7 @@ if (isset($_POST['add'])) {
|
||||
$zone_ns1, $zone_ns2, $zone_ns3, $zone_mx1, $zone_mx2, $zone_info]);
|
||||
|
||||
header_location("zoneview.php?zone_id=" . $dbh->lastInsertId());
|
||||
break;
|
||||
break; */
|
||||
}
|
||||
}
|
||||
|
||||
@@ -398,7 +398,7 @@ if (isset($_POST['del'])) {
|
||||
|
||||
header_location("asset.php");
|
||||
break;
|
||||
/* refactored
|
||||
/*
|
||||
case ("assetclass") :
|
||||
$assetclass_id = sanitize($_POST['assetclass_id']);
|
||||
|
||||
@@ -487,7 +487,7 @@ if (isset($_POST['del'])) {
|
||||
header_location("subnetview.php?subnet_id=" . $subnet_id);
|
||||
break;
|
||||
|
||||
case ("user") :
|
||||
/* case ("user") :
|
||||
$user_id = sanitize($_POST['user_id']);
|
||||
|
||||
$sth = $dbh->prepare("DELETE FROM user WHERE user_id=?");
|
||||
@@ -503,7 +503,7 @@ if (isset($_POST['del'])) {
|
||||
$sth->execute([$vlan_id]);
|
||||
|
||||
header_location("vlan.php");
|
||||
break;
|
||||
break; */
|
||||
|
||||
case ("vlansubnet") :
|
||||
$subnet_id = sanitize($_POST['subnet_id']);
|
||||
@@ -515,14 +515,14 @@ if (isset($_POST['del'])) {
|
||||
header_location("vlanview.php?vlan_id=" . $vlan_id);
|
||||
break;
|
||||
|
||||
case ("zone") :
|
||||
/* case ("zone") :
|
||||
$zone_id = sanitize($_POST['zone_id']);
|
||||
|
||||
$sth = $dbh->prepare("DELETE FROM zone WHERE zone_id=?");
|
||||
$sth->execute([$zone_id]);
|
||||
|
||||
header_location("zone.php");
|
||||
break;
|
||||
break; */
|
||||
}
|
||||
}
|
||||
|
||||
@@ -548,7 +548,7 @@ if (isset($_POST['edit'])) {
|
||||
$asset_id]);
|
||||
|
||||
header_location("assetview.php?asset_id=" . $asset_id);
|
||||
/* refactored
|
||||
/*
|
||||
case ("assetclass") :
|
||||
$id = sanitize($_POST['assetclass_id']);
|
||||
$name = sanitize($_POST['assetclass_name']);
|
||||
@@ -729,7 +729,7 @@ if (isset($_POST['edit'])) {
|
||||
header_location("subnetview.php?subnet_id=" . $subnet_id);
|
||||
break;
|
||||
|
||||
case ("user") :
|
||||
/* case ("user") :
|
||||
$user_id = sanitize($_POST['user_id']);
|
||||
$user_name = sanitize($_POST['user_name']);
|
||||
$user_displayname = sanitize($_POST['user_displayname']);
|
||||
@@ -803,7 +803,7 @@ if (isset($_POST['edit'])) {
|
||||
$id]);
|
||||
|
||||
header_location("zoneview.php?zone_id=" . $zone_id);
|
||||
break;
|
||||
break; */
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user