<?php require_once('includes/requirecompere.inc.php'); $clsr_id=0+TGET('clsr_id'); $mb_id=current_mb_id(); $DBConn->connect(); $classroom=db_load_classroom($DBConn,$clsr_id); if ($classroom['mb_id_owner']!=$mb_id) { redirect("./"); return; } $DBConn->begin(true); $lectures=db_load_lectures_of_classroom($DBConn,$clsr_id); if ($lectures) { redirect("qx-cmd-classroom.delete.confirm-clsr_id-".$clsr_id.".html"); } else { db_delete_classroom($DBConn,$clsr_id); redirect("qx-cmd-classroom.manage.html"); } $DBConn->commit(); ?>