diff --git a/Contoh RPP TI Semester-3 - Aplikasi Peminjaman Alat.pdf b/Contoh RPP TI Semester-3 - Aplikasi Peminjaman Alat.pdf new file mode 100644 index 0000000..73352b9 Binary files /dev/null and b/Contoh RPP TI Semester-3 - Aplikasi Peminjaman Alat.pdf differ diff --git a/README.md b/README.md index 4d359b5..b78d95d 100644 --- a/README.md +++ b/README.md @@ -1 +1 @@ -# ProjectWebTatibSystema \ No newline at end of file +# ProjectWebTatibSystema oish masa \ No newline at end of file diff --git a/Tata_Tertib/action/AdminFunc.php b/Tata_Tertib/action/AdminFunc.php new file mode 100644 index 0000000..8989698 --- /dev/null +++ b/Tata_Tertib/action/AdminFunc.php @@ -0,0 +1,56 @@ + filterClassmhs('TI-1A'); + return $ter; + break; + case 'TI-1B': + include '../../models/Admin.php'; + $conn = new Admin(); + $ter = $conn -> filterClassmhs('TI-1B'); + return $ter; + break; + case 'TI-1C': + include '../../models/Admin.php'; + $conn = new Admin(); + $ter = $conn -> filterClassmhs('TI-1C'); + return $ter; + break; + case 'SIB-1A': + include '../../models/Admin.php'; + $conn = new Admin(); + $ter = $conn -> filterClassmhs('SIB-1A'); + return $ter; + break; + case 'SIB-1B': + include '../../models/Admin.php'; + $conn = new Admin(); + $ter = $conn -> filterClassmhs('SIB-1B'); + return $ter; + break; + case 'SIB-1C': + include '../../models/Admin.php'; + $conn = new Admin(); + $ter = $conn -> filterClassmhs('SIB-1C'); + return $ter; + break; + } + } + } +} +?> \ No newline at end of file diff --git a/Tata_Tertib/action/MhsCrud/MhsCrud.php b/Tata_Tertib/action/MhsCrud/MhsCrud.php new file mode 100644 index 0000000..93e65aa --- /dev/null +++ b/Tata_Tertib/action/MhsCrud/MhsCrud.php @@ -0,0 +1,35 @@ +db; + +$act = isset($_POST['act']) ? strtolower($_POST['act']) : (isset($_GET['act']) ? strtolower($_GET['act']) : ''); + +switch ($act) { + case 'login-mhs': + $username = $_POST['username']; + $password = $_POST['password']; + + $query = $db->prepare('SELECT * FROM mahasiswa WHERE nim = ?'); + $query->bind_param('s', $username); + $query->execute(); + $data = $query->get_result()->fetch_assoc(); + + if ($data && $password === $data['password']) { + $session->set('is_login', true); + $session->set('username', $data['nim']); + $session->set('level', $data['role']); + $session->set('nama', $data['nama']); + $session->set('status', $data['status']); + $session->commit(); + header('Location: ../index.php'); + } else { + $session->setFlash('status', false); + $session->setFlash('message', 'Username dan password salah.'); + $session->commit(); + header('Location: ../index.php'); + } + break; + + case 'login-tendik': + $username = $_POST['username']; + $password = $_POST['password']; + $tables = ['admin', 'dosen', 'karyawan']; + + $data = null; + foreach ($tables as $table) { + $query = $db->prepare("SELECT * FROM $table WHERE nip = ?"); + $query->bind_param('s', $username); + $query->execute(); + $result = $query->get_result(); + if ($result->num_rows > 0) { + $data = $result->fetch_assoc(); + break; + } + } + + if ($data && $password === $data['password']) { + $session->set('is_login', true); + $session->set('username', $data['nip']); + $session->set('level', $data['role']); + $session->set('nama', $data['nama']); + $session->set('status', $data['status']); + $session->commit(); + header('Location: ../index.php'); + } else { + $session->setFlash('status', false); + $session->setFlash('message', 'Username dan password salah.'); + $session->commit(); + header('Location: ../index.php'); + } + break; + + case 'logout': + $session->deleteAll(); + header('Location: ../index.php'); + break; + + default: + echo 'Aksi tidak dikenali.'; + break; +} diff --git a/Tata_Tertib/action/dosen/beri-sanksi-action.php b/Tata_Tertib/action/dosen/beri-sanksi-action.php new file mode 100644 index 0000000..7afc555 --- /dev/null +++ b/Tata_Tertib/action/dosen/beri-sanksi-action.php @@ -0,0 +1,10 @@ +setSanksiDosenById($id, $sanksi); +header("Location: ../../index.php"); +exit(); \ No newline at end of file diff --git a/Tata_Tertib/action/dosen/download-pel-table.php b/Tata_Tertib/action/dosen/download-pel-table.php new file mode 100644 index 0000000..163084a --- /dev/null +++ b/Tata_Tertib/action/dosen/download-pel-table.php @@ -0,0 +1,40 @@ +getHistoryPelDosen(); + +// Membuka output file untuk di-stream +$output = fopen('php://output', 'w'); + +// Header kolom CSV +fputcsv($output, ['No', 'Nama', 'NIP', 'Status', 'Tanggal/Waktu', 'Pelanggaran', 'deskripsi']); + +// Isi data tabel ke file CSV +foreach ($data as $index => $row) { + fputcsv($output, [ + $index + 1, + $row['nama'], + $row['nip'], + getStatus($row['status']), + $row['tanggal_lapor'], + $row['nama_pelanggaran'], + $row['deskripsi'] + ]); +} + +fclose($output); + +function getStatus($id_status) +{ + switch ($id_status) { + case '1': return 'Selesai'; + case '2': return 'Sanksi Telah Dipenuhi'; + case '3': return 'Menunggu Sanksi'; + case '4': return 'Menunggu Konfirmasi'; + default: return 'Tidak Diketahui'; + } +} +?> \ No newline at end of file diff --git a/Tata_Tertib/action/dosen/hapus-laporan-action.php b/Tata_Tertib/action/dosen/hapus-laporan-action.php new file mode 100644 index 0000000..688b3f1 --- /dev/null +++ b/Tata_Tertib/action/dosen/hapus-laporan-action.php @@ -0,0 +1,9 @@ +dropPelDosen($id); +header("Location: ../../index.php"); +exit(); \ No newline at end of file diff --git a/Tata_Tertib/action/dosen/selesai-action.php b/Tata_Tertib/action/dosen/selesai-action.php new file mode 100644 index 0000000..d61b06a --- /dev/null +++ b/Tata_Tertib/action/dosen/selesai-action.php @@ -0,0 +1,9 @@ +setSelesaiDosenById($id); +header("Location: ../../index.php"); +exit(); \ No newline at end of file diff --git a/Tata_Tertib/action/dosen/show-bukti-selesai.php b/Tata_Tertib/action/dosen/show-bukti-selesai.php new file mode 100644 index 0000000..13e8a16 --- /dev/null +++ b/Tata_Tertib/action/dosen/show-bukti-selesai.php @@ -0,0 +1,16 @@ +getLampiranById($id); +$fileContent = $data['bukti_selesai']; + +if ($fileContent) { + // Atur header HTTP untuk PDF + header("Content-Type: application/pdf"); + echo $fileContent; // Kirim isi file langsung ke browser +} else { + echo "File tidak ditemukan."; +} +?> \ No newline at end of file diff --git a/Tata_Tertib/action/dosen/show-lampiran.php b/Tata_Tertib/action/dosen/show-lampiran.php new file mode 100644 index 0000000..eb43a5d --- /dev/null +++ b/Tata_Tertib/action/dosen/show-lampiran.php @@ -0,0 +1,16 @@ +getLampiranById($id); +$fileContent = $data['lampiran']; + +if ($fileContent) { + // Atur header HTTP untuk PDF + header("Content-Type: application/pdf"); + echo $fileContent; // Kirim isi file langsung ke browser +} else { + echo "File tidak ditemukan."; +} +?> \ No newline at end of file diff --git a/Tata_Tertib/action/dosen/upload-bukti-selesai.php b/Tata_Tertib/action/dosen/upload-bukti-selesai.php new file mode 100644 index 0000000..6224565 --- /dev/null +++ b/Tata_Tertib/action/dosen/upload-bukti-selesai.php @@ -0,0 +1,23 @@ +setBuktiSelesaiById($id, $fileContent); + + echo "File berhasil diunggah."; +} else { + echo "Gagal mengunggah file."; +} + +// Redirect kembali ke halaman sebelumnya +header("Location: ../../views/dashboard/dosen-kirim-bukti.php?id_pelanggaran=$id"); \ No newline at end of file diff --git a/Tata_Tertib/action/karyawan/beri-sanksi-action.php b/Tata_Tertib/action/karyawan/beri-sanksi-action.php new file mode 100644 index 0000000..16b0dfd --- /dev/null +++ b/Tata_Tertib/action/karyawan/beri-sanksi-action.php @@ -0,0 +1,10 @@ +setSanksiKaryawanById($id, $sanksi); +header("Location: ../../index.php"); +exit(); \ No newline at end of file diff --git a/Tata_Tertib/action/karyawan/download-pel-table.php b/Tata_Tertib/action/karyawan/download-pel-table.php new file mode 100644 index 0000000..9727f75 --- /dev/null +++ b/Tata_Tertib/action/karyawan/download-pel-table.php @@ -0,0 +1,40 @@ +getHistoryPelKaryawan(); + +// Membuka output file untuk di-stream +$output = fopen('php://output', 'w'); + +// Header kolom CSV +fputcsv($output, ['No', 'Nama', 'NIP', 'Status', 'Tanggal/Waktu', 'Pelanggaran', 'deskripsi']); + +// Isi data tabel ke file CSV +foreach ($data as $index => $row) { + fputcsv($output, [ + $index + 1, + $row['nama'], + $row['nip'], + getStatus($row['status']), + $row['tanggal_lapor'], + $row['nama_pelanggaran'], + $row['deskripsi'] + ]); +} + +fclose($output); + +function getStatus($id_status) +{ + switch ($id_status) { + case '1': return 'Selesai'; + case '2': return 'Sanksi Telah Dipenuhi'; + case '3': return 'Menunggu Sanksi'; + case '4': return 'Menunggu Konfirmasi'; + default: return 'Tidak Diketahui'; + } +} +?> \ No newline at end of file diff --git a/Tata_Tertib/action/karyawan/hapus-laporan-action.php b/Tata_Tertib/action/karyawan/hapus-laporan-action.php new file mode 100644 index 0000000..ef8c888 --- /dev/null +++ b/Tata_Tertib/action/karyawan/hapus-laporan-action.php @@ -0,0 +1,9 @@ +dropPelTendik($id); +header("Location: ../../index.php"); +exit(); \ No newline at end of file diff --git a/Tata_Tertib/action/karyawan/selesai-action.php b/Tata_Tertib/action/karyawan/selesai-action.php new file mode 100644 index 0000000..1305e71 --- /dev/null +++ b/Tata_Tertib/action/karyawan/selesai-action.php @@ -0,0 +1,9 @@ +setSelesaiKaryawanById($id); +header("Location: ../../index.php"); +exit(); \ No newline at end of file diff --git a/Tata_Tertib/action/karyawan/show-bukti-selesai.php b/Tata_Tertib/action/karyawan/show-bukti-selesai.php new file mode 100644 index 0000000..b36a6f4 --- /dev/null +++ b/Tata_Tertib/action/karyawan/show-bukti-selesai.php @@ -0,0 +1,16 @@ +getLampiranById($id); +$fileContent = $data['bukti_selesai']; + +if ($fileContent) { + // Atur header HTTP untuk PDF + header("Content-Type: application/pdf"); + echo $fileContent; // Kirim isi file langsung ke browser +} else { + echo "File tidak ditemukan."; +} +?> \ No newline at end of file diff --git a/Tata_Tertib/action/karyawan/show-lampiran.php b/Tata_Tertib/action/karyawan/show-lampiran.php new file mode 100644 index 0000000..d90d481 --- /dev/null +++ b/Tata_Tertib/action/karyawan/show-lampiran.php @@ -0,0 +1,16 @@ +getLampiranById($id); +$fileContent = $data['lampiran']; + +if ($fileContent) { + // Atur header HTTP untuk PDF + header("Content-Type: application/pdf"); + echo $fileContent; // Kirim isi file langsung ke browser +} else { + echo "File tidak ditemukan."; +} +?> \ No newline at end of file diff --git a/Tata_Tertib/action/karyawan/upload-bukti-selesai.php b/Tata_Tertib/action/karyawan/upload-bukti-selesai.php new file mode 100644 index 0000000..2d217da --- /dev/null +++ b/Tata_Tertib/action/karyawan/upload-bukti-selesai.php @@ -0,0 +1,23 @@ +setBuktiSelesaiById($id, $fileContent); + + echo "File berhasil diunggah."; +} else { + echo "Gagal mengunggah file."; +} + +// Redirect kembali ke halaman sebelumnya +header("Location: ../../views/dashboard/karyawan-kirim-bukti.php?id_pelanggaran=$id"); diff --git a/Tata_Tertib/action/mhs/detpel-action.php b/Tata_Tertib/action/mhs/detpel-action.php new file mode 100644 index 0000000..b6a73db --- /dev/null +++ b/Tata_Tertib/action/mhs/detpel-action.php @@ -0,0 +1,10 @@ +setSanksiById($id, $sanksi, $tambahan); +header("Location: ../../index.php"); +?> \ No newline at end of file diff --git a/Tata_Tertib/action/mhs/download-pel-table.php b/Tata_Tertib/action/mhs/download-pel-table.php new file mode 100644 index 0000000..e99fefb --- /dev/null +++ b/Tata_Tertib/action/mhs/download-pel-table.php @@ -0,0 +1,42 @@ +getHistoryPelMhs(); + +// Membuka output file untuk di-stream +$output = fopen('php://output', 'w'); + +// Header kolom CSV +fputcsv($output, ['No', 'Nama', 'NIM', 'Kelas', 'Status', 'Tanggal/Waktu', 'Pelanggaran', 'Kategori', 'deskripsi']); + +// Isi data tabel ke file CSV +foreach ($data as $index => $row) { + fputcsv($output, [ + $index + 1, + $row['nama_mahasiswa'], + $row['nim'], + $row['nama_kelas'], + getStatus($row['status_pelanggaran']), + $row['tanggal_lapor'], + $row['nama_pelanggaran'], + $row['kategori'], + $row['deskripsi_pelanggaran'] + ]); +} + +fclose($output); + +function getStatus($id_status) +{ + switch ($id_status) { + case '1': return 'Selesai'; + case '2': return 'Sanksi Telah Dipenuhi'; + case '3': return 'Menunggu Sanksi'; + case '4': return 'Menunggu Konfirmasi'; + default: return 'Tidak Diketahui'; + } +} +?> \ No newline at end of file diff --git a/Tata_Tertib/action/mhs/hapus-laporan-action.php b/Tata_Tertib/action/mhs/hapus-laporan-action.php new file mode 100644 index 0000000..2aa2687 --- /dev/null +++ b/Tata_Tertib/action/mhs/hapus-laporan-action.php @@ -0,0 +1,9 @@ +dropPelMhs($id); +header("Location: ../../index.php"); +exit(); \ No newline at end of file diff --git a/Tata_Tertib/action/mhs/selesai-action.php b/Tata_Tertib/action/mhs/selesai-action.php new file mode 100644 index 0000000..d3b8cee --- /dev/null +++ b/Tata_Tertib/action/mhs/selesai-action.php @@ -0,0 +1,9 @@ +setSelesaiMhsById($id); +header("Location: ../../index.php"); +exit(); \ No newline at end of file diff --git a/Tata_Tertib/action/mhs/show-bukti-selesai.php b/Tata_Tertib/action/mhs/show-bukti-selesai.php new file mode 100644 index 0000000..66c7599 --- /dev/null +++ b/Tata_Tertib/action/mhs/show-bukti-selesai.php @@ -0,0 +1,16 @@ +getBuktiSelesaiMhs($id); +$fileContent = $data['bukti_selesai']; + +if ($fileContent) { + // Atur header HTTP untuk PDF + header("Content-Type: application/pdf"); + echo $fileContent; // Kirim isi file langsung ke browser +} else { + echo "File tidak ditemukan."; +} +?> \ No newline at end of file diff --git a/Tata_Tertib/action/mhs/show-lampiran.php b/Tata_Tertib/action/mhs/show-lampiran.php new file mode 100644 index 0000000..0202d37 --- /dev/null +++ b/Tata_Tertib/action/mhs/show-lampiran.php @@ -0,0 +1,16 @@ +getLampiranById($id); +$fileContent = $data['lampiran']; + +if ($fileContent) { + // Atur header HTTP untuk PDF + header("Content-Type: application/pdf"); + echo $fileContent; // Kirim isi file langsung ke browser +} else { + echo "File tidak ditemukan."; +} +?> \ No newline at end of file diff --git a/Tata_Tertib/action/mhs/upload-bukti-selesai.php b/Tata_Tertib/action/mhs/upload-bukti-selesai.php new file mode 100644 index 0000000..54f1011 --- /dev/null +++ b/Tata_Tertib/action/mhs/upload-bukti-selesai.php @@ -0,0 +1,23 @@ +setBuktiSelesaiById($id, $fileContent); + + echo "File berhasil diunggah."; +} else { + echo "Gagal mengunggah file."; +} + +// Redirect kembali ke halaman sebelumnya +header("Location: ../../views/dashboard/mhs-kirim-bukti.php?id_pelanggaran=$id"); \ No newline at end of file diff --git a/Tata_Tertib/action/report/add-lapor-dosen.php b/Tata_Tertib/action/report/add-lapor-dosen.php new file mode 100644 index 0000000..5e04848 --- /dev/null +++ b/Tata_Tertib/action/report/add-lapor-dosen.php @@ -0,0 +1,30 @@ +addPelanggaranDosen($nama, $deskripsi, $sanksi, $lampiran, $nip); + header("Location: ../../views/report/report.php"); + exit; + } catch (\Throwable $th) { + echo "An error occurred: " . $th->getMessage(); + } +} +exit(); diff --git a/Tata_Tertib/action/report/add-lapor-karyawan.php b/Tata_Tertib/action/report/add-lapor-karyawan.php new file mode 100644 index 0000000..67567ee --- /dev/null +++ b/Tata_Tertib/action/report/add-lapor-karyawan.php @@ -0,0 +1,30 @@ +addPelanggaranKaryawan($nama, $deskripsi, $sanksi, $lampiran, $nip); + header("Location: ../../views/report/report.php"); + exit; + } catch (\Throwable $th) { + echo "An error occurred: " . $th->getMessage(); + } +} +exit(); diff --git a/Tata_Tertib/action/report/add-lapor-mhs.php b/Tata_Tertib/action/report/add-lapor-mhs.php new file mode 100644 index 0000000..e6a6f59 --- /dev/null +++ b/Tata_Tertib/action/report/add-lapor-mhs.php @@ -0,0 +1,28 @@ +addPelanggaranMhs($pelanggaran, $deskripsi, $lampiran, $nim); + header("Location: ../../views/report/report.php"); + exit; + } catch (\Throwable $th) { + echo "An error occurred: " . $th->getMessage(); + } +} +exit(); diff --git a/Tata_Tertib/action/report/report-dosen-redirect.php b/Tata_Tertib/action/report/report-dosen-redirect.php new file mode 100644 index 0000000..b376fb0 --- /dev/null +++ b/Tata_Tertib/action/report/report-dosen-redirect.php @@ -0,0 +1,38 @@ +searchDosenById($input); + + if ($data != null) { + header('location:../../views/report/form-dosen.php?nip='.$input); + } else { + $message = "Data tidak ditemukan"; + $session->setFlash('status', false); + $session->setFlash('message', $message); + header('location:../../views/report/report.php'); + } + } else if ($cari == 'nama') { + $data = $obj->searchDosenByName($input); + + if ($data != null) { + header('location:../../views/report/list-dosen.php?nama='.$input); + } else { + $message = "Data tidak ditemukan"; + $session->setFlash('status', false); + $session->setFlash('message', $message); + header('location:../../views/report/report.php'); + } + } +?> \ No newline at end of file diff --git a/Tata_Tertib/action/report/report-karyawan-redirect.php b/Tata_Tertib/action/report/report-karyawan-redirect.php new file mode 100644 index 0000000..b2a7267 --- /dev/null +++ b/Tata_Tertib/action/report/report-karyawan-redirect.php @@ -0,0 +1,36 @@ +searchByIdKaryawan($input); + + if ($data != null) { + header('location:../../views/report/form-karyawan.php?nip=' . $input); + } else { + $message = "Data tidak ditemukan"; + $session->setFlash('status', false); + $session->setFlash('message', $message); + header('location:../../views/report/report.php'); + } +} else if ($cari == 'nama') { + $data = $obj->searchKaryawanByName($input); + + if ($data != null) { + header('location:../../views/report/list-karyawan.php?nama=' . $input); + } else { + $message = "Data tidak ditemukan"; + $session->setFlash('status', false); + $session->setFlash('message', $message); + header('location:../../views/report/report.php'); + } +} diff --git a/Tata_Tertib/action/report/report-mhs-redirect.php b/Tata_Tertib/action/report/report-mhs-redirect.php new file mode 100644 index 0000000..136d3e5 --- /dev/null +++ b/Tata_Tertib/action/report/report-mhs-redirect.php @@ -0,0 +1,45 @@ +searchByIdMhs($input); + + if ($data == true) { + header('location:../../views/report/form-mhs.php?nim=' . $input); + } else { + $message = "Data tidak ditemukan"; + $session->setFlash('status', false); + $session->setFlash('message', $message); + header('location:../../views/report/report.php'); + } +} + +if ($_SERVER["REQUEST_METHOD"] == "POST") { + $pelanggaran = $_POST['tindakan']; + $deskripsi = $_POST['deskripsi']; + $lampiran = $_POST['lampiran']; + $obj->addPelanggaranMhs($pelanggaran, $deskripsi, $lampiran, $nim); + header("Location: report.php"); + exit(); +} else if ($cari == 'nama') { + $data = $obj->searchMhsByName($input); + + if ($data != null) { + header('location:../../views/report/list-mhs.php?nama=' . $input); + } else { + $message = "Data tidak ditemukan"; + $session->setFlash('status', false); + $session->setFlash('message', $message); + header('location:../../views/report/report.php'); + } +} diff --git a/Tata_Tertib/assets/footer.php b/Tata_Tertib/assets/footer.php index 9b0d58a..f04dfe0 100644 --- a/Tata_Tertib/assets/footer.php +++ b/Tata_Tertib/assets/footer.php @@ -1,3 +1,3 @@ \ No newline at end of file diff --git a/Tata_Tertib/assets/header.php b/Tata_Tertib/assets/header.php index d0c647c..67f651c 100644 --- a/Tata_Tertib/assets/header.php +++ b/Tata_Tertib/assets/header.php @@ -1,14 +1,56 @@ +get('nama'); +$status = $session->get('status'); +$level = $session->get('level'); +$idUsername = $session->get('username'); + +switch ($level) { + case '1': + # code... + include_once '../../models/Admin.php'; + $forImg = new Admin(); + $account_profile = $forImg->getImgProfile($idUsername); + break; + case '2': + # code... + include_once '../../models/Dpa.php'; + $forImg = new Dpa(); + $account_profile = $forImg->getImgProfile($idUsername); + break; + case '3': + include_once '../../models/Karyawan.php'; + $forImg = new Karyawan(); + $account_profile = $forImg->getImgProfile($idUsername); + # code... + break; + case '4': + include_once '../../models/Mhs.php'; + $forImg = new Mhs(); + $account_profile = $forImg->getImgProfile($idUsername); + # code... + break; + case '5': + # code... + include_once '../../models/Dosen.php'; + $forImg = new Dosen(); + $account_profile = $forImg->getImgProfile($idUsername); + break; + default: + break; +} +?> +
Menu

