<?php require_once('includes/requirecompere.inc.php'); require_once('includes/requirepost.inc.php'); require_once('includes/message.inc.php'); $lctr_id=TPOST('lctr_id'); $mb_id_participant=TPOST('mb_id'); $st_id=TPOST('st_id'); $cancelmsg=TPOST('cancelmsg'); $mb_id_owner=current_mb_id(); $timezone_bias_seconds=get_user_time_zone()*60; $DBConn->connect(); $lecture=db_load_lecture_by_id($DBConn,$lctr_id); if (!$lecture) { redirect("./"); return; } $course=db_load_course_by_id($DBConn,$lecture['cs_id']); if ($course['mb_id_owner']!=$mb_id_owner) { redirect("./"); return; } if (seconds_to_datetime()>=$lecture['lctr_expire']) { redirect("qx-cmd-course.lecture.cancelparticipant-lctr_id-".$lctr_id.'-mb_id-'.$mb_id_participant.'-st_id-'.$st_id.".html"); return; } $DBConn->begin(true); $rsv_id=db_cancel_reservation($DBConn,$lctr_id,$mb_id_participant,$st_id,$mb_id_owner); send_message( $DBConn, 'DECLINE', $mb_id_owner, 'COMPERE', $mb_id_participant, 'MEMBER', $cancelmsg, false, array( 'msg_lctr_id'=>$lctr_id, 'msg_cs_id'=>$lecture['cs_id'], 'msg_st_id'=>$st_id ) ); $DBConn->commit(); redirect("qx-cmd-course.lecture.detail-op-cancelled-lctr_id-".$lctr_id.".html"); ?>