From 54bfc103a51b035faf7cea2631fc9351acfbbf88 Mon Sep 17 00:00:00 2001 From: Giovanna Date: Fri, 18 Mar 2022 22:17:43 -0300 Subject: [PATCH 1/3] =?UTF-8?q?Update=20n=C3=A3o=20est=C3=A1=20sendo=20rea?= =?UTF-8?q?lizado?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- views/pages/institution/school/list-school.page.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/pages/institution/school/list-school.page.php b/views/pages/institution/school/list-school.page.php index a63e44f..9dc7638 100644 --- a/views/pages/institution/school/list-school.page.php +++ b/views/pages/institution/school/list-school.page.php @@ -82,7 +82,7 @@ fetch(PDO::FETCH_BOTH)) { ?> - Editar + Editar Excluir From 957ca836db160b85f44ac4125bb067733a7ea56b Mon Sep 17 00:00:00 2001 From: Giovanna Date: Fri, 18 Mar 2022 22:24:39 -0300 Subject: [PATCH 2/3] =?UTF-8?q?Update=20n=C3=A3o=20funciona?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/update-school-controller.php | 19 +++++++++++++ .../school/forms-update-school-page.php | 27 +++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 views/pages/institution/controller/update-school-controller.php create mode 100644 views/pages/institution/school/forms-update-school-page.php diff --git a/views/pages/institution/controller/update-school-controller.php b/views/pages/institution/controller/update-school-controller.php new file mode 100644 index 0000000..2a4c55d --- /dev/null +++ b/views/pages/institution/controller/update-school-controller.php @@ -0,0 +1,19 @@ +prepare("UPDATE schools SET nameSchool='$name' WHERE idSchool='$id' "); + + $stmt->bindValue(1, $name); + $stmt->execute(); +} catch (Exception $e) { + echo $e->getMessage(); +} diff --git a/views/pages/institution/school/forms-update-school-page.php b/views/pages/institution/school/forms-update-school-page.php new file mode 100644 index 0000000..3d73d66 --- /dev/null +++ b/views/pages/institution/school/forms-update-school-page.php @@ -0,0 +1,27 @@ + + + + + + + + Cadastro ETEC | HERE! + + +
+ +
+
+ +
+ + +
+ +
+ +
+ + \ No newline at end of file From 6b065f2f189752dbd6c08427a359562d95654dff Mon Sep 17 00:00:00 2001 From: Helena Date: Sat, 19 Mar 2022 15:00:14 -0300 Subject: [PATCH 3/3] =?UTF-8?q?fix:=20implementa=C3=A7=C3=A3o=20da=20funci?= =?UTF-8?q?onalidde=20editar=20etecs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/update-school-controller.php | 19 +++++----- .../school/forms-update-school-page.php | 36 +++++++++++++------ .../institution/school/list-school.page.php | 2 +- 3 files changed, 36 insertions(+), 21 deletions(-) diff --git a/views/pages/institution/controller/update-school-controller.php b/views/pages/institution/controller/update-school-controller.php index 2a4c55d..7d7a175 100644 --- a/views/pages/institution/controller/update-school-controller.php +++ b/views/pages/institution/controller/update-school-controller.php @@ -1,19 +1,18 @@ prepare("UPDATE schools SET nameSchool='$name' WHERE idSchool='$id' "); + $id = $_GET['updateIdSchool']; + $name = $_POST['updateNameSchool']; + $stmt = $connection->prepare("UPDATE schools + SET nameSchool = ? + WHERE idSchool = $id"); $stmt->bindValue(1, $name); $stmt->execute(); -} catch (Exception $e) { - echo $e->getMessage(); -} +} \ No newline at end of file diff --git a/views/pages/institution/school/forms-update-school-page.php b/views/pages/institution/school/forms-update-school-page.php index 3d73d66..5181cae 100644 --- a/views/pages/institution/school/forms-update-school-page.php +++ b/views/pages/institution/school/forms-update-school-page.php @@ -1,27 +1,43 @@ prepare("SELECT * FROM schools + WHERE idSchool = $id + "); + $stmt->execute(); + $rowCat = $stmt->fetch(PDO::FETCH_BOTH); +} ?> + + Cadastro ETEC | HERE! + -
+ -
-
+
+
-
- - -
+
+ +
-
- +
+
+ \ No newline at end of file diff --git a/views/pages/institution/school/list-school.page.php b/views/pages/institution/school/list-school.page.php index 9dc7638..5080d07 100644 --- a/views/pages/institution/school/list-school.page.php +++ b/views/pages/institution/school/list-school.page.php @@ -82,7 +82,7 @@ fetch(PDO::FETCH_BOTH)) { ?> - Editar + Editar Excluir