Sistem Tata Tertib | Polinema

- +

- Mahmoed Joendi M.
- Mahasiswa Aktif +
+

\ No newline at end of file diff --git a/Tata_Tertib/assets/icon/book-open-icon.svg b/Tata_Tertib/assets/icon/book-open-icon.svg new file mode 100644 index 0000000..1a1a82b --- /dev/null +++ b/Tata_Tertib/assets/icon/book-open-icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Tata_Tertib/assets/icon/caret-down-icon-filter.svg b/Tata_Tertib/assets/icon/caret-down-icon-filter.svg new file mode 100644 index 0000000..e05d669 --- /dev/null +++ b/Tata_Tertib/assets/icon/caret-down-icon-filter.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Tata_Tertib/assets/icon/classroom-icon.svg b/Tata_Tertib/assets/icon/classroom-icon.svg new file mode 100644 index 0000000..5405b0f --- /dev/null +++ b/Tata_Tertib/assets/icon/classroom-icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Tata_Tertib/assets/icon/filter-icon.svg b/Tata_Tertib/assets/icon/filter-icon.svg new file mode 100644 index 0000000..daca1fc --- /dev/null +++ b/Tata_Tertib/assets/icon/filter-icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Tata_Tertib/assets/icon/log-out-icon.svg b/Tata_Tertib/assets/icon/log-out-icon.svg new file mode 100644 index 0000000..a7cc7b9 --- /dev/null +++ b/Tata_Tertib/assets/icon/log-out-icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Tata_Tertib/assets/icon/pdf-icon.svg b/Tata_Tertib/assets/icon/pdf-icon.svg new file mode 100644 index 0000000..5cc22f2 --- /dev/null +++ b/Tata_Tertib/assets/icon/pdf-icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Tata_Tertib/assets/icon/user-list-icon.svg b/Tata_Tertib/assets/icon/user-list-icon.svg new file mode 100644 index 0000000..c226fcb --- /dev/null +++ b/Tata_Tertib/assets/icon/user-list-icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Tata_Tertib/assets/icon/x.svg b/Tata_Tertib/assets/icon/x.svg new file mode 100644 index 0000000..edb4e95 --- /dev/null +++ b/Tata_Tertib/assets/icon/x.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Tata_Tertib/assets/sanksi.json b/Tata_Tertib/assets/sanksi.json new file mode 100644 index 0000000..7ed6db4 --- /dev/null +++ b/Tata_Tertib/assets/sanksi.json @@ -0,0 +1,48 @@ +{ + "sanksi": [ + { + "tingkat": "5", + "deskripsi_pelanggaran": "Pelanggaran ringan", + "sanksi": [ + "Teguran lisan disertai dengan surat pernyataan tidak mengulangi perbuatan tersebut", + "Surat pernyataan dibubuhi materai dan ditandatangani mahasiswa dan DPA" + ] + }, + { + "tingkat": "4", + "deskripsi_pelanggaran": "Pelanggaran menengah", + "sanksi": [ + "Teguran tertulis disertai dengan pemanggilan orang tua/wali", + "Membuat surat pernyataan tidak mengulangi perbuatan tersebut, dibubuhi materai", + "Surat pernyataan ditandatangani mahasiswa, orang tua/wali, dan DPA" + ] + }, + { + "tingkat": "3", + "deskripsi_pelanggaran": "Pelanggaran moderat", + "sanksi": [ + "Membuat surat pernyataan tidak mengulangi perbuatan tersebut, dibubuhi materai", + "Surat pernyataan ditandatangani mahasiswa, orang tua/wali, dan DPA", + "Melakukan tugas khusus, seperti memperbaiki atau membersihkan kembali" + ] + }, + { + "tingkat": "2", + "deskripsi_pelanggaran": "Pelanggaran serius", + "sanksi": [ + "Dikenakan penggantian kerugian atau penggantian benda/barang semacamnya", + "Melakukan tugas layanan sosial dalam jangka waktu tertentu", + "Diberikan nilai D pada mata kuliah terkait saat melakukan pelanggaran" + ] + }, + { + "tingkat": "1", + "deskripsi_pelanggaran": "Pelanggaran sangat serius", + "sanksi": [ + "Dinonaktifkan (Cuti Akademik/Terminal) selama dua semester", + "Diberhentikan sebagai mahasiswa" + ] + } + ], + "catatan": "Pemberian sanksi dan mekanisme ditetapkan dalam peraturan tersendiri." +} \ No newline at end of file diff --git a/Tata_Tertib/assets/sidebar.php b/Tata_Tertib/assets/sidebar.php index 23b2282..7df321e 100644 --- a/Tata_Tertib/assets/sidebar.php +++ b/Tata_Tertib/assets/sidebar.php @@ -1,11 +1,95 @@ +get('level'); + +function getDashboardPage($level): string +{ + // Errornya biarkan, karena aslinya variabel ini + switch ($level) { + case '1': + $page = '../dashboard/dashboard-admin.php'; + return $page; + case '2': + $page = '../dashboard/dashboard-dpa.php'; + return $page; + case '3': + $page = '../dashboard/dashboard-karyawan.php'; + return $page; + case '4': + $page = '../dashboard/dashboard-mhs.php'; + return $page; + case '5': + $page = '../dashboard/dashboard-dosen.php'; + return $page; + default: + $page = '../dashboard/dashboard-mhs.php'; + return $page; + } +} + +function getHistoryPage($level): string +{ + // Errornya biarkan, karena aslinya variabel ini + switch ($level) { + case '1': + $page = '../history/history-admin.php'; + return $page; + case '2': + $page = '../history/history-dpa.php'; + return $page; + case '3': + $page = '../history/history-karyawan.php'; + return $page; + case '4': + $page = '../history/history-mhs.php'; + return $page; + case '5': + $page = '../history/history-dosen.php'; + return $page; + default: + $page = '../history/history-mhs.php'; + return $page; + } +} +?> + \ No newline at end of file diff --git a/Tata_Tertib/controllers/Dosen.php b/Tata_Tertib/controllers/Dosen.php deleted file mode 100644 index e69de29..0000000 diff --git a/Tata_Tertib/controllers/Hukuman.php b/Tata_Tertib/controllers/Hukuman.php deleted file mode 100644 index e69de29..0000000 diff --git a/Tata_Tertib/controllers/Mahasiswa.php b/Tata_Tertib/controllers/Mahasiswa.php deleted file mode 100644 index e69de29..0000000 diff --git a/Tata_Tertib/controllers/Pelanggaran.php b/Tata_Tertib/controllers/Pelanggaran.php deleted file mode 100644 index e69de29..0000000 diff --git a/Tata_Tertib/controllers/StatusPelangaran.php b/Tata_Tertib/controllers/StatusPelangaran.php deleted file mode 100644 index e69de29..0000000 diff --git a/Tata_Tertib/core/Koneksi.php b/Tata_Tertib/core/Koneksi.php new file mode 100644 index 0000000..98391ba --- /dev/null +++ b/Tata_Tertib/core/Koneksi.php @@ -0,0 +1,15 @@ + db = mysqli_connect($this -> host, $this -> username, $this -> password, $this -> database); + if ($this -> db -> connect_error){ + die("connection failed: ". $this -> db -> connect_error); + } + } +} \ No newline at end of file diff --git a/Tata_Tertib/core/Session.php b/Tata_Tertib/core/Session.php new file mode 100644 index 0000000..befe265 --- /dev/null +++ b/Tata_Tertib/core/Session.php @@ -0,0 +1,60 @@ +deleteFlash($key); + return $value; + } + public function deleteFlash($key) + { + if (isset($_SESSION['flash'][$key])) { + unset($_SESSION['flash'][$key]); + } + } + + public function deleteAllFlash() + { + if (isset($_SESSION['flash'])) { + unset($_SESSION['flash']); + } + } + + public function deleteAll() + { + session_destroy(); + } + public function commit() + { + session_commit(); + } +} diff --git a/Tata_Tertib/index.php b/Tata_Tertib/index.php index aeecc02..bbcdd0b 100644 --- a/Tata_Tertib/index.php +++ b/Tata_Tertib/index.php @@ -1,9 +1,42 @@ +db; + +if ($session->get('is_login') === true) { + switch ($session->get('level')) { + case '1': + header('Location: views/dashboard/dashboard-admin.php'); + break; + case '2': + header('Location: views/dashboard/dashboard-dpa.php'); + break; + case '3': + header('Location: views/dashboard/dashboard-karyawan.php'); + break; + case '4': + header('Location: views/dashboard/dashboard-mhs.php'); + break; + case '5': + header('Location: views/dashboard/dashboard-dosen.php'); + break; + default: + break; + } +} +?> + + + - Login e-TibPol + Login Form +
-

SELAMAT DATANG

- Polinema Logo - - + - + + \ No newline at end of file diff --git a/Tata_Tertib/login/Login_Admin.php b/Tata_Tertib/login/Login_Admin.php deleted file mode 100644 index 9940559..0000000 --- a/Tata_Tertib/login/Login_Admin.php +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - Login Tenaga Pendidikan - - - -
- Polinema Logo -

Login Tenaga Pendidikan

-
- - -
- - - - diff --git a/Tata_Tertib/login/img/logo_polinema.png b/Tata_Tertib/login/img/logo_polinema.png deleted file mode 100644 index 07dadb8..0000000 Binary files a/Tata_Tertib/login/img/logo_polinema.png and /dev/null differ diff --git a/Tata_Tertib/login/koneksi.php b/Tata_Tertib/login/koneksi.php deleted file mode 100644 index 6761e93..0000000 --- a/Tata_Tertib/login/koneksi.php +++ /dev/null @@ -1,6 +0,0 @@ -prepare($sql); -$stmt->bind_param("s", $nim); -$stmt->execute(); -$result = $stmt->get_result(); - -if ($result->num_rows > 0) { - $row = $result->fetch_assoc(); - - if (password_verify($password, $row['password'])) { - if ($row['role'] === $role) { - echo "success"; - } else { - echo "Invalid role."; - } - } else { - echo "Invalid password."; - } -} else { - echo "Invalid NIM."; -} - -$stmt->close(); -$conn->close(); -?> diff --git a/Tata_Tertib/login/login_mahasiswa.php b/Tata_Tertib/login/login_mahasiswa.php deleted file mode 100644 index 3f538ca..0000000 --- a/Tata_Tertib/login/login_mahasiswa.php +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - Login Form - - - - + '; + break; + case '2': + # code... + echo ' +
+
+ Sanksi Telah Dipenuhi +
+ '; + break; + case '3': + # code... + echo ' +
+
+ Menunggu Sanksi +
'; + break; + case '4': + # code... + echo ' +
+
+ Menunggu Konfirmasi +
'; + break; + default: + echo $id_status; + break; + } +} +?> \ No newline at end of file diff --git a/Tata_Tertib/views/dashboard/admin-table-karyawan.php b/Tata_Tertib/views/dashboard/admin-table-karyawan.php new file mode 100644 index 0000000..6b81735 --- /dev/null +++ b/Tata_Tertib/views/dashboard/admin-table-karyawan.php @@ -0,0 +1,99 @@ +getTabelPelKaryawan(); +?> + + + + +
+ Selesai +
+ '; + break; + case '2': + # code... + echo ' +
+
+ Sanksi Telah Dipenuhi +
+ '; + break; + case '3': + # code... + echo ' +
+
+ Menunggu Sanksi +
'; + break; + case '4': + # code... + echo ' +
+
+ Menunggu Konfirmasi +
'; + break; + default: + echo $id_status; + break; + } +} +?> \ No newline at end of file diff --git a/Tata_Tertib/views/dashboard/admin-table-mahasiswa.php b/Tata_Tertib/views/dashboard/admin-table-mahasiswa.php new file mode 100644 index 0000000..a745667 --- /dev/null +++ b/Tata_Tertib/views/dashboard/admin-table-mahasiswa.php @@ -0,0 +1,101 @@ +getTabelPelMhs(); +?> + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
NamaNIMStatusTanggal/WaktuKategori
. + +
+
+ + +
+ Selesai +
+ '; + break; + case '2': + # code... + echo ' +
+
+ Sanksi Telah Dipenuhi +
+ '; + break; + case '3': + # code... + echo ' +
+
+ Menunggu Sanksi +
'; + break; + case '4': + # code... + echo ' +
+
+ Menunggu Konfirmasi +
'; + break; + default: + echo $id_status; + break; + } +} +?> \ No newline at end of file diff --git a/Tata_Tertib/views/Admin/tabs.js b/Tata_Tertib/views/dashboard/admin-tabs.js similarity index 78% rename from Tata_Tertib/views/Admin/tabs.js rename to Tata_Tertib/views/dashboard/admin-tabs.js index 5a5672d..419a225 100644 --- a/Tata_Tertib/views/Admin/tabs.js +++ b/Tata_Tertib/views/dashboard/admin-tabs.js @@ -6,6 +6,7 @@ function initializeTabs() { button.addEventListener('click', function () { // Menghapus class 'active' dari semua tab document.querySelectorAll('.nav-table-button').forEach(btn => btn.classList.remove('active')); + const title = document.getElementById('title-table'); // Menambahkan class 'active' pada tab yang diklik this.classList.add('active'); @@ -16,20 +17,17 @@ function initializeTabs() { const activeTabText = this.textContent.trim(); let fileToLoad = ''; - // Memperbarui teks judul berdasarkan tab yang aktif - const titleElement = document.querySelector('h1'); // Memilih elemen judul (h1) - if (titleElement) { - titleElement.textContent = `List Pelanggaran ${activeTabText}`; - } - updateTabNavUnderline(activeTabText); if (activeTabText === "Mahasiswa") { - fileToLoad = 'table-mahasiswa.php'; + fileToLoad = 'admin-table-mahasiswa.php'; + title.textContent = "Mahasiswa"; } else if (activeTabText === "Dosen") { - fileToLoad = 'table-dosen.php'; + fileToLoad = 'admin-table-dosen.php'; + title.textContent = "Dosen"; } else if (activeTabText === "Karyawan") { - fileToLoad = 'table-karyawan.php'; + fileToLoad = 'admin-table-karyawan.php'; + title.textContent = "Karyawan"; } // Memuat konten sesuai tab yang dipilih @@ -56,7 +54,7 @@ function initializeTabs() { } // Memuat konten untuk tab aktif pertama kali - loadTableContent('table-mahasiswa.php'); // Memuat konten untuk tab "Mahasiswa" pertama kali + loadTableContent('admin-table-mahasiswa.php'); // Memuat konten untuk tab "Mahasiswa" pertama kali } function updateSVGColors() { @@ -77,13 +75,13 @@ function updateTabNavUnderline(button) { if (button === "Mahasiswa") { line.style.marginLeft = '0px'; - line.style.width = '152.03px'; + line.style.width = '178.03px'; } else if (button === "Dosen") { - line.style.marginLeft = '152.03px'; - line.style.width = '118.25px'; + line.style.marginLeft = '178.03px'; + line.style.width = '144.25px'; } else if (button === "Karyawan") { - line.style.marginLeft = '270.28px'; - line.style.width = '143.16px'; + line.style.marginLeft = '322.28px'; + line.style.width = '169.16px'; } } diff --git a/Tata_Tertib/views/dashboard/bukti-selesai-dosen.php b/Tata_Tertib/views/dashboard/bukti-selesai-dosen.php new file mode 100644 index 0000000..a74bbdf --- /dev/null +++ b/Tata_Tertib/views/dashboard/bukti-selesai-dosen.php @@ -0,0 +1,97 @@ +getLampiranById($id_pelanggaran); +$level = $session->get('level'); +?> + + + + + + + + +Sistem Tata Tertib | Polinema + + + + + + + + + + +
+ + + + +
+ + +
+ + + + + + + + + + + + + \ No newline at end of file diff --git a/Tata_Tertib/views/dashboard/bukti-selesai-karyawan.php b/Tata_Tertib/views/dashboard/bukti-selesai-karyawan.php new file mode 100644 index 0000000..93d3c54 --- /dev/null +++ b/Tata_Tertib/views/dashboard/bukti-selesai-karyawan.php @@ -0,0 +1,97 @@ +getLampiranTendikById($id_pelanggaran); +$level = $session->get('level'); +?> + + + + + + + + +Sistem Tata Tertib | Polinema + + + + + + + + + + +
+ + + + +
+ + +
+ + + + + + + + + + + + + \ No newline at end of file diff --git a/Tata_Tertib/views/dashboard/bukti-selesai-mhs.php b/Tata_Tertib/views/dashboard/bukti-selesai-mhs.php new file mode 100644 index 0000000..2bcf0db --- /dev/null +++ b/Tata_Tertib/views/dashboard/bukti-selesai-mhs.php @@ -0,0 +1,103 @@ +getLampiranById($id_pelanggaran); +$level = $session->get('level'); + +$sanksiData = $obj->getSanksiById($id_pelanggaran); +?> + + + + + + + + +Sistem Tata Tertib | Polinema + + + + + + + + + + +
+ + + + +
+ + +
+ + + + + + + + + + + + + \ No newline at end of file diff --git a/Tata_Tertib/views/dashboard/dashboard-admin.php b/Tata_Tertib/views/dashboard/dashboard-admin.php new file mode 100644 index 0000000..a4d91d6 --- /dev/null +++ b/Tata_Tertib/views/dashboard/dashboard-admin.php @@ -0,0 +1,72 @@ + + + + + + + + + +Sistem Tata Tertib | Polinema + + + + + + + + + +
+ + + + +
+

List Pelanggaran Mahasiswa

+ + +
+ +
+
+
+
+ + +
+ +
+
+ + + +
+ + + + + + + + + + + + \ No newline at end of file diff --git a/Tata_Tertib/views/dashboard/dashboard-dosen.php b/Tata_Tertib/views/dashboard/dashboard-dosen.php new file mode 100644 index 0000000..19fc825 --- /dev/null +++ b/Tata_Tertib/views/dashboard/dashboard-dosen.php @@ -0,0 +1,61 @@ + + + + + + + + + +Sistem Tata Tertib | Polinema + + + + + + + + + +
+ + + + +
+

List Pelanggaran

+ + + +
+
+
+ + +
+ + +
+
+ + + +
+ + + + + + + + + + + \ No newline at end of file diff --git a/Tata_Tertib/views/Admin/dashboard-admin.php b/Tata_Tertib/views/dashboard/dashboard-dpa.php similarity index 57% rename from Tata_Tertib/views/Admin/dashboard-admin.php rename to Tata_Tertib/views/dashboard/dashboard-dpa.php index 2836a42..ff39af7 100644 --- a/Tata_Tertib/views/Admin/dashboard-admin.php +++ b/Tata_Tertib/views/dashboard/dashboard-dpa.php @@ -1,10 +1,16 @@ + + - Website with Sidebar + +Sistem Tata Tertib | Polinema @@ -20,14 +26,13 @@
-

List Pelanggaran Mahasiswa

+

List Pelanggaran Mahasiswa

@@ -48,12 +53,18 @@ // Mengimpor dan menjalankan fungsi dari tabs.js import { initializeTabs - } from './tabs.js'; + } from './dpa-tabs.js'; document.addEventListener('DOMContentLoaded', () => { initializeTabs(); // Menjalankan fungsi untuk menginisialisasi tab }); + + + + + + \ No newline at end of file diff --git a/Tata_Tertib/views/dashboard/dashboard-karyawan.php b/Tata_Tertib/views/dashboard/dashboard-karyawan.php new file mode 100644 index 0000000..824c5be --- /dev/null +++ b/Tata_Tertib/views/dashboard/dashboard-karyawan.php @@ -0,0 +1,61 @@ + + + + + + + + + +Sistem Tata Tertib | Polinema + + + + + + + + + +
+ + + + +
+

List Pelanggaran

+ + + +
+
+
+ + +
+ + +
+
+ + + +
+ + + + + + + + + + + \ No newline at end of file diff --git a/Tata_Tertib/views/dashboard/dashboard-mhs.php b/Tata_Tertib/views/dashboard/dashboard-mhs.php new file mode 100644 index 0000000..7f57dbf --- /dev/null +++ b/Tata_Tertib/views/dashboard/dashboard-mhs.php @@ -0,0 +1,61 @@ + + + + + + + + + +Sistem Tata Tertib | Polinema + + + + + + + + + +
+ + + + +
+

List Pelanggaran Mahasiswa

+ + + +
+
+
+ + +
+ + +
+
+ + + +
+ + + + + + + + + + + \ No newline at end of file diff --git a/Tata_Tertib/views/dashboard/dosen-kirim-bukti.php b/Tata_Tertib/views/dashboard/dosen-kirim-bukti.php new file mode 100644 index 0000000..4ae39e0 --- /dev/null +++ b/Tata_Tertib/views/dashboard/dosen-kirim-bukti.php @@ -0,0 +1,104 @@ +getLampiranById($id_pelanggaran); +$level = $session->get('level'); + +function getSubmit($level) { + if ($level == 1) { + return 'disabled'; + } +} + +?> + + + + + + + + +Sistem Tata Tertib | Polinema + + + + + + + + + + +
+ + + + +
+ + + +
+ + + + + + + + + + + + + \ No newline at end of file diff --git a/Tata_Tertib/views/dashboard/dosen-lampiran.php b/Tata_Tertib/views/dashboard/dosen-lampiran.php new file mode 100644 index 0000000..f5615b6 --- /dev/null +++ b/Tata_Tertib/views/dashboard/dosen-lampiran.php @@ -0,0 +1,81 @@ +getLampiranById($id_pelanggaran); +$level = $session->get('level'); + +?> + + + + + + + + +Sistem Tata Tertib | Polinema + + + + + + + + + + +
+ + + + +
+ + +
+ + + + + + + + + + + + \ No newline at end of file diff --git a/Tata_Tertib/views/dashboard/dosen-table-pribadi.php b/Tata_Tertib/views/dashboard/dosen-table-pribadi.php new file mode 100644 index 0000000..38c73d4 --- /dev/null +++ b/Tata_Tertib/views/dashboard/dosen-table-pribadi.php @@ -0,0 +1,91 @@ +get('username'); +$data = $obj->getPelPribadi($nip); +?> + +
+ + + + + + + + + + + + + + + + + + + + + +
PelanggaranStatusTanggal/Waktu
. + +
+
+ + +
+ Selesai +
+ '; + break; + case '2': + # code... + echo ' +
+
+ Sanksi Telah Dipenuhi +
+ '; + break; + case '3': + # code... + echo ' +
+
+ Menunggu Sanksi +
'; + break; + case '4': + # code... + echo ' +
+
+ Menunggu Konfirmasi +
'; + break; + default: + echo $id_status; + break; + } +} +?> \ No newline at end of file diff --git a/Tata_Tertib/views/dashboard/dpa-detpel-mhs.php b/Tata_Tertib/views/dashboard/dpa-detpel-mhs.php new file mode 100644 index 0000000..dbec2d5 --- /dev/null +++ b/Tata_Tertib/views/dashboard/dpa-detpel-mhs.php @@ -0,0 +1,119 @@ +getDetailPelMhs($id); +$level = $session->get('level'); + +$sanksiJson = file_get_contents('../../assets/sanksi.json'); +$sanksiData = json_decode($sanksiJson, true); + +$imgMhs = $obj->getImgProfileMhs($data['nim']); + +?> + + + + + + + + +Sistem Tata Tertib | Polinema + + + + + + + + + + +
+ + + + +
+ + +
+ + + +
+ + + + + + + + + + \ No newline at end of file diff --git a/Tata_Tertib/views/dashboard/dpa-table-mahasiswa.php b/Tata_Tertib/views/dashboard/dpa-table-mahasiswa.php new file mode 100644 index 0000000..ed6d2d1 --- /dev/null +++ b/Tata_Tertib/views/dashboard/dpa-table-mahasiswa.php @@ -0,0 +1,132 @@ +get('username'); +$data = $obj->getTabelPelMhs($nip); + +function getTombolBuktiTebus($data, $i) +{ + $id = $data[$i]["id_pelanggaran_mhs"]; + if ($data[$i]["status_pelanggaran"] <= 2) { + echo ' + Bukti Tebus Sanksi + '; + } else { + echo ' + Bukti Tebus Sanksi + '; + } +} + +function getTombolSelesai($data, $i) +{ + if ($data[$i]["status_pelanggaran"] == 2) { + echo ' + Selesai + '; + } else { + echo ' + Selesai + '; + } +} + +?> + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
NamaNIMStatusTanggal/WaktuKategori
. + +
+
+ + +
+ Selesai +
+ '; + break; + case '2': + # code... + echo ' +
+
+ Sanksi Telah Dipenuhi +
+ '; + break; + case '3': + # code... + echo ' +
+
+ Menunggu Sanksi +
'; + break; + case '4': + # code... + echo ' +
+
+ Menunggu Konfirmasi +
'; + break; + default: + echo $id_status; + break; + } +} +?> \ No newline at end of file diff --git a/Tata_Tertib/views/dashboard/dpa-table-pribadi.php b/Tata_Tertib/views/dashboard/dpa-table-pribadi.php new file mode 100644 index 0000000..7d14c81 --- /dev/null +++ b/Tata_Tertib/views/dashboard/dpa-table-pribadi.php @@ -0,0 +1,93 @@ +get('username'); +$data = $obj->getPelPribadi($nip); +?> + +
+ + + + + + + + + + + + + + + + + + + + + +
PelanggaranStatusTanggal/Waktu
. + +
+
+ + +
+ Selesai +
+ '; + break; + case '2': + # code... + echo ' +
+
+ Sanksi Telah Dipenuhi +
+ '; + break; + case '3': + # code... + echo ' +
+
+ Menunggu Sanksi +
'; + break; + case '4': + # code... + echo ' +
+
+ Menunggu Konfirmasi +
'; + break; + default: + echo $id_status; + break; + } +} +?> \ No newline at end of file diff --git a/Tata_Tertib/views/dashboard/dpa-tabs.js b/Tata_Tertib/views/dashboard/dpa-tabs.js new file mode 100644 index 0000000..a098d70 --- /dev/null +++ b/Tata_Tertib/views/dashboard/dpa-tabs.js @@ -0,0 +1,83 @@ +// tabs.js + +function initializeTabs(nama_kelas) { + // Menangani klik pada setiap tab untuk mengubah tab yang aktif + document.querySelectorAll('.nav-table-button').forEach(button => { + button.addEventListener('click', function () { + // Menghapus class 'active' dari semua tab + document.querySelectorAll('.nav-table-button').forEach(btn => btn.classList.remove('active')); + const title = document.getElementById('title-table'); + + // Menambahkan class 'active' pada tab yang diklik + this.classList.add('active'); + + updateSVGColors(); + + // Menentukan file yang akan dimuat berdasarkan tab yang aktif + const activeTabText = this.textContent.trim(); + let fileToLoad = ''; + + updateTabNavUnderline(activeTabText); + + if (activeTabText === "Mahasiswa") { + fileToLoad = 'dpa-table-mahasiswa.php'; + title.textContent = `Kelas`; + } else if (activeTabText === "Pribadi") { + fileToLoad = 'dpa-table-pribadi.php'; + title.textContent = "Pribadi"; + } + + // Memuat konten sesuai tab yang dipilih + loadTableContent(fileToLoad); + }); + }); + + // Fungsi untuk memuat konten dari file PHP + function loadTableContent(file) { + const container = document.getElementById('table-content-container'); // Memilih container yang tepat + + // Menggunakan fetch untuk memuat file PHP + fetch(file) + .then(response => response.text()) + .then(data => { + // Memasukkan data yang didapat ke dalam container + container.innerHTML = data; + }) + .catch(error => { + // Menangani error jika fetch gagal + container.innerHTML = 'Terjadi kesalahan saat memuat konten.'; + console.error('Error loading content:', error); + }); + } + + // Memuat konten untuk tab aktif pertama kali + loadTableContent('dpa-table-mahasiswa.php'); // Memuat konten untuk tab "Mahasiswa" pertama kali +} + +function updateSVGColors() { + document.querySelectorAll('.nav-table-button').forEach(button => { + const svg = button.querySelector('img'); // Mengambil elemen SVG (atau yang mewakili SVG) + if (button.classList.contains('active')) { + // Ubah warna SVG untuk tab aktif + svg.style.filter = 'invert(60%) sepia(77%) saturate(500%) hue-rotate(180deg) brightness(90%) contrast(95%)'; + } else { + // Kembalikan warna SVG untuk tab tidak aktif + svg.style.filter = 'none'; + } + }); +} + +function updateTabNavUnderline(button) { + const line = document.getElementById('line-active'); + + if (button === "Mahasiswa") { + line.style.marginLeft = '0px'; + line.style.width = '178.03px'; + } else if (button === "Pribadi") { + line.style.marginLeft = '178.03px'; + line.style.width = '147.81px'; + } +} + +// Mengekspor fungsi supaya bisa digunakan di file lain +export { initializeTabs }; \ No newline at end of file diff --git a/Tata_Tertib/views/dashboard/karyawan-kirim-bukti.php b/Tata_Tertib/views/dashboard/karyawan-kirim-bukti.php new file mode 100644 index 0000000..faee635 --- /dev/null +++ b/Tata_Tertib/views/dashboard/karyawan-kirim-bukti.php @@ -0,0 +1,104 @@ +getLampiranById($id_pelanggaran); +$level = $session->get('level'); + +function getSubmit($level) { + if ($level == 1) { + return 'disabled'; + } +} + +?> + + + + + + + + +Sistem Tata Tertib | Polinema + + + + + + + + + + +
+ + + + +
+ + + +
+ + + + + + + + + + + + + \ No newline at end of file diff --git a/Tata_Tertib/views/dashboard/karyawan-lampiran.php b/Tata_Tertib/views/dashboard/karyawan-lampiran.php new file mode 100644 index 0000000..e3049f3 --- /dev/null +++ b/Tata_Tertib/views/dashboard/karyawan-lampiran.php @@ -0,0 +1,81 @@ +getLampiranById($id_pelanggaran); +$level = $session->get('level'); + +?> + + + + + + + + +Sistem Tata Tertib | Polinema + + + + + + + + + + +
+ + + + +
+ + +
+ + + + + + + + + + + + \ No newline at end of file diff --git a/Tata_Tertib/views/dashboard/karyawan-table-pribadi.php b/Tata_Tertib/views/dashboard/karyawan-table-pribadi.php new file mode 100644 index 0000000..eba7455 --- /dev/null +++ b/Tata_Tertib/views/dashboard/karyawan-table-pribadi.php @@ -0,0 +1,91 @@ +get('username'); +$data = $obj->getPelPribadi($nip); +?> + +
+ + + + + + + + + + + + + + + + + + + + + +
PelanggaranStatusTanggal/Waktu
. + +
+
+ + +
+ Selesai +
+ '; + break; + case '2': + # code... + echo ' +
+
+ Sanksi Telah Dipenuhi +
+ '; + break; + case '3': + # code... + echo ' +
+
+ Menunggu Sanksi +
'; + break; + case '4': + # code... + echo ' +
+
+ Menunggu Konfirmasi +
'; + break; + default: + echo $id_status; + break; + } +} +?> \ No newline at end of file diff --git a/Tata_Tertib/views/dashboard/mhs-kirim-bukti.php b/Tata_Tertib/views/dashboard/mhs-kirim-bukti.php new file mode 100644 index 0000000..07127be --- /dev/null +++ b/Tata_Tertib/views/dashboard/mhs-kirim-bukti.php @@ -0,0 +1,105 @@ +getLampiranById($id_pelanggaran); +$level = $session->get('level'); + +$sanksiData = $obj->getSanksiById($id_pelanggaran); +?> + + + + + + + + +Sistem Tata Tertib | Polinema + + + + + + + + + + +
+ + + + +
+ + +
+ + + + + + + + + + + + + \ No newline at end of file diff --git a/Tata_Tertib/views/dashboard/mhs-lampiran.php b/Tata_Tertib/views/dashboard/mhs-lampiran.php new file mode 100644 index 0000000..a9860c8 --- /dev/null +++ b/Tata_Tertib/views/dashboard/mhs-lampiran.php @@ -0,0 +1,84 @@ +getLampiranById($id_pelanggaran); +$level = $session->get('level'); + +$sanksiData = $obj->getSanksiById($id_pelanggaran); +?> + + + + + + + + +Sistem Tata Tertib | Polinema + + + + + + + + + + +
+ + + + +
+ + +
+ + + + + + + + + + + + \ No newline at end of file diff --git a/Tata_Tertib/views/dashboard/mhs-table-pribadi.php b/Tata_Tertib/views/dashboard/mhs-table-pribadi.php new file mode 100644 index 0000000..ec33e61 --- /dev/null +++ b/Tata_Tertib/views/dashboard/mhs-table-pribadi.php @@ -0,0 +1,93 @@ +get('username'); +$data = $obj->getPelPribadi($nip); +?> + +
+ + + + + + + + + + + + + + + + + + + + + + + +
PelanggaranKategoriStatusTanggal/Waktu
. + +
+
+ + +
+ Selesai +
+ '; + break; + case '2': + # code... + echo ' +
+
+ Sanksi Telah Dipenuhi +
+ '; + break; + case '3': + # code... + echo ' +
+
+ Menunggu Sanksi +
'; + break; + case '4': + # code... + echo ' +
+
+ Menunggu Konfirmasi +
'; + break; + default: + echo $id_status; + break; + } +} +?> \ No newline at end of file diff --git a/Tata_Tertib/views/Admin/script.js b/Tata_Tertib/views/dashboard/script.js similarity index 100% rename from Tata_Tertib/views/Admin/script.js rename to Tata_Tertib/views/dashboard/script.js diff --git a/Tata_Tertib/views/Pelanggaran/style.css b/Tata_Tertib/views/dashboard/style.css similarity index 74% rename from Tata_Tertib/views/Pelanggaran/style.css rename to Tata_Tertib/views/dashboard/style.css index 3bd877c..5e997e0 100644 --- a/Tata_Tertib/views/Pelanggaran/style.css +++ b/Tata_Tertib/views/dashboard/style.css @@ -20,7 +20,7 @@ body { .sidebar:hover, .sidebar.expanded { - width: 200px; + width: 210px; } .sidebar-logo { @@ -117,7 +117,6 @@ body { /* Pastikan header tetap di atas konten lainnya */ } - .header .header-kiri { height: 100%; display: flex; @@ -147,7 +146,7 @@ body { flex-direction: row; align-items: center; vertical-align: center; - gap: 30px; + gap: 20px; margin-right: 40px; } @@ -178,10 +177,10 @@ body { font-size: 13px; } -/* Tabel Container */ /* Container Content Setiap Halaman Menu*/ +/* Tabel Container */ .table-container { width: 98%; - height: 65%; + height: 73%; background-color: white; margin-left: 1%; margin-right: 1%; @@ -191,9 +190,7 @@ body { } .table-container h1 { - font-size: 30px; - margin-left: 2%; - margin-top: 2%; + font-size: 25px; } /* Table Nav Button */ @@ -231,10 +228,19 @@ body { transition: color 0.5s ease; } +.nav-table-button span { + margin-left: 13px; +} + +.nav-table-button img { + margin-bottom: 3px; + margin-right: 13px; +} + .line { display: flex; height: 2px; - width: 94%; + width: 96%; background-color: #BDD0E7; align-items: center; margin-bottom: 20px; @@ -246,104 +252,47 @@ body { .line-active { height: 3px; - width: 152px; + width: 178.03px; background-color: #1976D2; z-index: 2; border-radius: 5px; transition: all 0.3s ease; } -/* Bagian Isi Halaman Menu */ /* Search */ - /* =============================================================================================Bagian Isi Halaman Menu */ -.table-content-container { - width: 98%; - height: 60%; - margin-left: 1%; - margin-right: 1%; - overflow-y: auto; -} - -.container-laporkan { +/* Filter Button */ +.filter-search-container { display: flex; - flex-direction: column; /* Mengatur elemen anak menjadi kolom */ - align-items: center; /* Meratakan secara horizontal */ - text-align: center; /* Mengatur teks di dalam elemen menjadi rata tengah */ - margin-top: 3.3%; -} - -.masukkan-nama-header{ - font-size: 37px; - color: #333; - letter-spacing: 1.3px; - } -/* Styling untuk Search Bar */ -.search-bar-container { - display: flex; - align-items: center; - color: #007bff; - border: 1px solid #007bff; - border-radius: 20px; - padding: 5px 15px; - height: 31px; - width: 401px; - } - - .search-bar-container input { - border: none; - outline: none; - flex-grow: 1; - margin-left: 5px; - width: 80%; - - } - - .search-bar-container input::placeholder { - color: #aaa; - } - - /* Styling untuk Tombol Filter */ - .filter-button { +.filter-buttons-container { display: flex; + flex-direction: row; + justify-content: space-between; align-items: center; - justify-content: center; - width: 31px; - height: 31px; - border: 1px solid #007bff; - border-radius: 8px; - color: #007bff; - cursor: pointer; - margin-left: 10px; - } - - /* Styling untuk Dropdown */ - .dropdown-menu { - width: 300px; - padding: 15px; - border-radius: 8px; - border: 1px solid #ccc; - box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); - } + gap: 10px; + margin-left: 2%; +} - .dropdown-menu label { - font-weight: 500; - margin-bottom: 5px; - display: block; - } +.filter { + width: 97%; + margin-left: 1.5%; + margin-right: 1.5%; +} - .dropdown-menu .form-check-label { - margin-left: 5px; - } +.filter-button { + flex-direction: row; + gap: 20px; +} - - /* =============================================================================================Bagian Isi Halaman Menu */ +.filter-button a { + color: #3E3D46; +} -/* Tabel */ /* Bagian Isi Halaman Menu */ +/* Tabel */ .custom-table { width: 98%; height: 60%; - border-collapse: separate; + border-collapse: collapse; border-spacing: 0 0px; margin-left: 1%; margin-right: 1%; @@ -364,6 +313,7 @@ body { background-color: #F4F4FB; color: #858585; font-size: 14px; + position: sticky; } .custom-table tbody th { @@ -402,7 +352,9 @@ body { color: #3E3D46; } - +.table-content-container { + height: 65%; +} /* Footer */ .footer { @@ -410,4 +362,28 @@ body { background-color: #f8f9fa; border-top: 1px solid #ddd; margin-top: auto; +} + +.scrollable-table::-webkit-scrollbar { + width: 6px; + height: 6px; + padding: 10px; +} + +.scrollable-table::-webkit-scrollbar-track { + border-radius: 10px; + background: rgba(0, 0, 0, 0.1); +} + +.scrollable-table::-webkit-scrollbar-thumb { + border-radius: 10px; + background: rgba(0, 0, 0, 0.2); +} + +.scrollable-table::-webkit-scrollbar-thumb:hover { + background: rgba(0, 0, 0, 0.4); +} + +.scrollable-table::-webkit-scrollbar-thumb:active { + background: rgba(0, 0, 0, .9); } \ No newline at end of file diff --git a/Tata_Tertib/views/history/admin-detail-data-dosen.php b/Tata_Tertib/views/history/admin-detail-data-dosen.php new file mode 100644 index 0000000..03b5d3b --- /dev/null +++ b/Tata_Tertib/views/history/admin-detail-data-dosen.php @@ -0,0 +1,75 @@ +getDetailDosen($nip); +$kelas = isset($data['nama_kelas']) ? $data['nama_kelas'] : '-'; +$img = $obj->getImgProfileDosen($nip); + +function getHeader($level) +{ + switch ($level) { + case '1': + return 'dashboard-admin.php'; + case '2': + return 'href:dashboard-dpa.php'; + } +} +?> + + + + + + + + + Sistem Tata Tertib | Polinema + + + + + + + + + +
+ + + + +
+ +
+ + + +
+ + + + + + + + + + \ No newline at end of file diff --git a/Tata_Tertib/views/history/admin-detail-data-karyawan.php b/Tata_Tertib/views/history/admin-detail-data-karyawan.php new file mode 100644 index 0000000..21b9e35 --- /dev/null +++ b/Tata_Tertib/views/history/admin-detail-data-karyawan.php @@ -0,0 +1,74 @@ +getDetailKaryawan($nip); +$kelas = isset($data['nama_kelas']) ? $data['nama_kelas'] : '-'; +$img = $obj->getImgProfileKaryawan($nip); + +function getHeader($level) +{ + switch ($level) { + case '1': + return 'dashboard-admin.php'; + case '2': + return 'href:dashboard-dpa.php'; + } +} +?> + + + + + + + + + Sistem Tata Tertib | Polinema + + + + + + + + + +
+ + + + +
+ +
+ + + +
+ + + + + + + + + + \ No newline at end of file diff --git a/Tata_Tertib/views/history/admin-detail-data-mhs.php b/Tata_Tertib/views/history/admin-detail-data-mhs.php new file mode 100644 index 0000000..c5850ad --- /dev/null +++ b/Tata_Tertib/views/history/admin-detail-data-mhs.php @@ -0,0 +1,80 @@ +getDetailMhs($nim); +$imgMhs = $obj->getImgProfileMhs($nim); + +$level = $session->get('level'); +?> + + + + + + + + + Sistem Tata Tertib | Polinema + + + + + + + + + +
+ + + + +
+ + +
+ + + +
+ + + + + + + + + + \ No newline at end of file diff --git a/Tata_Tertib/views/history/admin-detpel-dosen.php b/Tata_Tertib/views/history/admin-detpel-dosen.php new file mode 100644 index 0000000..5f189d7 --- /dev/null +++ b/Tata_Tertib/views/history/admin-detpel-dosen.php @@ -0,0 +1,94 @@ +getDosenWithNip($id_pelanggaran_dosen); +$level = $session->get('level'); +$img = $obj->getImgProfileDosen($data['nip']); +?> + + + + + + + + + Sistem Tata Tertib | Polinema + + + + + + + + + + +
+ + + + +
+ + +
+ + + +
+ + + + + + + + + + \ No newline at end of file diff --git a/Tata_Tertib/views/history/admin-detpel-karyawan.php b/Tata_Tertib/views/history/admin-detpel-karyawan.php new file mode 100644 index 0000000..15b949b --- /dev/null +++ b/Tata_Tertib/views/history/admin-detpel-karyawan.php @@ -0,0 +1,95 @@ +getKaryawanWithNip($id_pelanggaran); +$level = $session->get('level'); +$img = $obj->getImgProfileKaryawan($data['nip']); + +?> + + + + + + + + +Sistem Tata Tertib | Polinema + + + + + + + + + + +
+ + + + +
+ + +
+ + + +
+ + + + + + + + + + \ No newline at end of file diff --git a/Tata_Tertib/views/history/admin-detpel-mhs.php b/Tata_Tertib/views/history/admin-detpel-mhs.php new file mode 100644 index 0000000..32e0834 --- /dev/null +++ b/Tata_Tertib/views/history/admin-detpel-mhs.php @@ -0,0 +1,118 @@ +getDetailPelMhs($id); +$level = $session->get('level'); + +$sanksiJson = file_get_contents('../../assets/sanksi.json'); +$sanksiData = json_decode($sanksiJson, true); +$imgMhs = $obj->getImgProfileMhs($data['nim']); + +?> + + + + + + + + + Sistem Tata Tertib | Polinema + + + + + + + + + + +
+ + + + +
+ + +
+ + + +
+ + + + + + + + + + \ No newline at end of file diff --git a/Tata_Tertib/views/history/admin-table-dosen.php b/Tata_Tertib/views/history/admin-table-dosen.php new file mode 100644 index 0000000..6d1ad3e --- /dev/null +++ b/Tata_Tertib/views/history/admin-table-dosen.php @@ -0,0 +1,99 @@ +getHistoryPelDosen(); +?> + + + + +
+ Selesai +
+ '; + break; + case '2': + # code... + echo ' +
+
+ Sanksi Telah Dipenuhi +
+ '; + break; + case '3': + # code... + echo ' +
+
+ Menunggu Sanksi +
'; + break; + case '4': + # code... + echo ' +
+
+ Menunggu Konfirmasi +
'; + break; + default: + echo $id_status; + break; + } +} +?> \ No newline at end of file diff --git a/Tata_Tertib/views/history/admin-table-karyawan.php b/Tata_Tertib/views/history/admin-table-karyawan.php new file mode 100644 index 0000000..8dedb91 --- /dev/null +++ b/Tata_Tertib/views/history/admin-table-karyawan.php @@ -0,0 +1,99 @@ +getHistoryPelKaryawan(); +?> + + + + +
+ Selesai +
+ '; + break; + case '2': + # code... + echo ' +
+
+ Sanksi Telah Dipenuhi +
+ '; + break; + case '3': + # code... + echo ' +
+
+ Menunggu Sanksi +
'; + break; + case '4': + # code... + echo ' +
+
+ Menunggu Konfirmasi +
'; + break; + default: + echo $id_status; + break; + } +} +?> \ No newline at end of file diff --git a/Tata_Tertib/views/history/admin-table-mahasiswa.php b/Tata_Tertib/views/history/admin-table-mahasiswa.php new file mode 100644 index 0000000..3cbfb6d --- /dev/null +++ b/Tata_Tertib/views/history/admin-table-mahasiswa.php @@ -0,0 +1,101 @@ +getHistoryPelMhs(); +?> + + + + +
+ Selesai +
+ '; + break; + case '2': + # code... + echo ' +
+
+ Sanksi Telah Dipenuhi +
+ '; + break; + case '3': + # code... + echo ' +
+
+ Menunggu Sanksi +
'; + break; + case '4': + # code... + echo ' +
+
+ Menunggu Konfirmasi +
'; + break; + default: + echo $id_status; + break; + } +} +?> \ No newline at end of file diff --git a/Tata_Tertib/views/history/admin-tabs.js b/Tata_Tertib/views/history/admin-tabs.js new file mode 100644 index 0000000..64e833a --- /dev/null +++ b/Tata_Tertib/views/history/admin-tabs.js @@ -0,0 +1,96 @@ +// tabs.js + +function initializeTabs() { + // Menangani klik pada setiap tab untuk mengubah tab yang aktif + document.querySelectorAll('.nav-table-button').forEach(button => { + button.addEventListener('click', function () { + // Menghapus class 'active' dari semua tab + document.querySelectorAll('.nav-table-button').forEach(btn => btn.classList.remove('active')); + const title = document.getElementById('title-table'); + const tambahButton = document.getElementById('tambah-button'); + + // Menambahkan class 'active' pada tab yang diklik + this.classList.add('active'); + + updateSVGColors(); + + // Menentukan file yang akan dimuat berdasarkan tab yang aktif + const activeTabText = this.textContent.trim(); + let fileToLoad = ''; + + updateTabNavUnderline(activeTabText); + + if (activeTabText === "Mahasiswa") { + fileToLoad = 'admin-table-mahasiswa.php'; + title.textContent = "Mahasiswa"; + tambahButton.textContent = 'Download Pelanggaran'; + tambahButton.setAttribute('href', '../../action/mhs/download-pel-table.php'); // Mengatur atribut href = 'Tambah Mahasiswa'; + } else if (activeTabText === "Dosen") { + fileToLoad = 'admin-table-dosen.php'; + title.textContent = "Dosen"; + tambahButton.textContent = 'Download Pelanggaran'; + tambahButton.setAttribute('href', '../../action/dosen/download-pel-table.php'); // Mengatur atribut href = 'Tambah Dosen'; + } else if (activeTabText === "Karyawan") { + fileToLoad = 'admin-table-karyawan.php'; + title.textContent = "Karyawan"; + tambahButton.textContent = 'Download Pelanggaran'; + tambahButton.setAttribute('href', '../../action/karyawan/download-pel-table.php'); // Mengatur atribut href = 'Tambah Karyawan'; + } + + // Memuat konten sesuai tab yang dipilih + loadTableContent(fileToLoad); + }); + }); + + // Fungsi untuk memuat konten dari file PHP + function loadTableContent(file) { + const container = document.getElementById('table-content-container'); // Memilih container yang tepat + + // Menggunakan fetch untuk memuat file PHP + fetch(file) + .then(response => response.text()) + .then(data => { + // Memasukkan data yang didapat ke dalam container + container.innerHTML = data; + }) + .catch(error => { + // Menangani error jika fetch gagal + container.innerHTML = 'Terjadi kesalahan saat memuat konten.'; + console.error('Error loading content:', error); + }); + } + + // Memuat konten untuk tab aktif pertama kali + loadTableContent('admin-table-mahasiswa.php'); // Memuat konten untuk tab "Mahasiswa" pertama kali +} + +function updateSVGColors() { + document.querySelectorAll('.nav-table-button').forEach(button => { + const svg = button.querySelector('img'); // Mengambil elemen SVG (atau yang mewakili SVG) + if (button.classList.contains('active')) { + // Ubah warna SVG untuk tab aktif + svg.style.filter = 'invert(60%) sepia(77%) saturate(500%) hue-rotate(180deg) brightness(90%) contrast(95%)'; + } else { + // Kembalikan warna SVG untuk tab tidak aktif + svg.style.filter = 'none'; + } + }); +} + +function updateTabNavUnderline(button) { + const line = document.getElementById('line-active'); + + if (button === "Mahasiswa") { + line.style.marginLeft = '0px'; + line.style.width = '178.03px'; + } else if (button === "Dosen") { + line.style.marginLeft = '178.03px'; + line.style.width = '144.25px'; + } else if (button === "Karyawan") { + line.style.marginLeft = '322.28px'; + line.style.width = '169.16px'; + } +} + +// Mengekspor fungsi supaya bisa digunakan di file lain +export { initializeTabs }; \ No newline at end of file diff --git a/Tata_Tertib/views/history/bukti-selesai-dosen.php b/Tata_Tertib/views/history/bukti-selesai-dosen.php new file mode 100644 index 0000000..a74bbdf --- /dev/null +++ b/Tata_Tertib/views/history/bukti-selesai-dosen.php @@ -0,0 +1,97 @@ +getLampiranById($id_pelanggaran); +$level = $session->get('level'); +?> + + + + + + + + +Sistem Tata Tertib | Polinema + + + + + + + + + + +
+ + + + +
+ + +
+ + + + + + + + + + + + + \ No newline at end of file diff --git a/Tata_Tertib/views/history/bukti-selesai-karyawan.php b/Tata_Tertib/views/history/bukti-selesai-karyawan.php new file mode 100644 index 0000000..93d3c54 --- /dev/null +++ b/Tata_Tertib/views/history/bukti-selesai-karyawan.php @@ -0,0 +1,97 @@ +getLampiranTendikById($id_pelanggaran); +$level = $session->get('level'); +?> + + + + + + + + +Sistem Tata Tertib | Polinema + + + + + + + + + + +
+ + + + +
+ + +
+ + + + + + + + + + + + + \ No newline at end of file diff --git a/Tata_Tertib/views/history/bukti-selesai-mhs.php b/Tata_Tertib/views/history/bukti-selesai-mhs.php new file mode 100644 index 0000000..2bcf0db --- /dev/null +++ b/Tata_Tertib/views/history/bukti-selesai-mhs.php @@ -0,0 +1,103 @@ +getLampiranById($id_pelanggaran); +$level = $session->get('level'); + +$sanksiData = $obj->getSanksiById($id_pelanggaran); +?> + + + + + + + + +Sistem Tata Tertib | Polinema + + + + + + + + + + +
+ + + + +
+ + +
+ + + + + + + + + + + + + \ No newline at end of file diff --git a/Tata_Tertib/views/history/dosen-kirim-bukti.php b/Tata_Tertib/views/history/dosen-kirim-bukti.php new file mode 100644 index 0000000..4ae39e0 --- /dev/null +++ b/Tata_Tertib/views/history/dosen-kirim-bukti.php @@ -0,0 +1,104 @@ +getLampiranById($id_pelanggaran); +$level = $session->get('level'); + +function getSubmit($level) { + if ($level == 1) { + return 'disabled'; + } +} + +?> + + + + + + + + +Sistem Tata Tertib | Polinema + + + + + + + + + + +
+ + + + +
+ + + +
+ + + + + + + + + + + + + \ No newline at end of file diff --git a/Tata_Tertib/views/history/dosen-lampiran.php b/Tata_Tertib/views/history/dosen-lampiran.php new file mode 100644 index 0000000..f5615b6 --- /dev/null +++ b/Tata_Tertib/views/history/dosen-lampiran.php @@ -0,0 +1,81 @@ +getLampiranById($id_pelanggaran); +$level = $session->get('level'); + +?> + + + + + + + + +Sistem Tata Tertib | Polinema + + + + + + + + + + +
+ + + + +
+ + +
+ + + + + + + + + + + + \ No newline at end of file diff --git a/Tata_Tertib/views/history/dosen-table-pribadi.php b/Tata_Tertib/views/history/dosen-table-pribadi.php new file mode 100644 index 0000000..65ca64e --- /dev/null +++ b/Tata_Tertib/views/history/dosen-table-pribadi.php @@ -0,0 +1,91 @@ +get('username'); +$data = $obj->getPelPribadiHistory($nip); +?> + +
+ + + + + + + + + + + + + + + + + + + + + +
PelanggaranStatusTanggal/Waktu
. + +
+
+ + +
+ Selesai +
+ '; + break; + case '2': + # code... + echo ' +
+
+ Sanksi Telah Dipenuhi +
+ '; + break; + case '3': + # code... + echo ' +
+
+ Menunggu Sanksi +
'; + break; + case '4': + # code... + echo ' +
+
+ Menunggu Konfirmasi +
'; + break; + default: + echo $id_status; + break; + } +} +?> \ No newline at end of file diff --git a/Tata_Tertib/views/history/dpa-detpel-mhs.php b/Tata_Tertib/views/history/dpa-detpel-mhs.php new file mode 100644 index 0000000..dbec2d5 --- /dev/null +++ b/Tata_Tertib/views/history/dpa-detpel-mhs.php @@ -0,0 +1,119 @@ +getDetailPelMhs($id); +$level = $session->get('level'); + +$sanksiJson = file_get_contents('../../assets/sanksi.json'); +$sanksiData = json_decode($sanksiJson, true); + +$imgMhs = $obj->getImgProfileMhs($data['nim']); + +?> + + + + + + + + +Sistem Tata Tertib | Polinema + + + + + + + + + + +
+ + + + +
+ + +
+ + + +
+ + + + + + + + + + \ No newline at end of file diff --git a/Tata_Tertib/views/history/dpa-table-mahasiswa.php b/Tata_Tertib/views/history/dpa-table-mahasiswa.php new file mode 100644 index 0000000..c1b4659 --- /dev/null +++ b/Tata_Tertib/views/history/dpa-table-mahasiswa.php @@ -0,0 +1,132 @@ +get('username'); +$data = $obj->getTabelPelMhsHistory($nip); + +function getTombolBuktiTebus($data, $i) +{ + $id = $data[$i]["id_pelanggaran_mhs"]; + if ($data[$i]["status_pelanggaran"] <= 2) { + echo ' + Bukti Tebus Sanksi + '; + } else { + echo ' + Bukti Tebus Sanksi + '; + } +} + +function getTombolSelesai($data, $i) +{ + if ($data[$i]["status_pelanggaran"] == 2) { + echo ' + Selesai + '; + } else { + echo ' + Selesai + '; + } +} + +?> + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
NamaNIMStatusTanggal/WaktuKategori
. + +
+
+ + +
+ Selesai +
+ '; + break; + case '2': + # code... + echo ' +
+
+ Sanksi Telah Dipenuhi +
+ '; + break; + case '3': + # code... + echo ' +
+
+ Menunggu Sanksi +
'; + break; + case '4': + # code... + echo ' +
+
+ Menunggu Konfirmasi +
'; + break; + default: + echo $id_status; + break; + } +} +?> \ No newline at end of file diff --git a/Tata_Tertib/views/history/dpa-table-pribadi.php b/Tata_Tertib/views/history/dpa-table-pribadi.php new file mode 100644 index 0000000..60c3b48 --- /dev/null +++ b/Tata_Tertib/views/history/dpa-table-pribadi.php @@ -0,0 +1,93 @@ +get('username'); +$data = $obj->getPelPribadiHistory($nip); +?> + +
+ + + + + + + + + + + + + + + + + + + + + +
PelanggaranStatusTanggal/Waktu
. + +
+
+ + +
+ Selesai +
+ '; + break; + case '2': + # code... + echo ' +
+
+ Sanksi Telah Dipenuhi +
+ '; + break; + case '3': + # code... + echo ' +
+
+ Menunggu Sanksi +
'; + break; + case '4': + # code... + echo ' +
+
+ Menunggu Konfirmasi +
'; + break; + default: + echo $id_status; + break; + } +} +?> \ No newline at end of file diff --git a/Tata_Tertib/views/history/dpa-tabs.js b/Tata_Tertib/views/history/dpa-tabs.js new file mode 100644 index 0000000..a098d70 --- /dev/null +++ b/Tata_Tertib/views/history/dpa-tabs.js @@ -0,0 +1,83 @@ +// tabs.js + +function initializeTabs(nama_kelas) { + // Menangani klik pada setiap tab untuk mengubah tab yang aktif + document.querySelectorAll('.nav-table-button').forEach(button => { + button.addEventListener('click', function () { + // Menghapus class 'active' dari semua tab + document.querySelectorAll('.nav-table-button').forEach(btn => btn.classList.remove('active')); + const title = document.getElementById('title-table'); + + // Menambahkan class 'active' pada tab yang diklik + this.classList.add('active'); + + updateSVGColors(); + + // Menentukan file yang akan dimuat berdasarkan tab yang aktif + const activeTabText = this.textContent.trim(); + let fileToLoad = ''; + + updateTabNavUnderline(activeTabText); + + if (activeTabText === "Mahasiswa") { + fileToLoad = 'dpa-table-mahasiswa.php'; + title.textContent = `Kelas`; + } else if (activeTabText === "Pribadi") { + fileToLoad = 'dpa-table-pribadi.php'; + title.textContent = "Pribadi"; + } + + // Memuat konten sesuai tab yang dipilih + loadTableContent(fileToLoad); + }); + }); + + // Fungsi untuk memuat konten dari file PHP + function loadTableContent(file) { + const container = document.getElementById('table-content-container'); // Memilih container yang tepat + + // Menggunakan fetch untuk memuat file PHP + fetch(file) + .then(response => response.text()) + .then(data => { + // Memasukkan data yang didapat ke dalam container + container.innerHTML = data; + }) + .catch(error => { + // Menangani error jika fetch gagal + container.innerHTML = 'Terjadi kesalahan saat memuat konten.'; + console.error('Error loading content:', error); + }); + } + + // Memuat konten untuk tab aktif pertama kali + loadTableContent('dpa-table-mahasiswa.php'); // Memuat konten untuk tab "Mahasiswa" pertama kali +} + +function updateSVGColors() { + document.querySelectorAll('.nav-table-button').forEach(button => { + const svg = button.querySelector('img'); // Mengambil elemen SVG (atau yang mewakili SVG) + if (button.classList.contains('active')) { + // Ubah warna SVG untuk tab aktif + svg.style.filter = 'invert(60%) sepia(77%) saturate(500%) hue-rotate(180deg) brightness(90%) contrast(95%)'; + } else { + // Kembalikan warna SVG untuk tab tidak aktif + svg.style.filter = 'none'; + } + }); +} + +function updateTabNavUnderline(button) { + const line = document.getElementById('line-active'); + + if (button === "Mahasiswa") { + line.style.marginLeft = '0px'; + line.style.width = '178.03px'; + } else if (button === "Pribadi") { + line.style.marginLeft = '178.03px'; + line.style.width = '147.81px'; + } +} + +// Mengekspor fungsi supaya bisa digunakan di file lain +export { initializeTabs }; \ No newline at end of file diff --git a/Tata_Tertib/views/history/history-admin.php b/Tata_Tertib/views/history/history-admin.php new file mode 100644 index 0000000..74b74be --- /dev/null +++ b/Tata_Tertib/views/history/history-admin.php @@ -0,0 +1,74 @@ + + + + + + + + + + Sistem Tata Tertib | Polinema + + + + + + + + + +
+ + + + +
+
+

History Pelanggaran Mahasiswa

+ Download Pelanggaran +
+ + +
+ +
+
+
+
+ + +
+ +
+
+ + + +
+ + + + + + + + + + + + \ No newline at end of file diff --git a/Tata_Tertib/views/history/history-dosen.php b/Tata_Tertib/views/history/history-dosen.php new file mode 100644 index 0000000..9218897 --- /dev/null +++ b/Tata_Tertib/views/history/history-dosen.php @@ -0,0 +1,61 @@ + + + + + + + + + +Sistem Tata Tertib | Polinema + + + + + + + + + +
+ + + + +
+

History Pelanggaran

+ + + +
+
+
+ + +
+ + +
+
+ + + +
+ + + + + + + + + + + \ No newline at end of file diff --git a/Tata_Tertib/views/Dosen/dashboard-admin.php b/Tata_Tertib/views/history/history-dpa.php similarity index 53% rename from Tata_Tertib/views/Dosen/dashboard-admin.php rename to Tata_Tertib/views/history/history-dpa.php index 5005859..1a3876f 100644 --- a/Tata_Tertib/views/Dosen/dashboard-admin.php +++ b/Tata_Tertib/views/history/history-dpa.php @@ -1,14 +1,18 @@ + + - Website with Sidebar + +Sistem Tata Tertib | Polinema - - @@ -22,12 +26,13 @@
-

List Pelanggaran Mahasiswa

+

History Pelanggaran Mahasiswa

@@ -48,12 +53,18 @@ // Mengimpor dan menjalankan fungsi dari tabs.js import { initializeTabs - } from './tabs.js'; + } from './dpa-tabs.js'; document.addEventListener('DOMContentLoaded', () => { initializeTabs(); // Menjalankan fungsi untuk menginisialisasi tab }); + + + + + + \ No newline at end of file diff --git a/Tata_Tertib/views/history/history-karyawan.php b/Tata_Tertib/views/history/history-karyawan.php new file mode 100644 index 0000000..292c5f3 --- /dev/null +++ b/Tata_Tertib/views/history/history-karyawan.php @@ -0,0 +1,61 @@ + + + + + + + + + +Sistem Tata Tertib | Polinema + + + + + + + + + +
+ + + + +
+

History Pelanggaran

+ + + +
+
+
+ + +
+ + +
+
+ + + +
+ + + + + + + + + + + \ No newline at end of file diff --git a/Tata_Tertib/views/history/history-mhs.php b/Tata_Tertib/views/history/history-mhs.php new file mode 100644 index 0000000..81b725e --- /dev/null +++ b/Tata_Tertib/views/history/history-mhs.php @@ -0,0 +1,61 @@ + + + + + + + + + +Sistem Tata Tertib | Polinema + + + + + + + + + +
+ + + + +
+

History Pelanggaran Mahasiswa

+ + + +
+
+
+ + +
+ + +
+
+ + + +
+ + + + + + + + + + + \ No newline at end of file diff --git a/Tata_Tertib/views/history/karyawan-kirim-bukti.php b/Tata_Tertib/views/history/karyawan-kirim-bukti.php new file mode 100644 index 0000000..faee635 --- /dev/null +++ b/Tata_Tertib/views/history/karyawan-kirim-bukti.php @@ -0,0 +1,104 @@ +getLampiranById($id_pelanggaran); +$level = $session->get('level'); + +function getSubmit($level) { + if ($level == 1) { + return 'disabled'; + } +} + +?> + + + + + + + + +Sistem Tata Tertib | Polinema + + + + + + + + + + +
+ + + + +
+ + + +
+ + + + + + + + + + + + + \ No newline at end of file diff --git a/Tata_Tertib/views/history/karyawan-lampiran.php b/Tata_Tertib/views/history/karyawan-lampiran.php new file mode 100644 index 0000000..e3049f3 --- /dev/null +++ b/Tata_Tertib/views/history/karyawan-lampiran.php @@ -0,0 +1,81 @@ +getLampiranById($id_pelanggaran); +$level = $session->get('level'); + +?> + + + + + + + + +Sistem Tata Tertib | Polinema + + + + + + + + + + +
+ + + + +
+ + +
+ + + + + + + + + + + + \ No newline at end of file diff --git a/Tata_Tertib/views/history/karyawan-table-pribadi.php b/Tata_Tertib/views/history/karyawan-table-pribadi.php new file mode 100644 index 0000000..53bd636 --- /dev/null +++ b/Tata_Tertib/views/history/karyawan-table-pribadi.php @@ -0,0 +1,91 @@ +get('username'); +$data = $obj->getPelPribadiHistory($nip); +?> + +
+ + + + + + + + + + + + + + + + + + + + + +
PelanggaranStatusTanggal/Waktu
. + +
+
+ + +
+ Selesai +
+ '; + break; + case '2': + # code... + echo ' +
+
+ Sanksi Telah Dipenuhi +
+ '; + break; + case '3': + # code... + echo ' +
+
+ Menunggu Sanksi +
'; + break; + case '4': + # code... + echo ' +
+
+ Menunggu Konfirmasi +
'; + break; + default: + echo $id_status; + break; + } +} +?> \ No newline at end of file diff --git a/Tata_Tertib/views/history/mhs-kirim-bukti.php b/Tata_Tertib/views/history/mhs-kirim-bukti.php new file mode 100644 index 0000000..07127be --- /dev/null +++ b/Tata_Tertib/views/history/mhs-kirim-bukti.php @@ -0,0 +1,105 @@ +getLampiranById($id_pelanggaran); +$level = $session->get('level'); + +$sanksiData = $obj->getSanksiById($id_pelanggaran); +?> + + + + + + + + +Sistem Tata Tertib | Polinema + + + + + + + + + + +
+ + + + +
+ + +
+ + + + + + + + + + + + + \ No newline at end of file diff --git a/Tata_Tertib/views/history/mhs-lampiran.php b/Tata_Tertib/views/history/mhs-lampiran.php new file mode 100644 index 0000000..a9860c8 --- /dev/null +++ b/Tata_Tertib/views/history/mhs-lampiran.php @@ -0,0 +1,84 @@ +getLampiranById($id_pelanggaran); +$level = $session->get('level'); + +$sanksiData = $obj->getSanksiById($id_pelanggaran); +?> + + + + + + + + +Sistem Tata Tertib | Polinema + + + + + + + + + + +
+ + + + +
+ + +
+ + + + + + + + + + + + \ No newline at end of file diff --git a/Tata_Tertib/views/history/mhs-table-pribadi.php b/Tata_Tertib/views/history/mhs-table-pribadi.php new file mode 100644 index 0000000..6b5f744 --- /dev/null +++ b/Tata_Tertib/views/history/mhs-table-pribadi.php @@ -0,0 +1,95 @@ +get('username'); +$data = $obj->getPelPribadiHistory($nip); +?> + + + +
+ + + + + + + + + + + + + + + + + + + + + + + +
PelanggaranKategoriStatusTanggal/Waktu
. + +
+
+ + +
+ Selesai +
+ '; + break; + case '2': + # code... + echo ' +
+
+ Sanksi Telah Dipenuhi +
+ '; + break; + case '3': + # code... + echo ' +
+
+ Menunggu Sanksi +
'; + break; + case '4': + # code... + echo ' +
+
+ Menunggu Konfirmasi +
'; + break; + default: + echo $id_status; + break; + } +} +?> \ No newline at end of file diff --git a/Tata_Tertib/views/Dosen/script.js b/Tata_Tertib/views/history/script.js similarity index 100% rename from Tata_Tertib/views/Dosen/script.js rename to Tata_Tertib/views/history/script.js diff --git a/Tata_Tertib/views/history/style.css b/Tata_Tertib/views/history/style.css new file mode 100644 index 0000000..5e997e0 --- /dev/null +++ b/Tata_Tertib/views/history/style.css @@ -0,0 +1,389 @@ +body { + margin: 0; + font-family: Arial, sans-serif; + color: #4a4a4a; + display: flex; + height: 100vh; + overflow: hidden; +} + +/* Sidebar Styles */ +.sidebar { + width: 70px; + background-color: #1976D2; + color: white; + height: 100%; + position: flex; + transition: width 0.3s; + overflow: hidden; +} + +.sidebar:hover, +.sidebar.expanded { + width: 210px; +} + +.sidebar-logo { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + text-align: center; + vertical-align: center; + padding: 15px 20px 15px 20px; +} + +.sidebar-logo img { + width: 40px; + max-width: 40px; + margin-bottom: 15px; +} + +.sidebar-logo p { + display: none; + white-space: nowrap; + overflow: hidden; +} + +.sidebar:hover .sidebar-logo img, +.sidebar:hover .sidebar-logo p, +.sidebar.expanded .sidebar-logo img, +.sidebar.expanded .sidebar-logo p { + display: inline-block; +} + +.sidebar-menu { + position: absolute; + top: 120px; + list-style: none; + padding: 0; + margin: 0; +} + +.sidebar-menu li { + padding: 0px 20px 40px 22px; + display: flex; + align-items: center; +} + +.sidebar-menu li img { + display: flex; + padding-bottom: 2px; + margin-right: 10px; +} + +.sidebar-menu li a { + text-decoration: none; + color: white; + display: flex; + align-items: center; +} + +.sidebar-menu li a span { + margin-left: 10px; + display: none; +} + +.sidebar:hover .sidebar-menu li a span, +.sidebar.expanded .sidebar-menu li a span { + display: inline-block; +} + +/* Main Content Styles */ +.main-content { + background-color: #E0E2F1; + flex-grow: 1; + display: flex; + flex-direction: column; + height: 100vh; + overflow-y: auto; +} + +/* Header */ +.header { + height: 70px; + background-color: #ffffff; + border-bottom: 1px solid #ddd; + display: flex; + align-items: center; + justify-content: space-between; + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); + + position: sticky; + /* Menjadikan header sticky */ + top: 0; + /* Menempatkan header di atas halaman */ + z-index: 1000; + /* Pastikan header tetap di atas konten lainnya */ +} + +.header .header-kiri { + height: 100%; + display: flex; + align-items: center; + vertical-align: center; + flex-direction: row; + margin: 10px 0px 10px 10px; +} + +.header .header-kiri img { + cursor: pointer; + margin-right: 20px; + vertical-align: center; +} + +.header .header-kiri p { + margin: 0; + font-size: 20px; + align-items: center; + vertical-align: center; + display: inline-block; +} + +.header-kanan { + display: flex; + height: 40px; + flex-direction: row; + align-items: center; + vertical-align: center; + gap: 20px; + margin-right: 40px; +} + +.header-kanan img { + width: 40px; + /* Ubah sesuai ukuran yang diinginkan */ + height: 40px; + /* Sama dengan width agar perbandingannya 1:1 */ + object-fit: cover; + /* Potong gambar agar tidak terdistorsi */ + border-radius: 50%; + /* Membuatnya menjadi lingkaran */ + overflow: hidden; + /* Pastikan tidak ada bagian gambar yang keluar */ +} + +.header-kanan p { + margin: 0; + font-size: 20px; + flex-direction: column; + vertical-align: center; + display: flex; + line-height: 12px; + padding-top: 5px; +} + +.status-header { + font-size: 13px; +} + +/* Tabel Container */ +.table-container { + width: 98%; + height: 73%; + background-color: white; + margin-left: 1%; + margin-right: 1%; + margin-top: 1%; + border-radius: 20px; + box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); +} + +.table-container h1 { + font-size: 25px; +} + +/* Table Nav Button */ +/* Styling dasar untuk tab */ +.table-nav ul { + display: flex; + list-style-type: none; + padding: 0; + margin: 0; + margin-left: 2%; + transition: all 0.3s ease; +} + +.table-nav .nav-table-button { + display: inline-block; + padding: 10px 20px; + cursor: pointer; +} + +.table-nav .nav-table-button.active a { + color: #1976D2; + transition: color 0.3s ease; +} + +.table-nav .nav-table-button a { + text-decoration: none; + color: #BDD0E7; + transition: color 0.3s ease; +} + +.table-nav .nav-table-button:hover { + border-top-right-radius: 5px; + border-top-left-radius: 5px; + background-color: #f1f1f1; + transition: color 0.5s ease; +} + +.nav-table-button span { + margin-left: 13px; +} + +.nav-table-button img { + margin-bottom: 3px; + margin-right: 13px; +} + +.line { + display: flex; + height: 2px; + width: 96%; + background-color: #BDD0E7; + align-items: center; + margin-bottom: 20px; + border-radius: 3px; + margin-left: 2%; + margin-right: 2%; + z-index: 1; +} + +.line-active { + height: 3px; + width: 178.03px; + background-color: #1976D2; + z-index: 2; + border-radius: 5px; + transition: all 0.3s ease; +} + +/* Filter Button */ +.filter-search-container { + display: flex; +} + +.filter-buttons-container { + display: flex; + flex-direction: row; + justify-content: space-between; + align-items: center; + gap: 10px; + margin-left: 2%; +} + +.filter { + width: 97%; + margin-left: 1.5%; + margin-right: 1.5%; +} + +.filter-button { + flex-direction: row; + gap: 20px; +} + +.filter-button a { + color: #3E3D46; +} + +/* Tabel */ +.custom-table { + width: 98%; + height: 60%; + border-collapse: collapse; + border-spacing: 0 0px; + margin-left: 1%; + margin-right: 1%; +} + +.custom-table tbody tr { + background-color: #ffffff; + border-radius: 10px; +} + +.custom-table td, +.custom-table th { + padding: 15px; + text-align: left; +} + +.custom-table thead th { + background-color: #F4F4FB; + color: #858585; + font-size: 14px; + position: sticky; +} + +.custom-table tbody th { + color: #3E3D46; +} + +.custom-table tbody tr:nth-child(even) { + background-color: #FAFAFC; +} + +.custom-table tbody tr:hover { + background-color: #F1F1F1; +} + +.custom-table thead tr th:nth-child(7) { + border-top-right-radius: 10px; + border-bottom-right-radius: 10px; +} + +.custom-table thead tr th:nth-child(1) { + border-top-left-radius: 10px; + border-bottom-left-radius: 10px; +} + +.custom-table tbody tr td:nth-child(1) { + border-top-left-radius: 10px; + border-bottom-left-radius: 10px; +} + +.custom-table tbody tr td:nth-child(7) { + border-top-right-radius: 10px; + border-bottom-right-radius: 10px; +} + +.custom-table tbody tr td button { + color: #3E3D46; +} + +.table-content-container { + height: 65%; +} + +/* Footer */ +.footer { + height: 70px; + background-color: #f8f9fa; + border-top: 1px solid #ddd; + margin-top: auto; +} + +.scrollable-table::-webkit-scrollbar { + width: 6px; + height: 6px; + padding: 10px; +} + +.scrollable-table::-webkit-scrollbar-track { + border-radius: 10px; + background: rgba(0, 0, 0, 0.1); +} + +.scrollable-table::-webkit-scrollbar-thumb { + border-radius: 10px; + background: rgba(0, 0, 0, 0.2); +} + +.scrollable-table::-webkit-scrollbar-thumb:hover { + background: rgba(0, 0, 0, 0.4); +} + +.scrollable-table::-webkit-scrollbar-thumb:active { + background: rgba(0, 0, 0, .9); +} \ No newline at end of file diff --git a/Tata_Tertib/views/manajemen-user/admin-detail-data-dosen.php b/Tata_Tertib/views/manajemen-user/admin-detail-data-dosen.php new file mode 100644 index 0000000..03b5d3b --- /dev/null +++ b/Tata_Tertib/views/manajemen-user/admin-detail-data-dosen.php @@ -0,0 +1,75 @@ +getDetailDosen($nip); +$kelas = isset($data['nama_kelas']) ? $data['nama_kelas'] : '-'; +$img = $obj->getImgProfileDosen($nip); + +function getHeader($level) +{ + switch ($level) { + case '1': + return 'dashboard-admin.php'; + case '2': + return 'href:dashboard-dpa.php'; + } +} +?> + + + + + + + + + Sistem Tata Tertib | Polinema + + + + + + + + + +
+ + + + +
+ +
+ + + +
+ + + + + + + + + + \ No newline at end of file diff --git a/Tata_Tertib/views/manajemen-user/admin-detail-data-karyawan.php b/Tata_Tertib/views/manajemen-user/admin-detail-data-karyawan.php new file mode 100644 index 0000000..21b9e35 --- /dev/null +++ b/Tata_Tertib/views/manajemen-user/admin-detail-data-karyawan.php @@ -0,0 +1,74 @@ +getDetailKaryawan($nip); +$kelas = isset($data['nama_kelas']) ? $data['nama_kelas'] : '-'; +$img = $obj->getImgProfileKaryawan($nip); + +function getHeader($level) +{ + switch ($level) { + case '1': + return 'dashboard-admin.php'; + case '2': + return 'href:dashboard-dpa.php'; + } +} +?> + + + + + + + + + Sistem Tata Tertib | Polinema + + + + + + + + + +
+ + + + +
+ +
+ + + +
+ + + + + + + + + + \ No newline at end of file diff --git a/Tata_Tertib/views/manajemen-user/admin-detail-data-mhs.php b/Tata_Tertib/views/manajemen-user/admin-detail-data-mhs.php new file mode 100644 index 0000000..7becc15 --- /dev/null +++ b/Tata_Tertib/views/manajemen-user/admin-detail-data-mhs.php @@ -0,0 +1,80 @@ +getDetailMhs($nim); +$imgMhs = $obj->getImgProfileMhs($nim); + +$level = $session->get('level'); +?> + + + + + + + + + Sistem Tata Tertib | Polinema + + + + + + + + + +
+ + + + +
+ + +
+ + + +
+ + + + + + + + + + \ No newline at end of file diff --git a/Tata_Tertib/views/manajemen-user/admin-tabs.js b/Tata_Tertib/views/manajemen-user/admin-tabs.js new file mode 100644 index 0000000..68e66ff --- /dev/null +++ b/Tata_Tertib/views/manajemen-user/admin-tabs.js @@ -0,0 +1,95 @@ +// tabs.js + +function initializeTabs() { + // Menangani klik pada setiap tab untuk mengubah tab yang aktif + document.querySelectorAll('.nav-table-button').forEach(button => { + button.addEventListener('click', function () { + // Menghapus class 'active' dari semua tab + document.querySelectorAll('.nav-table-button').forEach(btn => btn.classList.remove('active')); + const title = document.getElementById('title-table'); + const tambahButton = document.getElementById('tambah-button'); + + // Menambahkan class 'active' pada tab yang diklik + this.classList.add('active'); + + updateSVGColors(); + + // Menentukan file yang akan dimuat berdasarkan tab yang aktif + const activeTabText = this.textContent.trim(); + let fileToLoad = ''; + + updateTabNavUnderline(activeTabText); + + if (activeTabText === "Mahasiswa") { + fileToLoad = 'table-mahasiswa.php'; + title.textContent = "Mahasiswa"; + tambahButton.textContent = 'Tambah Mahasiswa'; + tambahButton.setAttribute('href', 'tambah-mahasiswa.php'); // Mengatur atribut href = 'Tambah Mahasiswa'; + } else if (activeTabText === "Dosen") { + fileToLoad = 'table-dosen.php'; + title.textContent = "Dosen"; + tambahButton.textContent = 'Tambah Dosen'; + tambahButton.setAttribute('href', 'tambah-dosen.php'); // Mengatur atribut href = 'Tambah Dosen'; + } else if (activeTabText === "Karyawan") { + fileToLoad = 'table-karyawan.php'; + title.textContent = "Karyawan"; + tambahButton.textContent = 'Tambah Karyawan'; + tambahButton.setAttribute('href', 'tambah-karyawan.php'); // Mengatur atribut href = 'Tambah Karyawan'; + } + // Memuat konten sesuai tab yang dipilih + loadTableContent(fileToLoad); + }); + }); + + // Fungsi untuk memuat konten dari file PHP + function loadTableContent(file) { + const container = document.getElementById('table-content-container'); // Memilih container yang tepat + + // Menggunakan fetch untuk memuat file PHP + fetch(file) + .then(response => response.text()) + .then(data => { + // Memasukkan data yang didapat ke dalam container + container.innerHTML = data; + }) + .catch(error => { + // Menangani error jika fetch gagal + container.innerHTML = 'Terjadi kesalahan saat memuat konten.'; + console.error('Error loading content:', error); + }); + } + + // Memuat konten untuk tab aktif pertama kali + loadTableContent('table-mahasiswa.php'); // Memuat konten untuk tab "Mahasiswa" pertama kali +} + +function updateSVGColors() { + document.querySelectorAll('.nav-table-button').forEach(button => { + const svg = button.querySelector('img'); // Mengambil elemen SVG (atau yang mewakili SVG) + if (button.classList.contains('active')) { + // Ubah warna SVG untuk tab aktif + svg.style.filter = 'invert(60%) sepia(77%) saturate(500%) hue-rotate(180deg) brightness(90%) contrast(95%)'; + } else { + // Kembalikan warna SVG untuk tab tidak aktif + svg.style.filter = 'none'; + } + }); +} + +function updateTabNavUnderline(button) { + const line = document.getElementById('line-active'); + + if (button === "Mahasiswa") { + line.style.marginLeft = '0px'; + line.style.width = '178.03px'; + } else if (button === "Dosen") { + line.style.marginLeft = '178.03px'; + line.style.width = '144.25px'; + } else if (button === "Karyawan") { + line.style.marginLeft = '322.28px'; + line.style.width = '169.16px'; + } +} + +// Mengekspor fungsi supaya bisa digunakan di file lain +export { initializeTabs }; \ No newline at end of file diff --git a/Tata_Tertib/views/manajemen-user/deleteDosen.php b/Tata_Tertib/views/manajemen-user/deleteDosen.php new file mode 100644 index 0000000..e84d05c --- /dev/null +++ b/Tata_Tertib/views/manajemen-user/deleteDosen.php @@ -0,0 +1,7 @@ + deleteDosen($id); +header("Location: manajemen-user.php"); +?> \ No newline at end of file diff --git a/Tata_Tertib/views/manajemen-user/deleteKaryawan.php b/Tata_Tertib/views/manajemen-user/deleteKaryawan.php new file mode 100644 index 0000000..829d48f --- /dev/null +++ b/Tata_Tertib/views/manajemen-user/deleteKaryawan.php @@ -0,0 +1,7 @@ + deleteKaryawan($id); +header("Location: manajemen-user.php"); +?> \ No newline at end of file diff --git a/Tata_Tertib/views/manajemen-user/deleteMhs.php b/Tata_Tertib/views/manajemen-user/deleteMhs.php new file mode 100644 index 0000000..9d0d72b --- /dev/null +++ b/Tata_Tertib/views/manajemen-user/deleteMhs.php @@ -0,0 +1,8 @@ + deleteMhs($id); + return $result; +header("Location: manajemen-user.php"); +?> diff --git a/Tata_Tertib/views/manajemen-user/edit-dosen.php b/Tata_Tertib/views/manajemen-user/edit-dosen.php new file mode 100644 index 0000000..05a7c19 --- /dev/null +++ b/Tata_Tertib/views/manajemen-user/edit-dosen.php @@ -0,0 +1,137 @@ +getKelasMhs(); +$id = $_GET['nip']; +$edit = $admin->reaByIdDosen($id); +$dataDosen = $admin->getDosenByIdDosen($id); + +if ($_SERVER["REQUEST_METHOD"] == "POST") { + $nama = $_POST['nama']; + $noTelp = $_POST['no_telp']; + $password = $_POST['password']; + $email = $_POST['email']; + $status = $_POST['status']; + $kelas = $_POST['kelas']; + $img = $_FILES['foto_profile']['tmp_name']; + $fotoProfile = file_get_contents($img); + $addDosen = $admin->editDosen($password, $nama, $status, $noTelp, $email, $kelas, $fotoProfile, $id); + + header("Location:manajemen-user.php"); + exit(); +} +?> + + + + + + + + + Sistem Tata Tertib | Polinema + + + + + + + + + + +
+ + +
+

Input Data Dosen

+
+
+
+ +
+ +
+
+
+
+ +
+ +
+
+ +
+ +
+
+
+ +
+ + +
+ +
+ +
+ +
+
+
+ +
+ + +
+ +
+ +
+ +
+
+
+ +
+ + +
+ +
+
+ +
+ + + +
+ +
+ +
+
+ +
+ + + + + \ No newline at end of file diff --git a/Tata_Tertib/views/manajemen-user/edit-karyawan.php b/Tata_Tertib/views/manajemen-user/edit-karyawan.php new file mode 100644 index 0000000..1ad8636 --- /dev/null +++ b/Tata_Tertib/views/manajemen-user/edit-karyawan.php @@ -0,0 +1,110 @@ +readByIdKaryawan($id); +$dataKaryawan = $admin->getAllDataKaryawanWithId($id); +if ($_SERVER["REQUEST_METHOD"] == "POST") { + $password = $_POST['password']; + $nama = $_POST['nama']; + $status = $_POST['status']; + $no_telp = $_POST['no_telp']; + $email = $_POST['email']; + $img = $_FILES['foto_profile']['tmp_name']; + $fotoProfile = file_get_contents($img); + + $result = $admin->editKaryawan($password, $nama, $status, $no_telp, $email, $fotoProfile, $id); + header("Location:manajemen-user.php"); + exit(); +} +?> + + + + + + + + + Sistem Tata Tertib | Polinema + + + + + + + + + + +
+ + +
+

Input Data Karyawan

+
+
+
+ +
+ +
+
+
+ +
+ +
+
+ +
+ +
+
+
+ +
+ +
+ +
+ +
+ +
+
+
+ +
+ + +
+ +
+
+ +
+ +
+ +
+ +
+
+ +
+ + + + + \ No newline at end of file diff --git a/Tata_Tertib/views/manajemen-user/edit-mhs.php b/Tata_Tertib/views/manajemen-user/edit-mhs.php new file mode 100644 index 0000000..c78a60f --- /dev/null +++ b/Tata_Tertib/views/manajemen-user/edit-mhs.php @@ -0,0 +1,152 @@ + getKelasForMhs(); +$id = $_GET['nim']; +$edit = $order -> reaByIdMhs($id); +$dataMhs = $order->getAllDataMhsWithId($id); + +if($_SERVER["REQUEST_METHOD"] == "POST"){ + $nama = $_POST['nama']; + $password = $_POST['password']; + $kelas = $_POST['kelas']; + $status = $_POST['status']; + $notelp = $_POST['no_telp']; + $alamat = $_POST['alamat']; + $email = $_POST['email']; + $namaAyah = $_POST['nama_ayah']; + $noTelpAyah = $_POST['no_telp_ayah']; + $namaIbu = $_POST['nama_ibu']; + $noTelpIbu = $_POST['no_telp_ibu']; + $img = $_FILES['foto_profile']['tmp_name']; + $fotoProfile = file_get_contents($img); + $editmhs = $order -> editMhs($nama, $password, $status, $kelas, $notelp, $alamat, $email, $namaAyah, $noTelpAyah, $namaIbu, $noTelpIbu, $id, $fotoProfile); + header("Location:manajemen-user.php"); + exit(); +} + +?> + + + + + + + +Sistem Tata Tertib | Polinema + + + + + + + + + + +
+ + +
+

Input Data Mahasiswa

+
+
+
+ +
+ +
+
+
+ +
+ +
+
+ +
+ +
+
+
+ +
+ +
+
+ +
+ +
+
+
+ +
+ +
+
+ +
+ +
+
+
+ +
+ +
+
+ +
+ +
+
+
+ +
+ +
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+
+ +
+ +
+
+ +
+ + + + + \ No newline at end of file diff --git a/Tata_Tertib/views/manajemen-user/manajemen-user.php b/Tata_Tertib/views/manajemen-user/manajemen-user.php new file mode 100644 index 0000000..bcaef07 --- /dev/null +++ b/Tata_Tertib/views/manajemen-user/manajemen-user.php @@ -0,0 +1,70 @@ + + + + + + + + + +Sistem Tata Tertib | Polinema + + + + + + + + + +
+ + + + +
+
+

Manajemen Mahasiswa

+ Tambah Mahasiswa +
+ +
+ +
+
+
+
+ + +
+ +
+
+ + + +
+ + + + + + + + + \ No newline at end of file diff --git a/Tata_Tertib/views/Pelanggaran/script.js b/Tata_Tertib/views/manajemen-user/script.js similarity index 53% rename from Tata_Tertib/views/Pelanggaran/script.js rename to Tata_Tertib/views/manajemen-user/script.js index 56265d6..ec114bd 100644 --- a/Tata_Tertib/views/Pelanggaran/script.js +++ b/Tata_Tertib/views/manajemen-user/script.js @@ -36,34 +36,5 @@ function initializeTabFilter() { } } -// Menambahkan event listener untuk ikon filter -document.querySelector('.filter-button').addEventListener('click', function() { - // Ambil elemen di dalam filter-button - var icon = this.querySelector('i'); - - // Toggle antara bi-funnel dan bi-funnel-fill pada elemen - icon.classList.toggle('bi-funnel'); - icon.classList.toggle('bi-funnel-fill'); - - // Menampilkan atau menyembunyikan dropdown filter - var dropdownMenu = document.querySelector('.dropdown-menu'); - dropdownMenu.classList.toggle('d-none'); // Menyembunyikan/menampilkan dropdown -}); - -// Event listener untuk menutup dropdown dan mengembalikan ikon ke semula -document.addEventListener('click', function(event) { - // Cek apakah klik terjadi di luar filter-button atau dropdown-menu - var filterButton = document.querySelector('.filter-button'); - var dropdownMenu = document.querySelector('.dropdown-menu'); - - if (!filterButton.contains(event.target) && !dropdownMenu.contains(event.target)) { - // Jika klik di luar filter-button dan dropdown, sembunyikan dropdown dan reset ikon - dropdownMenu.classList.add('d-none'); - var icon = filterButton.querySelector('i'); - icon.classList.remove('bi-funnel-fill'); - icon.classList.add('bi-funnel'); - } -}); - // Panggil fungsi untuk inisialisasi filter saat halaman dimuat document.addEventListener('DOMContentLoaded', initializeTabFilter); diff --git a/Tata_Tertib/views/Admin/style.css b/Tata_Tertib/views/manajemen-user/style.css similarity index 84% rename from Tata_Tertib/views/Admin/style.css rename to Tata_Tertib/views/manajemen-user/style.css index 3c8f46f..fea9639 100644 --- a/Tata_Tertib/views/Admin/style.css +++ b/Tata_Tertib/views/manajemen-user/style.css @@ -20,7 +20,7 @@ body { .sidebar:hover, .sidebar.expanded { - width: 200px; + width: 210px; } .sidebar-logo { @@ -117,7 +117,6 @@ body { /* Pastikan header tetap di atas konten lainnya */ } - .header .header-kiri { height: 100%; display: flex; @@ -147,7 +146,7 @@ body { flex-direction: row; align-items: center; vertical-align: center; - gap: 30px; + gap: 20px; margin-right: 40px; } @@ -181,7 +180,7 @@ body { /* Tabel Container */ .table-container { width: 98%; - height: 65%; + height: 73%; background-color: white; margin-left: 1%; margin-right: 1%; @@ -191,9 +190,7 @@ body { } .table-container h1 { - font-size: 30px; - margin-left: 2%; - margin-top: 2%; + font-size: 25px; } /* Table Nav Button */ @@ -231,10 +228,19 @@ body { transition: color 0.5s ease; } +.nav-table-button span { + margin-left: 13px; +} + +.nav-table-button img { + margin-bottom: 3px; + margin-right: 13px; +} + .line { display: flex; height: 2px; - width: 94%; + width: 96%; background-color: #BDD0E7; align-items: center; margin-bottom: 20px; @@ -246,20 +252,47 @@ body { .line-active { height: 3px; - width: 152px; + width: 178.03px; background-color: #1976D2; z-index: 2; border-radius: 5px; transition: all 0.3s ease; } +/* Filter Button */ +.filter-search-container { + display: flex; +} +.filter-buttons-container { + display: flex; + flex-direction: row; + justify-content: space-between; + align-items: center; + gap: 10px; + margin-left: 2%; +} + +.filter { + width: 97%; + margin-left: 1.5%; + margin-right: 1.5%; +} + +.filter-button { + flex-direction: row; + gap: 20px; +} + +.filter-button a { + color: #3E3D46; +} /* Tabel */ .custom-table { width: 98%; height: 60%; - border-collapse: separate; + border-collapse: collapse; border-spacing: 0 0px; margin-left: 1%; margin-right: 1%; @@ -280,6 +313,7 @@ body { background-color: #F4F4FB; color: #858585; font-size: 14px; + position: sticky; } .custom-table tbody th { @@ -319,8 +353,7 @@ body { } .table-content-container { - height: 60%; - overflow-y: auto; + height: 65%; } /* Footer */ @@ -329,4 +362,22 @@ body { background-color: #f8f9fa; border-top: 1px solid #ddd; margin-top: auto; +} + +.scrollable-table::-webkit-scrollbar-track { + border-radius: 10px; + background: rgba(0, 0, 0, 0.1); +} + +.scrollable-table::-webkit-scrollbar-thumb { + border-radius: 10px; + background: rgba(0, 0, 0, 0.2); +} + +.scrollable-table::-webkit-scrollbar-thumb:hover { + background: rgba(0, 0, 0, 0.4); +} + +.scrollable-table::-webkit-scrollbar-thumb:active { + background: rgba(0, 0, 0, .9); } \ No newline at end of file diff --git a/Tata_Tertib/views/manajemen-user/table-dosen.php b/Tata_Tertib/views/manajemen-user/table-dosen.php new file mode 100644 index 0000000..d90ec15 --- /dev/null +++ b/Tata_Tertib/views/manajemen-user/table-dosen.php @@ -0,0 +1,55 @@ +getTabelUserDosen(); +?> + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
NamaNIPEmailKelasNo TeelpStatus
. + +
+
\ No newline at end of file diff --git a/Tata_Tertib/views/manajemen-user/table-karyawan.php b/Tata_Tertib/views/manajemen-user/table-karyawan.php new file mode 100644 index 0000000..5e7406e --- /dev/null +++ b/Tata_Tertib/views/manajemen-user/table-karyawan.php @@ -0,0 +1,55 @@ +getTabelUserKaryawan(); + +// Menampilkan tabel dengan perulangan for +?> + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
NamaNIPEmailNo TelpStatus
. +
+
\ No newline at end of file diff --git a/Tata_Tertib/views/manajemen-user/table-mahasiswa.php b/Tata_Tertib/views/manajemen-user/table-mahasiswa.php new file mode 100644 index 0000000..e357162 --- /dev/null +++ b/Tata_Tertib/views/manajemen-user/table-mahasiswa.php @@ -0,0 +1,54 @@ +getTabelUserMahasiswa(); +?> + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
NamaNIMNo telpKelasEmail
. + +
+
\ No newline at end of file diff --git a/Tata_Tertib/views/manajemen-user/tambah-dosen.php b/Tata_Tertib/views/manajemen-user/tambah-dosen.php new file mode 100644 index 0000000..804de68 --- /dev/null +++ b/Tata_Tertib/views/manajemen-user/tambah-dosen.php @@ -0,0 +1,126 @@ +getKelasMhs(); + +if ($_SERVER["REQUEST_METHOD"] == "POST") { + $nama = $_POST['nama']; + $nip = $_POST['nip']; + $noTelp = $_POST['no_telp']; + $password = $_POST['password']; + $email = $_POST['email']; + $status = $_POST['status']; + $kelas = isset($_POST['kelas']) && !empty($_POST['kelas']) ? $_POST['kelas'] : null; + $img = $_FILES['foto_profile']['tmp_name']; + $fotoProfile = file_get_contents($img); + $addDosen = $admin->addTabelUserDosen($nama, $nip, $noTelp, $password, $email, $status, $kelas, $fotoProfile); + return $addDosen; +} + +?> + + + + + + + + + Sistem Tata Tertib | Polinema + + + + + + + + + + +
+ + +
+

