<?php require_once('includes/requirecompere.inc.php'); require_once('includes/courseinfo.inc.php'); $CMD_TMPL_NAME='courseinfo'; $cs_id=0+TGET('cs_id'); $saved=TGET('saved'); $mb_id=current_mb_id(); $dataset['MODIFY']=array(0); $dataset['ENTERING']=array(0); $dataset['SAVE-OK']=$saved=='ok'?array(0):array(); $dataset['MANAGABLE']=array(0); $DBConn->connect(true); if (TGET('op')=='revise' && $_SESSION['reserv.inputcache.domain']=='course') { $course=$_SESSION['reserv.inputcache.data']; $dataset+=$_SESSION['reserv.inputcache.errorareas']; } else { $course=db_load_course_by_id($DBConn,$cs_id); if ($course['mb_id_owner']!=$mb_id) { redirect("./"); return; } $course+=db_load_course_reserve_deadline($DBConn,$cs_id); $requests=db_get_course_info_requests($DBConn,$cs_id); $course['IDR']=array_projection($requests,'id_field'); $course_info=db_load_course_info_by_course_id($DBConn,$cs_id); $course['INFO']['ci_value']=rowset2map($course_info,'ci_property','ci_value'); $course['INFO']['ci_property']=array_projection($course_info,'ci_property'); } $dataset+=course_info_prepare_dataset($DBConn,$course); ?>