403Webshell
Server IP : 127.0.0.1  /  Your IP : 192.168.99.1
Web Server : Apache/2.4.35 (Win64) OpenSSL/1.1.1b mod_fcgid/2.3.9
System : Windows NT WIN-JEJMB9EN0L0 10.0 build 14393 (Windows Server 2016) AMD64
User : Administrator ( 0)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  D:/bpkd/admin/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : D:/bpkd/admin/services_form.php
<!-- Add Modal -->
<div class="modal fade" id="addModal" tabindex="-1">
    <div class="modal-dialog modal-lg">
        <div class="modal-content">
            <form method="POST" action="<?php echo BASE_URL; ?>/admin/services.php">
                <div class="modal-header">
                    <h5 class="modal-title">
                        <i class="fas fa-plus-circle me-2"></i>Tambah Layanan Baru
                    </h5>
                    <button type="button" class="btn-close" data-bs-dismiss="modal"></button>
                </div>
                <div class="modal-body">
                    <div class="row">
                        <div class="col-md-8 mb-3">
                            <label class="form-label">Judul Layanan <span class="text-danger">*</span></label>
                            <input type="text" class="form-control" name="title" id="addTitle" required>
                        </div>
                        <div class="col-md-4 mb-3">
                            <label class="form-label">Urutan Tampil</label>
                            <input type="number" class="form-control" name="service_order" value="0" min="0">
                        </div>
                    </div>
                    
                    <div class="mb-3">
                        <label class="form-label">Deskripsi <span class="text-danger">*</span></label>
                        <textarea class="form-control" name="description" rows="3" id="addDesc" required></textarea>
                    </div>
                    
                    <div class="row">
                        <div class="col-md-6 mb-3">
                            <label class="form-label">Icon (Font Awesome)</label>
                            <div class="input-group">
                                <span class="input-group-text"><i class="fas fa-icons"></i></span>
                                <input type="text" class="form-control" name="icon" id="addIcon" value="fas fa-file-alt">
                            </div>
                            <small class="text-muted">
                                Contoh: fas fa-file-alt, fas fa-comments, fas fa-info-circle
                            </small>
                        </div>
                        <div class="col-md-6 mb-3">
                            <label class="form-label">Link/URL</label>
                            <input type="text" class="form-control" name="link" placeholder="/layanan/... atau https://...">
                            <small class="text-muted">Contoh: layanan-administrasi.php, /layanan, atau https://example.com</small>
                        </div>
                    </div>
                    
                    <div class="row">
                        <div class="col-md-6 mb-3">
                            <label class="form-label">Teks Tombol</label>
                            <input type="text" class="form-control" name="button_text" value="Selengkapnya">
                        </div>
                        <div class="col-md-6 mb-3">
                            <label class="form-label">Status</label>
                            <select class="form-control" name="status">
                                <option value="active">Aktif</option>
                                <option value="inactive">Tidak Aktif</option>
                            </select>
                        </div>
                    </div>
                    
                    <div class="mb-3">
                        <div class="form-check">
                            <input class="form-check-input" type="checkbox" name="featured" id="featured">
                            <label class="form-check-label" for="featured">
                                <i class="fas fa-star text-warning me-1"></i>Jadikan Layanan Unggulan (Featured)
                            </label>
                        </div>
                    </div>
                    
                    <!-- Preview Card -->
                    <div class="service-preview-card">
                        <i class="fas fa-file-alt" id="previewIcon"></i>
                        <h6 id="previewTitle">Judul Layanan</h6>
                        <p id="previewDesc">Deskripsi layanan akan muncul di sini...</p>
                        <button class="btn btn-primary btn-sm" disabled>Selengkapnya</button>
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Batal</button>
                    <button type="submit" name="add" class="btn btn-primary">
                        <i class="fas fa-save me-2"></i>Simpan
                    </button>
                </div>
            </form>
        </div>
    </div>
</div>