Input Data Dosen

+
+
+
+ +
+ +
+
+ +
+ +
+
+
+ +
+ +
+
+ +
+ +
+
+
+ +
+ +
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+
+
+ +
+ +
+
+
+
+
+ +
+ +
+
+ +
+ + + + + \ No newline at end of file diff --git a/Tata_Tertib/views/manajemen-user/tambah-karyawan.php b/Tata_Tertib/views/manajemen-user/tambah-karyawan.php new file mode 100644 index 0000000..12876ba --- /dev/null +++ b/Tata_Tertib/views/manajemen-user/tambah-karyawan.php @@ -0,0 +1,114 @@ + addTabelUserKaryawan($nama, $password, $status, $nip, $noTelp, $email, $fotoProfile); + header("Location:manajemen-user.php"); + exit(); +} +?> + + + + + + + + +Sistem Tata Tertib | Polinema + + + + + + + + + + +
+ + +
+

Input Data Karyawan

+
+
+
+ +
+ +
+
+ +
+ +
+
+
+ +
+ +
+
+ +
+ +
+
+
+ +
+ + +
+ +
+ +
+ +
+
+
+ +
+ + +
+ +
+
+ +
+ +
+ +
+ +
+
+ +
+ + + + + \ No newline at end of file diff --git a/Tata_Tertib/views/manajemen-user/tambah-mahasiswa.php b/Tata_Tertib/views/manajemen-user/tambah-mahasiswa.php new file mode 100644 index 0000000..d98cb4f --- /dev/null +++ b/Tata_Tertib/views/manajemen-user/tambah-mahasiswa.php @@ -0,0 +1,155 @@ +addTabelUserMahasiswa($nama, $password, $status, $nim, $kelas, $noTelp, $alamat, $email, $namaAyah, $noTelpAyah, $namaIbu, $noTelpIbu, $fotoProfile); + return $tabelMahasiswa; +} +$kelas = $data->getKelasForMhs(); + +?> + + + + + + + +Sistem Tata Tertib | Polinema + + + + + + + + + + +
+ + +
+

