<?php require_once('includes/requirecompere.inc.php'); $plc_id=0+TGET('plc_id'); $DBConn->connect(); $DBConn->begin(true); $place=db_load_place($DBConn,$plc_id); if ($place['mb_id_owner']==current_mb_id()) { $classrooms=db_classroom_at_place($DBConn,$plc_id); $summary=db_count_reservations_at_place($DBConn,$plc_id); $lectures=db_load_lectures_of_place($DBConn,$plc_id); if (!$classrooms && empty($summary['count']) && !$lectures) { db_delete_place($DBConn,$plc_id); member_refresh_login($DBConn); } } redirect("qx-cmd-place.manage.html"); $DBConn->commit(); ?>