Store in GIT

This commit is contained in:
2026-06-17 15:46:26 +02:00
parent 47150cc7ca
commit 876ad89e72
134 changed files with 31034 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
<?php
require("../../../inc/connect.php");
require("../../../inc/session.php");
$device = $_POST['device'];
$name = $_POST['name'];
$location = $_POST['location'];
$description = $_POST['description'];
//Check if allowed to edit
$sql = "SELECT `id` FROM `device` WHERE `dev_id`='$device' AND `user`=$userid";
$query = ExecQuery($mysqli, $sql);
if($query->num_rows < 1)
{
error("devices", "You are not allowed to edit that device");
}
//Update the device
$sql = "UPDATE `device` SET `name`='$name', `location`='$location', `description`='$description' WHERE `dev_id`='$device'";
ExecQuery($mysqli, $sql);
success("devices", "The device has been updated");
?>