Initial commit BIJ CI4

This commit is contained in:
BIJ Dev
2026-04-21 05:49:17 +07:00
commit fa38ac6b24
13170 changed files with 866701 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
<?php
session_start();
require_once __DIR__ . '/../config.php';
$token = $_SESSION['token'] ?? null;
if (!$token) {
echo "No token found";
exit;
}
$berita_result = api_get_berita($token);
echo "<h2>Simple Berita Debug</h2>";
if ($berita_result['success']) {
$data = $berita_result['data'];
echo "<h3>Raw Data Structure:</h3>";
echo "<pre>";
print_r($data);
echo "</pre>";
$items = $data['data'] ?? $data;
if (is_array($items)) {
echo "<h3>Items Count: " . count($items) . "</h3>";
echo "<h3>First Item:</h3>";
echo "<pre>";
print_r($items[0] ?? 'No first item');
echo "</pre>";
echo "<h3>All Items with IDs:</h3>";
foreach ($items as $i => $item) {
$id = $item['id'] ?? $item['berita_id'] ?? "NO_ID_$i";
$judul = $item['judul'] ?? 'NO_TITLE';
echo "<p>$i: ID='$id', Judul='$judul'</p>";
}
}
} else {
echo "<p>Error: " . ($berita_result['data']['pesan'] ?? 'Unknown error') . "</p>";
}