smarty->assign([ "page" => $page, "inline_scripts" => external_scripts(actual_bundle_path("dist/js", "inline")), "vendor_scripts" => external_scripts(actual_bundle_path("dist/js", "vendor")), "common_scripts" => external_scripts(actual_bundle_path("dist/js", "common")), "vendor_styles" => external_styles(actual_bundle_path("dist/css/prod", "vendor")), "common_styles" => styles_by_mode("common"), "user" => $user, "role" => $role, "page_info" => $page_info, ])->display($page->view); // $referer = new Referer(); // // // // if ($page->code === 404) { // header($_SERVER["SERVER_PROTOCOL"] . " 404 Not Found"); // } // // if ($page->type === AbstractPage::TYPE_HTML) { // $page->smarty->assign([ // "page" => $page, // "phone" => new Phone("88045550145"), // "email" => new Email("denis_golovko@luchianapa.ru"), // "address" => "г-к Анапа, ул. Пионерский проспект, д. 1", // "address_code" => 350000, // "meta" => new Meta($page->eng), //// "builds" => $builds, // "inline_scripts" => external_scripts(actual_bundle_path("dist/js", "inline")), // "vendor_scripts" => external_scripts(actual_bundle_path("dist/js", "vendor")), // "common_scripts" => external_scripts(actual_bundle_path("dist/js", "common")), // "vendor_styles" => external_styles(actual_bundle_path("dist/css/prod", "vendor")), // "common_styles" => styles_by_mode("common"), // //"articles" => json_decode(file_get_contents("data/articles.json"), true) ?: [], // "articles" => Article::get_all(), // //"referer" => $referer, // "is_intop_ads" => $referer->is_intop_ads, // "is_intop_ads_not_krd" => $referer->is_intop_ads_not_krd, // "pre_type" => get_secret_key2() // ])->display($page->view); // } elseif ($page->type === AbstractPage::TYPE_API) { // echo $page->view; // } // // db_disconnect();