@@ -8,23 +8,23 @@ |
||
8 | 8 | $this->tags["brandImg"] = ""; |
9 | 9 | $this->tags["menu"] = ""; |
10 | 10 | $this->tags["title"] = ""; |
11 | - $this->tags["subtitle"] = ""; |
|
11 | + $this->tags["subtitle"] = ""; |
|
12 | 12 | $this->tags["content"] = ""; |
13 | - $this->tags["outContent"] = ""; |
|
13 | + $this->tags["outContent"] = ""; |
|
14 | 14 | $this->tags["footer"] = ""; |
15 | 15 | $this->tags["pagePath"] = []; |
16 | - $this->tags["css"] = []; |
|
17 | - $this->tags["js"] = []; |
|
16 | + $this->tags["css"] = []; |
|
17 | + $this->tags["js"] = []; |
|
18 | 18 | $this->tags["jsVariables"] = []; |
19 | - $this->tags["metaDescription"] = []; |
|
20 | - $this->tags["metaKeywords"] = []; |
|
19 | + $this->tags["metaDescription"] = []; |
|
20 | + $this->tags["metaKeywords"] = []; |
|
21 | 21 | $this->tags["metaAuthor"] = []; |
22 | 22 | } |
23 | 23 | public function uniforma() { |
24 | 24 | $this->addDipendences(); |
25 | 25 | $this->tags["css"] = array_unique($this->tags["css"]); |
26 | 26 | $this->tags["js"] = array_unique($this->tags["js"]); |
27 | - $this->tags["pagePath"] = json_encode($this->tags["pagePath"]); |
|
27 | + $this->tags["pagePath"] = json_encode($this->tags["pagePath"]); |
|
28 | 28 | $tempStr = ""; |
29 | 29 | foreach ($this->tags["css"] as $i) |
30 | 30 | $tempStr .= "<link rel='stylesheet' href='$i'>"; |
@@ -26,17 +26,20 @@ |
||
26 | 26 | $this->tags["js"] = array_unique($this->tags["js"]); |
27 | 27 | $this->tags["pagePath"] = json_encode($this->tags["pagePath"]); |
28 | 28 | $tempStr = ""; |
29 | - foreach ($this->tags["css"] as $i) |
|
30 | - $tempStr .= "<link rel='stylesheet' href='$i'>"; |
|
29 | + foreach ($this->tags["css"] as $i) { |
|
30 | + $tempStr .= "<link rel='stylesheet' href='$i'>"; |
|
31 | + } |
|
31 | 32 | $this->tags["css"] = $tempStr; |
32 | 33 | $tempStr = ""; |
33 | - foreach ($this->tags["js"] as $i) |
|
34 | - $tempStr .= "<script src='$i'></script>"; |
|
34 | + foreach ($this->tags["js"] as $i) { |
|
35 | + $tempStr .= "<script src='$i'></script>"; |
|
36 | + } |
|
35 | 37 | $this->tags["js"] = $tempStr; |
36 | 38 | $tempStr = ""; |
37 | 39 | $tempStr .= "<script type='text/javascript'>"; |
38 | - foreach ($this->tags["jsVariables"] as $i) |
|
39 | - $tempStr .= " $i[0] = $i[1];\n"; |
|
40 | + foreach ($this->tags["jsVariables"] as $i) { |
|
41 | + $tempStr .= " $i[0] = $i[1];\n"; |
|
42 | + } |
|
40 | 43 | $tempStr .= "</script>"; |
41 | 44 | $this->tags["jsVariables"] = $tempStr; |
42 | 45 | } |
@@ -4,10 +4,10 @@ |
||
4 | 4 | parent::__construct(); |
5 | 5 | } |
6 | 6 | public function getPage() { |
7 | - $base = $_SERVER["REDIRECT_BASE"]; |
|
8 | - $request = $_SERVER["REQUEST_URI"]; |
|
7 | + $base = $_SERVER["REDIRECT_BASE"]; |
|
8 | + $request = $_SERVER["REQUEST_URI"]; |
|
9 | 9 | $url = str_replace($base, "", $request); |
10 | - $url = explode("/",$url); |
|
10 | + $url = explode("/", $url); |
|
11 | 11 | return $url[1]; |
12 | 12 | } |
13 | 13 | } |
@@ -6,23 +6,23 @@ |
||
6 | 6 | require_once (end($GLOBALS["JATEPath"])."jate/functions/requirer.php"); |
7 | 7 | |
8 | 8 | //USER STUFF |
9 | - requireComponent ("modules/JConfig/JConfig.php"); |
|
10 | - $jConfig = new JConfig(); |
|
11 | - $jConfig->import("config/connection.json","connection"); |
|
9 | + requireComponent("modules/JConfig/JConfig.php"); |
|
10 | + $jConfig = new JConfig(); |
|
11 | + $jConfig->import("config/connection.json", "connection"); |
|
12 | 12 | $jConfig->import("config/misc.json"); |
13 | 13 | $jConfig->import("config/router.json"); |
14 | 14 | |
15 | 15 | //JATE STUFF |
16 | - requireComponent ("functions/folder.php"); |
|
16 | + requireComponent("functions/folder.php"); |
|
17 | 17 | |
18 | 18 | //JATE SUFF |
19 | - requireComponent ("modules/Module/Module.php"); |
|
20 | - requireComponents ("functions"); |
|
21 | - requireModules ("modules"); |
|
19 | + requireComponent("modules/Module/Module.php"); |
|
20 | + requireComponents("functions"); |
|
21 | + requireModules("modules"); |
|
22 | 22 | |
23 | 23 | //USER STUFF |
24 | - requireComponent ("config.php",false); |
|
25 | - requireModules ("modules",false); |
|
26 | - requireComponents ("bundles/models",false); |
|
27 | - requireComponents ("bundles/controllers",false); |
|
24 | + requireComponent("config.php", false); |
|
25 | + requireModules("modules", false); |
|
26 | + requireComponents("bundles/models", false); |
|
27 | + requireComponents("bundles/controllers", false); |
|
28 | 28 | ?> |
@@ -2,7 +2,7 @@ |
||
2 | 2 | class Page01 extends Template { |
3 | 3 | public function __construct() { |
4 | 4 | parent::__construct(); |
5 | - $this->tags["title"] = "JATE - Page01"; |
|
5 | + $this->tags["title"] = "JATE - Page01"; |
|
6 | 6 | $this->tags["content"] = $this->makePage(); |
7 | 7 | } |
8 | 8 | public function makePage() { |
@@ -2,7 +2,7 @@ |
||
2 | 2 | class Home extends Template { |
3 | 3 | public function __construct() { |
4 | 4 | parent::__construct(); |
5 | - $this->tags["title"] = "JATE - Home"; |
|
5 | + $this->tags["title"] = "JATE - Home"; |
|
6 | 6 | $this->tags["content"] = $this->makePage(); |
7 | 7 | } |
8 | 8 | public function makePage() { |
@@ -2,7 +2,7 @@ |
||
2 | 2 | class Page404 extends Template { |
3 | 3 | public function __construct() { |
4 | 4 | parent::__construct(); |
5 | - $this->tags["title"] = "JATE - 404"; |
|
5 | + $this->tags["title"] = "JATE - 404"; |
|
6 | 6 | $this->tags["content"] = $this->makePage(); |
7 | 7 | } |
8 | 8 | public function makePage() { |
@@ -19,14 +19,14 @@ |
||
19 | 19 | public function makeConnection() { |
20 | 20 | global $jConfig; |
21 | 21 | $connection = null; |
22 | - if($jConfig->connection["enable"]) |
|
22 | + if ($jConfig->connection["enable"]) |
|
23 | 23 | $connection = new Connection( |
24 | 24 | $jConfig->connection["server"] |
25 | 25 | , $jConfig->connection["database"] |
26 | 26 | , $jConfig->connection["user"] |
27 | 27 | , $jConfig->connection["password"] |
28 | 28 | ); |
29 | - $this->addConnection("base",$connection); |
|
29 | + $this->addConnection("base", $connection); |
|
30 | 30 | } |
31 | 31 | } |
32 | 32 | ?> |
@@ -19,13 +19,14 @@ |
||
19 | 19 | public function makeConnection() { |
20 | 20 | global $jConfig; |
21 | 21 | $connection = null; |
22 | - if($jConfig->connection["enable"]) |
|
23 | - $connection = new Connection( |
|
22 | + if($jConfig->connection["enable"]) { |
|
23 | + $connection = new Connection( |
|
24 | 24 | $jConfig->connection["server"] |
25 | 25 | , $jConfig->connection["database"] |
26 | 26 | , $jConfig->connection["user"] |
27 | 27 | , $jConfig->connection["password"] |
28 | 28 | ); |
29 | + } |
|
29 | 30 | $this->addConnection("base",$connection); |
30 | 31 | } |
31 | 32 | } |
@@ -2,7 +2,7 @@ |
||
2 | 2 | class Page01 extends Template { |
3 | 3 | public function __construct() { |
4 | 4 | parent::__construct(); |
5 | - $this->tags["title"] = "JATE - Page01"; |
|
5 | + $this->tags["title"] = "JATE - Page01"; |
|
6 | 6 | $this->tags["content"] = $this->makePage(); |
7 | 7 | } |
8 | 8 | public function makePage() { |
@@ -2,7 +2,7 @@ |
||
2 | 2 | class Home extends Template { |
3 | 3 | public function __construct() { |
4 | 4 | parent::__construct(); |
5 | - $this->tags["title"] = "JATE - Home"; |
|
5 | + $this->tags["title"] = "JATE - Home"; |
|
6 | 6 | $this->tags["content"] = $this->makePage(); |
7 | 7 | } |
8 | 8 | public function makePage() { |