forked from Warsaalk/OGotcha
/
index.php
69 lines (56 loc) · 2.56 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<?php
/** OGotcha, a combat report converter for Ogame
* Copyright (C) 2014 Klaas Van Parys
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* This program is based on the Kokx's CR Converter © 2009 kokx: https://github.com/kokx/kokx-converter
*
* This file is not part of the original program and therefore it only inherits this copyright: Copyright (C) 2014 Klaas Van Parys
*/
/**
* Include everything we need
*/
include 'const.php';
include __MODULES . 'kokx/const.php';
/**
* Let the Main handle everything :)
*/
$main = new Main(); //Create Main
//$main->addInfo( new Info( "This website is still under construction and can be used for testing purposes only! Errors can occur when doing certain actions.", Info::INFORMATION ) );
//$main->addInfo( new Info( "Copyrights are not final yet. This software is under GNU GPL v3 license, the source will be available when the software is finished!", Info::INFORMATION ) );
$main->initDictionaries( array('nl','en'), 'en' );
$main->initPages( array('home','info') );
$main->setValidator( new Validator() ); //Connect form validator
$main->setFormManager( new FormManager() ); //Connect form manager
$main->setDict( new Dictionary() ); //Connect dictionary
$main->setStore( new Store() ); //Connect Store
$main->handleGet(); //Handle $_GET
$main->handleDictionary(); //Handle Dictionary
$main->handlePost(); //Handle $_POST
$main->handleModule( 'KokxModule' ); //Name of module class
$main->addGoogleAnalytics( 'UA-46271379-4' );
$main->addInfo( new Info( $main->getDict()->getVal('OGotcha release'), Info::INFORMATION ) );
/**
* Handle View
*/
$view = new View( $main ); //Create view
$view->addCSS( 'main.css' ); //Add style
$renderd = $view->render(); //Render content
echo $renderd; //Dispay content
/*
* http://pastebin.com/Fg1uhvU4 - Dutch
* http://pastebin.com/1xzDcJm4 - English
* http://pastebin.com/gT7PFkxK - English
*/