<?php require_once('includes/requirelogin.inc.php'); $cs_id=0+TGET('cs_id'); $clsr_id=0+TGET('clsr_id'); $op=TGET('op'); $mb_id=current_mb_id(); $DBConn->connect(); $course=db_load_course_by_id($DBConn,$cs_id); $classroom=db_load_classroom($DBConn,$clsr_id); if ($course['mb_id_owner']!=$mb_id || $classroom['mb_id_owner']!=$mb_id) { redirect("./"); return; } if ($op=='add') db_add_classroom_to_course($DBConn,$cs_id,$clsr_id); else db_delete_classroom_from_course($DBConn,$cs_id,$clsr_id); $dataset+=prepare_wizard_dataset(); redirect("qx-cmd-course.assign.classroom-cs_id-".$cs_id.$dataset['WIZARD-PARAM-DBLHYP'].".html"); ?>