📁 PHP Dosya Yöneticisi
/
/
home
/
demodesigncom
/
falscripti.demodesign.com.tr
/
ns-admin
📝
kahvefallar.php
← Geri Dön
<?php // Hata ayıklama için error_reporting etkinleştirme ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL); // Veritabanı bağlantısını kontrol et $conn = new mysqli($servername, $username, $password, $dbname); if ($conn->connect_error) { die("Bağlantı başarısız: " . $conn->connect_error); } // Karakter setini ayarla $conn->set_charset("utf8mb4"); // Veritabanı sorgusu - ID'ye göre azalan sıralama $query = "SELECT fal_tarih, fal_sorusu, durum, id, kullanici_uid, fal_tur FROM kahve_fal ORDER BY id DESC"; $result = $conn->query($query); // Sorgunun çalışıp çalışmadığını kontrol et if ($result === false) { die("Sorgu hatası: " . $conn->error); } ?> <div class="main-content group-data-[sidebar-size=sm]:ml-[70px]"> <div class="page-content dark:bg-zinc-700"> <div class="container-fluid px-4 py-6"> <!-- Başlık ve Breadcrumb --> <div class="grid grid-cols-1 pb-6"> <div class="md:flex items-center justify-between"> <h4 class="text-lg font-semibold text-gray-900 dark:text-white mb-4 md:mb-0">Fallar</h4> <nav aria-label="Breadcrumb"> <ol class="inline-flex items-center space-x-2"> <li> <a href="#" class="text-sm text-blue-600 hover:underline dark:text-blue-400"> Canlı İşlemler </a> </li> <li> <i class="fas fa-angle-right text-gray-500 dark:text-gray-400"></i> </li> <li> <a href="#" class="text-sm text-gray-600 hover:underline dark:text-gray-300">Fallar</a> </li> </ol> </nav> </div> </div> <!-- Tablo --> <div class="grid grid-cols-12 gap-6"> <div class="col-span-12"> <div class="bg-white dark:bg-zinc-800 shadow-lg rounded-lg overflow-hidden"> <div class="relative overflow-x-auto p-6"> <table id="datatable" class="min-w-full text-sm text-gray-700 dark:text-gray-200"> <thead class="bg-gray-100 dark:bg-gray-800 text-gray-600 dark:text-gray-300"> <tr> <th class="px-6 py-3 text-left">İşlemler</th> <th class="px-6 py-3 text-left">Yorumlandı</th> <th class="px-6 py-3 text-left">Soru</th> <th class="px-6 py-3 text-left">Gönderildi</th> <th class="px-6 py-3 text-left">Kullanıcı UID</th> <th class="px-6 py-3 text-left">ID</th> <th class="px-6 py-3 text-left">Yazı - Ses</th> </tr> </thead> <tbody> <?php if ($result->num_rows > 0) { while ($row = $result->fetch_assoc()) { echo '<tr id="'.$row["id"].'">'; // İşlemler echo '<td class="px-6 py-4 border-b border-gray-200 dark:border-gray-600"> <a href="falyorumla?id='.$row["id"].'" class="text-blue-600 hover:underline">Düzenle</a> <a href="/kahvefalsil.php?sil='.$row["id"].'" class="ml-4 text-red-600 hover:underline delete-record" data-id="'.$row["id"].'">Sil</a> </td>'; // Yorumlandı echo ($row["durum"] == 1) ? '<td class="px-6 py-4 border-b border-gray-200 dark:border-gray-600 text-green-500">Evet</td>' : '<td class="px-6 py-4 border-b border-gray-200 dark:border-gray-600 text-red-500 font-semibold">Hayır</td>'; // Soru echo '<td class="px-6 py-4 border-b border-gray-200 dark:border-gray-600">'.$row["fal_sorusu"].'</td>'; // Gönderildi echo '<td class="px-6 py-4 border-b border-gray-200 dark:border-gray-600">'.date("d.m.Y", strtotime($row["fal_tarih"])).'</td>'; // Kullanıcı UID echo '<td class="px-6 py-4 border-b border-gray-200 dark:border-gray-600">'.$row["kullanici_uid"].'</td>'; // ID echo '<td class="px-6 py-4 border-b border-gray-200 dark:border-gray-600">'.$row["id"].'</td>'; // Yazı - Ses echo '<td class="px-6 py-4 border-b border-gray-200 dark:border-gray-600">'.$row["fal_tur"].'</td>'; echo '</tr>'; } } else { echo '<tr><td colspan="7" class="text-center py-4 text-gray-500">Veri bulunamadı</td></tr>'; } $conn->close(); ?> </tbody> </table> </div> </div> </div> </div> <!-- Footer --> <footer class="mt-6 border-t py-4 text-center dark:border-zinc-600"> <p class="text-gray-500 dark:text-gray-400">© <script>document.write(new Date().getFullYear());</script> AEG. Tüm hakları saklıdır. </p> </footer> </div> </div> </div> <script src="https://code.jquery.com/jquery-3.6.4.min.js"></script> <script> $(document).ready(function() { $(".delete-record").click(function(e) { e.preventDefault(); var id = $(this).data("id"); var isConfirmed = confirm("Bu kaydı silmek istediğinize emin misiniz?"); if (isConfirmed) { $.ajax({ type: "GET", url: "kahvefalsil.php?sil=" + id, success: function(response) { var data = JSON.parse(response); if (data.success) { alert("Kayıt başarıyla silindi."); location.reload(); } else { alert("Hata: " + data.error); } } }); } }); }); </script>
💾 Kaydet
İptal
📝 Yeniden Adlandır
İptal
Kaydet
🔐 Dosya İzinleri (chmod)
İzin Değeri:
Hızlı Seçim:
777
755
644
600
777
= Herkes okur/yazar/çalıştırır
755
= Sahip tam, diğerleri okur/çalıştırır
644
= Sahip okur/yazar, diğerleri okur
600
= Sadece sahip okur/yazar
İptal
Uygula