Web FT UNTAN (Laravel 8) versi lama + dump database ftuntan_web_profil

Kode dari ftuntan_main dengan dependensi diperbarui untuk PHP 8.3
(perbaikan insiden 27 Okt 2026). Dump database di database/sql/.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
izu
2026-10-29 13:31:52 +07:00
co-authored by Claude Opus 5.5
commit 5f264c815a
489 changed files with 61031 additions and 0 deletions
@@ -0,0 +1,235 @@
@extends('admin/layout/main')
@section('title', 'Kegiatan Internal Kampus')
@section('container')
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<div class="content-header">
<div class="container-fluid">
<div class="row mb-2">
<div class="col-sm-6">
<h1 class="m-0">Kegiatan Internal Kampus</h1>
</div><!-- /.col -->
</div><!-- /.row -->
</div><!-- /.container-fluid -->
</div>
<!-- /.content-header -->
<!-- Alert Status -->
@if (session('status'))
<div class="alert alert-success">
{{ session('status') }}
</div>
@endif
@if (session('alert'))
<div class="alert alert-danger">
{{ session('alert') }}
</div>
@endif
<!-- Main content -->
<section class="content">
<div class="container-fluid">
<div class="row">
<div class="col-12">
<div class="card">
<div class="card-header">
<h3 class="card-title">Tambah Data Kegiatan Internal Kampus</h3>
</div>
<!-- /.card-header -->
<div class="card-body">
<div class="card-body">
<div class="row">
<!-- form start -->
<form class="from-prevent-multiple-submits" action="{{ route('kegiatan_internal_kampus.store') }}" method="POST"
id="ckeditorForm" enctype="multipart/form-data">
@csrf
<div class="card-body">
<div class="form-group">
<label for="judul">Judul</label>
<input type="text" class="form-control" id="judul" name="judul"
placeholder="Masukkan Judul" value="" required maxlength="255">
</div>
<div class="form-group">
<label for="nama_foto">Thumbnail (Maksimal 2MB)</label>
<div class="form-group">
<img id="img_preview_add" style="max-width: 200px;"
class="mt-2" />
</div>
<input type="file" accept="image/*" class="form-control mt-0"
name="thumbnail" id="input_foto_add" required>
</div>
<div class="form-group">
<label for="teks">Teks (Foto Maksimal 2MB)</label>
<textarea id="teks" placeholder="Masukkan Teks" name="teks"
class="ck_editor_txt" id="ck_editor_txt"></textarea>
</div>
<div class="form-group">
<label for="release_date">Tanggal Rilis</label>
<input type="date" class="form-control" name="release_date" required>
</div>
</div>
<!-- /.card-body -->
<div class="card-footer">
<button id="submit" type="submit" class="btn btn-primary from-prevent-multiple-submits">Save</button>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
</div>
<script>
//Define an adapter to upload the files
class MyUploadAdapter {
constructor(loader) {
// The file loader instance to use during the upload. It sounds scary but do not
// worry — the loader will be passed into the adapter later on in this guide.
this.loader = loader;
// URL where to send files.
this.url = '{{ route('ckeditor.upload') }}';
//
}
// Starts the upload process.
upload() {
return this.loader.file.then(
(file) =>
new Promise((resolve, reject) => {
this._initRequest();
this._initListeners(resolve, reject, file);
this._sendRequest(file);
})
);
}
// Aborts the upload process.
abort() {
if (this.xhr) {
this.xhr.abort();
}
}
// Initializes the XMLHttpRequest object using the URL passed to the constructor.
_initRequest() {
const xhr = (this.xhr = new XMLHttpRequest());
// Note that your request may look different. It is up to you and your editor
// integration to choose the right communication channel. This example uses
// a POST request with JSON as a data structure but your configuration
// could be different.
// xhr.open('POST', this.url, true);
xhr.open("POST", this.url, true);
xhr.setRequestHeader("x-csrf-token", "{{ csrf_token() }}");
xhr.responseType = "json";
}
// Initializes XMLHttpRequest listeners.
_initListeners(resolve, reject, file) {
const xhr = this.xhr;
const loader = this.loader;
const genericErrorText = `Couldn't upload file: ${file.name}.`;
xhr.addEventListener("error", () => reject(genericErrorText));
xhr.addEventListener("abort", () => reject());
xhr.addEventListener("load", () => {
const response = xhr.response;
// This example assumes the XHR server's "response" object will come with
// an "error" which has its own "message" that can be passed to reject()
// in the upload promise.
//
// Your integration may handle upload errors in a different way so make sure
// it is done properly. The reject() function must be called when the upload fails.
if (!response || response.error) {
return reject(response && response.error ? response.error.message : genericErrorText);
}
// If the upload is successful, resolve the upload promise with an object containing
// at least the "default" URL, pointing to the image on the server.
// This URL will be used to display the image in the content. Learn more in the
// UploadAdapter#upload documentation.
resolve({
default: response.url,
});
});
// Upload progress when it is supported. The file loader has the #uploadTotal and #uploaded
// properties which are used e.g. to display the upload progress bar in the editor
// user interface.
if (xhr.upload) {
xhr.upload.addEventListener("progress", (evt) => {
if (evt.lengthComputable) {
loader.uploadTotal = evt.total;
loader.uploaded = evt.loaded;
}
});
}
}
// Prepares the data and sends the request.
_sendRequest(file) {
// Prepare the form data.
const data = new FormData();
data.append("upload", file);
// Important note: This is the right place to implement security mechanisms
// like authentication and CSRF protection. For instance, you can use
// XMLHttpRequest.setRequestHeader() to set the request headers containing
// the CSRF token generated earlier by your application.
// Send the request.
this.xhr.send(data);
}
// ...
}
function SimpleUploadAdapterPlugin(editor) {
editor.plugins.get("FileRepository").createUploadAdapter = (loader) => {
// Configure the URL to the upload script in your back-end here!
return new MyUploadAdapter(loader);
};
}
var allEditors = document.querySelector('.ck_editor_txt');
//Initialize the ckeditor
ClassicEditor.create(document.querySelector("#teks"), {
extraPlugins: [SimpleUploadAdapterPlugin],
}).catch((error) => {
console.error(error);
});
$("#ckeditorForm").submit(function(e) {
var content = $('.ck_editor_txt').val();
html = $(content).text();
if ($.trim(html) == '') {
alert("Teks Tidak Boleh Kosong!");
e.preventDefault();
}
});
//Form add image validation
var uploadField = document.getElementById("input_foto_add");
uploadField.onchange = function() {
if (this.files[0].size > 2000000) {
alert("Batas maksimum 2MB!");
this.value = "";
} else {
//Ubah Img Preview
var reader = new FileReader();
reader.onload = function() {
var output = document.getElementById('img_preview_add');
output.src = reader.result;
}
reader.readAsDataURL(event.target.files[0]);
};
};
</script>
<script type="text/javascript">
(function(){
$('.from-prevent-multiple-submits').on('submit', function(){
$('.from-prevent-multiple-submits').attr('disabled','true');
})
})();
</script>
@endsection
@@ -0,0 +1,232 @@
@extends('admin/layout/main')
@section('title', 'Kegiatan Internal Kampus')
@section('container')
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<div class="content-header">
<div class="container-fluid">
<div class="row mb-2">
<div class="col-sm-6">
<h1 class="m-0">Kegiatan Internal Kampus</h1>
</div><!-- /.col -->
</div><!-- /.row -->
</div><!-- /.container-fluid -->
</div>
<!-- /.content-header -->
<!-- Alert Status -->
@if (session('status'))
<div class="alert alert-success">
{{ session('status') }}
</div>
@endif
@if (session('alert'))
<div class="alert alert-danger">
{{ session('alert') }}
</div>
@endif
<!-- Main content -->
<section class="content">
<div class="container-fluid">
<div class="row">
<div class="col-12">
<div class="card">
<div class="card-header">
<h3 class="card-title">Edit Data Kegiatan Internal Kampus</h3>
</div>
<!-- /.card-header -->
<div class="card-body">
<div class="card-body">
<div class="row">
<!-- form start -->
<form class="from-prevent-multiple-submits"
action="{{ route('kegiatan_internal_kampus.update', $kegiatanInternalKampu) }}"
method="POST" enctype="multipart/form-data">
@method('patch')
@csrf
<div class="card-body">
<div class="form-group">
<label for="judul">Judul</label>
<input type="text" class="form-control" id="judul" name="judul"
placeholder="Masukkan Judul" maxlength="255"
value="{{ $kegiatanInternalKampu->judul }}">
</div>
<div class="form-group">
<label for="nama_foto">Thumbnail (Maksimal 2MB)</label>
<div class="form-group">
<img src="{{ url($kegiatanInternalKampu->thumbnail) }}"
alt="Image Missing" id="old_nama_foto" style="max-width: 200px;"
class="mt-2" />
</div>
<input type="file" accept="image/*" class="form-control mt-0"
name="thumbnail" id="input_foto_edit">
<input type="hidden" name="old_thumbnail"
value="{{ $kegiatanInternalKampu->thumbnail }}">
</div>
<div class="form-group">
<label for="teks">Teks (Foto Maksimal 2MB)</label>
<textarea id="teks" placeholder="Masukkan Deskripsi Video"
name="teks">{{ $kegiatanInternalKampu->teks }}</textarea>
</div>
<div class="form-group">
<label for="release_date">Tanggal Rilis</label>
<input type="date" class="form-control" name="release_date"
value="{{ $kegiatanInternalKampu->release_date }}" required>
</div>
</div>
<!-- /.card-body -->
<div class="card-footer">
<button id="submit" type="submit"
class="btn btn-primary from-prevent-multiple-submits">Save</button>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
</div>
<script>
//Define an adapter to upload the files
class MyUploadAdapter {
constructor(loader) {
// The file loader instance to use during the upload. It sounds scary but do not
// worry — the loader will be passed into the adapter later on in this guide.
this.loader = loader;
// URL where to send files.
this.url = '{{ route('ckeditor.upload') }}';
//
}
// Starts the upload process.
upload() {
return this.loader.file.then(
(file) =>
new Promise((resolve, reject) => {
this._initRequest();
this._initListeners(resolve, reject, file);
this._sendRequest(file);
})
);
}
// Aborts the upload process.
abort() {
if (this.xhr) {
this.xhr.abort();
}
}
// Initializes the XMLHttpRequest object using the URL passed to the constructor.
_initRequest() {
const xhr = (this.xhr = new XMLHttpRequest());
// Note that your request may look different. It is up to you and your editor
// integration to choose the right communication channel. This example uses
// a POST request with JSON as a data structure but your configuration
// could be different.
// xhr.open('POST', this.url, true);
xhr.open("POST", this.url, true);
xhr.setRequestHeader("x-csrf-token", "{{ csrf_token() }}");
xhr.responseType = "json";
}
// Initializes XMLHttpRequest listeners.
_initListeners(resolve, reject, file) {
const xhr = this.xhr;
const loader = this.loader;
const genericErrorText = `Couldn't upload file: ${file.name}.`;
xhr.addEventListener("error", () => reject(genericErrorText));
xhr.addEventListener("abort", () => reject());
xhr.addEventListener("load", () => {
const response = xhr.response;
// This example assumes the XHR server's "response" object will come with
// an "error" which has its own "message" that can be passed to reject()
// in the upload promise.
//
// Your integration may handle upload errors in a different way so make sure
// it is done properly. The reject() function must be called when the upload fails.
if (!response || response.error) {
return reject(response && response.error ? response.error.message : genericErrorText);
}
// If the upload is successful, resolve the upload promise with an object containing
// at least the "default" URL, pointing to the image on the server.
// This URL will be used to display the image in the content. Learn more in the
// UploadAdapter#upload documentation.
resolve({
default: response.url,
});
});
// Upload progress when it is supported. The file loader has the #uploadTotal and #uploaded
// properties which are used e.g. to display the upload progress bar in the editor
// user interface.
if (xhr.upload) {
xhr.upload.addEventListener("progress", (evt) => {
if (evt.lengthComputable) {
loader.uploadTotal = evt.total;
loader.uploaded = evt.loaded;
}
});
}
}
// Prepares the data and sends the request.
_sendRequest(file) {
// Prepare the form data.
const data = new FormData();
data.append("upload", file);
// Important note: This is the right place to implement security mechanisms
// like authentication and CSRF protection. For instance, you can use
// XMLHttpRequest.setRequestHeader() to set the request headers containing
// the CSRF token generated earlier by your application.
// Send the request.
this.xhr.send(data);
}
// ...
}
function SimpleUploadAdapterPlugin(editor) {
editor.plugins.get("FileRepository").createUploadAdapter = (loader) => {
// Configure the URL to the upload script in your back-end here!
return new MyUploadAdapter(loader);
};
}
//Initialize the ckeditor
ClassicEditor.create(document.querySelector("#teks"), {
extraPlugins: [SimpleUploadAdapterPlugin],
}).catch((error) => {
console.error(error);
});
//Form edit image validation
var uploadField = document.getElementById("input_foto_edit");
uploadField.onchange = function() {
if (this.files[0].size > 2000000) {
alert("Batas maksimum 2MB!");
this.value = "";
} else {
//Ubah Img Preview
var reader = new FileReader();
reader.onload = function() {
var output = document.getElementById('old_nama_foto');
output.src = reader.result;
}
reader.readAsDataURL(event.target.files[0]);
};
};
</script>
<script type="text/javascript">
(function() {
$('.from-prevent-multiple-submits').on('submit', function() {
$('.from-prevent-multiple-submits').attr('disabled', 'true');
})
})();
</script>
@endsection
@@ -0,0 +1,158 @@
@extends('admin/layout/main')
@section('title', 'Kegiatan Internal Kampus')
@section('container')
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<div class="content-header">
<div class="container-fluid">
<div class="row mb-2">
<div class="col-sm-6">
<h1 class="m-0">Kegiatan Internal Kampus</h1>
</div><!-- /.col -->
</div><!-- /.row -->
</div><!-- /.container-fluid -->
</div>
<!-- /.content-header -->
<!-- Alert Status -->
@if (session('status'))
<div class="alert alert-success">
{{ session('status') }}
</div>
@endif
@if (session('alert'))
<div class="alert alert-danger">
{{ session('alert') }}
</div>
@endif
<!-- Main content -->
<section class="content">
<div class="container-fluid">
<div class="row">
<div class="col-12">
<div class="card">
<div class="card-header">
<h3 class="card-title">Data Kegiatan Internal Kampus</h3>
</div>
<!-- /.card-header -->
<div class="card-body">
<div class="row">
<div class="col-12 text-left">
<a type="button" href="{{ url('/admin/kegiatan_internal_kampus/create') }}"
class="btn btn-success mb-3"><i class="fa fa-plus-circle"></i>
Tambah Data Kegiatan Internal Kampus
</a>
</div>
</div>
<div class="table-responsive">
<table id="tabel_kegiatan_internal_kampus" class="table table-bordered table-striped">
<thead>
<tr>
<th>Nomor</th>
<th>Judul</th>
<th>Thumbnail</th>
<th>Teks</th>
<th>Jadwal Rilis</th>
<th>Status</th>
<th>Aksi</th>
</tr>
</thead>
<tbody>
@foreach ($kegiatanInternalKampus as $kegiatanInternalKampu)
<tr>
<td>{{ $loop->iteration }}</td>
<td>{{ $kegiatanInternalKampu->judul }}</td>
<td>
<img src="{{ url($kegiatanInternalKampu->thumbnail) }}"
alt="Image Missing" style="width: 100px;">
</td>
<td>
@if (strlen(strip_tags($kegiatanInternalKampu->teks)) > 100)
{{ str_replace('&nbsp;', '', substr(strip_tags($kegiatanInternalKampu->teks), 0, 100) . '...') }}
@else
{{ str_replace('&nbsp;', '', substr(strip_tags($kegiatanInternalKampu->teks), 0, 100)) }}
@endif
</td>
<td>{{ $kegiatanInternalKampu->release_date }}</td>
<td>
@if ($kegiatanInternalKampu->deleted_at != '')
Terhapus
@elseif ($kegiatanInternalKampu->release_date > date('Y-m-d'))
Belum Rilis
@else
Rilis
@endif
</td>
<td>
@if ($kegiatanInternalKampu->deleted_at != '')
<form
action="{{ url('/admin/kegiatan_internal_kampus/' . $kegiatanInternalKampu->id . '/restore') }}"
method="post">
@csrf
<button type="submit" class="btn btn-primary"
onclick="return confirm('Apakah anda yakin ingin mengembalikan data?')"><i
class="fas fa-trash-restore"></i> Restore
</button>
</form>
<form
action="{{ url('/admin/kegiatan_internal_kampus/' . $kegiatanInternalKampu->id . '/delete_permanen') }}"
method="post">
@csrf
<input type="hidden" name="thumbnail"
value="{{ $kegiatanInternalKampu->thumbnail }}">
<button type="submit" class="btn btn-danger"
onclick="return confirm('Apakah anda yakin ingin menghapus permanen data?')"><i
class="fa fa-trash"></i> Delete Permanent
</button>
</form>
@else
<a href="{{ route('kegiatan_internal_kampus.edit', $kegiatanInternalKampu) }}"
class="btn btn-warning open-formModalEdit">
<i class="fa fa-edit"></i> Edit
</a>
<form
action="{{ route('kegiatan_internal_kampus.destroy', $kegiatanInternalKampu) }}"
method="post">
@method('delete')
@csrf
<button type="submit" class="btn btn-danger"
onclick="return confirm('Apakah anda yakin ingin menghapus data?')"><i
class="fa fa-trash"></i> Delete
</button>
</form>
@endif
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
<!-- /.card-body -->
</div>
</div>
</div>
</div>
</div>
</section>
</div>
<!--Data Table -->
<script>
$(function() {
$("#tabel_kegiatan_internal_kampus").DataTable({
"paging": true,
"lengthChange": false,
"searching": true,
"ordering": true,
"info": true,
"autoWidth": false,
"responsive": false,
"buttons": ["copy", "csv", "excel", "pdf", "print", "colvis"]
}).buttons().container().appendTo('#tabel_kegiatan_internal_kampus_wrapper .col-md-6:eq(0)');
});
</script>
@endsection