<?php

if ($this->is_id()) {

	//akiknek ez a shirt_id van beállítva, azoknál null-ra állítjuk
	$shirt_query = "SELECT ck_id FROM camp_kid WHERE ck_shirt_size_id = " . $this->get_id();
	$shirt_assoc_array = $sql->assoc_array($shirt_query);
	foreach ($shirt_assoc_array as $uk_id) {
		$sql->update_table('camp_kid', array('ck_shirt_size_id' => 'null'), array('ck_id' => $uk_id['ck_id']));
	}

	$sql->update_table('camp_shirt', array('cshirt_deleted' => 1), array('cshirt_id' => $this->get_id()));

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


?>