<?php require_once('includes/requirecompere.inc.php'); $clsr_id=0+TGET('clsr_id'); $mb_id=current_mb_id(); $DBConn->connect(true); $classroom=db_load_classroom($DBConn,$clsr_id); if ($classroom['mb_id_owner']!=$mb_id) { redirect("./"); return; } $lectures=db_load_lectures_of_classroom($DBConn,$clsr_id); $dataset['LECTURE']=$lectures; foreach ($dataset['LECTURE'] as &$lec) { $lec+=array_key_prepend(split_datetime($lec['lctr_since'],$timezone_bias_seconds),'since_'); $lec+=array_key_prepend(split_datetime($lec['lctr_expire'],$timezone_bias_seconds),'expire_'); } $dataset+=$classroom; $dataset['NOT-DELETABLE']=$lectures?array(0):array(); $dataset['DELETABLE']=$dataset['NOT-DELETABLE']?array():array(0); ?>