$error[] = 'Du skal skrive et tal, når du tilmelder dig elevmødet.';
            }
        }
    }
    if (!empty($_POST['jubilaeum']) and is_jubilar($auth)) {
        foreach ($_POST['jubilaeum'] as $key => $antal) {
            if (isset($antal) and is_numeric($antal)) {
                $client->changeBasket($key, (int) $antal);
            } elseif (!empty($antal) and !is_numeric($antal)) {
                $error[] = 'Du skal skrive et tal, når du tilmelder dig jubilæet';
            }
        }
    }
    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)));
<?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');