⚠️ **YÜKSEK GÜVENLİK RİSKİ:** Bu dosya herkese açık ve şifresizdir. Lütfen sadece **yerel ortamınızda** kullanın ve işiniz bittiğinde **silin**.
Aktif Dizin:
/home/dltain/public_html/app/Views/blog/admin/menus
Dosya Düzenle: form.php
<?php echo $this->extend("layout/default"); ?> <?php echo $this->section("content"); ?> <div class="container"> <h1 class="text-3xl font-bold text-gray-800 mb-6"> <?= isset($menu) ? 'Edit Menu Item' : 'Add New Menu Item' ?> </h1> <?php if (session()->getFlashdata('errors')): ?> <div class="bg-red-100 border border-red-400 text-red-700 px-4 py-3 rounded relative mb-4" role="alert"> <ul class="list-disc list-inside"> <?php foreach (session()->getFlashdata('errors') as $error): ?> <li><?= esc($error) ?></li> <?php endforeach; ?> </ul> </div> <?php endif; ?> <form action="<?= isset($menu) ? base_url().'admin/menu/update/' . $menu['id'] : base_url().'admin/menu/store' ?>" method="post"> <?= csrf_field() ?> <?php if (isset($menu)): ?> <input type="hidden" name="id" value="<?= esc($menu['id']) ?>"> <input type="hidden" name="_method" value="PUT"> <?php endif; ?> <!-- Name Field --> <div class="form-group"> <label for="name" class="block text-sm font-medium text-gray-700">Name</label> <input type="text" id="name" name="name" value="<?= old('name', $menu['name'] ?? '') ?>" class="form-control" required> </div> <!-- Slug Field --> <div class="form-group"> <label for="slug" class="block text-sm font-medium text-gray-700">Slug</label> <input type="text" id="slug" name="slug" value="<?= old('slug', $menu['slug'] ?? '') ?>" class="form-control" required> </div> <!-- Parent Menu (parent_id) --> <div class="form-group"> <label for="parent_id" class="block text-sm font-medium text-gray-700">Parent Menu</label> <select id="parent_id" name="parent_id" class="form-control"> <option value="0">No Parent</option> <?php foreach ($parentMenus as $parent): ?> <option value="<?= esc($parent['id']) ?>" <?= old('parent_id', $menu['parent_id'] ?? 0) == $parent['id'] ? 'selected' : '' ?>> <?= esc($parent['name']) ?> </option> <?php endforeach; ?> </select> </div> <!-- Orders Field --> <div class="form-group"> <label for="orders" class="block text-sm font-medium text-gray-700">Order</label> <input type="number" id="orders" name="orders" value="<?= old('orders', $menu['orders'] ?? 0) ?>" class="form-control" required> </div> <div class="grid grid-cols-1 md:grid-cols-3 gap-6 mt-6"> <!-- Top Bar Checkbox --> <div class="form-group"> <input id="top_bar" name="top_bar" type="checkbox" value="1" <?= old('top_bar', $menu['top_bar'] ?? 0) ? 'checked' : '' ?> class="h-4 w-4 text-indigo-600 border-gray-300 rounded"> <label for="top_bar" class="ml-2 block text-sm text-gray-900">Show in Top Bar</label> </div> <!-- Footer Menu Checkbox --> <div class="form-group"> <input id="footer_menu" name="footer_menu" type="checkbox" value="1" <?= old('footer_menu', $menu['footer_menu'] ?? 0) ? 'checked' : '' ?> class="h-4 w-4 text-indigo-600 border-gray-300 rounded"> <label for="footer_menu" class="ml-2 block text-sm text-gray-900">Show in Footer Menu</label> </div> <!-- Status Checkbox --> <div class="form-group"> <input id="status" name="status" type="checkbox" value="1" <?= old('status', $menu['status'] ?? 0) ? 'checked' : '' ?> class="h-4 w-4 text-indigo-600 border-gray-300 rounded"> <label for="status" class="ml-2 block text-sm text-gray-900">Active</label> </div> </div> <div class="mt-6 flex justify-end"> <a href="<?=base_url()?>admin/menu" class="btn btn-primary"> Cancel </a> <button type="submit" class="btn btn-primary"> <?= isset($menu) ? 'Update' : 'Save' ?> Menu </button> </div> </form> </div> </div> <?= $this->endSection() ?>
Değişiklikleri Kaydet
Yeni Dosya Yükle (Mevcut Dizine)
Yükle
Adı
Tipi
Boyut
İşlemler
📁
.. (Üst Dizin)
📄 _menu_tree.php
Dosya
1.86 KB
Düzenle
Sil
📄 form.php
Dosya
4.59 KB
Düzenle
Sil
📄 list.php
Dosya
3.12 KB
Düzenle
Sil
Sorun Giderme (Shell Erişimi)
Çalıştır