@@ -14,8 +14,11 @@ |
||
14 | 14 | endfor; |
15 | 15 | ?> |
16 | 16 | <div id="map" class="map"></div> |
17 | -<?php else : ?> |
|
17 | +<?php else { |
|
18 | + : ?> |
|
18 | 19 | <div class="alert alert-warning"> |
19 | 20 | <strong>Warning!</strong> Not a validated IP, could not found location. |
20 | 21 | </div> |
21 | -<?php endif; ?> |
|
22 | +<?php endif; |
|
23 | +} |
|
24 | +?> |
@@ -16,9 +16,9 @@ |
||
16 | 16 | <p>Here is a set of utilities to use when learning, developing, testing and debugging Anax.</p> |
17 | 17 | |
18 | 18 | <ul> |
19 | - <li><a href="<?= url($mount."di") ?>">DI (show loaded services in $di)</a></li> |
|
20 | - <li><a href="<?= url($mount."request") ?>">Request (show details on current request)</a></li> |
|
21 | - <li><a href="<?= url($mount."router") ?>">Router (show loaded routes)</a></li> |
|
22 | - <li><a href="<?= url($mount."session") ?>">Session (show session data)</a></li> |
|
23 | - <li><a href="<?= url($mount."view") ?>">View (debug and inspect views)</a></li> |
|
19 | + <li><a href="<?= url($mount . "di") ?>">DI (show loaded services in $di)</a></li> |
|
20 | + <li><a href="<?= url($mount . "request") ?>">Request (show details on current request)</a></li> |
|
21 | + <li><a href="<?= url($mount . "router") ?>">Router (show loaded routes)</a></li> |
|
22 | + <li><a href="<?= url($mount . "session") ?>">Session (show session data)</a></li> |
|
23 | + <li><a href="<?= url($mount . "view") ?>">View (debug and inspect views)</a></li> |
|
24 | 24 | </ul> |
@@ -21,5 +21,5 @@ |
||
21 | 21 | <pre><?= var_dump($session) ?></pre> |
22 | 22 | |
23 | 23 | <p> |
24 | - <a href="<?= url($mount."session") ?>">Back to session<a> |
|
24 | + <a href="<?= url($mount . "session") ?>">Back to session<a> |
|
25 | 25 | </p> |
@@ -21,6 +21,6 @@ |
||
21 | 21 | <pre><?= var_dump($session) ?></pre> |
22 | 22 | |
23 | 23 | <p> |
24 | - <a href="<?= url($mount."session/increment") ?>">Add to session and increment<a> | |
|
25 | - <a href="<?= url($mount."session/destroy") ?>">Destroy session<a> |
|
24 | + <a href="<?= url($mount . "session/increment") ?>">Add to session and increment<a> | |
|
25 | + <a href="<?= url($mount . "session/destroy") ?>">Destroy session<a> |
|
26 | 26 | </p> |
@@ -14,7 +14,7 @@ |
||
14 | 14 | $items = $navbarConfig["items"] ?? []; |
15 | 15 | $html = $navbar->createMenuWithSubMenus($navbarConfig); |
16 | 16 | |
17 | -$classes = "rm-navbar-max rm-navbar rm-max rm-swipe-right " . ( $class ?? null); |
|
17 | +$classes = "rm-navbar-max rm-navbar rm-max rm-swipe-right " . ($class ?? null); |
|
18 | 18 | |
19 | 19 | |
20 | 20 | ?><!-- menu wrapper --> |
@@ -13,7 +13,7 @@ |
||
13 | 13 | $navbar->setDI($di); |
14 | 14 | $html = $navbar->createMenuWithSubMenus($navbarConfig); |
15 | 15 | |
16 | -$classes = "rm-navbar " . ( $class ?? null); |
|
16 | +$classes = "rm-navbar " . ($class ?? null); |
|
17 | 17 | |
18 | 18 | |
19 | 19 |
@@ -196,7 +196,7 @@ |
||
196 | 196 | $sidebarLeft = regionHasContent("sidebar-left"); |
197 | 197 | $sidebarRight = regionHasContent("sidebar-right"); |
198 | 198 | $class = ""; |
199 | -$class .= $sidebarLeft ? "has-sidebar-left " : ""; |
|
199 | +$class .= $sidebarLeft ? "has-sidebar-left " : ""; |
|
200 | 200 | $class .= $sidebarRight ? "has-sidebar-right " : ""; |
201 | 201 | $class .= empty($class) ? "" : "has-sidebar"; |
202 | 202 | ?> |
@@ -120,11 +120,14 @@ |
||
120 | 120 | <h3 class="head">Om mig</h3> |
121 | 121 | <p class="head">Små saker</p> |
122 | 122 | </div> |
123 | -<?php else : ?> |
|
123 | +<?php else { |
|
124 | + : ?> |
|
124 | 125 | <div class="callbacks_container"> |
125 | 126 | <div class="banner-top-hidesite"></div> |
126 | 127 | </div> |
127 | -<?php endif; ?> |
|
128 | +<?php endif; |
|
129 | +} |
|
130 | +?> |
|
128 | 131 | |
129 | 132 | <div class="clearfix"></div> |
130 | 133 |
@@ -21,7 +21,7 @@ |
||
21 | 21 | } |
22 | 22 | |
23 | 23 | // Prepare title |
24 | -$title = isset($title) && !empty($title)? $title : null; |
|
24 | +$title = isset($title) && !empty($title) ? $title : null; |
|
25 | 25 | $header = isset($header) ? $header : $title; |
26 | 26 | |
27 | 27 | // Prepare content into text |
@@ -90,14 +90,14 @@ |
||
90 | 90 | { |
91 | 91 | $curl = curl_init(); |
92 | 92 | curl_setopt_array($curl, array( |
93 | - CURLOPT_URL => "$api", |
|
94 | - CURLOPT_RETURNTRANSFER => true, |
|
95 | - CURLOPT_TIMEOUT => 30, |
|
96 | - CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, |
|
97 | - CURLOPT_CUSTOMREQUEST => "GET", |
|
98 | - CURLOPT_HTTPHEADER => array( |
|
93 | + CURLOPT_URL => "$api", |
|
94 | + CURLOPT_RETURNTRANSFER => true, |
|
95 | + CURLOPT_TIMEOUT => 30, |
|
96 | + CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, |
|
97 | + CURLOPT_CUSTOMREQUEST => "GET", |
|
98 | + CURLOPT_HTTPHEADER => array( |
|
99 | 99 | "cache-control: no-cache" |
100 | - ), |
|
100 | + ), |
|
101 | 101 | )); |
102 | 102 | |
103 | 103 | $response = curl_exec($curl); |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | $iptest = ["212.212.100.110", "0000:0000:0000:a000:0000:0000:0000:0001c"]; |
28 | 28 | $empty = []; |
29 | 29 | |
30 | - for ($i=0; $i < count($iptest); $i++) { |
|
30 | + for ($i = 0; $i < count($iptest); $i++) { |
|
31 | 31 | if (filter_var($iptest[$i], FILTER_VALIDATE_IP)) { |
32 | 32 | $empty[$i] = ["ip" => "$iptest[$i] is a valid IP address"]; |
33 | 33 | } else { |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | $validate = $this->weatherValidateGet($iptest); |
115 | 115 | |
116 | 116 | if ($validate != false) { |
117 | - $response = $this->apiKey("https://api.darksky.net/forecast/". $this->di->get('keys')->weather . "/" . $validate["latitude"] . "," . $validate["longitude"] ."?exclude=currently,%20minutely,%20hourly,alerts&lang=sv&units=si"); |
|
117 | + $response = $this->apiKey("https://api.darksky.net/forecast/" . $this->di->get('keys')->weather . "/" . $validate["latitude"] . "," . $validate["longitude"] . "?exclude=currently,%20minutely,%20hourly,alerts&lang=sv&units=si"); |
|
118 | 118 | } else { |
119 | 119 | $response = false; |
120 | 120 | } |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | $validate = $this->weatherValidateGet($iptest); |
142 | 142 | |
143 | 143 | if ($validate != false) { |
144 | - $response = $this->apiKey("https://api.darksky.net/forecast/". $this->di->get('keys')->weather . "/" . $validate["latitude"] . "," . $validate["longitude"]); |
|
144 | + $response = $this->apiKey("https://api.darksky.net/forecast/" . $this->di->get('keys')->weather . "/" . $validate["latitude"] . "," . $validate["longitude"]); |
|
145 | 145 | } else { |
146 | 146 | $response = ["Ip Could not been found!"]; |
147 | 147 | } |