<?php $stmt = $pdo->query("SELECT DISTINCT DATE_FORMAT(created_at, '%Y-%m') as archive_date FROM news ORDER BY archive_date DESC"); $archives = $stmt->fetchAll(PDO::FETCH_ASSOC); foreach ($archives as $archive) echo '<a href="archive.php?date=' . $archive['archive_date'] . '">' . date('F Y', strtotime($archive['archive_date'])) . '</a><br>';
$posts = $db->query("SELECT * FROM posts ORDER BY created_at DESC")->fetchAll(); ?> <!DOCTYPE html> <html> <head> <title>Warez Admin Panel</title> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet"> </head> <body class="container mt-4"> <div class="d-flex justify-content-between"> <h2>Admin Panel</h2> <a href="index.php" class="btn btn-secondary">View Site</a> </div> <hr> warez haber scripti php date
Use code with caution. Y: 4 haneli yıl (Örn: 2026) m: 2 haneli ay (01-12) d: 2 haneli gün (01-31) H: 24 saatlik formatta saat (00-23) i: Dakika (00-59) s: Saniye (00-59) 2. Zaman Dilimi (Timezone) Ayarlaması date('F Y', strtotime($archive['archive_date']))
Run this once using a PHP script or SQLite manager. Zaman Dilimi (Timezone) Ayarlaması Run this once using
Many news scripts store dates as a "timestamp" in the database. If your script isn't displaying the date correctly, you may need to use strtotime() convert the database string before formatting it: $db_date = $row[ 'publish_date' // Date from your database , strtotime($db_date)); Use code with caution. Copied to clipboard 3. Better Alternatives to Warez
$timestamp = strtotime($row['created_at']); echo time_ago($timestamp); ?>