Input Data Mahasiswa

+
+
+
+ +
+ +
+
+ +
+ +
+
+
+ +
+ +
+
+ +
+ +
+
+
+ +
+ +
+
+ +
+ +
+
+
+ +
+ +
+
+ +
+ +
+
+
+ +
+ +
+
+ +
+ +
+
+
+ +
+ +
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+
+ +
+ +
+
+ +
+ + + + + \ No newline at end of file diff --git a/Tata_Tertib/views/report/form-dosen.php b/Tata_Tertib/views/report/form-dosen.php new file mode 100644 index 0000000..ce1aaa3 --- /dev/null +++ b/Tata_Tertib/views/report/form-dosen.php @@ -0,0 +1,102 @@ +getPelanggaran(); + +$nip = isset($_GET['nip']) ? $_GET['nip'] : ''; +$data = $obj->getSimpleDataDosen($nip); + +$base64_image = base64_encode($data['foto_profile']); + +?> + + + + + + + + +Sistem Tata Tertib | Polinema + + + + + + + + + + +
+ + + + +
+

Formulir Laporan Pelanggaran Dosen

+ +
+
+
+
+
+

+

+ +
+
+
+ +
+
+ +
+ +
+
+
+ +
+

+
+ + cancel +
+
+
+ +
+ + + +
+ + + + + + + + + + + + \ No newline at end of file diff --git a/Tata_Tertib/views/report/form-karyawan.php b/Tata_Tertib/views/report/form-karyawan.php new file mode 100644 index 0000000..2ce3560 --- /dev/null +++ b/Tata_Tertib/views/report/form-karyawan.php @@ -0,0 +1,102 @@ +getPelanggaran(); + +$nip = isset($_GET['nip']) ? $_GET['nip'] : ''; +$data = $obj->getSimpleDataKaryawan($nip); + +$base64_image = base64_encode($data['foto_profile']); + +?> + + + + + + + + +Sistem Tata Tertib | Polinema + + + + + + + + + + +
+ + + + +
+

