forked from GibbonEdu/core
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindexFindRedirect.php
More file actions
20 lines (17 loc) · 843 Bytes
/
indexFindRedirect.php
File metadata and controls
20 lines (17 loc) · 843 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?php
include './gibbon.php';
$type = substr($_GET['fastFinderSearch'] ?? '', 0, 3);
$id = substr($_GET['fastFinderSearch'] ?? '', 4);
$URL = './index.php';
if ($gibbon->session->has('absoluteURL')) {
if ($type == 'Stu') {
$URL = $gibbon->session->get('absoluteURL').'/index.php?q=/modules/Students/student_view_details.php&gibbonPersonID='.$id;
} elseif ($type == 'Act') {
$URL = $gibbon->session->get('absoluteURL').'/index.php?q=/modules/'.$id;
} elseif ($type == 'Sta') {
$URL = $gibbon->session->get('absoluteURL').'/index.php?q=/modules/Staff/staff_view_details.php&gibbonPersonID='.$id;
} elseif ($type == 'Cla') {
$URL = $gibbon->session->get('absoluteURL').'/index.php?q=/modules/Departments/department_course_class.php&gibbonCourseClassID='.$id;
}
}
header("Location: {$URL}");