Add Friend<span hidden>' . $user->id . '</span> </button> '; } } } echo ' <div class="btn-group pull-right"> <a id="btninvite" class="btn-mini dropdown-toggle" data-toggle="dropdown" href="#"> <i class="icon-large icon-circle-arrow-down"></i> Invite <i class="icon-caret-down"></i> <span class="caret"></span> </a> <ul class="dropdown-menu"> '; $schoolsImIn = SchoolUser::getSchoolsImIn($session->user_id); $bathsImIn = BatchUser::getBatchsImIn($session->user_id); $sectionsImIn = SectionUser::getSectionsImIn($session->user_id); if ($loggeduser->is_super_admin()) { if (count($schoolsImIn) > 0) { echo '<li class="divider"> schools</li>'; foreach ($schoolsImIn as $theuser) { $school = School::get_by_id($theuser->schoolid); if (!$school) { $theuser->delete(); } echo '<li><a href="#" onclick="invite(\'schoolid\', ' . $school->id . '); return false;">' . $school->name . '</a></li>'; } } } if (count($bathsImIn) > 0) { echo '<li class="divider"> batchs</li>';
require_once "../initialize.php"; $input = $_GET['input']; $html = ""; $filterby = $_GET['filterby']; $thestudent = User::get_by_id($_GET['studentid']); if ($filterby == "schoolmates") { $orgbyuser = SchoolUser::getSchoolsImIn($thestudent->id); $ids = array(); foreach ($orgbyuser as $item) { array_push($ids, $item->schoolid); } $mates = SchoolUser::getUsersInMultipleSchoolsSearch($ids, $_GET['input']); } else { if ($filterby == "batchmates") { $orgbyuser = BatchUser::getBatchsImIn($thestudent->id); $ids = array(); foreach ($orgbyuser as $item) { array_push($ids, $item->batchid); } $mates = BatchUser::getUsersInMultipleBatchsSearch($ids, $_GET['input']); } else { if ($filterby == "sectionmates") { $orgbyuser = SectionUser::getSectionsImIn($thestudent->id); $ids = array(); foreach ($orgbyuser as $item) { array_push($ids, $item->sectionid); } $mates = SectionUser::getUsersInMultipleSectionsSearch($ids, $_GET['input']); } else { if ($filterby == "clubmates") {
<?php require_once "../initialize.php"; $batchsselect = null; if (isset($_GET["schoolid"])) { if (SchoolUser::amIAdmin($session->user_id, $_GET["schoolid"])) { $batchadmins = BatchUser::getBatchsImIn($session->user_id); } else { $batchadmins = BatchUser::getBatchsIAdminInSchool($session->user_id, $_GET["schoolid"]); } if (count($batchadmins) > 0) { foreach ($batchadmins as $batchadmin) { $batch = Batch::get_by_id($batchadmin->batchid); $batchsselect .= "<option value='" . $batch->id . "'>" . $batch->fromyear . "-" . ($batch->fromyear + 1) . "</option>"; } if (User::get_by_id($session->user_id)->is_super_admin()) { $batchsselect .= "<option value='NOTHING'>NOTHING</option>"; } } else { $batchsselect .= "<option value='0'>NO BATCHS YET</option>"; } if (User::get_by_id($session->user_id)->is_super_admin()) { $batchsselect = ""; $batchs = Batch::get_all(); if (count($batchs) > 0) { foreach ($batchs as $batch) { $batchsselect .= "<option value='" . $batch->id . "'>" . $batch->fromyear . "-" . ($batch->fromyear + 1) . "</option>"; } $batchsselect .= "<option value='NOTHING'>NOTHING</option>"; } else { $batchsselect .= "<option value='0'>NO BATCHS YET</option>";