added drag and photos

This commit is contained in:
2025-11-22 13:35:12 +01:00
parent eeb1d0d5de
commit 8edccbdfef
21 changed files with 2006 additions and 121 deletions
+10 -7
View File
@@ -7,19 +7,22 @@ try {
$pdo = $db->getConnection();
$lineNumber = $_POST['lineNumber'] ?? null;
$name = $_POST['lineName'] ?? '';
$model = $_POST['model'] ?? '';
$brand = $_POST['brand'] ?? '';
$status = $_POST['status'] ?? 'active';
$name = $_POST['lineName'] ?? '';
$model = $_POST['model'] ?? '';
$brand = $_POST['brand'] ?? '';
$status = $_POST['status'] ?? 'active';
$color = $_POST['color'] ?? '#dc2626';
if (!$lineNumber || !$name) {
echo json_encode(['success' => false, 'message' => 'Numero linea e nome sono obbligatori.']);
exit;
}
$stmt = $pdo->prepare("INSERT INTO production_lines (line_number, name, model, brand, status)
VALUES (?, ?, ?, ?, ?)");
$stmt->execute([$lineNumber, $name, $model, $brand, $status]);
$stmt = $pdo->prepare("
INSERT INTO production_lines (line_number, name, model, brand, status, color)
VALUES (?, ?, ?, ?, ?, ?)
");
$stmt->execute([$lineNumber, $name, $model, $brand, $status, $color]);
echo json_encode(['success' => true]);
} catch (Exception $e) {