function __construct()
 {
     $this->idTeacher = $_SESSION['id'];
     $this->idTermin = $_GET['id'];
     $this->currentRow = TerminDAO::getTerminyProId($this->idTermin);
     $this->rooms = RoomsDAO::getMistnosti();
     $this->subjects = SubjectsDAO::getSubjects($this->idTeacher);
 }
 function __construct()
 {
     $this->DBconnect = DBconnect::getInstance();
     $this->personal['surname'] = $_SESSION['surname'];
     $this->personal['name'] = $_SESSION['name'];
     $this->personal['id'] = $_SESSION['id'];
     $this->terminy = TerminDAO::getTerminyPedagoga($this->personal['id']);
 }
<?php

session_start();
include_once $_SERVER['DOCUMENT_ROOT'] . '/projects/XWYDA_KU3/Controler/DBconnect.php';
include_once $_SERVER['DOCUMENT_ROOT'] . '/projects/XWYDA_KU3/Database/TerminDAO.php';
$idTermin = $_GET['id'];
print TerminDAO::deleteTermin($idTermin);
print '<br>Budete presmerovani';
header('Refresh:2; url=/projects/XWYDA_KU3/index.php?page=teacher', true, 303);