0) || ($pos2>0)) { // note: three equal signs $ie = false; } else { $ie = true; } // define template instance and set up templates if (hasContentImages($Menu, $Submenu)) { $tpl = new atemplate( array ( 'MAIN' => 'tpl/main_new.tpl', 'CONTENTTPL' => 'tpl/content_with_images.tpl' ) ); $tpl->process('CONTENTTPL', array( 'PATH' => BuildPath($Menu, $Submenu, $Hornav, $Course, $Research), 'PAGETITLE' => GetPageTitle($Menu, $Submenu, $Hornav, $Course, $Research, $Contentfile), 'CONTENT' => getContentFile($Menu, $Submenu, $Course, $Hornav, $Contentfile, $Picture, $ie), 'CONTENTIMAGES' => BuildContentImages($Menu, $Submenu, $Hornav, $Course, $Research), ) ); } else { $tpl = new atemplate( array ( 'MAIN' => 'tpl/main_new.tpl', 'CONTENTTPL' => 'tpl/content_without_images.tpl' ) ); if (hasDynamicContent($Menu, $Submenu)) { $tpl->process('CONTENTTPL', array( 'PATH' => BuildPath($Menu, $Submenu, $Hornav, $Course, $Research), 'PAGETITLE' => GetPageTitle($Menu, $Submenu, $Hornav, $Course, $Research, $Contentfile), 'CONTENT' => getDynamicContent($Menu, $Submenu) ) ); } else { $tpl->process('CONTENTTPL', array( 'PATH' => BuildPath($Menu, $Submenu, $Hornav, $Course, $Research), 'PAGETITLE' => GetPageTitle($Menu, $Submenu, $Hornav, $Course, $Research, $Contentfile), 'CONTENT' => getContentFile($Menu, $Submenu, $Course, $Hornav, $Contentfile, $Picture, $ie), ) ); }; }; // process template $tpl->process('MAIN', array( 'TITLE' => "Dybuster / " . GetTitle4($Menu, $Submenu, $Hornav, $Course, $Research), 'TOPLEVELMENU' => BuildTopLevelMenu($Menu, $Submenu, $Hornav, $Course, $Research), 'SUBLEVELIMAGE' => GetSubLevelImage($Menu, $Submenu, $Hornav, $Course, $Research, $Contentfile), 'SUBLEVELMENU' => BuildSubLevelMenu($Menu, $Submenu, $Hornav, $Course, $Research), 'LASTUPDATE' => $lastupdate, 'COPYRIGHT' => $copyright, 'WEBMASTER' => $webmaster, 'HEAD' => getHead($Menu, $Submenu, $Hornav, $ie), 'ONLOAD' => onLoad($Menu, $Submenu, $Hornav, $ie), 'LANG' => $Lang, 'LANGSWITCH' => BuildLangSwitch($Lang), ) ); $tpl->embed('CONTENTTPL', 'MAIN'); // print the page to the output $tpl->printit(); ?>