diff --git a/index.php b/index.php index 39ed39d..ce544dc 100644 --- a/index.php +++ b/index.php @@ -20,16 +20,18 @@ $stranka_obsah = file_get_contents($cesta_k_stranke); $out = str_replace('__TEMPLATE_STRANKA__', $stranka_obsah, $out); $cesta_k_skriptu = "scripty/$nazov_stranky.js"; +$script_obsah = ""; if (!file_exists($cesta_k_skriptu)){ - $cesta_k_skriptu = ''; + $script_obsah = ''; } -$out = str_replace('__TEMPLATE_SCRIPT__', "", $out); +$out = str_replace('__TEMPLATE_SCRIPT__', $script_obsah, $out); $cesta_k_stylu = "styly/$nazov_stranky.css"; +$style_obsah = ""; if (!file_exists($cesta_k_stylu)){ - $cesta_k_stylu = ''; + $style_obsah = ''; } -$out = str_replace('__TEMPLATE_STYLE__', "", $out); +$out = str_replace('__TEMPLATE_STYLE__', $style_obsah, $out); echo $out; ?> \ No newline at end of file