Skip to content

Commit

Permalink
Step 1 of installation process - just moved disclaimer
Browse files Browse the repository at this point in the history
  • Loading branch information
Spamercz committed Jan 18, 2016
1 parent d272bfc commit cea3608
Show file tree
Hide file tree
Showing 13 changed files with 243 additions and 349 deletions.
20 changes: 20 additions & 0 deletions App/InstallModule/Presenters/ConfigPresenter.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php

namespace App\InstallModule\Presenters;

use Nette;

class ConfigPresenter extends Nette\Application\UI\Presenter
{


public function actionDefault()
{

}

public function renderDefault()
{

}
}
20 changes: 20 additions & 0 deletions App/InstallModule/Presenters/IntroPresenter.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php

namespace App\InstallModule\Presenters;

use Nette;

class IntroPresenter extends Nette\Application\UI\Presenter
{


public function actionDefault()
{

}

public function renderDefault()
{

}
}
53 changes: 53 additions & 0 deletions App/InstallModule/Templates/@layout.latte
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>TravianZ Installation</title>
<link rel="shortcut icon" href="{$baseUrl}/favicon.ico" />
<meta http-equiv="cache-control" content="max-age=0" />
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="expires" content="0" />
<meta http-equiv="imagetoolbar" content="no" />
<meta http-equiv="content-type" content="text/html; charset=us-ascii" />
<script src="{$baseUrl}/mt-full.js" type="text/javascript"></script>
<script src="{$baseUrl}/unx.js" type="text/javascript"></script>
<script src="{$baseUrl}/new.js" type="text/javascript"></script>
<link href="{$baseUrl}/gpack/travian_default/lang/en/lang.css" rel="stylesheet" type="text/css" />
<link href="{$baseUrl}/gpack/travian_default/lang/en/compact.css" rel="stylesheet" type="text/css" />
<link href="{$baseUrl}/gpack/travian_default/travian.css" rel="stylesheet" type="text/css" />
<link href="{$baseUrl}/gpack/travian_default/lang/en/lang.css" rel="stylesheet" type="text/css" />

{include customJS}
</head>

<body>
<div class="wrapper">
<img class="c1" src="{$baseUrl}/img/x.gif" id="msfilter" alt="" name="msfilter" />
<div id="dynamic_header"></div>
<div id="header">
<div id="mtop"></div>
</div>

<div id="mid">
<div id="side_navi">
{include menu}
</div>

<div id="content" class="login">
{include content}
</div>
</div>

<div id="side_info" class="outgame"></div>
<div class="clear"></div>
</div>

<div class="footer-stopper outgame"></div>
<div class="clear"></div>

{include ../../Templates/footer.latte}

<div id="ce"></div>
</body>
</html>
33 changes: 33 additions & 0 deletions App/InstallModule/Templates/Intro/default.latte
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{block customJS}
{include ../script.tpl}
{/block}

{block menu}
{include ../menu.latte}
{/block}

{block content}
<div class="progress_bar">
<span>Step 1 from 7 </span>
</div>
<div class="headline">
<center>
<span class="f18 c5">TravianZ Installation Script</span>
</center>
</div>
<br>
<h4>&nbsp;&nbsp;Disclaimer</h4>
<ul>
<li>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.</li>
<li>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.</li>
<li>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.</li>
<li>Users are asked to review the code on their own accord and behalf.</li>
<li>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.</li>
<li><b>You have no rights to edit copyright notices or/and claim this script as your own.</b></li>
<li>Last but not least, Enjoy.</li>
</ul>
<br>
<center>
<a n:href=":Install:Config:default">Next</a>
</center>
{/block}
24 changes: 24 additions & 0 deletions App/InstallModule/Templates/menu.latte
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<div class="menu">
{* c1 not yet, c2 active, c3 done*}
<li class="c2 f9">
Intro
</li>
<li class="c1 f9">
Configuration
</li>
<li class="c1 f9">
Database
</li>
<li class="c1 f9">
Field
</li>
<li class="c1 f9">
Multihunter
</li>
<li class="c1 f9">
Oasis
</li>
<li class="c1 f9">
End
</li>
</div>
48 changes: 48 additions & 0 deletions App/InstallModule/Templates/script.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<style type="text/css">
.menu {
margin-left: 23px;
margin-top: 50px;
}
.f18 {
font-size: 18pt;
}
span.cc3 {
position: absolute;
right:10%
}
span.cc2 {
position: absolute;
left:10%
}
div.lbox {
width: 280px;
padding-left: 29px;
padding-bottom: 15px;
}
div.rbox {
width: 196px;
padding-left: 10px;
padding-bottom: 15px;
}
div.wholebox {
width: 494px;
padding-left: 29px;
padding-bottom: 15px;
}
div.wholebox div {
float:none;
}
div.lbox ul, div.rbox ul {
margin: 0 0 0 15px;
padding: 0 15px 0 0;
}
</style>
3 changes: 2 additions & 1 deletion App/Router/routeFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ class RouterFactory
public static function createRouter()
{
$router = new RouteList;
$router[] = new Route('<presenter>/<action>[/<id>]', 'Homepage:default');

$router[] = new Route('<module>/<presenter>[/<action>][/<id>]', 'Front:Homepage:default');

return $router;
}
Expand Down
18 changes: 18 additions & 0 deletions App/Templates/Footer.latte
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{block footer}
<div id="footer">
<div id="mfoot">
<div class="footer-menu">
<center>
<br />
<div class="copyright">
&copy; 2016
</div>
<div class="copyright">
Server running <a href="https://github.com/VBoss/TravianZ">Spamian</a>.
</div>
</center>
</div>
<div id="cfoot"></div>
</div>
</div>
{/block}
29 changes: 25 additions & 4 deletions www/.htaccess
Original file line number Diff line number Diff line change
@@ -1,4 +1,25 @@
<Files "*.tpl">
Order Deny,Allow
Deny from all
</Files>
# Apache configuration file (see httpd.apache.org/docs/current/mod/quickreference.html)

