Subversion-Projekte lars-tiefland.php_share

Revision

Blame | Letzte Änderung | Log anzeigen | RSS feed

<?
        function aktion($standard=true)
        {
                if(!$standard) 
                        return newAktion();
                        
                $aktion = getAktion(getCurrentAktion());

                if ($aktion['html_seite_schalter'] == 0)
                {
                        $template = loadTemplates($_SESSION['INI']['TEMPLATE']['contentAktion']);
                
                        // Aktion headline Template auslesen
                        $aktion['headline'] = templateContent($aktion, $template['aktionHeadline']);

                        // Aktionstemplate auslesen
                        echo templateContent($aktion, $template['aktionContent']);

                        // Template durch Aktion vorgegeben ??
                        if ($aktion['template'])
                        {
                                $_SESSION['INI']['TEMPLATE']['contentAktion']['aktionItem']=$aktion['template'];
                        }
                
                        $items = getAktionItems(getCurrentAktion());

                        // Artikeltemplate auslesen
                        $aktionItemTemplate = file_get_contents($_SESSION['INI']['templatePath'].$_SESSION['INI']['TEMPLATE']['contentAktion']['aktionItem']);

                        // Artikel ausgeben
                        if (is_array($items))
                        {
                                foreach($items as $item)
                                {
                                        
                                        $item["langbezeichnungIntro"] = templateContent($item, $template['aktionItemDescr']);
                                        echo templateContent($item, $aktionItemTemplate);
                                }
                        }
                }
                else
                {
                        echo $aktion['html_seite'];
                }
        }
        
        function newAktion()
        {
                $aktion = getAktion(getCurrentAktion());
                
                if ($aktion['html_seite_schalter'] == 0)
                {
                        $template = loadTemplates($_SESSION['INI']['TEMPLATE']['contentAktion']);
                
                        // Aktion headline Template auslesen
                        $aktion['headline'] = templateContent($aktion, $template['aktionHeadline']);

                        // Aktionstemplate auslesen
                        //echo templateContent($aktion, $template['aktionContent']);

                        // Template durch Aktion vorgegeben ??
                        if ($aktion['template'])
                        {
                                $_SESSION['INI']['TEMPLATE']['contentAktion']['aktionItem']=$aktion['template'];
                        }
                
                        $items = getAktionItems(getCurrentAktion());

                        // Artikeltemplate auslesen
                        $aktionItemTemplate = file_get_contents($_SESSION['INI']['templatePath'].$_SESSION['INI']['TEMPLATE']['contentAktion']['aktionItem']);

                        // Artikel ausgeben
                        if (is_array($items))
                        {
                                foreach($items as $item)
                                {
                                        
                                        $item["langbezeichnungIntro"] = templateContent($item, $template['aktionItemDescr']);
                                        $Items['aktionItems'] = $Items['aktionItems'].templateContent($item, $template['aktionItem']);
                                }
                                
                                echo templateContent($Items, $template['aktionContent']);
                        }
                }
                else
                {
                        echo $aktion['html_seite'];
                }
        }
        
        aktion($_SESSION['INI']['aktion']['standard']);
?>