Verlosungen

Gewinnspiele mit Laufzeit-Filter (nur aktive: Start ≤ heute ≤ Ende). Teilnahme über getWinForm(). Optional nach verknüpftem Event filtern.

Inhalt

getWinContent($id, $mediaCheck = "false")

Gibt ein einzelnes Gewinnspiel zurück. Alle Keys identisch wie die Liste.

$win = getWinContent("1");

echo $win["headline"];
echo $win["content"];
echo date("d.m.Y", $win["date"]); // Startdatum
echo date("d.m.Y", $win["ende"]); // Enddatum (Key: "ende")
echo $win["image"]["image"];

// Verknüpfte Events:
foreach ($win["events"] as $eventId) { echo $eventId; }

// Links:
foreach ($win["links"] as $link) {
    echo '<a href="'.$link["url"].'">'.$link["button"].'</a>';
}
// Downloads:
foreach ($win["downloads"] as $dl) {
    echo '<a href="'.$dl["file"].'">'.$dl["button"].'</a>';
}
{
    "id": null,
    "key": null,
    "tags": null,
    "headline": "",
    "content": "",
    "description": "",
    "date": null,
    "ende": null,
    "events": [
        ""
    ],
    "label": [
        ""
    ],
    "website": [
        ""
    ],
    "status": null,
    "update": null,
    "image_items": 10,
    "video_items": 1,
    "videofile_items": 2,
    "media_items": 13,
    "image": {
        "id": "597",
        "image": "media\/win\/image\/597.webp",
        "thumbnail": "media\/win\/image\/thumbnail\/597.webp",
        "small": "media\/win\/image\/small\/597.webp",
        "check": "false"
    },
    "video": {
        "id": "606",
        "url": "https:\/\/www.youtube.com\/watch?v=DRXJhVHQDtI",
        "embed": "