diff --git a/add_installation.php b/add_installation.php index 91f80db..f22f38b 100644 --- a/add_installation.php +++ b/add_installation.php @@ -12,7 +12,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { $breaker_output = trim($_POST['breaker_output'] ?? null); if (empty($client_name) || empty($address) || empty($technician_name)) { - $_SESSION['message'] = 'Please fill all required fields.'; + $_SESSION['message'] = 'Por favor, preencha todos os campos obrigatórios.'; $_SESSION['message_type'] = 'danger'; header('Location: index.php'); exit; @@ -51,17 +51,17 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { $img_stmt = $pdo->prepare("INSERT INTO installation_images (installation_id, image_path) VALUES (?, ?)"); $img_stmt->execute([$installation_id, $image_path]); } else { - throw new Exception('Failed to move uploaded file: ' . $file_name); + throw new Exception('Falha ao mover o arquivo enviado: ' . $file_name); } } else { - throw new Exception('Invalid file type: ' . $file_name); + throw new Exception('Tipo de arquivo inválido: ' . $file_name); } } } } $pdo->commit(); - $_SESSION['message'] = 'Installation registered successfully!'; + $_SESSION['message'] = 'Instalação registrada com sucesso!'; $_SESSION['message_type'] = 'success'; } catch (Exception $e) { @@ -69,10 +69,10 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { $pdo->rollBack(); } error_log("Upload/Database error: " . $e->getMessage()); - $_SESSION['message'] = 'Failed to register installation: ' . $e->getMessage(); + $_SESSION['message'] = 'Falha ao registrar a instalação: ' . $e->getMessage(); $_SESSION['message_type'] = 'danger'; } } header('Location: index.php'); -exit; +exit; \ No newline at end of file diff --git a/index.php b/index.php index cb4aa0f..fd81fa7 100644 --- a/index.php +++ b/index.php @@ -13,7 +13,7 @@ try { } catch (Exception $e) { $installations = []; $total_installations = 0; - $db_error = "Database connection failed or table not found. Please run the migration."; + $db_error = "Falha na conexão com o banco de dados ou tabela não encontrada. Por favor, execute a migração."; } ?> @@ -21,11 +21,11 @@ try { - ILOADNET SOLUTIONS - Dashboard - + ILOADNET SOLUTIONS - Painel de Controle + - + @@ -41,22 +41,22 @@ try { @@ -66,16 +66,16 @@ try {