<?php require_once('includes/requirecompere.inc.php'); require_once('includes/requirepost.inc.php'); $cs_id=TPOST('cs_id'); $qn_id_select=TPOST('qn_id_select'); $mb_id=current_mb_id(); $DBConn->connect(); $DBConn->begin(true); $course=db_load_course_by_id($DBConn,$cs_id); if (!$course || $course['mb_id_owner']!=$mb_id) { $DBConn->rollback(); redirect("qx-cmd-course.manage.html"); return; } db_set_course_questionnaire($DBConn,$mb_id,$cs_id,$qn_id_select); $DBConn->commit(); redirect("qx-cmd-course.assign.questionnaire-cs_id-".$cs_id."-op-saved.html"); ?>