$sectionuser->pending = $_POST['pending']; $sectionuser->enabled = $_POST['enabled']; $sectionuser->userid = $_POST['userid']; $sectionuser->schoolid = $_POST['schoolid']; $sectionuser->batchid = $_POST['batchid']; $sectionuser->sectionuserid = $_POST['sectionuserid']; $sectionuser->level = $_POST['level']; $sectionuser->create(); $log = new Log($session->user_id, $clientip, "WEB", "CREATED SECTIONUSER: "******"WEB", "UPDATED SECTIONUSER: "******"WEB", "DELETED SECTIONUSER: " . $_POST['id']); $log->create(); SectionUser::get_by_id($_POST['id'])->delete(); } } }
$object->pending = 0; $object->update(); $notification->title = "message"; $notification->itemid = $itemid; $notification->itemtype = "schooluser"; } else { if ($itemtype == "batchuser") { $object = BatchUser::get_by_id($itemid); $object->pending = 0; $object->update(); $notification->title = "message"; $notification->itemid = $itemid; $notification->itemtype = "batchuser"; } else { if ($itemtype == "sectionuser") { $object = SectionUser::get_by_id($itemid); $object->pending = 0; $object->update(); $notification->title = "message"; $notification->itemid = $itemid; $notification->itemtype = "sectionuser"; } else { if ($itemtype == "clubuser") { $object = ClubUser::get_by_id($itemid); $object->pending = 0; $object->update(); $notification->title = "message"; $notification->itemid = $itemid; $notification->itemtype = "clubuser"; } else { if ($itemtype == "groupuser") {
} $html .= "Now friends"; } else { if ($notification->itemtype == "schooluser") { $object = SchoolUser::get_by_id($notification->itemid); $school = School::get_by_id($object->schoolid); $html .= "Now a member in School <a href='school.php?id=" . $school->id . "'>" . $school->name . "</a>"; } else { if ($notification->itemtype == "batchuser") { $object = BatchUser::get_by_id($notification->itemid); $batch = Batch::get_by_id($object->batchid); $school = School::get_by_id($object->schoolid); $html .= "Now a member in Batch <a href='batch.php?id=" . $batch->id . "'>" . $batch->get_batchyear() . "</a> of School <a href='school.php?id=" . $school->id . "'>" . $school->name . "</a>"; } else { if ($notification->itemtype == "sectionuser") { $object = SectionUser::get_by_id($notification->itemid); $section = Section::get_by_id($object->sectionid); $batch = Batch::get_by_id($object->batchid); $school = School::get_by_id($object->schoolid); $html .= "Now a member in Section <a href='section.php?id=" . $section->id . "'>" . $section->name . "</a> of Batch <a href='batch.php?id=" . $batch->id . "'>" . $batch->get_batchyear() . "</a> of School <a href='school.php?id=" . $school->id . "'>" . $school->name . "</a>"; } else { if ($notification->itemtype == "clubuser") { $object = ClubUser::get_by_id($notification->itemid); $club = Club::get_by_id($object->clubid); $school = School::get_by_id($object->schoolid); $html .= "Now a member in Club <a href='club.php?id=" . $club->id . "'>" . $club->name . "</a> of School <a href='school.php?id=" . $school->id . "'>" . $school->name . "</a>"; } else { if ($notification->itemtype == "groupuser") { $object = GroupUser::get_by_id($notification->itemid); $group = Group::get_by_id($object->groupid); $school = School::get_by_id($object->schoolid);
} $log = new Log($session->userid, $clientip, "WEB", "DELETED MULTIPLE BATCHUSERS"); $log->create(); $response = "success"; } else { if ($what == "section") { foreach ($ids as $id) { Section::get_by_id($id)->delete(); } $log = new Log($session->userid, $clientip, "WEB", "DELETED MULTIPLE SECTIONS"); $log->create(); $response = "success"; } else { if ($what == "sectionuser") { foreach ($ids as $id) { SectionUser::get_by_id($id)->delete(); } $log = new Log($session->userid, $clientip, "WEB", "DELETED MULTIPLE SECTIONUSERS"); $log->create(); $response = "success"; } else { if ($what == "pending") { foreach ($ids as $id) { Pending::get_by_id($id)->delete(); } $log = new Log($session->userid, $clientip, "WEB", "DELETED MULTIPLE PENDINGS"); $log->create(); $response = "success"; } else { if ($what == "log") { foreach ($ids as $id) {