From cea36088dadff749d7e9551c4a2dcd1b13d4d105 Mon Sep 17 00:00:00 2001 From: VBoss Date: Mon, 18 Jan 2016 01:25:50 +0100 Subject: [PATCH] Step 1 of installation process - just moved disclaimer --- .../Presenters/ConfigPresenter.php | 20 +++ .../Presenters/IntroPresenter.php | 20 +++ App/InstallModule/Templates/@layout.latte | 53 +++++++ .../Templates/Intro/default.latte | 33 ++++ App/InstallModule/Templates/menu.latte | 24 +++ App/InstallModule/Templates/script.tpl | 48 ++++++ App/Router/routeFactory.php | 3 +- App/Templates/Footer.latte | 18 +++ www/.htaccess | 29 +++- www/install/index.php | 105 ------------- www/install/templates/greet.tpl | 50 ------ www/install/templates/menu.tpl | 44 ------ www/install/templates/script.tpl | 145 ------------------ 13 files changed, 243 insertions(+), 349 deletions(-) create mode 100644 App/InstallModule/Presenters/ConfigPresenter.php create mode 100644 App/InstallModule/Presenters/IntroPresenter.php create mode 100644 App/InstallModule/Templates/@layout.latte create mode 100644 App/InstallModule/Templates/Intro/default.latte create mode 100644 App/InstallModule/Templates/menu.latte create mode 100644 App/InstallModule/Templates/script.tpl create mode 100644 App/Templates/Footer.latte delete mode 100644 www/install/templates/greet.tpl delete mode 100644 www/install/templates/menu.tpl delete mode 100644 www/install/templates/script.tpl diff --git a/App/InstallModule/Presenters/ConfigPresenter.php b/App/InstallModule/Presenters/ConfigPresenter.php new file mode 100644 index 00000000..22b4b010 --- /dev/null +++ b/App/InstallModule/Presenters/ConfigPresenter.php @@ -0,0 +1,20 @@ + + + + + TravianZ Installation + + + + + + + + + + + + + + + {include customJS} + + + +
+ +
+ + +
+
+ {include menu} +
+ + +
+ +
+
+
+ + +
+ + {include ../../Templates/footer.latte} + +
+ + \ No newline at end of file diff --git a/App/InstallModule/Templates/Intro/default.latte b/App/InstallModule/Templates/Intro/default.latte new file mode 100644 index 00000000..71fb136e --- /dev/null +++ b/App/InstallModule/Templates/Intro/default.latte @@ -0,0 +1,33 @@ +{block customJS} + {include ../script.tpl} +{/block} + +{block menu} + {include ../menu.latte} +{/block} + +{block content} +
+ Step 1 from 7 +
+
+
+ TravianZ Installation Script +
+
+
+

  Disclaimer

+ +
+
+ Next +
+{/block} \ No newline at end of file diff --git a/App/InstallModule/Templates/menu.latte b/App/InstallModule/Templates/menu.latte new file mode 100644 index 00000000..3f7c8fab --- /dev/null +++ b/App/InstallModule/Templates/menu.latte @@ -0,0 +1,24 @@ + \ No newline at end of file diff --git a/App/InstallModule/Templates/script.tpl b/App/InstallModule/Templates/script.tpl new file mode 100644 index 00000000..94e438dc --- /dev/null +++ b/App/InstallModule/Templates/script.tpl @@ -0,0 +1,48 @@ + \ No newline at end of file diff --git a/App/Router/routeFactory.php b/App/Router/routeFactory.php index 4a1b547a..9716d5cb 100644 --- a/App/Router/routeFactory.php +++ b/App/Router/routeFactory.php @@ -13,7 +13,8 @@ class RouterFactory public static function createRouter() { $router = new RouteList; - $router[] = new Route('/[/]', 'Homepage:default'); + + $router[] = new Route('/[/][/]', 'Front:Homepage:default'); return $router; } diff --git a/App/Templates/Footer.latte b/App/Templates/Footer.latte new file mode 100644 index 00000000..11b0d0fd --- /dev/null +++ b/App/Templates/Footer.latte @@ -0,0 +1,18 @@ +{block footer} + +{/block} \ No newline at end of file diff --git a/www/.htaccess b/www/.htaccess index a63010c1..90343780 100644 --- a/www/.htaccess +++ b/www/.htaccess @@ -1,4 +1,25 @@ - - Order Deny,Allow - Deny from all - \ No newline at end of file +# Apache configuration file (see httpd.apache.org/docs/current/mod/quickreference.html) + +# disable directory listing + + Options -Indexes + + +# enable cool URL + + RewriteEngine On + # RewriteBase / + + # prevents files starting with dot to be viewed by browser + RewriteRule /\.|^\. - [F] + + # front controller + RewriteCond %{REQUEST_FILENAME} !-f + RewriteCond %{REQUEST_FILENAME} !-d + RewriteRule !\.(pdf|js|ico|gif|jpg|png|css|rar|zip|tar\.gz)$ index.php [L] + + +# enable gzip compression + + AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css application/x-javascript text/javascript application/javascript application/json + \ No newline at end of file diff --git a/www/install/index.php b/www/install/index.php index 17572f19..7bc32a17 100644 --- a/www/install/index.php +++ b/www/install/index.php @@ -1,93 +1,5 @@ - - - - - - - TravianZ Installation - - - - - - - - - - - - - - - - -
- - -
- - - -
-
- -
- - - - - -
- - -
- -
- - diff --git a/www/install/templates/greet.tpl b/www/install/templates/greet.tpl deleted file mode 100644 index b8d36ebb..00000000 --- a/www/install/templates/greet.tpl +++ /dev/null @@ -1,50 +0,0 @@ - -
- -

  Disclaimer

