setAfterSession (& $DB); # jinak bych pracoval se separatni kopii pro $iShop! } else $iShop = new iShop (& $DB); $_SESSION['cart'] = & $iShop; if (!$_GET['menu']) $_GET['menu'] = $_SESSION['menu']; else $_SESSION['menu'] = $_GET['menu']; # ---------------- KOSIK ---------------------------- # provizorni, doladit if ($Page->getPage () != 'order') $kosik['action'] = $iShop->getActions(); if ($iShop->isOrder ()) { # zpracuji aktualni obsah kosiku $kosik['goods'] = $iShop->getAllGoods (); # celkova cena $kosik['total'] = 0; $kosik['total_sdph'] = 0; $kosik['num_items'] = 0; foreach ($kosik['goods'] AS $polozka) { $kosik['total'] += $polozka['subtotal']; $kosik['total_sdph'] += $polozka['subtotal_sdph']; $kosik['num_items'] += $polozka['amount']; } } $Smarty->assign ('cart', $kosik); # assignuji si udaje o zakaznikovi (pokud jsou) $Smarty->assign ('customer', $iShop->getCustomer ()); # --konec--------- KOSIK ---------------------konec-- # =============================================== # hlavni prepinadlo, co mam delat - chce udelat jinak! # =============================================== require_once ('./include/page.' . $Page->getPage () . '.php'); # zpracuji razeni v levem menu $Smarty->assign('menu', $Page->getMenu ($_GET['menu'])); $Page->getMenu ($_GET['menu'], true); # nacteni novinek $Novinky = new Novinky (& $DB); $Smarty->assign ('novinky', $Novinky->get ('n.stav = "ok"', null, 5)); /* # nacteni duvodu (prvnich 1000 ok dle id) do leveho menu $Smarty->assign ('duvody', $Duvody->getRandom ('d.stav = "ok"', null, 1000)); $Smarty->assign ('duvody_celkem', $Duvody->getRowsCount ()); */ # pripadne zobrazeni infoboxu $Smarty->assign ('infobox', $INFOBOX); # kdyz debuguji, assgnuji si u pozadavky na databazi $Smarty->assign ('DEBUG_sql_queries', $DB->messages); $Smarty->assign ('content', $Page->getPage ()); $Smarty->display ($Page->getPage () . '.tpl'); ?>