<?php require_once('includes/requirecompere.inc.php'); $cs_id=TGET('cs_id'); $mb_id=current_mb_id(); $op=TGET('op'); $DBConn->connect(true); $course=db_load_course_by_id($DBConn,$cs_id); if (!$course || $course['mb_id_owner']!=$mb_id) { redirect("./"); return; } $circle=db_load_course_circle($DBConn,$cs_id); $mb_ids=array_projection($circle,'mb_id'); $members=db_load_members($DBConn,$mb_ids); $dataset+=$course; $dataset['MEMBER']=$members; $dataset['NO-MEMBER']=!$members?array(0):array(); $dataset['INVITE-OK']=$op=='invite.ok'?array(0):array(); ?>