/
home
/
techb158
/
workloadmatch.com
/
workloadmatch.com
/
Manager
/
/home/techb158/workloadmatch.com/workloadmatch.com/Manager
mkdir
upload
Name
Size
Mode
Actions
core/
-
0755
rm
css/
-
0755
rm
data/
-
0755
rm
fonts/
-
0755
rm
Inc/
-
0755
rm
js/
-
0755
rm
php/
-
0755
rm
accesscontrol.php
16039
0644
edit
dl
rm
AddClient.php
3930
0644
edit
dl
rm
addcourse.php
17736
0644
edit
dl
rm
addcoursesession.php
20528
0644
edit
dl
rm
addcoursetime.php
17305
0644
edit
dl
rm
addgroup - Copy.php
21212
0644
edit
dl
rm
addgroup.php
22999
0644
edit
dl
rm
addgroup1.php
20667
0644
edit
dl
rm
addholiday.php
18019
0644
edit
dl
rm
addmanager.php
18765
0644
edit
dl
rm
addremediation.php
17877
0644
edit
dl
rm
addretake.php
21914
0644
edit
dl
rm
adduser.php
30079
0644
edit
dl
rm
adduser1.php
23527
0644
edit
dl
rm
Add_Course_Session.php
6529
0644
edit
dl
rm
add_event.php
1960
0644
edit
dl
rm
Add_Teacher_Unavailability.php
1746
0644
edit
dl
rm
adminreports.php
16219
0644
edit
dl
rm
AI_Generate_Schedule - Copy.php
12217
0644
edit
dl
rm
AI_Generate_Schedule.php
10731
0644
edit
dl
rm
ajax_course_group_Backup.php
17270
0644
edit
dl
rm
ajax_course_group_Backup_1.php
18742
0644
edit
dl
rm
ajax_fetch_schedule.php
3760
0644
edit
dl
rm
ajax_get_group_slots.php
872
0644
edit
dl
rm
ajax_replace_saturday -Completed.php
18739
0644
edit
dl
rm
ajax_replace_saturday - Copy (2).php
18739
0644
edit
dl
rm
ajax_replace_saturday - Copy (3).php
26554
0644
edit
dl
rm
ajax_replace_saturday - Copy (4).php
26615
0644
edit
dl
rm
ajax_replace_saturday - Copy (5).php
28374
0644
edit
dl
rm
ajax_replace_saturday - Copy.php
13452
0644
edit
dl
rm
ajax_replace_saturday - Good.php
17270
0644
edit
dl
rm
ajax_replace_saturday.php
30779
0644
edit
dl
rm
ajax_swap_courses.php
4279
0644
edit
dl
rm
assign_course_group-BackUp.php
21331
0644
edit
dl
rm
assign_course_group - Copy (BackUp).php
18315
0644
edit
dl
rm
assign_course_group - Copy.php
21318
0644
edit
dl
rm
assign_course_group.php
18315
0644
edit
dl
rm
assign_course_group1.php
20962
0644
edit
dl
rm
Assign_Course_Report.php
1375
0644
edit
dl
rm
assign_teacher_manual-1.php
21095
0644
edit
dl
rm
assign_teacher_manual - Copy (2).php
22328
0644
edit
dl
rm
assign_teacher_manual - Copy.php
22388
0644
edit
dl
rm
assign_teacher_manual-Not work.php
20585
0644
edit
dl
rm
assign_teacher_manual.php
22328
0644
edit
dl
rm
assign_teacher_manual_force_conflicts.php
22359
0644
edit
dl
rm
availableteacherreport.php
13718
0644
edit
dl
rm
Available_Teacher_Report - Copy.php
2236
0644
edit
dl
rm
Available_Teacher_Report.php
7691
0644
edit
dl
rm
brokerreports.php
16318
0644
edit
dl
rm
calendar - Copy (2).php
16891
0644
edit
dl
rm
calendar - Copy.php
23193
0644
edit
dl
rm
calendar.php
30653
0644
edit
dl
rm
changestatus.php
865
0644
edit
dl
rm
Check_if_Teacher_Report.php
1587
0644
edit
dl
rm
complete_schedule_report_by_teacher.php
19312
0644
edit
dl
rm
courseflagtime.php
3411
0644
edit
dl
rm
Create_Group_Schedule_Algorithm.php
3828
0644
edit
dl
rm
Create_Schedule_Algorithm - Copy (2).php
41412
0644
edit
dl
rm
Create_Schedule_Algorithm - Copy (3).php
46352
0644
edit
dl
rm
Create_Schedule_Algorithm - Copy (4).php
53569
0644
edit
dl
rm
Create_Schedule_Algorithm - Copy (5).php
67956
0644
edit
dl
rm
Create_Schedule_Algorithm - Copy (6).php
71134
0644
edit
dl
rm
Create_Schedule_Algorithm - Copy (7).php
72529
0644
edit
dl
rm
Create_Schedule_Algorithm - Copy (8).php
73084
0644
edit
dl
rm
Create_Schedule_Algorithm - Copy (9).php
73577
0644
edit
dl
rm
Create_Schedule_Algorithm - Copy (10).php
76505
0644
edit
dl
rm
Create_Schedule_Algorithm - Copy (11).php
76764
0644
edit
dl
rm
Create_Schedule_Algorithm - Copy (12).php
86324
0644
edit
dl
rm
Create_Schedule_Algorithm - Copy (13).php
83133
0644
edit
dl
rm
Create_Schedule_Algorithm - Copy (14).php
87274
0644
edit
dl
rm
Create_Schedule_Algorithm - Copy (get info only).php
69747
0644
edit
dl
rm
Create_Schedule_Algorithm - Copy (with 2 course 2nd SPECIAL ).php
82314
0644
edit
dl
rm
Create_Schedule_Algorithm - Copy.php
40581
0644
edit
dl
rm
Create_Schedule_Algorithm.php
88276
0644
edit
dl
rm
Create_Schedule_Algorithm_1.php
41412
0644
edit
dl
rm
Create_Schedule_Algorithm_2.php
76505
0644
edit
dl
rm
Create_Schedule_Algorithm_2_combined.php
89764
0644
edit
dl
rm
Create_Schedule_Algorithm_2_combined_both_slots.php
91932
0644
edit
dl
rm
Create_Schedule_Algorithm_2_fixed.php
76829
0644
edit
dl
rm
Create_Schedule_Algorithm_3.php
87274
0644
edit
dl
rm
Create_Schedule_Algorithm_4.php
87274
0644
edit
dl
rm
dashboard-BackUp.php
18806
0644
edit
dl
rm
dashboard.php
22507
0644
edit
dl
rm
deleteschedulefromgroup.php
16819
0644
edit
dl
rm
delete_course.php
580
0644
edit
dl
rm
delete_course_from_teacher.php
4990
0644
edit
dl
rm
delete_course_from_teacher_backup.php
3094
0644
edit
dl
rm
delete_event.php
1212
0644
edit
dl
rm
delete_group.php
1858
0644
edit
dl
rm
delete_holiday.php
715
0644
edit
dl
rm
delete_retake.php
1276
0644
edit
dl
rm
delete_schedule_from_group-1.php
1870
0644
edit
dl
rm
delete_schedule_from_group.php
1850
0644
edit
dl
rm
delete_teacher_level.php
798
0644
edit
dl
rm
delete_teacher_unavailability.php
1347
0644
edit
dl
rm
delete_timeslot.php
597
0644
edit
dl
rm
display_schedule-1.php
18846
0644
edit
dl
rm
display_schedule.php
18846
0644
edit
dl
rm
do_remove_saturday.php
6170
0644
edit
dl
rm
edit_event.php
1612
0644
edit
dl
rm
error_log
74070
0644
edit
dl
rm
examschedulereport.php
16267
0644
edit
dl
rm
Exam_Schedule_Report.php
2677
0644
edit
dl
rm
export_absences.php
1221
0644
edit
dl
rm
fetch_all_scheduled_courses.php
6318
0644
edit
dl
rm
fetch_courses - BackUp.php
9711
0644
edit
dl
rm
fetch_courses - Copy.php
7719
0644
edit
dl
rm
fetch_courses.php
9167
0644
edit
dl
rm
fetch_courses_for_program.php
788
0644
edit
dl
rm
fetch_courses_for_program_by_schedule - Copy.php
2297
0644
edit
dl
rm
fetch_courses_for_program_by_schedule.php
3935
0644
edit
dl
rm
fetch_courses_teacher_preference.php
3852
0644
edit
dl
rm
fetch_course_for_added_group.php
897
0644
edit
dl
rm
fetch_course_hours.php
691
0644
edit
dl
rm
fetch_disabled_dates.php
518
0644
edit
dl
rm
fetch_events.php
975
0644
edit
dl
rm
fetch_exist_dates.php
1099
0644
edit
dl
rm
fetch_groups_exist_in_schedule.php
956
0644
edit
dl
rm
fetch_groups_for_program.php
843
0644
edit
dl
rm
fetch_group_timeslot.php
847
0644
edit
dl
rm
fetch_reserve_courses.php
7429
0644
edit
dl
rm
fetch_retake_courses.php
923
0644
edit
dl
rm
fetch_scheduled_courses.php
2178
0644
edit
dl
rm
fetch_schedule_report_by_group.php
5440
0644
edit
dl
rm
fetch_teachers_by_group.php
4421
0644
edit
dl
rm
fetch_teachers_by_program.php
1821
0644
edit
dl
rm
fetch_teachers_for_group.php
3170
0644
edit
dl
rm
fetch_teacher_assignment.php
24776
0644
edit
dl
rm
fetch_teacher_by_course.php
3880
0644
edit
dl
rm
fetch_teacher_conflicts.php
5682
0644
edit
dl
rm
fetch_teacher_conflicts_only.php
7665
0644
edit
dl
rm
fetch_teacher_conflicts_only_force_conflicts.php
7114
0644
edit
dl
rm
fetch_teacher_conflicts_showonly.php
10447
0644
edit
dl
rm
fetch_teacher_load.php
1482
0644
edit
dl
rm
fetch_teacher_prefrence_courses_accounting.php
1606
0644
edit
dl
rm
find_replacement-1.php
16075
0644
edit
dl
rm
find_replacement.php
18161
0644
edit
dl
rm
followup.php
16160
0644
edit
dl
rm
Generate Group Schedule.php
16987
0644
edit
dl
rm
Generate Group Schedule 1.php
18121
0644
edit
dl
rm
generateschedule.php
15706
0644
edit
dl
rm
Generate_Schedule.php
33620
0644
edit
dl
rm
generate_schedule_handler.php
7095
0644
edit
dl
rm
Generate_Schedule_Script.php
29731
0644
edit
dl
rm
getlang.php
326
0644
edit
dl
rm
getrefer.php
4349
0644
edit
dl
rm
getstatus.php
1260
0644
edit
dl
rm
get_groups_by_program.php
608
0644
edit
dl
rm
get_schedule_ai-1.php
37755
0644
edit
dl
rm
get_schedule_ai - Copy.php
36459
0644
edit
dl
rm
get_schedule_ai.php
36855
0644
edit
dl
rm
get_schedule_report.php
2393
0644
edit
dl
rm
group_schedule_form - Copy.php
16994
0644
edit
dl
rm
group_schedule_form.php
16994
0644
edit
dl
rm
main-header-inc.php
1196
0644
edit
dl
rm
main-header.php
16671
0644
edit
dl
rm
managecategory.php
9233
0644
edit
dl
rm
managerreports.php
25056
0644
edit
dl
rm
Preference_Accounting.php
22503
0644
edit
dl
rm
profile.php
20680
0644
edit
dl
rm
reference_list.php
8207
0644
edit
dl
rm
remove_saturday_course.php
19503
0644
edit
dl
rm
report_absence.php
19287
0644
edit
dl
rm
report_absence_1.php
6160
0644
edit
dl
rm
reserve_course.php
18957
0644
edit
dl
rm
rewrite_ajax_replace_saturday.php
12800
0644
edit
dl
rm
rewrite_Create_Schedule_Algorithm.php
88318
0644
edit
dl
rm
rewrite_Create_Schedule_Algorithm_2.php
88900
0644
edit
dl
rm
save_schedule.php
2970
0644
edit
dl
rm
save_schedule_group_course.php
25367
0644
edit
dl
rm
schedulereportbygroup.php
17731
0644
edit
dl
rm
schedulereportbyteacher.php
19111
0644
edit
dl
rm
scheduleteacherbygroupreport - Copy.php
31986
0644
edit
dl
rm
scheduleteacherbygroupreport.php
36556
0644
edit
dl
rm
scheduleteacherreport.php
28150
0644
edit
dl
rm
schedule_report.php
17664
0644
edit
dl
rm
Schedule_Report_by_Group.php
3647
0644
edit
dl
rm
Schedule_Report_by_Teacher.php
92433
0644
edit
dl
rm
selectuser.php
1172
0644
edit
dl
rm
swapcourses.php
19469
0644
edit
dl
rm
teacher_preference.php
18182
0644
edit
dl
rm
teacher_preference_by_course.php
19244
0644
edit
dl
rm
teacher_unavailability.php
17835
0644
edit
dl
rm
test.php
13895
0644
edit
dl
rm
test1.php
21837
0644
edit
dl
rm
transfer_reference.php
27288
0644
edit
dl
rm
unassigncoursereport.php
16029
0644
edit
dl
rm
unassign_course.php
19011
0644
edit
dl
rm
Unassign_Course_Report.php
1697
0644
edit
dl
rm
unscheduledgroupreport.php
15675
0644
edit
dl
rm
Unscheduled_Group_Report.php
2007
0644
edit
dl
rm
updateclient.php
14765
0644
edit
dl
rm
updatecourse.php
21626
0644
edit
dl
rm
updatecoursesessionhours.php
18197
0644
edit
dl
rm
updatecoursetime.php
21831
0644
edit
dl
rm
updategroup - Copy.php
24534
0644
edit
dl
rm
updategroup.php
18001
0644
edit
dl
rm
updateholiday.php
22493
0644
edit
dl
rm
updateteacherlevel.php
24532
0644
edit
dl
rm
updateteacherunavailability.php
14184
0644
edit
dl
rm
UpdateUser.php
18214
0644
edit
dl
rm
Update_Course_Hours.php
2135
0644
edit
dl
rm
Update_Follow_Up.php
4618
0644
edit
dl
rm
update_reserve_course.php
1934
0644
edit
dl
rm
update_teacher_level
2508
0644
edit
dl
rm
update_teacher_level.php
2430
0644
edit
dl
rm
useraccesslist.php
12875
0644
edit
dl
rm
users.php
9049
0644
edit
dl
rm
view_swap_log.php
894
0644
edit
dl
rm
Edit:
/home/techb158/workloadmatch.com/workloadmatch.com/Manager/scheduleteacherbygroupreport.php
(36556B)
<?php include_once '../includes/db_connect.php'; include_once '../includes/functions.php'; sec_session_start(); require '../includes/CSRF_Protect.php'; $csrf = new CSRF_Protect(); $page = 'Manager | Schedule Teacher Report'; addinfo($page, $mysqli); /*** function format_time_slot_label($slot, $day) { if ($day === 'Saturday') { if (stripos($slot, 'evening') !== false) return 'Morning (Sat)'; if (stripos($slot, 'morning') !== false) return 'Morning'; } return $slot; } function format_time_slot_range($slot, $start, $end, $day) { if ($day === 'Saturday') { if (stripos($slot, 'morning') !== false) return "08:30 AM - 12:30 PM"; if (stripos($slot, 'evening') !== false) return "09:00 AM - 01:00 PM"; } return date('h:i A', strtotime($start)) . ' - ' . date('h:i A', strtotime($end)); } ***/ function format_time_slot_label($slot, $day) { if ($day === 'Saturday' && stripos($slot, 'evening') !== false) { return 'Morning (Sat)'; } return ucwords($slot); } function format_time_slot_range($slot, $from, $to, $day) { return date("h:i A", strtotime($from)) . " – " . date("h:i A", strtotime($to)); } ?> <!DOCTYPE html> <html> <head> <title>Schedule Teacher Report</title> <!-- Responsive meta --> <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport"> <link rel="icon" href="../dist/img/avatar.png" sizes="32x32" /> <!-- Bootstrap --> <link rel="stylesheet" href="../bower_components/bootstrap/dist/css/bootstrap.min.css"> <!-- Font Awesome --> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.5.0/css/font-awesome.min.css"> <!-- Ionicons --> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/ionicons/2.0.1/css/ionicons.min.css"> <!-- daterange picker --> <link rel="stylesheet" href="../plugins/daterangepicker/daterangepicker-bs3.css"> <!-- bootstrap datepicker --> <link rel="stylesheet" href="../plugins/datepicker/datepicker3.css"> <!-- iCheck --> <link rel="stylesheet" href="../plugins/iCheck/all.css"> <!-- Bootstrap Color Picker --> <link rel="stylesheet" href="../plugins/colorpicker/bootstrap-colorpicker.min.css"> <!-- Bootstrap time Picker --> <link rel="stylesheet" href="../plugins/timepicker/bootstrap-timepicker.min.css"> <!-- Select2 --> <link rel="stylesheet" href="../plugins/select2/select2.min.css"> <!-- Theme style --> <link rel="stylesheet" href="../dist/css/AdminLTE.min.css"> <!-- AdminLTE Skins --> <link rel="stylesheet" href="../dist/css/skins/skin-black-light.min.css"> <!-- DataTables CSS --> <link rel="stylesheet" href="../plugins/datatables/dataTables.bootstrap.css"> <link rel="stylesheet" href="https://cdn.datatables.net/1.10.13/css/jquery.dataTables.min.css"> <link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.2.4/css/buttons.dataTables.min.css"> <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif]--> <style> @media print { .no-print { display: none; } table { border-collapse: collapse !important; width: 100%; } th, td { border: 1px solid #000 !important; padding: 8px !important; } tr[style*="background-color"] { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; } } </style> <script type="text/JavaScript" src="../js/_all-skins.js"></script> <script type="text/JavaScript" src="../js/_all-skins.min.js"></script> <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script> <script> $(document).ready(function() { // When Program_ID changes, reset Group_ID and clear course list. $("#Program_ID").change(function() { var programID = $(this).val(); $("#Group_ID").html('<option value="">Select Group</option>').val(""); if (programID !== "") { $.ajax({ url: "fetch_groups_for_program", // Existing endpoint to fetch groups method: "POST", data: { Program_ID: programID }, success: function(data) { $("#Group_ID").empty().append('<option value="">Select Group</option>' + data).val(""); } }); } }); }); </script> </head> <body class="hold-transition skin-black-light sidebar-mini"> <?php if (login_check($mysqli) == true) : ?> <?php include 'main-header-inc.php'; ?> <div class="wrapper"> <?php include 'main-header.php'; ?> <div class="content-wrapper"> <section class="content-header"> <h1>Schedule Report by Group</h1> </section> <section class="content"> <div class="tab-content"> <div class="active tab-pane" id="activity"> <!-- About Me Box --> <div class="box box-primary"> <div class="box-body"> <form method="POST"> <!-- Program Selection --> <div class="form-group"> <div class="text-center mt-6"> <label for="programSelect" class="col-sm-2 control-label"><?php echo LANG_VALUE_326; ?></label> <div class="col-sm-4"> <select class="form-control select2" name="Program_ID" id="Program_ID"> <option value=""><?php echo LANG_VALUE_326; ?></option> <?php $queryPrograms = "SELECT Program_ID, Program_Name FROM Programs"; $resultPrograms = $mysqli->query($queryPrograms); while ($program = $resultPrograms->fetch_assoc()) { echo "<option value='".$program["Program_ID"]."'>".$program["Program_Name"]."</option>"; } ?> </select> </div> </div> </div> <!-- Group Selection --> <div class="form-group"> <div class="text-center mt-6"> <label for="Group_ID" class="col-sm-2 control-label"><?php echo LANG_VALUE_269; ?></label> <div class="col-sm-4"> <select class="form-control select2" name="Group_ID" id="Group_ID"> <option value=""><?php echo LANG_VALUE_269; ?></option> <!-- Groups will be loaded dynamically via AJAX --> </select> </div> </div> </div> <button type="submit" class="btn btn-primary">Generate Schedule</button> </form> <br> <?php if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['Program_ID'], $_POST['Group_ID'])) { $programID = (int)$_POST['Program_ID']; $groupID = (int)$_POST['Group_ID']; // 1. Group Info $stmtGroup = $mysqli->prepare("SELECT * FROM Manager_Group_Name WHERE Group_ID = ? AND Program_ID = ?"); $stmtGroup->bind_param("ii", $groupID, $programID); $stmtGroup->execute(); $groupData = $stmtGroup->get_result()->fetch_assoc(); $stmtGroup->close(); if (!$groupData) die("Group not found."); $groupName = htmlspecialchars($groupData['Group_Name']); // 1. Load all Holidays $holidays = []; $res = $mysqli->query(" SELECT Event_Title, Event_Start, Event_End, Event_Color FROM Events WHERE Calendar_Year IN ( SELECT DISTINCT YEAR(Start_Date) FROM Schedule_Course_for_Group WHERE Program_ID = $programID AND Group_ID = $groupID ) "); while ($row = $res->fetch_assoc()) { $start = new DateTime($row['Event_Start']); $end = new DateTime($row['Event_End']); while ($start <= $end) { $d = $start->format('Y-m-d'); $holidays[$d] = [ 'title' => $row['Event_Title'], 'color' => $row['Event_Color'] ?: '#FFD700' ]; $start->modify('+1 day'); } } // 2. Load Retake Records $retakes = []; $stmt = $mysqli->prepare(" SELECT Type, Retake_Date FROM Retake_Records WHERE Program_ID = ? AND Group_ID = ? "); $stmt->bind_param('ii', $programID, $groupID); $stmt->execute(); $stmt->bind_result($rType, $rDate); while ($stmt->fetch()) { $retakes[$rDate] = $rType; } $stmt->close(); // 3. Get Exam Dates per Course $examDates = []; $stmt = $mysqli->prepare(" SELECT Course_ID, MAX(End_Date) FROM Schedule_Course_for_Group WHERE Program_ID = ? AND Group_ID = ? GROUP BY Course_ID "); $stmt->bind_param('ii', $programID, $groupID); $stmt->execute(); $stmt->bind_result($eCourseID, $eDate); while ($stmt->fetch()) { $examDates[$eCourseID] = $eDate; } $stmt->close(); // 4. Load Scheduled Sessions WITH Teacher Info $scheduleRows = []; $stmt = $mysqli->prepare(" SELECT scf.Schedule_ID, scf.Course_ID, scf.Course_Name, scf.Reserve_Course, scf.Start_Date, scf.End_Date, gsm.Time_Slot, gsm.Time_From, gsm.Time_To, tp.First_Name, tp.Last_Name FROM Schedule_Course_for_Group AS scf JOIN Group_Slot_Mapping AS gsm ON scf.Group_Slot_ID = gsm.Group_Slot_ID LEFT JOIN Teacher_Course_Assignments AS tca ON scf.Schedule_ID = tca.Schedule_ID LEFT JOIN Teacher_Profile AS tp ON tca.Teacher_ID = tp.Teacher_ID WHERE scf.Program_ID = ? AND scf.Group_ID = ? ORDER BY scf.Start_Date, scf.Start_Time "); $stmt->bind_param("ii", $programID, $groupID); $stmt->execute(); $stmt->bind_result( $scheduleID, $courseID, $courseName, $reserveCourse, $startDate, $endDate, $slotLabel, $slotFrom, $slotTo, $firstName, $lastName ); while ($stmt->fetch()) { //echo $firstName .'"-"'. $lastName; $scheduleRows[] = [ 'schedule_id' => $scheduleID, 'course_id' => $courseID, 'course_name' => $courseName, 'reserve' => $reserveCourse, 'start_date' => $startDate, 'end_date' => $endDate, 'slot' => $slotLabel, 'from' => $slotFrom, 'to' => $slotTo, 'teacher' => trim("$firstName $lastName") ]; } $stmt->close(); // 5. Group sessions by date $byDate = []; foreach ($scheduleRows as $r) { $period = new DatePeriod( new DateTime($r['start_date']), new DateInterval('P1D'), (new DateTime($r['end_date']))->modify('+1 day') ); foreach ($period as $dt) { $current = $dt->format('Y-m-d'); $byDate[$current][] = $r; } } // 6. Combine all possible dates $allDates = array_unique( array_merge( array_keys($byDate), array_keys($holidays), array_keys($retakes) ) ); sort($allDates, SORT_STRING); // 7. Render table echo "<table class='table table-bordered'>"; echo "<thead>"; echo "<tr><td colspan='6' style='background-color:#d9edf7; font-weight:bold;'>Schedule for Group: $groupName</td></tr>"; echo "<tr> <th>Date</th> <th>Time Slot</th> <th>Course</th> <th>Teacher</th> <th>Time</th> <th>Type</th> </tr> </thead><tbody>"; foreach ($allDates as $date) { $dayName = date('l', strtotime($date)); $isHoliday = isset($holidays[$date]); $isRetake = isset($retakes[$date]); // Holiday row if ($isHoliday && !isset($byDate[$date])) { $h = $holidays[$date]; echo "<tr style='background-color:{$h['color']}; font-weight:bold;'> <td>($dayName) $date</td> <td colspan='4'>{$h['title']}</td> <td>Holiday</td> </tr>"; continue; } // Retake row if ($isRetake && !isset($byDate[$date])) { echo "<tr style='background-color:#D9EDF7; font-weight:bold;'> <td>($dayName) $date</td> <td colspan='4'>Retake Session</td> <td>{$retakes[$date]}</td> </tr>"; continue; } // Scheduled sessions foreach ($byDate[$date] as $r) { $isExam = isset($examDates[$r['course_id']]) && $examDates[$r['course_id']] === $date; $type = $isExam ? 'Exam Day' : 'Regular'; $style = $isExam ? "style='background-color:#FFCCCC; font-weight:bold;'" : ""; $timeRange = date("h:i A", strtotime($r['from'])) . " – " . date("h:i A", strtotime($r['to'])); $teacher = $r['teacher'] ?: "-"; echo "<tr $style> <td>($dayName) $date</td> <td>{$r['slot']}</td> <td>{$r['course_name']}</td> <td>" . htmlspecialchars($teacher) . "</td> <td>{$timeRange}</td> <td>{$type}</td> </tr>"; } } echo "</tbody></table>"; } /************* if (isset($_POST['Program_ID'], $_POST['Group_ID'])) { $Program_ID = intval($_POST['Program_ID']); $Group_ID = intval($_POST['Group_ID']); // 1. Group Info $stmtGroup = $mysqli->prepare("SELECT * FROM Manager_Group_Name WHERE Group_ID = ? AND Program_ID = ?"); $stmtGroup->bind_param("ii", $Group_ID, $Program_ID); $stmtGroup->execute(); $groupData = $stmtGroup->get_result()->fetch_assoc(); $stmtGroup->close(); if (!$groupData) die("Group not found."); $groupName = htmlspecialchars($groupData['Group_Name']); $classDays = array_map('trim', explode(',', $groupData['class_days'])); // 2. Assignments $stmt = $mysqli->prepare("SELECT tca.*, tp.First_Name, tp.Last_Name, c.Course_Name, cg.Time_Slot, cg.Start_Time, cg.End_Time FROM Teacher_Course_Assignments tca JOIN Teacher_Profile tp ON tca.Teacher_ID = tp.Teacher_ID JOIN Courses c ON tca.Course_ID = c.Course_ID JOIN Course_Group_Schedule_Main cg ON tca.Schedule_ID = cg.Schedule_ID WHERE tca.Program_ID = ? AND tca.Group_ID = ?"); $stmt->bind_param("ii", $Program_ID, $Group_ID); $stmt->execute(); $assignments = $stmt->get_result()->fetch_all(MYSQLI_ASSOC); $stmt->close(); // 3. Retakes $stmt = $mysqli->prepare(" SELECT rr.Retake_Date, gsm.Time_Slot FROM Retake_Records rr JOIN Group_Slot_Mapping gsm ON rr.Group_ID = gsm.Group_ID WHERE rr.Program_ID = ? AND rr.Group_ID = ? "); //$stmt = $mysqli->prepare("SELECT rr.Retake_Date, tsp.Time_Slot // FROM Retake_Records rr // JOIN Time_Slot_Programs tsp ON rr.Time_Slot_Programs_ID = tsp.Time_Slot_Programs_ID // WHERE rr.Program_ID = ? AND rr.Group_ID = ?"); //$stmt->bind_param("ii", $Program_ID, $Group_ID); //$stmt->execute(); //$retakes = $stmt->get_result()->fetch_all(MYSQLI_ASSOC); //$stmt->close(); // 4. Holidays $holidayMap = []; $res = $mysqli->query("SELECT Event_Title, Event_Start, Event_End, Event_Color FROM Events"); while ($event = $res->fetch_assoc()) { $start = new DateTime($event['Event_Start']); $end = (new DateTime($event['Event_End']))->modify('+1 day'); foreach (new DatePeriod($start, new DateInterval('P1D'), $end) as $dt) { $holidayMap[$dt->format('Y-m-d')] = [ 'title' => $event['Event_Title'], 'color' => $event['Event_Color'] ]; } } // 5. Date Range $dates = array_merge(array_column($assignments, 'Start_Date'), array_column($assignments, 'End_Date')); $start = new DateTime(min($dates)); $end = (new DateTime(max($dates)))->modify('+1 day'); $range = new DatePeriod($start, new DateInterval('P1D'), $end); echo "<h3>Schedule for Group: <strong>{$groupName}</strong></h3>"; echo "<div class='box-body table-responsive no-padding'>"; echo "<table id='example2' class='table table-bordered table-striped'>"; echo "<thead><tr><th>Date</th><th>Course</th><th>Teacher</th><th>Time Slot</th><th>Time</th><th>Type</th></tr></thead><tbody>"; foreach ($range as $date) { $current = $date->format('Y-m-d'); $day = $date->format('l'); // Always display holiday regardless of class day //if (isset($holidayMap[$current])) { // $h = $holidayMap[$current]; // echo "<tr style='background-color:{$h['color']}'><td>$current</td><td>{$h['title']}</td><td>-</td><td>-</td><td>-</td><td>Holiday</td></tr>"; //} if (isset($holidayMap[$current])) { $h = $holidayMap[$current]; echo "<tr style='background-color:{$h['color']}'><td>$current</td><td>{$h['title']}</td><td>-</td><td>-</td><td>-</td><td>Holiday</td></tr>"; continue; // ✅ prevent further rows on this holiday } // Only skip non-class days if not a holiday if (!in_array($day, $classDays) && !isset($holidayMap[$current])) continue; $usedSlots = []; // Holidays (full day event, doesn't skip other events) // Holidays (skip the rest of the loop if it's a holiday) // Holidays (display holiday but still show other events on this day) // Retakes foreach ($retakes as $r) { if ($r['Retake_Date'] === $current) { $slotKey = strtolower(trim($r['Time_Slot'])); if (!in_array($slotKey, $usedSlots)) { $usedSlots[] = $slotKey; echo "<tr style='background-color:lightgray'><td>$current</td><td>Retake</td><td>-</td><td>{$r['Time_Slot']}</td><td>-</td><td>Retake</td></tr>"; } } } // Assignments (handle multiple slots per day) foreach ($assignments as $a) { if ($current >= $a['Start_Date'] && $current <= $a['End_Date']) { $slotKey = strtolower(trim($a['Time_Slot'])); if (in_array($slotKey, $usedSlots)) continue; $usedSlots[] = $slotKey; $type = ($current === $a['End_Date']) ? 'Exam Day' : 'Regular'; $bg = ($type === 'Exam Day') ? "style='background-color:#ffeeba'" : ""; $slot = format_time_slot_label($a['Time_Slot'], $day); $time = format_time_slot_range($a['Time_Slot'], $a['Start_Time'], $a['End_Time'], $day); $teacher = htmlspecialchars("{$a['First_Name']} {$a['Last_Name']}"); echo "<tr $bg><td>$current</td><td>{$a['Course_Name']}</td><td>{$teacher}</td><td>{$slot}</td><td>{$time}</td><td>{$type}</td></tr>"; } } } echo "</tbody></table></div>"; } ************/ /* if (isset($_POST['Program_ID'], $_POST['Group_ID'])) { $Program_ID = intval($_POST['Program_ID']); $Group_ID = intval($_POST['Group_ID']); // Get Group Name $stmt = $mysqli->prepare("SELECT Group_Name, class_days FROM Manager_Group_Name WHERE Program_ID = ? AND Group_ID = ?"); $stmt->bind_param("ii", $Program_ID, $Group_ID); $stmt->execute(); $groupData = $stmt->get_result()->fetch_assoc(); $stmt->close(); $groupName = $groupData['Group_Name'] ?? 'Unknown Group'; $groupClassDays = explode(',', trim($groupData['class_days'])); // Assignments $stmt = $mysqli->prepare("SELECT tca.*, tp.First_Name, tp.Last_Name, c.Course_Name, cg.Time_Slot, cg.Start_Time, cg.End_Time FROM Teacher_Course_Assignments tca JOIN Teacher_Profile tp ON tp.Teacher_ID = tca.Teacher_ID JOIN Courses c ON c.Course_ID = tca.Course_ID JOIN Course_Group_Schedule cg ON cg.Schedule_ID = tca.Schedule_ID WHERE tca.Program_ID = ? AND tca.Group_ID = ?"); $stmt->bind_param("ii", $Program_ID, $Group_ID); $stmt->execute(); $assignments = $stmt->get_result()->fetch_all(MYSQLI_ASSOC); $stmt->close(); // Retakes $stmt = $mysqli->prepare("SELECT rr.Retake_Date, tsp.Time_Slot FROM Retake_Records rr JOIN Time_Slot_Programs tsp ON rr.Time_Slot_Programs_ID = tsp.Time_Slot_Programs_ID WHERE rr.Program_ID = ? AND rr.Group_ID = ?"); $stmt->bind_param("ii", $Program_ID, $Group_ID); $stmt->execute(); $retakes = $stmt->get_result()->fetch_all(MYSQLI_ASSOC); $stmt->close(); // Holidays $holidayMap = []; $res = $mysqli->query("SELECT Event_Title, Event_Start, Event_End, Event_Color FROM Events"); while ($event = $res->fetch_assoc()) { $start = new DateTime($event['Event_Start']); $end = (new DateTime($event['Event_End']))->modify('+1 day'); foreach (new DatePeriod($start, new DateInterval('P1D'), $end) as $dt) { $holidayMap[$dt->format('Y-m-d')] = [ 'title' => $event['Event_Title'], 'color' => $event['Event_Color'] ]; } } // Date range $dates = array_merge(array_column($assignments, 'Start_Date'), array_column($assignments, 'End_Date')); $start = new DateTime(min($dates)); $end = (new DateTime(max($dates)))->modify('+1 day'); $range = new DatePeriod($start, new DateInterval('P1D'), $end); echo "<div class='box-body table-responsive no-padding'>"; echo "<table id='example2' class='table table-bordered table-striped'>"; echo "<thead><tr><td colspan='6' style='background-color:#d9edf7; font-weight:bold;'>Schedule for Group: $groupName</td></tr>"; echo "<tr><th>Date</th><th>Course</th><th>Teacher</th><th>Time Slot</th><th>Time</th><th>Type</th></tr></thead><tbody>"; foreach ($range as $date) { $current = $date->format('Y-m-d'); $day = $date->format('l'); $shownSlots = []; if (isset($holidayMap[$current])) { $h = $holidayMap[$current]; echo "<tr style='background-color:{$h['color']}'><td>$current</td><td>{$h['title']}</td><td>-</td><td>-</td><td>-</td><td>Holiday</td></tr>"; continue; } foreach ($retakes as $r) { if ($r['Retake_Date'] === $current) { $slot = format_time_slot_label($r['Time_Slot'], $day); echo "<tr style='background-color:lightgray'><td>$current</td><td>Retake</td><td>-</td><td>$slot</td><td>-</td><td>Retake</td></tr>"; $shownSlots[] = strtolower(trim($r['Time_Slot'])); } } foreach ($assignments as $a) { if ($current >= $a['Start_Date'] && $current <= $a['End_Date']) { $slotKey = strtolower(trim($a['Time_Slot'])); if (in_array($slotKey, $shownSlots)) continue; $type = ($current === $a['End_Date']) ? 'Exam Day' : 'Regular'; $bg = ($type === 'Exam Day') ? "style='background-color:#ffeeba'" : ""; $slotLabel = format_time_slot_label($a['Time_Slot'], $day); $time = format_time_slot_range($a['Time_Slot'], $a['Start_Time'], $a['End_Time'], $day); $teacher = $a['First_Name'] . ' ' . $a['Last_Name']; echo "<tr $bg><td>$current</td><td>{$a['Course_Name']}</td><td>$teacher</td><td>$slotLabel</td><td>$time</td><td>$type</td></tr>"; } } } echo "</tbody></table></div>"; } */ /* if (isset($_POST['Program_ID'], $_POST['Group_ID'])) { include_once '../includes/db_connect.php'; $Program_ID = intval($_POST['Program_ID']); $Group_ID = intval($_POST['Group_ID']); // 1. Group Details $stmtGroup = $mysqli->prepare("SELECT * FROM Manager_Group_Name WHERE Group_ID = ? AND Program_ID = ?"); $stmtGroup->bind_param("ii", $Group_ID, $Program_ID); $stmtGroup->execute(); $groupData = $stmtGroup->get_result()->fetch_assoc(); $stmtGroup->close(); if (!$groupData) die("Group not found."); $groupName = $groupData['Group_Name']; $classDays = array_map('trim', explode(',', $groupData['class_days'])); // 2. Assignments $stmt = $mysqli->prepare("SELECT tca.*, tp.First_Name, tp.Last_Name, c.Course_Name, cg.Time_Slot, cg.Start_Time, cg.End_Time FROM Teacher_Course_Assignments tca JOIN Teacher_Profile tp ON tca.Teacher_ID = tp.Teacher_ID JOIN Courses c ON tca.Course_ID = c.Course_ID JOIN Course_Group_Schedule cg ON tca.Schedule_ID = cg.Schedule_ID WHERE tca.Program_ID = ? AND tca.Group_ID = ?"); $stmt->bind_param("ii", $Program_ID, $Group_ID); $stmt->execute(); $assignments = $stmt->get_result()->fetch_all(MYSQLI_ASSOC); $stmt->close(); // 3. Replacements $stmt = $mysqli->prepare("SELECT tra.*, tp.First_Name, tp.Last_Name, c.Course_Name, cg.Time_Slot, cg.Start_Time, cg.End_Time FROM Teacher_Replacement_Assignments tra JOIN Teacher_Profile tp ON tra.Replacing_Teacher_ID = tp.Teacher_ID JOIN Course_Group_Schedule cg ON tra.Schedule_ID = cg.Schedule_ID JOIN Courses c ON cg.Course_ID = c.Course_ID WHERE cg.Group_ID = ? AND cg.Program_ID = ?"); $stmt->bind_param("ii", $Group_ID, $Program_ID); $stmt->execute(); $replacements = $stmt->get_result()->fetch_all(MYSQLI_ASSOC); $stmt->close(); // 4. Retakes $stmt = $mysqli->prepare("SELECT rr.Retake_Date, tsp.Time_Slot FROM Retake_Records rr JOIN Time_Slot_Programs tsp ON rr.Time_Slot_Programs_ID = tsp.Time_Slot_Programs_ID WHERE rr.Program_ID = ? AND rr.Group_ID = ?"); $stmt->bind_param("ii", $Program_ID, $Group_ID); $stmt->execute(); $retakes = $stmt->get_result()->fetch_all(MYSQLI_ASSOC); $stmt->close(); // 5. Holidays $holidayMap = []; $res = $mysqli->query("SELECT Event_Title, Event_Start, Event_End, Event_Color FROM Events"); while ($event = $res->fetch_assoc()) { $start = new DateTime($event['Event_Start']); $end = (new DateTime($event['Event_End']))->modify('+1 day'); foreach (new DatePeriod($start, new DateInterval('P1D'), $end) as $dt) { $holidayMap[$dt->format('Y-m-d')] = [ 'title' => $event['Event_Title'], 'color' => $event['Event_Color'] ]; } } // 6. Dates range $dates = array_merge( array_column($assignments, 'Start_Date'), array_column($assignments, 'End_Date'), array_column($replacements, 'Replacement_From'), array_column($replacements, 'Replacement_To') ); $start = new DateTime(min($dates)); $end = (new DateTime(max($dates)))->modify('+1 day'); $range = new DatePeriod($start, new DateInterval('P1D'), $end); echo "<h3>Schedule for Group: <strong>" . htmlspecialchars($groupName) . "</strong></h3>"; echo "<div class='box-body table-responsive no-padding'>"; echo "<table id='example2' class='table table-bordered table-striped'>"; echo "<thead><tr><th>Date</th><th>Course</th><th>Teacher</th><th>Time Slot</th><th>Time</th><th>Type</th></tr></thead><tbody>"; foreach ($range as $date) { $current = $date->format('Y-m-d'); $day = $date->format('l'); if (isset($holidayMap[$current])) { echo "<tr style='background-color:{$holidayMap[$current]['color']}'><td>$current</td><td>{$holidayMap[$current]['title']}</td><td>-</td><td>-</td><td>-</td><td>Holiday</td></tr>"; continue; } $usedSlots = []; foreach ($retakes as $r) { if ($r['Retake_Date'] == $current) { $slot = format_time_slot_label($r['Time_Slot'], $day); echo "<tr style='background-color:lightgray'><td>$current</td><td>Retake</td><td>-</td><td>$slot</td><td>-</td><td>Retake</td></tr>"; $usedSlots[] = strtolower(trim($r['Time_Slot'])); } } foreach ($replacements as $r) { if ($current >= $r['Replacement_From'] && $current <= $r['Replacement_To']) { $slotKey = strtolower(trim($r['Time_Slot'])); if (in_array($slotKey, $usedSlots)) continue; $usedSlots[] = $slotKey; $time = format_time_slot_range($r['Time_Slot'], $r['Start_Time'], $r['End_Time'], $day); $slot = format_time_slot_label($r['Time_Slot'], $day); $teacher = htmlspecialchars("{$r['First_Name']} {$r['Last_Name']}"); echo "<tr style='background-color:#d1e7dd'><td>$current</td><td>{$r['Course_Name']}</td><td>$teacher</td><td>$slot</td><td>$time</td><td>Replacement</td></tr>"; } } foreach ($assignments as $a) { if ($current >= $a['Start_Date'] && $current <= $a['End_Date']) { $slotKey = strtolower(trim($a['Time_Slot'])); if (in_array($slotKey, $usedSlots)) continue; $usedSlots[] = $slotKey; $type = ($current == $a['End_Date']) ? 'Exam Day' : 'Regular'; $bg = ($type === 'Exam Day') ? "style='background-color:#ffeeba'" : ""; $time = format_time_slot_range($a['Time_Slot'], $a['Schedule_Start_Time'], $a['Schedule_End_Time'], $day); $slot = format_time_slot_label($a['Time_Slot'], $day); $teacher = htmlspecialchars("{$a['First_Name']} {$a['Last_Name']}"); echo "<tr $bg><td>$current</td><td>{$a['Course_Name']}</td><td>$teacher</td><td>$slot</td><td>$time</td><td>$type</td></tr>"; } } } echo "</tbody></table></div>"; } */ ?> </div> </div> </div> </div> </section> </div> </div> <!-- Modal --> <div class="modal fade alert" id="squarespaceModal" tabindex="-1" role="dialog" aria-labelledby="modalLabel" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"> <span aria-hidden="true">x</span> <span class="sr-only"><?php echo LANG_VALUE_266; ?></span> </button> <h3 class="modal-title" id="lineModalLabel"><?php echo LANG_VALUE_265; ?></h3> </div> <div class="modal-body"> <form class="sidebar" method="post" name="registration_form" onsubmit="return validateForm()" action="<?php echo esc_url($_SERVER['REQUEST_URI']); ?>"> <?php $csrf->echoInputField(); ?> <div class="form-group"> <label for="Name"><?php echo LANG_VALUE_264; ?></label> <input type="hidden" class="form-control" id="g_id" name="g_id" required readonly> <input type="text" class="form-control" id="Group_Names" name="Group_Names" placeholder="<?php echo LANG_VALUE_264; ?>" required> </div> <div class="form-group"> <input type="submit" name="submits" value="<?php echo LANG_VALUE_5; ?>" class="btn btn-primary center-block"> </div> </form> </div> </div> </div> </div> <!-- jQuery 2.2.0 --> <script src="../plugins/jQuery/jQuery-2.2.0.min.js"></script> <!-- Bootstrap --> <script src="../bower_components/bootstrap/dist/js/bootstrap.min.js"></script> <!-- Select2 --> <script src="../plugins/select2/select2.full.min.js"></script> <!-- InputMask --> <script src="../plugins/input-mask/jquery.inputmask.js"></script> <script src="../plugins/input-mask/jquery.inputmask.date.extensions.js"></script> <script src="../plugins/input-mask/jquery.inputmask.extensions.js"></script> <!-- daterangepicker --> <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.11.2/moment.min.js"></script> <script src="../plugins/daterangepicker/daterangepicker.js"></script> <!-- bootstrap datepicker --> <script src="../plugins/datepicker/bootstrap-datepicker.js"></script> <!-- bootstrap color picker --> <script src="../plugins/colorpicker/bootstrap-colorpicker.min.js"></script> <!-- bootstrap time picker --> <script src="../plugins/timepicker/bootstrap-timepicker.min.js"></script> <!-- SlimScroll --> <script src="../plugins/slimScroll/jquery.slimscroll.min.js"></script> <!-- iCheck --> <script src="../plugins/iCheck/icheck.min.js"></script> <!-- FastClick --> <script src="../plugins/fastclick/fastclick.js"></script> <!-- AdminLTE App --> <script src="../dist/js/app.min.js"></script> <!-- AdminLTE for demo purposes --> <script src="../dist/js/demo.js"></script> <!-- DataTables --> <script src="../plugins/datatables/jquery.dataTables.min.js"></script> <script src="../plugins/datatables/dataTables.bootstrap.min.js"></script> <script src="https://cdn.datatables.net/buttons/1.2.4/js/dataTables.buttons.min.js"></script> <script src="https://cdn.datatables.net/buttons/1.2.4/js/buttons.flash.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/2.5.0/jszip.min.js"></script> <script src="https://cdn.rawgit.com/bpampuch/pdfmake/0.1.18/build/pdfmake.min.js"></script> <script src="https://cdn.rawgit.com/bpampuch/pdfmake/0.1.18/build/vfs_fonts.js"></script> <script src="https://cdn.datatables.net/buttons/1.2.4/js/buttons.html5.min.js"></script> <script src="https://cdn.datatables.net/buttons/1.2.4/js/buttons.print.min.js"></script> <script> function validateForm() { var programID = document.getElementById("Program_ID").value; var groupID = document.getElementById("Group_ID").value; var teacherID = document.getElementById("Teacher_ID").value; if (programID === "" || groupID === "" || teacherID === "") { alert("Please select Program, Group and Teacher."); return false; } return true; } </script> <script> function toggleFields(checkbox) { let row = checkbox.closest('tr'); let inputs = row.querySelectorAll('.course-input'); let reserveCheckbox = row.querySelector('input[name^="Reserve_Course"]'); if (checkbox.checked) { inputs.forEach(input => input.removeAttribute('disabled')); reserveCheckbox.removeAttribute('disabled'); } else { inputs.forEach(input => input.setAttribute('disabled', 'true')); reserveCheckbox.checked = false; reserveCheckbox.setAttribute('disabled', 'true'); } countSelected(); } function countSelected() { let selectedCount = document.querySelectorAll('.activate-row:checked').length; console.log("Total Selected Courses: " + selectedCount); } </script> <script> $(document).ready(function() { $('#example3').DataTable({ dom: 'Bfrtip', buttons: ['copy', 'csv', 'excel', 'pdf', 'print'] }); }); </script> <script> $(document).ready(function() { $('#example2').DataTable({ "iDisplayLength": 100, dom: 'Bfrtip', buttons: ['copy', 'csv', 'excel', 'pdf', 'print'] }); }); </script> <script> $(function () { $('#example1').dataTable({"iDisplayLength": 50}); $("#example2").DataTable(); $('#example3').DataTable({ "paging": true, "lengthChange": false, "searching": false, "ordering": true, "info": true, "autoWidth": false }); }); </script> <script> $(function () { $(".select2").select2(); $("#datemask").inputmask("dd/mm/yyyy", {"placeholder": "dd/mm/yyyy"}); $("#datemask2").inputmask("mm/dd/yyyy", {"placeholder": "mm/dd/yyyy"}); $("[data-mask]").inputmask(); $('#reservation').daterangepicker(); $('#reservationtime').daterangepicker({timePicker: true, timePickerIncrement: 30, format: 'MM/DD/YYYY h:mm A'}); $('#daterange-btn').daterangepicker({ ranges: { 'Today': [moment(), moment()], 'Yesterday': [moment().subtract(1, 'days'), moment().subtract(1, 'days')], 'Last 7 Days': [moment().subtract(6, 'days'), moment()], 'Last 30 Days': [moment().subtract(29, 'days'), moment()], 'This Month': [moment().startOf('month'), moment().endOf('month')], 'Last Month': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')] }, startDate: moment().subtract(29, 'days'), endDate: moment() }, function (start, end) { $('#daterange-btn span').html(start.format('MMMM D, YYYY') + ' - ' + end.format('MMMM D, YYYY')); }); $('#datepicker').datepicker({ autoclose: true }); $('input[type="checkbox"].minimal, input[type="radio"].minimal').iCheck({ checkboxClass: 'icheckbox_minimal-blue', radioClass: 'iradio_minimal-blue' }); $('input[type="checkbox"].minimal-red, input[type="radio"].minimal-red').iCheck({ checkboxClass: 'icheckbox_minimal-red', radioClass: 'iradio_minimal-red' }); $('input[type="checkbox"].flat-red, input[type="radio"].flat-red').iCheck({ checkboxClass: 'icheckbox_flat-green', radioClass: 'iradio_flat-green' }); $(".my-colorpicker1").colorpicker(); $(".my-colorpicker2").colorpicker(); $(".timepicker").timepicker({ showInputs: false }); }); </script> <?php else : ?> <?php include '../authorized.php'; ?> <?php endif; ?> </body> </html>
Save
cmd:
run