}
    if (!empty($_POST['stjernetraef'])) {
        // sørger for at slette alle tilmeldinger med stjernetræf
        $stjernetraef = $client->getProducts(array('keywords' => array(122)));
        foreach ($stjernetraef['products'] as $product) {
            // 122 er stjernetræf
            $client->changeBasket($product['id'], 0);
        }
        $client->changeBasket($_POST['stjernetraef'], 1);
    }
    if (empty($error) and count($error) == 0) {
        header('Location: basket.php');
        exit;
    }
}
$basket = $client->getBasket();
$elevmoede = $client->getProducts(array('keywords' => array(121)));
$stjernetraef = $client->getProducts(array('keywords' => array(122)));
$jubilaeum = $client->getProducts(array('keywords' => array(120)));
$tilmelding_tpl = new Template(PATH_TEMPLATE);
$tilmelding_tpl->set('error', $error);
$tilmelding_tpl->set('items', utf8_decoding($basket['items']));
$tilmelding_tpl->set('elevmoede', utf8_decoding($elevmoede['products']));
$tilmelding_tpl->set('stjernetraef', utf8_decoding($stjernetraef['products']));
if (is_jubilar($auth)) {
    $tilmelding_tpl->set('jubilaeum', utf8_decoding($jubilaeum['products']));
} else {
    $tilmelding_tpl->set('jubilaeum', '');
}
$basket = $client->getBasket();
$tilmelding_tpl->set('selected_items', $basket['items']);
<?php

require 'include_elevforeningen_login.php';
$contact = $auth->getContact($_SESSION['contact_id']);
$error = array();
if (!empty($_POST)) {
    if (is_array($_POST['order'])) {
        foreach ($_POST['order'] as $key => $antal) {
            if (isset($antal) and is_numeric((int) $antal)) {
                $client->changeBasket($key, (int) $antal);
            } else {
                $error[] = 'Du skal skrive et tal, hvis du vil bestille noget.';
            }
        }
    }
    if (empty($error) and count($error) == 0) {
        header('Location: basket.php');
        exit;
    }
}
$client = new IntrafacePublic_Shop_XMLRPC_Client($credentials);
$products = $client->getProducts(array('keywords' => array(225)));
$products_tpl = new Template(PATH_TEMPLATE);
$products_tpl->set('products', $products);
$products_tpl->set('selected_items', $client->getBasket());
$string = $products_tpl->fetch('elevforeningen/products.tpl.php');
$tpl = new Template(PATH_TEMPLATE_KUNDELOGIN);
$tpl->set('title', 'Tilmelding');
$tpl->set('content_main', $string);
echo $tpl->fetch('main.tpl.php');