<!-- Edit Modal -->
<?php if ($edit_service): ?>
<div class="modal fade" id="editModal" tabindex="-1" data-bs-backdrop="static">
    <div class="modal-dialog modal-lg">
        <div class="modal-content">
            <form method="POST" action="<?php echo BASE_URL; ?>/admin/services.php">
                <div class="modal-header">
                    <h5 class="modal-title">
                        <i class="fas fa-edit me-2"></i>Edit Layanan
                    </h5>
                    <a href="<?php echo BASE_URL; ?>/admin/services.php" class="btn-close"></a>
                </div>
                <div class="modal-body">
                    <input type="hidden" name="id" value="<?php echo $edit_service['id']; ?>">
                    
                    <div class="row">
                        <div class="col-md-8 mb-3">
                            <label class="form-label">Judul Layanan <span class="text-danger">*</span></label>
                            <input type="text" class="form-control" name="title" id="editTitle" value="<?php echo htmlspecialchars($edit_service['title']); ?>" required>
                        </div>
                        <div class="col-md-4 mb-3">
                            <label class="form-label">Urutan Tampil</label>
                            <input type="number" class="form-control" name="service_order" value="<?php echo $edit_service['service_order']; ?>" min="0">
                        </div>
                    </div>
                    
                    <div class="mb-3">
                        <label class="form-label">Deskripsi <span class="text-danger">*</span></label>
                        <textarea class="form-control" name="description" rows="3" id="editDesc" required><?php echo htmlspecialchars($edit_service['description']); ?></textarea>
                    </div>
                    
                    <div class="row">
                        <div class="col-md-6 mb-3">
                            <label class="form-label">Icon (Font Awesome)</label>
                            <div class="input-group">
                                <span class="input-group-text"><i class="<?php echo $edit_service['icon']; ?>"></i></span>
                                <input type="text" class="form-control" name="icon" id="editIcon" value="<?php echo $edit_service['icon']; ?>">
                            </div>
                            <small class="text-muted">
                                Contoh: fas fa-file-alt, fas fa-comments, fas fa-info-circle
                            </small>
                        </div>
                        <div class="col-md-6 mb-3">
                            <label class="form-label">Link/URL</label>
                            <input type="text" class="form-control" name="link" value="<?php echo htmlspecialchars($edit_service['link']); ?>">
                        </div>
                    </div>
                    
                    <div class="row">
                        <div class="col-md-6 mb-3">
                            <label class="form-label">Teks Tombol</label>
                            <input type="text" class="form-control" name="button_text" value="<?php echo htmlspecialchars($edit_service['button_text']); ?>">
                        </div>
                        <div class="col-md-6 mb-3">
                            <label class="form-label">Status</label>
                            <select class="form-control" name="status">
                                <option value="active" <?php echo $edit_service['status'] == 'active' ? 'selected' : ''; ?>>Aktif</option>
                                <option value="inactive" <?php echo $edit_service['status'] == 'inactive' ? 'selected' : ''; ?>>Tidak Aktif</option>
                            </select>
                        </div>
                    </div>
                    
                    <div class="mb-3">
                        <div class="form-check">
                            <input class="form-check-input" type="checkbox" name="featured" id="editFeatured" <?php echo $edit_service['featured'] ? 'checked' : ''; ?>>
                            <label class="form-check-label" for="editFeatured">
                                <i class="fas fa-star text-warning me-1"></i>Jadikan Layanan Unggulan (Featured)
                            </label>
                        </div>
                    </div>
                    
                    <!-- Preview Card -->
                    <div class="service-preview-card">
                        <i class="<?php echo $edit_service['icon']; ?>" id="editPreviewIcon"></i>
                        <h6 id="editPreviewTitle"><?php echo htmlspecialchars($edit_service['title']); ?></h6>
                        <p id="editPreviewDesc"><?php echo htmlspecialchars(substr($edit_service['description'], 0, 80)); ?>...</p>
                        <button class="btn btn-primary btn-sm" disabled><?php echo htmlspecialchars($edit_service['button_text']); ?></button>
                    </div>
                </div>
                <div class="modal-footer">
                    <a href="<?php echo BASE_URL; ?>/admin/services.php" class="btn btn-secondary">Batal</a>
                    <button type="submit" name="edit" class="btn btn-primary">
                        <i class="fas fa-save me-2"></i>Update
                    </button>
                </div>
            </form>
        </div>
    </div>
</div>

<script>
// Pass BASE_URL ke JavaScript
const BASE_URL = '<?php echo BASE_URL; ?>';

// Live preview untuk Add Modal
const addTitle = document.getElementById('addTitle');
const addDesc = document.getElementById('addDesc');
const addIcon = document.getElementById('addIcon');
const previewTitle = document.getElementById('previewTitle');
const previewDesc = document.getElementById('previewDesc');
const previewIcon = document.getElementById('previewIcon');

if (addTitle) {
    addTitle.addEventListener('input', function() {
        previewTitle.textContent = this.value || 'Judul Layanan';
    });
}
if (addDesc) {
    addDesc.addEventListener('input', function() {
        previewDesc.textContent = this.value.substring(0, 100) || 'Deskripsi layanan akan muncul di sini...';
    });
}
if (addIcon) {
    addIcon.addEventListener('input', function() {
        previewIcon.className = this.value || 'fas fa-file-alt';
    });
}

// Live preview untuk Edit Modal
const editTitle = document.getElementById('editTitle');
const editDesc = document.getElementById('editDesc');
const editIcon = document.getElementById('editIcon');
const editPreviewTitle = document.getElementById('editPreviewTitle');
const editPreviewDesc = document.getElementById('editPreviewDesc');
const editPreviewIcon = document.getElementById('editPreviewIcon');

if (editTitle) {
    editTitle.addEventListener('input', function() {
        editPreviewTitle.textContent = this.value || 'Judul Layanan';
    });
}
if (editDesc) {
    editDesc.addEventListener('input', function() {
        editPreviewDesc.textContent = this.value.substring(0, 100) || 'Deskripsi layanan akan muncul di sini...';
    });
}
if (editIcon) {
    editIcon.addEventListener('input', function() {
        editPreviewIcon.className = this.value || 'fas fa-file-alt';
    });
}

// Show edit modal automatically
document.addEventListener('DOMContentLoaded', function() {
    const editModal = document.getElementById('editModal');
    if (editModal) {
        new bootstrap.Modal(editModal).show();
    }
});
</script>

<style>
.service-preview-card {
    background: #f8f9fc;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    margin-top: 15px;
    border: 1px solid #e3e6f0;
}

.service-preview-card i {
    font-size: 2rem;
    color: #4e73df;
    margin-bottom: 10px;
}

.service-preview-card h6 {
    margin-bottom: 5px;
    font-weight: 600;
}

.service-preview-card p {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 10px;
}

.service-preview-card .btn-sm {
    font-size: 0.7rem;
    padding: 3px 10px;
}
</style>
<?php endif; ?>

Youez - 2016 - github.com/yon3zu
LinuXploit