-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
executable file
·126 lines (119 loc) · 6.23 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
<?php
session_start();
if (!isset($_SESSION['user'])) {
header('Location: login.php');
exit;
}
if (isset($_GET['logout'])) {
session_destroy();
header('Location: login.php');
exit;
}
?>
<!DOCTYPE html>
<html>
<head>
<title>Kalendar Kegiatan</title>
<script src='script.js'></script>
<link rel="stylesheet" href="lib/bootstrap.min.css">
<script src="lib/fullcalendar.min.js"></script>
<script src="lib/jquery.min.js"></script>
<script src="lib/bootstrap.bundle.min.js"></script>
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<div class="container-fluid">
<a class="navbar-brand" href="#">Kalendar Kegiatan</a>
<div class="d-flex justify-content-end">
<a href="?logout=true" class="btn btn-danger">Logout</a>
</div>
</div>
</nav>
<div class="container mt-4">
<div class="row">
<div class="col-lg-8">
<div class="d-flex justify-content-between align-items-center mb-2">
<select id="monthSelect" class="form-control" style="width: auto;"></select>
</div>
<div id="calendar"></div>
</div>
<div class="col-lg-4" style="top: 40px">
<div class="alert alert-warning" role="alert">
<h4>Daftar Kegiatan</h4>
</div>
<h5>Kegiatan Mendatang</h5>
<ul class="list-group" id="upcomingEventList"></ul>
<h5>Kegiatan Dalam 2 Minggu</h5>
<ul class="list-group" id="twoWeeksFromNowEventList" style="margin-bottom: 16px"></ul>
</div>
</div>
</div>
<div class="modal fade" id="eventModal" tabindex="-1" role="dialog" aria-labelledby="eventModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="eventModalLabel">Buat/Perbarui Kegiatan</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Tutup">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<form action="event_action.php" method="POST" id="eventForm">
<input type="hidden" name="eventId" id="eventId">
<input type="hidden" name="action" id="action">
<div class="form-group">
<label for="kegiatan">Nama Kegiatan</label>
<input type="text" name="kegiatan" class="form-control" id="kegiatan" rows="2" placeholder="Nama Kegiatan" required>
</div>
<p>Penanggung Jawab</p>
<div class="form-group row">
<div class="col-sm-6">
<select id="divisi_pj" name="divisi_pj" class="form-control"></select>
</div>
<div class="col-sm-6">
<input type="text" id="penganggung_jawab" name="penganggung_jawab" class="form-control" placeholder="Nama">
</div>
</div>
<div class="form-group">
<label for="lokasi">Lokasi</label>
<div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" name="lokasi_type" id="lokasi_type_sekolah" value="sekolah" checked>
<label class="form-check-label" for="lokasi_type_sekolah">Di Sekolah</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" name="lokasi_type" id="lokasi_type_luar" value="luar">
<label class="form-check-label" for="lokasi_type_luar">Di Luar</label>
</div>
<div id="lokasi_sekolah" style="display: block;">
<select id="lokasiSelect" name="lokasi" class="form-control" required></select>
</div>
<div id="lokasi_luar" style="display: none;">
<input type="text" class="form-control" id="lokasi" list="lokasiList" placeholder="Lokasi">
<datalist id="lokasiList"></datalist>
</div>
<input type="hidden" name="lokasi" id="hiddenLokasi">
</div>
<div class="form-group">
<label for="peserta">Peserta</label>
<textarea name="peserta" class="form-control" id="peserta" rows="2" placeholder="Peserta"></textarea>
</div>
<div class="form-group">
<label for="mulai">Tanggal Mulai</label>
<input type="datetime-local" class="form-control" name="mulai" id="mulai" required>
</div>
<div class="form-group">
<label for="selesai">Tanggal Berakhir</label>
<input type="datetime-local" class="form-control" name="selesai" id="selesai" required>
</div>
<div class="form-group">
<button type="submit" class="btn btn-success">Simpan</button>
<button type="button" class="btn btn-danger" id="deleteButton" style="display:none;">Hapus</button>
</div>
</form>
</div>
</div>
</div>
</div>
</body>
</html>