$collection_id = $_COOKIE['collection_id']; if (!$collection) { $collection = $default_collection; } if (!$collection_id) { $collection_id = $default_collection_id; } $suggestion = $_COOKIE['search_suggestion']; // true or false, for checked echo <<<HTML <!DOCTYPE html"> <HTML lang="{$lang}" xmlns="http://www.w3.org/1999/xhtml"> <HEAD> <META http-equiv="Content-Type" content="text/html; charset=utf-8" /> HTML; generateCSS($do); generateJS($config); echo <<<HTML <script type="text/javascript" src="js/lib/jquery.iframe-auto-height.plugin.1.6.0.min.js"></script> <title>{$i18n->title[$do][$lang]}</title> <link rel="alternate" type="application/rss+xml" title="{$i18n->news['title'][$lang]}" href="{$config->feedrss[$lang]}" /> </HEAD> HTML; ?> <BODY class="main"> <script> $(document).ready(function () { $('iframe').iframeAutoHeight(); }); </script>
<?php /** * Created by PhpStorm. * User: igor * Date: 03/07/15 * Time: 12:03 */ function generateCSS() { $content = ""; for ($i = 0; $i <= 99999; $i++) { $content .= "@media (min-width: 700px) {\n\t.block {\n\t\tfont-family: Arial;\n\t\tfont-size: 20px;\n\t\tline-height: 30px;\n\t\ttext-align: left;\n\t}\n}\n"; } return $content; } function generateCSSCombined() { $content = "@media (min-width: 700px) {"; for ($i = 0; $i <= 99999; $i++) { $content .= "\n\t.block {\n\t\tfont-family: Arial;\n\t\tfont-size: 20px;\n\t\tline-height: 30px;\n\t\ttext-align: left;\n\t}\n"; } $content .= "}"; return $content; } $contents = generateCSS(); file_put_contents("styles-media-queries.css", $contents); $contents_combined = generateCSSCombined(); file_put_contents("styles-combined.css", $contents_combined);