Formulir Laporan Pelanggaran Karyawan

+ +
+
+
+
+
+

+

+ +
+
+
+ +
+
+ +
+ +
+
+
+ +
+

+
+ + cancel +
+
+
+ +
+ + + +
+ + + + + + + + + + + + \ No newline at end of file diff --git a/Tata_Tertib/views/report/form-mhs.php b/Tata_Tertib/views/report/form-mhs.php new file mode 100644 index 0000000..0e52fb6 --- /dev/null +++ b/Tata_Tertib/views/report/form-mhs.php @@ -0,0 +1,108 @@ +getPelanggaran(); + +$nim = isset($_GET['nim']) ? $_GET['nim'] : ''; +$data = $obj->getSimpleDataMhs($nim); + +$base64_image = base64_encode($data['foto_profile']); +?> + + + + + + + + +Sistem Tata Tertib | Polinema + + + + + + + + + + +
+ + + + +
+

Formulir Laporan Pelanggaran Mahasiswa

+ +
+
+
+
+
+

+

+ +
+
+ + +
+
+ +
+ +
+
+
+ +
+
+
+ + cancel +
+
+
+ +
+ + + +
+ + + + + + + + + + + + \ No newline at end of file diff --git a/Tata_Tertib/views/report/list-dosen.php b/Tata_Tertib/views/report/list-dosen.php new file mode 100644 index 0000000..cfd9fee --- /dev/null +++ b/Tata_Tertib/views/report/list-dosen.php @@ -0,0 +1,56 @@ + + + + + + + + + +Sistem Tata Tertib | Polinema + + + + + + + + + +
+ + + + +
+ + +