# disable directory listing
<IfModule mod_autoindex.c>
Options -Indexes
</IfModule>

# enable cool URL
<IfModule mod_rewrite.c>
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]
</IfModule>

# enable gzip compression
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css application/x-javascript text/javascript application/javascript application/json
</IfModule>
105 changes: 0 additions & 105 deletions www/install/index.php
Original file line number Diff line number Diff line change
@@ -1,93 +1,5 @@
<?php include("templates/script.tpl");

if(!isset($_GET['s'])) {
$_GET['s']=0;
}
$tz=(isset($_GET['t']))? $_GET['t']:1;
switch($tz) {
case 1: $t_zone="Africa/Dakar";break;
case 2: $t_zone="America/New_York";break;
case 3: $t_zone="Antarctica/Casey";break;
case 4: $t_zone="Arctic/Longyearbyen";break;
case 5: $t_zone="Asia/Kuala_Lumpur";break;
case 6: $t_zone="Atlantic/Azores";break;
case 7: $t_zone="Australia/Melbourne";break;
case 8: $t_zone="Europe/Bucharest";break;
case 9: $t_zone="Europe/London";break;
case 10: $t_zone="Indian/Maldives";break;
case 11: $t_zone="Pacific/Fiji";break;
}
date_default_timezone_set($t_zone);
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>TravianZ Installation</title>
<link rel="shortcut icon" href="favicon.ico" />
<meta http-equiv="cache-control" content="max-age=0" />
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="expires" content="0" />
<meta http-equiv="imagetoolbar" content="no" />
<meta http-equiv="content-type" content="text/html; charset=us-ascii" />
<script src="mt-full.js?0ac36" type="text/javascript"></script>
<script src="unx.js?0ac36" type="text/javascript"></script>
<script src="new.js?0ac36" type="text/javascript"></script>
<link href="../gpack/travian_default/lang/en/lang.css?f4b7c" rel="stylesheet" type="text/css" />
<link href="../gpack/travian_default/lang/en/compact.css?f4b7c" rel="stylesheet" type="text/css" />
<link href="../gpack/travian_default/travian.css?e21d2" rel="stylesheet" type="text/css" />
<link href="../gpack/travian_default/lang/en/lang.css?e21d2" rel="stylesheet" type="text/css" />
</head>
<body>
<script LANGUAGE="JavaScript">
function refresh(tz) {
var dt = new Array();
dt=tz.split(",");
tz=dt[0];
location="?s=1&t="+tz;
}
function proceed() {
document.dataform.Submit.disabled=true;
return(true);
}
</script>
<div class="wrapper">
<img class="c1" src="img/x.gif" id="msfilter" alt="" name="msfilter" />

<div id="dynamic_header"></div>

<div id="header">
<div id="mtop"></div>
</div>

<div id="mid">
<div id="side_navi">
<?php include("templates/menu.tpl"); ?>
</div>

<div id="content" class="login">
<?php
IHG_Progressbar::draw_css();
$bar = new IHG_Progressbar(7, 'Step %d from %d ');
$bar->draw();
for($i = 0; $i < ($_GET['s']+1); $i++) {
$bar->tick();
}
?>
<div class="headline"><center>
<span class="f18 c5">TravianZ Installation Script</span>
</center></div>

<?php
if(substr(sprintf('%o', fileperms('../')), -4)<'700'){
echo"<span class='f18 c5'>ERROR!</span><br />It's not possible to write the config file. Change the permission to '777'. After that, refresh this page!";
} else
switch($_GET['s']){
case 0:
include("templates/greet.tpl");
break;
case 1:
include("templates/config.tpl");
break;
Expand All @@ -107,20 +19,3 @@ function proceed() {
include("templates/end.tpl");
break;
}
?>

<div id="side_info" class="outgame"></div>

<div class="clear"></div>
</div>

<div class="footer-stopper outgame"></div>

<div class="clear"></div>

<?php include("../Templates/footer.tpl"); ?>
</div>

<div id="ce"></div>
</body>
</html>
Loading

0 comments on commit cea3608

Please sign in to comment.