<td class="region">Region</td> <td class="title">Category Title</td> </tr> </thead> <tbody> <?php foreach ($results as $result) { if (time() >= $result["event_start"] && time() <= $result["event_finish"]) { $bgcolour = "#E7ECF4"; $is_here = true; } else { $bgcolour = "#FFFFFF"; $is_here = false; } if ((bool) $result["manage_apartments"]) { $apartment_id = regionaled_apartment_check($result["event_id"], $ENTRADA_USER->getActiveId()); $apartment_available = $apartment_id ? true : false; } else { $apartment_available = false; } if ($apartment_available) { $click_url = ENTRADA_URL . "/clerkship?section=details&id=" . $result["event_id"]; } elseif ($ENTRADA_ACL->amIAllowed('electives', 'update')) { $click_url = ENTRADA_URL . "/admin/clerkship/electives?section=edit&id=" . $result["event_id"]; } elseif ($_SESSION["details"]["group"] == "student" && $result["event_type"] == "elective" && $result["event_status"] == "approval") { $click_url = ENTRADA_URL . "/clerkship/electives?section=edit&id=" . $result["event_id"]; } else { $click_url = ENTRADA_URL . "/clerkship/electives?section=view&id=" . $result["event_id"]; } if (!isset($result["region_name"]) || $result["region_name"] == "") { $result_region = clerkship_get_elective_location($result["event_id"]);
<td class="region">Region</td> <td class="title">Category Title</td> </tr> </thead> <tbody> <?php foreach ($results as $result) { if (time() >= $result["event_start"] && time() <= $result["event_finish"]) { $bgcolour = "#E7ECF4"; $is_here = true; } else { $bgcolour = "#FFFFFF"; $is_here = false; } if ((bool) $result["manage_apartments"]) { $aschedule_id = regionaled_apartment_check($result["event_id"], $ENTRADA_USER->getID()); $apartment_available = $aschedule_id ? true : false; } else { $apartment_available = false; } if (!isset($result["region_name"]) || $result["region_name"] == "") { $result_region = clerkship_get_elective_location($result["event_id"]); $result["region_name"] = $result_region["region_name"]; $result["city"] = $result_region["city"]; } else { $result["city"] = ""; } $cssclass = ""; if ($result["event_type"] == "elective") { switch ($result["event_status"]) { case "approval":