<?php require_once('includes/requirecompere.inc.php'); require_once('includes/courseinfo.inc.php'); $CMD_TMPL_NAME='courseinfo'; $cs_id=0+TGET('cs_id'); $mb_id=current_mb_id(); $dataset['DELETE-CONFIRM']=array(0); $dataset['CONFIRMING']=array(0); $dataset['MANAGABLE']=array(0); $DBConn->connect(true); $course=db_load_course_by_id($DBConn,$cs_id); if ($course['mb_id_owner']!=$mb_id) { redirect("./"); return; } $lectures=db_load_lectures_of_course($DBConn,$cs_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['NONDELETABLE']=$lectures?array(0):array(); $dataset['LECTURE-LIST']=$lectures?array(0):array(); $dataset['DELETABLE']=$dataset['NONDELETABLE']?array():array(0); $dataset+=course_info_prepare_dataset($DBConn,$course); ?>