www/upl_miscs.php

changeset 785
aa79acfdf8a9
parent 311
f6fafccd8a6d
--- a/www/upl_miscs.php	Sun Feb 06 20:06:46 2022 +0100
+++ b/www/upl_miscs.php	Thu Feb 10 22:15:10 2022 +0100
@@ -51,7 +51,9 @@
 
 foreach ($miscs->MISC as $misc) {
 
-	$sql  = "INSERT INTO inventory_miscs SET name='" . mysqli_real_escape_string($db, $misc->NAME);
+	$uuid = str_replace("\n", "", file_get_contents('/proc/sys/kernel/random/uuid'));
+	$sql  = "INSERT INTO inventory_miscs SET uuid='" . $uuid;
+	$sql .= "', name='" . mysqli_real_escape_string($db, $misc->NAME);
 	if ($misc->NOTES)
 		$sql .= "', notes='" . mysqli_real_escape_string($db, $misc->NOTES);
 

mercurial