diff --git a/v4/.htaccess b/v4/.htaccess new file mode 100644 index 0000000..b9d3b28 --- /dev/null +++ b/v4/.htaccess @@ -0,0 +1,9 @@ +RewriteEngine On +Options -Indexes +RewriteBase / + +# index.php?page=neco => neco/ +RewriteCond %{REQUEST_FILENAME} !-d +RewriteCond %{REQUEST_FILENAME} !-f +RewriteRule ^([^/]+)/?$ ?page=$1 + diff --git a/v4/Dockerfile b/v4/Dockerfile new file mode 100644 index 0000000..e69de29 diff --git a/v4/css/style.css b/v4/css/style.css new file mode 100644 index 0000000..9610dc2 --- /dev/null +++ b/v4/css/style.css @@ -0,0 +1,12 @@ +* { + margin: 0; + padding: 0; + box-sizing: border-box; +} + +.nav { + display: flex; + +} + + diff --git a/v4/index.php b/v4/index.php new file mode 100644 index 0000000..df42df1 --- /dev/null +++ b/v4/index.php @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <?= $title ?> + + + + 0) { + echo("

Upozornění

Nelze nahrát soubor v nadřazeném adresáři."); + } + elseif($file == "index" || $file == "/index") { + echo("

Upozornění

Index nemůže načíst sám sebe."); + } else { + require_once($file2); + } + } + else { + require_once("./pages/error_404.php"); + } +} +else { + require_once("./pages/home/home.php"); +} +?> + + + diff --git a/v4/pages/home/home.php b/v4/pages/home/home.php new file mode 100644 index 0000000..3169a52 --- /dev/null +++ b/v4/pages/home/home.php @@ -0,0 +1,2 @@ +

Home

+test

diff --git a/v4/pages/test/test.php b/v4/pages/test/test.php new file mode 100644 index 0000000..dee2107 --- /dev/null +++ b/v4/pages/test/test.php @@ -0,0 +1,3 @@ +

Test

+
home +