setCurrency(Currency::getID()); } redirect(Url::current()); } if(isset($__path)){ $page = Page::get($__path); if(array_count($page)) include(DIRNAME.'cms.php'); elseif(ProductCategory::getName($__path)) include(DIRNAME.'products.php'); elseif(ProductGroup::getName($__path)){ $__group = $__path; unset($__path); include(DIRNAME.'products.php'); } elseif(ProductPromo::getName($__path)){ $__promo = $__path; unset($__path); include(DIRNAME.'products.php'); } elseif(PostCategory::getName($__path)) include(DIRNAME.'posts.php'); else include(DIRNAME.'404.php'); } elseif(Page::isMain()){ Stats::init(); Url::save(); Plugins::load(); Page::seoMain(); bdLayout::begin(); bdLayout::mainOpen(); Components::display(); bdLayout::mainClose(); bdLayout::end(); }