<?php

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() . ";";
	//$sql->execute_query($delete_query);

	$sql->update_table('training', array('tr_deleted' => 1), array('tr_id' => $this->get_id()));

	log::register('delete_training', $this->get_id());
	header("Location: /admin/trainings");
}


?>