bugfixes#1
This commit is contained in:
10
_include/include_delete_member.php
Normal file
10
_include/include_delete_member.php
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
if ($this->is_id()) {
|
||||||
|
$delete_query = "DELETE FROM user_parent WHERE uk_id = " . $this->get_id() . ";";
|
||||||
|
$sql->execute_query($delete_query);
|
||||||
|
header("Location: /admin/members");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
||||||
10
_include/include_delete_parent.php
Normal file
10
_include/include_delete_parent.php
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
if ($this->is_id()) {
|
||||||
|
$delete_query = "DELETE FROM user_parent WHERE up_id = " . $this->get_id() . ";";
|
||||||
|
$sql->execute_query($delete_query);
|
||||||
|
header("Location: /admin/parents");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
||||||
@@ -1,6 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
if ($this->is_id()) {
|
if ($this->is_id()) {
|
||||||
|
//először ki kell törölni a coachokat
|
||||||
|
$delete_coach_query = "DELETE FROM training_coach WHERE trc_training_tr_id = " . $this->get_id() . ";";
|
||||||
|
$sql->execute_query($delete_coach_query);
|
||||||
$delete_query = "DELETE FROM training WHERE tr_id = " . $this->get_id() . ";";
|
$delete_query = "DELETE FROM training WHERE tr_id = " . $this->get_id() . ";";
|
||||||
$sql->execute_query($delete_query);
|
$sql->execute_query($delete_query);
|
||||||
header("Location: /admin/trainings");
|
header("Location: /admin/trainings");
|
||||||
|
|||||||
@@ -87,6 +87,7 @@ if (isset($_POST['action'])) {
|
|||||||
$every_week = isset($_POST['every_week']);
|
$every_week = isset($_POST['every_week']);
|
||||||
if ($every_week) unset($_POST['every_week']);
|
if ($every_week) unset($_POST['every_week']);
|
||||||
training::create_training($_POST, $every_week);
|
training::create_training($_POST, $every_week);
|
||||||
|
header("Location: /admin/trainings/");
|
||||||
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user