HEX
Server: Apache/2.4.25 (Debian)
System: Linux server17 4.9.0-19-amd64 #1 SMP Debian 4.9.320-2 (2022-06-30) x86_64
User: web37 (1062)
PHP: 7.4.30
Disabled: show_source, highlight_file, apache_child_terminate, apache_get_modules, apache_note, apache_setenv, virtual, dl, disk_total_space, posix_getpwnam, posix_getpwuid, posix_mkfifo, posix_mknod, posix_setpgid, posix_setsid, posix_setuid, posix_uname, proc_nice, openlog, syslog, pfsockopen
Upload Files
File: /var/www/web37/htdocs/telefon-sex/admin/optional-object-content.php
<?php

include "includes.php";

Configuration::getControlPanel()->accessOrRedirect();
$settings = Configuration::getSettings();

// Load the main template
$mainT = Configuration::getControlPanel()->getMainTemplate();
$contentT = new Template("templates/common/box.php");
$contentId = @$_GET['id'];

// Valid content ID
if (isset($settings['admin']['extra-links'][$contentId])) {
    $entry = $settings['admin']['extra-links'][$contentId];
    $mainT->pagetitle = $entry['title'];
    $stylesheets = array();
    $scripts = array();

    // Scripts / css
    foreach ($entry['resources'] as $resource) {
        $ext = substr(strtolower($resource), strlen($resource) - 3);
        if ($ext == "css") {
            $stylesheets[] = "../" . $resource;
        }
        else if ($ext == ".js") {
            $scripts[] = "../". $resource;
        }
    }
    $mainT->scripts = $scripts;
    $mainT->stylesheets = $stylesheets;

    // Contents
    ob_start();
    include("../" . $entry['path']);
    $contentT->content = ob_get_contents();
    ob_end_clean();
}
// Invalid content ID
else {
    $mainT->pagetitle = "Invalid contents";
    $contentT->content = "The content with specified ID '" . htmlspecialchars($contentId, ENT_QUOTES) . "' was not found.";
}

// Output the HTML
$mainT->content = $contentT->render();
echo $mainT->render();