diff --git a/.htaccess b/.htaccess new file mode 100644 index 0000000..441e1e4 --- /dev/null +++ b/.htaccess @@ -0,0 +1,4 @@ + +Order Allow,Deny +Deny from all + diff --git a/README.txt b/README.txt index 35f339e..e57a453 100644 --- a/README.txt +++ b/README.txt @@ -16,7 +16,12 @@ matter). Then, create two directories-- "p/" and "u/"-- that are accessible and modifiable by your web-server user. Finally, make a "res/config.php" file (from "res/config.example.php"). -Then, profit! + +If you're using a web-server that supports .htaccess files (Apache and the +ilk), then you should be good from here. Otherwise, you should manually block +the files referenced in "/.htaccess" and "res/.htaccess"-- for sample config +of Lighttpd, read "docs/lighttpd.txt". + ---------------------------------------- diff --git a/public_html/coin.php b/coin.php similarity index 65% rename from public_html/coin.php rename to coin.php index 720b155..5504c27 100644 --- a/public_html/coin.php +++ b/coin.php @@ -1,6 +1,6 @@ "https://HOSTNAME/", + "^/COPYING.txt$" => "https://HOSTNAME/", + "^/res/config.*$" => "https://HOSTNAME/", + "^/res/library.*$" => "https://HOSTNAME/", + "^/res/templates.*$" => "https://HOSTNAME/" + ) + +... just make sure to change HOSTNAME to your actual hostname, and to change +"^/" to whatever the root to your insert-coin instance is. diff --git a/public_html/index.php b/index.php similarity index 100% rename from public_html/index.php rename to index.php diff --git a/public_html/mask.php b/mask.php similarity index 67% rename from public_html/mask.php rename to mask.php index 89e4346..cdbf0d0 100644 --- a/public_html/mask.php +++ b/mask.php @@ -1,6 +1,6 @@ HTML // Create a general insert-coin webpage; relative path from rootdir -// for $image_path, and relative path from /resources/templates/ +// for $image_path, and relative path from /res/templates/ // for $template function create_page($page_title, $template, $image_alt_text, $image_path) { - include(root("resources/templates/header.php")); + include(root("res/templates/header.php")); ?>
<?php echo($image_alt_text); ?> + src="">
diff --git a/resources/library/sanitization.php b/res/library/sanitization.php similarity index 100% rename from resources/library/sanitization.php rename to res/library/sanitization.php diff --git a/resources/library/string.php b/res/library/string.php similarity index 100% rename from resources/library/string.php rename to res/library/string.php diff --git a/resources/library/urls.php b/res/library/urls.php similarity index 100% rename from resources/library/urls.php rename to res/library/urls.php diff --git a/resources/templates/coin/beam.php b/res/templates/coin/beam.php similarity index 100% rename from resources/templates/coin/beam.php rename to res/templates/coin/beam.php diff --git a/resources/templates/coin/celebrate.php b/res/templates/coin/celebrate.php similarity index 100% rename from resources/templates/coin/celebrate.php rename to res/templates/coin/celebrate.php diff --git a/resources/templates/coin/death-1.html b/res/templates/coin/death-1.html similarity index 100% rename from resources/templates/coin/death-1.html rename to res/templates/coin/death-1.html diff --git a/resources/templates/coin/death-2.html b/res/templates/coin/death-2.html similarity index 100% rename from resources/templates/coin/death-2.html rename to res/templates/coin/death-2.html diff --git a/resources/templates/coin/death.html b/res/templates/coin/death.html similarity index 100% rename from resources/templates/coin/death.html rename to res/templates/coin/death.html diff --git a/resources/templates/footer.php b/res/templates/footer.php similarity index 100% rename from resources/templates/footer.php rename to res/templates/footer.php diff --git a/resources/templates/header.php b/res/templates/header.php similarity index 71% rename from resources/templates/header.php rename to res/templates/header.php index 031e380..7041f6f 100644 --- a/resources/templates/header.php +++ b/res/templates/header.php @@ -8,8 +8,9 @@ - - +"> +"> diff --git a/resources/templates/mask/celebrate.php b/res/templates/mask/celebrate.php similarity index 100% rename from resources/templates/mask/celebrate.php rename to res/templates/mask/celebrate.php diff --git a/resources/templates/mask/create.php b/res/templates/mask/create.php similarity index 100% rename from resources/templates/mask/create.php rename to res/templates/mask/create.php diff --git a/resources/templates/mask/death-1.html b/res/templates/mask/death-1.html similarity index 100% rename from resources/templates/mask/death-1.html rename to res/templates/mask/death-1.html diff --git a/resources/templates/mask/death-2.php b/res/templates/mask/death-2.php similarity index 100% rename from resources/templates/mask/death-2.php rename to res/templates/mask/death-2.php diff --git a/resources/templates/mask/death-3.html b/res/templates/mask/death-3.html similarity index 100% rename from resources/templates/mask/death-3.html rename to res/templates/mask/death-3.html diff --git a/resources/templates/mask/death.html b/res/templates/mask/death.html similarity index 100% rename from resources/templates/mask/death.html rename to res/templates/mask/death.html diff --git a/res/templates/menu.php b/res/templates/menu.php new file mode 100644 index 0000000..8dc5d3a --- /dev/null +++ b/res/templates/menu.php @@ -0,0 +1,11 @@ + diff --git a/resources/templates/menu.php b/resources/templates/menu.php deleted file mode 100644 index ce690fe..0000000 --- a/resources/templates/menu.php +++ /dev/null @@ -1,9 +0,0 @@ - diff --git a/public_html/result/beam.php b/result/beam.php similarity index 90% rename from public_html/result/beam.php rename to result/beam.php index e9f251c..d63e971 100644 --- a/public_html/result/beam.php +++ b/result/beam.php @@ -1,6 +1,6 @@