<?php require_once('includes/requirecompere.inc.php'); $mb_id_leader=current_mb_id(); $mb_id_member=TGET('member_id'); $timezone_bias_seconds=get_user_time_zone()*60; $DBConn->connect(); $DBConn->begin(true); $lectures=db_load_lectures_of_team_member($DBConn,$mb_id_leader,$mb_id_member); $dependedlecturecount=0; foreach ($lectures as $lec) { if ($lec['staffcount']==1) $dependedlecturecount++; } if ($dependedlecturecount) { redirect("qx-cmd-team.delete.confirm-member_id-".$mb_id_member.".html"); } else { db_delete_team_member($DBConn,$mb_id_leader,$mb_id_member); redirect("qx-cmd-team.manage.html"); } $DBConn->commit(); ?>