-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathApp.class.php
55 lines (45 loc) · 1.55 KB
/
App.class.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
<?php
if( !defined("webStart") ) { exit(0); }
class App {
static $text = array();
function __construct() {
$this->_autoload();
$this->_get();
}
private function _get() {
if( isset($_GET['controller']) && isset($_GET['action']) ) {
$controller = $_GET['controller'];
$action = $_GET['action'];
} else {
$controller = "pages";
$action = "home";
}
require_once('Call.php');
}
private function _autoload() {
// โหลด Language
require_once( ROOT_LANG . "Language.php" );
if( isset($_GET['lang']) ) {
Language::$type = $_GET['lang'];
}
Language::_load();
$this->setAllText();
// โหลด Request
require_once( ROOT_REQUEST . "Request.class.php" );
// โหลด Controller
// require_once( ROOT_CONTROLLER . "pagesController.php" );
// require_once( ROOT_CONTROLLER . "indexController.php" );
// require_once( ROOT_CONTROLLER . "homeController.php" );
// require_once( ROOT_CONTROLLER . "historyController.php" );
// require_once( ROOT_CONTROLLER . "importantplaceController.php" );
// require_once( ROOT_CONTROLLER . "galleryController.php" );
// โหลด Modal
//require_once( ROOT_MODAL . "page.php" );
}
private function setAllText() {
$result = Connect::select("text","");
foreach( $result as $val ) {
App::$text[$val['key_t']] = $val['content'];
}
}
}