Subversion-Projekte lars-tiefland.php_share

Revision

Blame | Letzte Änderung | Log anzeigen | RSS feed

<?
        function showAddonItems($Id = false)
        {
                if ($Id == false) { return false; }
                if (is_array($Id))
                        { $addOnItems = $Id; }
                else
                        { $addOnItems = getAddOnItems($Id); }
        
                $template = loadTemplates($_SESSION['INI']['TEMPLATE']['addOnItem']);
                $buffer = array();
                
                foreach($addOnItems as $addOnItem)
                {
                        $addOnItem["addOnItemImage"] = templateContent($addOnItem, $template["addOnItemImage"]);
                        
                        $addOnItem["Lieferstatus"] = templateContent
                                                                        (
                                                                                array("LieferstatusText" => $addOnItem["LieferstatusText"]),
                                                                                file_get_contents($_SESSION['INI']['TEMPLATE']['addOnItem']["lieferstatus".$addOnItem["LieferstatusValue"]])
                                                                        );

                        $buffer[] = templateContent($addOnItem, $template["addOnItem"]);
                }
                
                if (count($addOnItems) > 0)
                {
                        echo templateContent(array("AddOnItems" => implode("", $buffer)) , $template["addOnItemContainer"]);
                        return true;
                }
                else
                {
                        return false;           
                }
        }
?>