- -
    -
  • Along with the installation/usage of this game, you shall be fully responsible for any legal results that may raised initiated by the owners of any unlicensed content you permit your copy of this game to publish.
  • - -
  • Neither the team that created this script nor the team that customised it to create this distribution/release shall be responsible for any damage done to your computer/server system.
  • - -
  • All code was confirmed to be running correctly by the creation team without any visible security risk they were aware of at the time the released it. Similarly for the customisation team who customised it to create this distribution/release.
  • - -
  • Users are asked to review the code on their own accord and behalf.
  • - -
  • Any customization to the source code are the property of each customisation's author, it is up to each author's discretion whether to share it by including it in free open source distributions such as this one.
  • - -
  • You have no rights to edit copyright notices or/and claim this script as your own.
  • - -
  • Last but not least, Enjoy.
  • -
- -
-
    -
  • Before Installation (Linux):

  • -
  • CHMOD install to 777 (chmod -R 777 install)
  • -
  • CHMOD GameEngine to 777 (chmod -R 777 GameEngine)
  • -
  • After Installation

  • -
  • Delete install folder (sudo rm -R install)
  • -
  • CHMOD GameEngine back to 755 (sudo chmod -R 755 GameEngine)
  • -
  • CHMOD Prevention to 777 (sudo chmod -R 777 GameEngine/Prevention)
  • -
  • CHMOD Notes to 777 (sudo chmod -R 777 GameEngine/Notes)
  • -
- -
    -
  • After Installation

  • -
  • Protect folder /Admin with password protect directory
  • -
- -
- TravianZ Team -
-
- -
-
- -
-
- -
diff --git a/www/install/templates/menu.tpl b/www/install/templates/menu.tpl deleted file mode 100644 index cc2bf27e..00000000 --- a/www/install/templates/menu.tpl +++ /dev/null @@ -1,44 +0,0 @@ - diff --git a/www/install/templates/script.tpl b/www/install/templates/script.tpl deleted file mode 100644 index 26c9141f..00000000 --- a/www/install/templates/script.tpl +++ /dev/null @@ -1,145 +0,0 @@ - - -bar_id = uniqid('progressbar'); - $this->label = $label; - - $this->max_ticks = $max_ticks; - $this->ticks = 0; - } - - public function tick() { - $this->ticks++; - $this->draw_progress(); - } - - public function draw() { - $this->draw_bar(); - $this->draw_progress(); - } - - static public function draw_css() { - echo ' - - '; - } - - protected function draw_bar() { - echo ' -
- -
- -
-
- '; - echo ' - - '; - - $this->flush(); - } - - protected function draw_progress() { - - $width = round($this->ticks / $this->max_ticks * 100, 2); - $label = sprintf($this->label, $this->ticks, $this->max_ticks); - - echo ' - - - '; - $this->flush(); - } - - protected function flush() { - while(ob_get_level() > 0) { - ob_end_flush(); - } - - flush(); - } -} -?> \ No newline at end of file