function retreiveAttendanceLock($attendance) { $meeting = retreiveAttendanceMeetingId($attendance); return retreiveAttendanceMeetingLock($meeting); }
break; //----------------------------------------------------------------------------------------------------------------------------------// //LIST ATTENDANCE //----------------------------------------------------------------------------------------------------------------------------------// //----------------------------------------------------------------------------------------------------------------------------------// //LIST ATTENDANCE //----------------------------------------------------------------------------------------------------------------------------------// case 'listAttendance': $meeting = db_clean_int($_GET['meeting']); $smarty->assign("meeting_name", retreiveMeetingNameForAttendance($meeting)); $smarty->assign("meeting_id", $meeting); $smarty->assign("semester_id", retreiveSemesterIdForMeeting($meeting)); $smarty->assign("attendance", retreiveAttendance($meeting)); $smarty->assign("addable", retreiveAdditionalAttendanceMemberCount($meeting)); $smarty->assign("meeting_count", retreiveMeetingChildrenCount($meeting)); $smarty->assign("meeting_lock", retreiveAttendanceMeetingLock($meeting)); $smarty->display('listAttendance.tpl'); break; //----------------------------------------------------------------------------------------------------------------------------------// //ATTENDANCE BLOCK //----------------------------------------------------------------------------------------------------------------------------------// //----------------------------------------------------------------------------------------------------------------------------------// //ATTENDANCE BLOCK //----------------------------------------------------------------------------------------------------------------------------------// case 'attendanceBlock': $attendance = db_clean_int($_GET['attendance']); //These are AJAX requests! //If an update to the attendance record's status is requested, process it. //This even validates the key! //If it doesn't validate, simply display it as if it wasn't updated, no big deal... just click again. if (isset($_GET['status']) && secureform_test_pk(db_clean_text($_GET['key']), "attendanceBlock", $attendance)) {
function toggleMeetingLock($meeting) { $lock = retreiveAttendanceMeetingLock($meeting); if ($lock == 0) { $query = "UPDATE meetings SET `lock` = 1 WHERE `id` = " . $meeting . " LIMIT 1;"; } else { $query = "UPDATE meetings SET `lock` = 0 WHERE `id` = " . $meeting . " LIMIT 1;"; } $result = mysql_query($query); }