SetCurrentMainAreaTemplatePath($currentMainAreaTemplatePath); TTemplate::TTemplate($templatesBasePath,$templatePath,$templateClassPath,$templateHtmlPath,$templateHtmlFile,$templateLayer,$imagesetFolder); } // Destructor function Destructor() { TTemplate::Destructor(); } // Loads settings only for used templates function LoadSettings(&$ptr) { TTemplate::LoadSettings($ptr); $this->Debug(sprintf("templatePath: %s
",$ptr->templatePath)); $this->Debug(sprintf("templateHtmlFile: %s
",$ptr->templateHtmlFile)); $this->Debug(sprintf("CLASS: %s
",$this->GetClassName($ptr))); if ($_GET['cmdTemplateHtmlFile']) { if (!$_GET['setMainAreaTemplatePath']) $_GET['setMainAreaTemplatePath']=$_GET['cmdTemplateHtmlFile']; } //######################################################################## // Set classes for specifical templates //######################################################################## $templateFunctionClassName=""; switch ($ptr->templatePath) { //------------------------------------------------------------------------ // Default templateset case "default": switch ($ptr->templateHtmlFile) { case "main.html": $templateFunctionClassName="TTemplateFunctions_Main"; break; case "login.html": $templateFunctionClassName="TTemplateFunctions_Login"; break; case "mainarea.html": $templateFunctionClassName="TTemplateFunctions_MainArea"; break; case "groupnavigation.html": $templateFunctionClassName="TTemplateFunctions_GroupNavigation"; break; case "mainarea_start.html": $templateFunctionClassName="TTemplateFunctions_MainArea_Start"; break; case "maingroups.html": $templateFunctionClassName="TTemplateFunctions_MainGroups"; break; case "register.html": $templateFunctionClassName="TTemplateFunctions_Register"; break; case "register_done.html": $templateFunctionClassName="TTemplateFunctions_RegisterDone"; break; case "groupdetail.html": $templateFunctionClassName="TTemplateFunctions_GroupDetail"; break; case "productlist.html": $templateFunctionClassName="TTemplateFunctions_ProductList"; break; case "productdetail.html": $templateFunctionClassName="TTemplateFunctions_ProductDetail"; break; case "productbasket.html": $templateFunctionClassName="TTemplateFunctions_ProductBasket"; break; case "preview_productbasket.html": $templateFunctionClassName="TTemplateFunctions_PreviewProductBasket"; break; case "preview_specialoffers.html": $templateFunctionClassName="TTemplateFunctions_PreviewSpecialoffers"; break; case "specialoffers.html": $templateFunctionClassName="TTemplateFunctions_SpecialOffers"; break; case "contact.html": $templateFunctionClassName="TTemplateFunctions_Contact"; break; case "resellerorders.html": $templateFunctionClassName="TTemplateFunctions_ResellerOrders"; break; case "catalogueslist.html": $templateFunctionClassName="TTemplateFunctions_CataloguesList"; break; case "preview_newproducts.html": $templateFunctionClassName="TTemplateFunctions_PreviewNewProducts"; break; case "dropdownnav.html": $templateFunctionClassName="TTemplateFunctions_DropDownNavigation"; break; case "auctionproductlist.html": $templateFunctionClassName="TTemplateFunctions_AuctionProductList"; break; case "auctionproductdetail.html": $templateFunctionClassName="TTemplateFunctions_AuctionProductDetail"; break; case "customerarea_orders.html": $templateFunctionClassName="TTemplateFunctions_CustomerAreaOrders"; break; case "customerarea_orderproducts.html": $templateFunctionClassName="TTemplateFunctions_CustomerAreaOrderProducts"; break; case "preview_news.html": $templateFunctionClassName="TTemplateFunctions_PreviewNews"; break; case "preview_newsletter.html": $templateFunctionClassName="TTemplateFunctions_PreviewNewsletter"; break; case "newsarchive.html": $templateFunctionClassName="TTemplateFunctions_NewsArchive"; break; case "news.html": $templateFunctionClassName="TTemplateFunctions_News"; break; case "newsletter.html": $templateFunctionClassName="TTemplateFunctions_Newsletter"; break; case "ordersystem_whois.html": $templateFunctionClassName="TTemplateFunctions_OrdersystemWhois"; break; case "download.html": $templateFunctionClassName="TTemplateFunctions_Download"; break; case "pwforgotten.html": $templateFunctionClassName="TTemplateFunctions_PasswordForgotten"; break; case "msgneg.html": $templateFunctionClassName="TTemplateFunctions_MsgNeg"; break; case "msgpos.html": $templateFunctionClassName="TTemplateFunctions_MsgPos"; break; case "newproducts.html": $templateFunctionClassName="TTemplateFunctions_NewProducts"; break; case "forumlist.html": $templateFunctionClassName="TTemplateFunctions_ForumList"; break; case "forum_threadlist.html": $templateFunctionClassName="TTemplateFunctions_Forum_ThreadList"; break; case "forum_entrydetail.html": $templateFunctionClassName="TTemplateFunctions_Forum_EntryDetail"; break; case "forumnavigation.html": $templateFunctionClassName="TTemplateFunctions_ForumNavigation"; break; case "forum_answerentry.html": $templateFunctionClassName="TTemplateFunctions_Forum_AnswerEntry"; break; case "forum_registeruser.html": $templateFunctionClassName="TTemplateFunctions_Forum_RegisterUser"; break; case "forum_entrylist.html": $templateFunctionClassName="TTemplateFunctions_Forum_EntryList"; break; case "forum_newthread.html": $templateFunctionClassName="TTemplateFunctions_Forum_NewThread"; break; case "forum_searchentry.html": $templateFunctionClassName="TTemplateFunctions_Forum_SearchEntry"; break; case "ordersummary.html": $templateFunctionClassName="TTemplateFunctions_OrderSummary"; break; } break; //------------------------------------------------------------------------ // Other template sets (for other HTML-Templates, XML, oder WML-Templates, etc.) // ... // ... // ... //------------------------------------------------------------------------ } if ($templateFunctionClassName) $this->SetTemplateFunctionClass($templateFunctionClassName); } // Sets the current template for the mainarea (must be called before TTemplate::TTemplate) function SetCurrentMainAreaTemplatePath($path) { $this->currentMainAreaTemplatePath=$path; } }; // Set static Debugmode //TKernel::SetDebugMode(1); TKernel::SetTimeTrackingMode(2); /* //------------------------------------------------------------------------------ // Set maintemplate if ($_GET['setMainAreaTemplatePath']) { $currentMainAreaTemplatePath=$_GET['setMainAreaTemplatePath']; $_SESSION['currentMainAreaTemplatePath']=$currentMainAreaTemplatePath; } else $currentMainAreaTemplatePath=$_SESSION['currentMainAreaTemplatePath']; if (!$currentMainAreaTemplatePath) $currentMainAreaTemplatePath="mainarea_start.html"; //------------------------------------------------------------------------------ */ $site=new TSite("../templates",$GLOBALS['config']['templatesetFolder'],"classes",$GLOBALS['config']['templatesFolder'],"main.html",0,$currentImagesetPath,$currentMainAreaTemplatePath); // Set if HTML comments should be cut $site->SetCutHTMLComments(false); // Set if Linefeeds (\n) should be cut $site->SetCutLF(false); // Set base objects $site->SetSqlObject($sql); $site->SetTemporaryDataObject($temporaryData); $site->SetBannerObject($banner); $site->SetContentManagerObject($contentMgr); $site->SetContentManagerShortObject($contentMgrShort); $site->SetContentManagerAdminObject($contentMgrAdmin); $site->SetContentManagerShortAdminObject($contentMgrShortAdmin); $site->SetSqlTemplateObject($sqlTemplate); $site->SetDynamicContentObject($dynamicContent); //------------------------------------------------------------------------------ // Start parsing and put to screen $site->Put(); //$template->PutMemoryStats(); // Disconnect from database if (isset($sql)) $sql->Close(); // Call destructor $site->Close(); ?>