Pilih Dosen Yang Ingin Dilaporkan

+
+
+
+ + +
+ + +
+
+ + + +
+ + + + + + + + + + + \ No newline at end of file diff --git a/Tata_Tertib/views/report/list-karyawan.php b/Tata_Tertib/views/report/list-karyawan.php new file mode 100644 index 0000000..502b8c5 --- /dev/null +++ b/Tata_Tertib/views/report/list-karyawan.php @@ -0,0 +1,56 @@ + + + + + + + + + +Sistem Tata Tertib | Polinema + + + + + + + + + +
+ + + + +
+ + +

Pilih Karyawan Yang Ingin Dilaporkan

+
+
+
+ + +
+ + +
+
+ + + +
+ + + + + + + + + + + \ No newline at end of file diff --git a/Tata_Tertib/views/report/list-mhs.php b/Tata_Tertib/views/report/list-mhs.php new file mode 100644 index 0000000..a324dc8 --- /dev/null +++ b/Tata_Tertib/views/report/list-mhs.php @@ -0,0 +1,56 @@ + + + + + + + + + +Sistem Tata Tertib | Polinema + + + + + + + + + +
+ + + + +
+ + +

Pilih Mahasiswa Yang Ingin Dilaporkan

+
+
+
+ + +
+ + +
+
+ + + +
+ + + + + + + + + + + \ No newline at end of file diff --git a/Tata_Tertib/views/Dosen/tabs.js b/Tata_Tertib/views/report/report-tabs.js similarity index 80% rename from Tata_Tertib/views/Dosen/tabs.js rename to Tata_Tertib/views/report/report-tabs.js index eec0d1f..8896a4b 100644 --- a/Tata_Tertib/views/Dosen/tabs.js +++ b/Tata_Tertib/views/report/report-tabs.js @@ -6,6 +6,7 @@ function initializeTabs() { button.addEventListener('click', function () { // Menghapus class 'active' dari semua tab document.querySelectorAll('.nav-table-button').forEach(btn => btn.classList.remove('active')); + const title = document.getElementById('title-table'); // Menambahkan class 'active' pada tab yang diklik this.classList.add('active'); @@ -19,11 +20,14 @@ function initializeTabs() { updateTabNavUnderline(activeTabText); if (activeTabText === "Mahasiswa") { - fileToLoad = 'table-mahasiswa.php'; + fileToLoad = 'tab-mhs.php'; + title.textContent = "Laporkan Mahasiswa"; } else if (activeTabText === "Dosen") { - fileToLoad = 'table-dosen.php'; + fileToLoad = 'tab-dosen.php'; + title.textContent = "Laporkan Dosen"; } else if (activeTabText === "Karyawan") { - fileToLoad = 'table-karyawan.php'; + fileToLoad = 'tab-karyawan.php'; + title.textContent = "Laporkan Karyawan"; } // Memuat konten sesuai tab yang dipilih @@ -50,7 +54,7 @@ function initializeTabs() { } // Memuat konten untuk tab aktif pertama kali - loadTableContent('table-mahasiswa.php'); // Memuat konten untuk tab "Mahasiswa" pertama kali + loadTableContent('tab-mhs.php'); // Memuat konten untuk tab "Mahasiswa" pertama kali } function updateSVGColors() { @@ -71,13 +75,13 @@ function updateTabNavUnderline(button) { if (button === "Mahasiswa") { line.style.marginLeft = '0px'; - line.style.width = '152.03px'; + line.style.width = '178.03px'; } else if (button === "Dosen") { - line.style.marginLeft = '152.03px'; - line.style.width = '118.25px'; + line.style.marginLeft = '178.03px'; + line.style.width = '144.25px'; } else if (button === "Karyawan") { - line.style.marginLeft = '270.28px'; - line.style.width = '143.16px'; + line.style.marginLeft = '322.28px'; + line.style.width = '169.16px'; } } diff --git a/Tata_Tertib/views/report/report.php b/Tata_Tertib/views/report/report.php new file mode 100644 index 0000000..5338d59 --- /dev/null +++ b/Tata_Tertib/views/report/report.php @@ -0,0 +1,74 @@ +getFlash('status'); +if ($status === false) { + $message = $session->getFlash('message'); + echo ""; +} +?> + + + + + + + + +Sistem Tata Tertib | Polinema + + + + + + + + + +
+ + + + +
+

Laporkan Mahasiswa

+ + +
+ +
+
+
+
+ + +
+ +
+
+ + + +
+ + + + + + + + + \ No newline at end of file diff --git a/Tata_Tertib/views/report/script.js b/Tata_Tertib/views/report/script.js new file mode 100644 index 0000000..ec114bd --- /dev/null +++ b/Tata_Tertib/views/report/script.js @@ -0,0 +1,40 @@ +document.addEventListener('DOMContentLoaded', function () { + const sidebar = document.getElementById('sidebar'); + const menuToggle = document.getElementById('menu-toggle'); + const mainContent = document.querySelector('.main-content'); + + menuToggle.addEventListener('click', () => { + sidebar.classList.toggle('expanded'); + mainContent.classList.toggle('expanded'); + }); +}); + +const navButtons = document.querySelectorAll('.nav-table-button'); + +// Menambahkan event listener untuk setiap tombol +navButtons.forEach(button => { + button.addEventListener('click', function () { + // Menghapus class 'active' dari semua tombol + navButtons.forEach(button => button.classList.remove('active')); + + // Menambahkan class 'active' pada tombol yang diklik + this.classList.add('active'); + }); +}); + +// Fungsi untuk menginisialisasi filter pada tab aktif +function initializeTabFilter() { + // Pilih tab yang memiliki class 'active' + const activeTab = document.querySelector('.nav-table-button.active'); + + // Pilih elemen img (atau SVG) di dalam tab aktif + const svg = activeTab.querySelector('img'); + + // Terapkan filter pada SVG di dalam tab aktif + if (svg) { + svg.style.filter = 'invert(60%) sepia(77%) saturate(500%) hue-rotate(180deg) brightness(90%) contrast(95%)'; + } +} + +// Panggil fungsi untuk inisialisasi filter saat halaman dimuat +document.addEventListener('DOMContentLoaded', initializeTabFilter); diff --git a/Tata_Tertib/views/Dosen/style.css b/Tata_Tertib/views/report/style.css similarity index 89% rename from Tata_Tertib/views/Dosen/style.css rename to Tata_Tertib/views/report/style.css index 3c8f46f..b74f414 100644 --- a/Tata_Tertib/views/Dosen/style.css +++ b/Tata_Tertib/views/report/style.css @@ -20,7 +20,7 @@ body { .sidebar:hover, .sidebar.expanded { - width: 200px; + width: 210px; } .sidebar-logo { @@ -117,7 +117,6 @@ body { /* Pastikan header tetap di atas konten lainnya */ } - .header .header-kiri { height: 100%; display: flex; @@ -147,7 +146,7 @@ body { flex-direction: row; align-items: center; vertical-align: center; - gap: 30px; + gap: 20px; margin-right: 40px; } @@ -181,7 +180,7 @@ body { /* Tabel Container */ .table-container { width: 98%; - height: 65%; + height: 73%; background-color: white; margin-left: 1%; margin-right: 1%; @@ -191,9 +190,7 @@ body { } .table-container h1 { - font-size: 30px; - margin-left: 2%; - margin-top: 2%; + font-size: 25px; } /* Table Nav Button */ @@ -231,10 +228,19 @@ body { transition: color 0.5s ease; } +.nav-table-button span { + margin-left: 13px; +} + +.nav-table-button img { + margin-bottom: 3px; + margin-right: 13px; +} + .line { display: flex; height: 2px; - width: 94%; + width: 96%; background-color: #BDD0E7; align-items: center; margin-bottom: 20px; @@ -246,20 +252,47 @@ body { .line-active { height: 3px; - width: 152px; + width: 178.03px; background-color: #1976D2; z-index: 2; border-radius: 5px; transition: all 0.3s ease; } +/* Filter Button */ +.filter-search-container { + display: flex; +} +.filter-buttons-container { + display: flex; + flex-direction: row; + justify-content: space-between; + align-items: center; + gap: 10px; + margin-left: 2%; +} + +.filter{ + width: 97%; + margin-left: 1.5%; + margin-right: 1.5%; +} + +.filter-button { + flex-direction: row; + gap: 20px; +} + +.filter-button a{ + color: #3E3D46; +} /* Tabel */ .custom-table { width: 98%; height: 60%; - border-collapse: separate; + border-collapse: collapse; border-spacing: 0 0px; margin-left: 1%; margin-right: 1%; @@ -280,6 +313,7 @@ body { background-color: #F4F4FB; color: #858585; font-size: 14px; + position: sticky; } .custom-table tbody th { @@ -319,8 +353,7 @@ body { } .table-content-container { - height: 60%; - overflow-y: auto; + height: 65%; } /* Footer */ diff --git a/Tata_Tertib/views/report/tab-dosen.php b/Tata_Tertib/views/report/tab-dosen.php new file mode 100644 index 0000000..772f3cb --- /dev/null +++ b/Tata_Tertib/views/report/tab-dosen.php @@ -0,0 +1,32 @@ +getTabelPelDosen(); +?> + +
+ + +

Masukkan Data Dosen

+ +
+
+ +
+ + Cari Berdasarkan: +
+ + +
+ + +
+
\ No newline at end of file diff --git a/Tata_Tertib/views/report/tab-karyawan.php b/Tata_Tertib/views/report/tab-karyawan.php new file mode 100644 index 0000000..a2875e5 --- /dev/null +++ b/Tata_Tertib/views/report/tab-karyawan.php @@ -0,0 +1,32 @@ +getTabelPelKaryawan(); +?> + +
+ + +

Masukkan Data Karyawan

+ +
+
+ +
+ + Cari Berdasarkan: +
+ + +
+ + +
+
\ No newline at end of file diff --git a/Tata_Tertib/views/report/tab-mhs.php b/Tata_Tertib/views/report/tab-mhs.php new file mode 100644 index 0000000..f5e3d1a --- /dev/null +++ b/Tata_Tertib/views/report/tab-mhs.php @@ -0,0 +1,32 @@ + + +
+ + +

Masukkan Data Mahasiswa

+ + +
+
+ +
+ + Cari Berdasarkan: +
+ + +
+ + +
+ +
diff --git a/Tata_Tertib/views/report/table-list-dosen.php b/Tata_Tertib/views/report/table-list-dosen.php new file mode 100644 index 0000000..608a391 --- /dev/null +++ b/Tata_Tertib/views/report/table-list-dosen.php @@ -0,0 +1,44 @@ +searchDosenByName($input); +?> +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + +
NamaNIPKelas
. + " class="btn btn-danger">Laporkan +
+
+ + \ No newline at end of file diff --git a/Tata_Tertib/views/report/table-list-karyawan.php b/Tata_Tertib/views/report/table-list-karyawan.php new file mode 100644 index 0000000..3d4718a --- /dev/null +++ b/Tata_Tertib/views/report/table-list-karyawan.php @@ -0,0 +1,42 @@ +searchKaryawanByName($input); +?> +
+ + +
+
+ + + + + + + + + + + + + + + + + + + +
NamaNIP
. + " class="btn btn-danger">Laporkan +
+
+ + \ No newline at end of file diff --git a/Tata_Tertib/views/report/table-list-mhs.php b/Tata_Tertib/views/report/table-list-mhs.php new file mode 100644 index 0000000..11dec40 --- /dev/null +++ b/Tata_Tertib/views/report/table-list-mhs.php @@ -0,0 +1,44 @@ +searchMhsByName($input); +?> +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + +
NamaNIPKelas
. + " class="btn btn-danger">Laporkan +
+
+ + \ No newline at end of file diff --git a/sanksi.json b/sanksi.json new file mode 100644 index 0000000..c96931c --- /dev/null +++ b/sanksi.json @@ -0,0 +1,49 @@ +{ + "sanksi": [ + { + "tingkat": "V", + "deskripsi_pelanggaran": "Pelanggaran ringan", + "sanksi": [ + "Teguran lisan disertai dengan surat pernyataan tidak mengulangi perbuatan tersebut", + "Surat pernyataan dibubuhi materai dan ditandatangani mahasiswa dan DPA" + ] + }, + { + "tingkat": "IV", + "deskripsi_pelanggaran": "Pelanggaran menengah", + "sanksi": [ + "Teguran tertulis disertai dengan pemanggilan orang tua/wali", + "Membuat surat pernyataan tidak mengulangi perbuatan tersebut, dibubuhi materai", + "Surat pernyataan ditandatangani mahasiswa, orang tua/wali, dan DPA" + ] + }, + { + "tingkat": "III", + "deskripsi_pelanggaran": "Pelanggaran moderat", + "sanksi": [ + "Membuat surat pernyataan tidak mengulangi perbuatan tersebut, dibubuhi materai", + "Surat pernyataan ditandatangani mahasiswa, orang tua/wali, dan DPA", + "Melakukan tugas khusus, seperti memperbaiki atau membersihkan kembali" + ] + }, + { + "tingkat": "II", + "deskripsi_pelanggaran": "Pelanggaran serius", + "sanksi": [ + "Dikenakan penggantian kerugian atau penggantian benda/barang semacamnya", + "Melakukan tugas layanan sosial dalam jangka waktu tertentu", + "Diberikan nilai D pada mata kuliah terkait saat melakukan pelanggaran" + ] + }, + { + "tingkat": "I", + "deskripsi_pelanggaran": "Pelanggaran sangat serius", + "sanksi": [ + "Dinonaktifkan (Cuti Akademik/Terminal) selama dua semester", + "Diberhentikan sebagai mahasiswa" + ] + } + ], + "catatan": "Pemberian sanksi dan mekanisme ditetapkan dalam peraturan tersendiri." + } + \ No newline at end of file