@@ -1219,7 +1219,8 @@ discard block |
||
1219 | 1219 | /* |
1220 | 1220 | * check log or cache |
1221 | 1221 | */ |
1222 | - if ($object_type == OBJECT_CACHE) {// get filenames of the pictures of $this' caches |
|
1222 | + if ($object_type == OBJECT_CACHE) { |
|
1223 | +// get filenames of the pictures of $this' caches |
|
1223 | 1224 | $rs = sql( |
1224 | 1225 | "SELECT `pictures`.`url` " . |
1225 | 1226 | "FROM `pictures`,`caches` " . |
@@ -1228,7 +1229,8 @@ discard block |
||
1228 | 1229 | OBJECT_CACHE, |
1229 | 1230 | $this->getUserId() |
1230 | 1231 | ); |
1231 | - } elseif ($object_type == OBJECT_CACHELOG) {// get filenames of the pictures of $this' logs |
|
1232 | + } elseif ($object_type == OBJECT_CACHELOG) { |
|
1233 | +// get filenames of the pictures of $this' logs |
|
1232 | 1234 | $rs = sql( |
1233 | 1235 | "SELECT `pictures`.`url` " . |
1234 | 1236 | "FROM `pictures`,`cache_logs` " . |
@@ -31,15 +31,15 @@ discard block |
||
31 | 31 | public function getDecimal() |
32 | 32 | { |
33 | 33 | if ($this->nLat < 0) { |
34 | - $sLat = 'S ' . sprintf('%08.5f', - $this->nLat) . '°'; |
|
34 | + $sLat = 'S '.sprintf('%08.5f', - $this->nLat).'°'; |
|
35 | 35 | } else { |
36 | - $sLat = 'N ' . sprintf('%08.5f', $this->nLat) . '°'; |
|
36 | + $sLat = 'N '.sprintf('%08.5f', $this->nLat).'°'; |
|
37 | 37 | } |
38 | 38 | |
39 | 39 | if ($this->nLon < 0) { |
40 | - $sLon = 'W ' . sprintf('%09.5f', - $this->nLon) . '°'; |
|
40 | + $sLon = 'W '.sprintf('%09.5f', - $this->nLon).'°'; |
|
41 | 41 | } else { |
42 | - $sLon = 'E ' . sprintf('%09.5f', $this->nLon) . '°'; |
|
42 | + $sLon = 'E '.sprintf('%09.5f', $this->nLon).'°'; |
|
43 | 43 | } |
44 | 44 | |
45 | 45 | return [ |
@@ -62,9 +62,9 @@ discard block |
||
62 | 62 | $nLatDeg = floor($nLat); |
63 | 63 | $nLatMin = ($nLat - $nLatDeg) * 60; |
64 | 64 | if ($bLatN) { |
65 | - $sLat = 'N ' . sprintf("%02d", $nLatDeg) . '° ' . sprintf($minute_format, $nLatMin) . '\''; |
|
65 | + $sLat = 'N '.sprintf("%02d", $nLatDeg).'° '.sprintf($minute_format, $nLatMin).'\''; |
|
66 | 66 | } else { |
67 | - $sLat = 'S ' . sprintf("%02d", $nLatDeg) . '° ' . sprintf($minute_format, $nLatMin) . '\''; |
|
67 | + $sLat = 'S '.sprintf("%02d", $nLatDeg).'° '.sprintf($minute_format, $nLatMin).'\''; |
|
68 | 68 | } |
69 | 69 | |
70 | 70 | // Ocprop: ([E|W].*?)' |
@@ -76,9 +76,9 @@ discard block |
||
76 | 76 | $nLonDeg = floor($nLon); |
77 | 77 | $nLonMin = ($nLon - $nLonDeg) * 60; |
78 | 78 | if ($bLonE) { |
79 | - $sLon = 'E ' . sprintf("%03d", $nLonDeg) . '° ' . sprintf($minute_format, $nLonMin) . '\''; |
|
79 | + $sLon = 'E '.sprintf("%03d", $nLonDeg).'° '.sprintf($minute_format, $nLonMin).'\''; |
|
80 | 80 | } else { |
81 | - $sLon = 'W ' . sprintf("%03d", $nLonDeg) . '° ' . sprintf($minute_format, $nLonMin) . '\''; |
|
81 | + $sLon = 'W '.sprintf("%03d", $nLonDeg).'° '.sprintf($minute_format, $nLonMin).'\''; |
|
82 | 82 | } |
83 | 83 | |
84 | 84 | return [ |
@@ -144,8 +144,8 @@ discard block |
||
144 | 144 | return [ |
145 | 145 | 'zone' => "", |
146 | 146 | 'letter' => "", |
147 | - 'north' => 'N ' . 0, |
|
148 | - 'east' => 'E ' . 0 |
|
147 | + 'north' => 'N '.0, |
|
148 | + 'east' => 'E '.0 |
|
149 | 149 | ]; |
150 | 150 | } |
151 | 151 | if ($this->nLon <= - 180 || $this->nLon > 180 || $this->nLat <= - 80 || $this->nLat >= 84) { |
@@ -157,8 +157,8 @@ discard block |
||
157 | 157 | 0 |
158 | 158 | ]; |
159 | 159 | } |
160 | - $lw = (float) $this->nLon; |
|
161 | - $bw = (float) $this->nLat; |
|
160 | + $lw = (float)$this->nLon; |
|
161 | + $bw = (float)$this->nLat; |
|
162 | 162 | |
163 | 163 | //WGS84 Datum |
164 | 164 | //Große Halbachse a und Abplattung f |
@@ -177,9 +177,9 @@ discard block |
||
177 | 177 | |
178 | 178 | //Koeffizienten zur Berechnung der Meridianbogenlänge |
179 | 179 | $e0 = $c * (pi() / 180) * (1 - 3 * $ex2 / 4 + 45 * $ex4 / 64 - 175 * $ex6 / 256 + 11025 * $ex8 / 16384); |
180 | - $e2 = $c * (- 3 * $ex2 / 8 + 15 * $ex4 / 32 - 525 * $ex6 / 1024 + 2205 * $ex8 / 4096); |
|
180 | + $e2 = $c * (-3 * $ex2 / 8 + 15 * $ex4 / 32 - 525 * $ex6 / 1024 + 2205 * $ex8 / 4096); |
|
181 | 181 | $e4 = $c * (15 * $ex4 / 256 - 105 * $ex6 / 1024 + 2205 * $ex8 / 16384); |
182 | - $e6 = $c * (- 35 * $ex6 / 3072 + 315 * $ex8 / 12288); |
|
182 | + $e6 = $c * (-35 * $ex6 / 3072 + 315 * $ex8 / 12288); |
|
183 | 183 | |
184 | 184 | //Längenzone lz und Breitenzone (Band) bz |
185 | 185 | $lzn = intval(($lw + 180) / 6) + 1; |
@@ -203,9 +203,9 @@ discard block |
||
203 | 203 | |
204 | 204 | $lz = "$lzn"; |
205 | 205 | if ($lzn < 10) { |
206 | - $lz = "0" . $lzn; |
|
206 | + $lz = "0".$lzn; |
|
207 | 207 | } |
208 | - $bd = (int) (1 + ($bw + 80) / 8); |
|
208 | + $bd = (int)(1 + ($bw + 80) / 8); |
|
209 | 209 | $bz = substr($b_sel, $bd - 1, 1); |
210 | 210 | |
211 | 211 | //Geographische Breite in Radianten br |
@@ -250,29 +250,29 @@ discard block |
||
250 | 250 | $ew = 0.9996 * ($nd * $cos1 * $dl + $nd * $cos3 * (1 - $tan2 + $etasq) * $dl3 / 6 + |
251 | 251 | $nd * $cos5 * (5 - 18 * $tan2 + $tan4) * $dl5 / 120) + 500000; |
252 | 252 | |
253 | - $nk = $nw - (int) $nw; |
|
253 | + $nk = $nw - (int)$nw; |
|
254 | 254 | if ($nk < 0.5) { |
255 | - $nw = '' . (int) $nw; |
|
255 | + $nw = ''.(int)$nw; |
|
256 | 256 | } else { |
257 | - $nw = '' . ((int) $nw + 1); |
|
257 | + $nw = ''.((int)$nw + 1); |
|
258 | 258 | } |
259 | 259 | |
260 | 260 | while (strlen($nw) < 7) { |
261 | - $nw = '0' . $nw; |
|
261 | + $nw = '0'.$nw; |
|
262 | 262 | } |
263 | 263 | |
264 | - $nk = $ew - (int) $ew; |
|
264 | + $nk = $ew - (int)$ew; |
|
265 | 265 | if ($nk < 0.5) { |
266 | - $ew = '0' . (int) $ew; |
|
266 | + $ew = '0'.(int)$ew; |
|
267 | 267 | } else { |
268 | - $ew = '0' . intval($ew + 1); |
|
268 | + $ew = '0'.intval($ew + 1); |
|
269 | 269 | } |
270 | 270 | |
271 | 271 | return [ |
272 | 272 | 'zone' => $lz, |
273 | 273 | 'letter' => $bz, |
274 | - 'north' => 'N ' . floor($nw), |
|
275 | - 'east' => 'E ' . floor($ew) |
|
274 | + 'north' => 'N '.floor($nw), |
|
275 | + 'east' => 'E '.floor($ew) |
|
276 | 276 | ]; |
277 | 277 | } |
278 | 278 | |
@@ -282,7 +282,7 @@ discard block |
||
282 | 282 | $pdResult = $this->wgs2pot($this->nLat, $this->nLon); |
283 | 283 | $result = $this->geo2gk($pdResult[1], $pdResult[0]); |
284 | 284 | |
285 | - return 'R ' . floor($result[0]) . ' H ' . floor($result[1]); |
|
285 | + return 'R '.floor($result[0]).' H '.floor($result[1]); |
|
286 | 286 | } |
287 | 287 | |
288 | 288 | public function wgs2pot($bw, $lw) |
@@ -313,8 +313,8 @@ discard block |
||
313 | 313 | 0 |
314 | 314 | ]; |
315 | 315 | } |
316 | - $lw = (float) $lw; |
|
317 | - $bw = (float) $bw; |
|
316 | + $lw = (float)$lw; |
|
317 | + $bw = (float)$bw; |
|
318 | 318 | |
319 | 319 | // Quellsystem WGS 84 Datum |
320 | 320 | // Große Halbachse a und Abplattung fq |
@@ -392,8 +392,8 @@ discard block |
||
392 | 392 | 0 |
393 | 393 | ]; |
394 | 394 | } |
395 | - $lp = (float) $lp; |
|
396 | - $bp = (float) $bp; |
|
395 | + $lp = (float)$lp; |
|
396 | + $bp = (float)$bp; |
|
397 | 397 | |
398 | 398 | // Potsdam Datum |
399 | 399 | // Große Halbachse a und Abplattung f |
@@ -411,9 +411,9 @@ discard block |
||
411 | 411 | |
412 | 412 | // Koeffizienten zur Berechnung der Meridianbogenlänge |
413 | 413 | $e0 = $c * (pi() / 180) * (1 - 3 * $ex2 / 4 + 45 * $ex4 / 64 - 175 * $ex6 / 256 + 11025 * $ex8 / 16384); |
414 | - $e2 = $c * (- 3 * $ex2 / 8 + 15 * $ex4 / 32 - 525 * $ex6 / 1024 + 2205 * $ex8 / 4096); |
|
414 | + $e2 = $c * (-3 * $ex2 / 8 + 15 * $ex4 / 32 - 525 * $ex6 / 1024 + 2205 * $ex8 / 4096); |
|
415 | 415 | $e4 = $c * (15 * $ex4 / 256 - 105 * $ex6 / 1024 + 2205 * $ex8 / 16384); |
416 | - $e6 = $c * (- 35 * $ex6 / 3072 + 315 * $ex8 / 12288); |
|
416 | + $e6 = $c * (-35 * $ex6 / 3072 + 315 * $ex8 / 12288); |
|
417 | 417 | |
418 | 418 | // Breite in Radianten |
419 | 419 | $br = $bp * pi() / 180; |
@@ -451,18 +451,18 @@ discard block |
||
451 | 451 | $rw = ($nd * $cos1 * $dl + $nd * $cos3 * (1 - $tan2 + $etasq) * $dl3 / 6 + |
452 | 452 | $nd * $cos5 * (5 - 18 * $tan2 + $tan4) * $dl5 / 120 + $kz * 1e6 + 500000); |
453 | 453 | |
454 | - $nk = $hw - (int) $hw; |
|
454 | + $nk = $hw - (int)$hw; |
|
455 | 455 | if ($nk < 0.5) { |
456 | - $hw = (int) $hw; |
|
456 | + $hw = (int)$hw; |
|
457 | 457 | } else { |
458 | - $hw = ((int) $hw) + 1; |
|
458 | + $hw = ((int)$hw) + 1; |
|
459 | 459 | } |
460 | 460 | |
461 | - $nk = $rw - (int) $rw; |
|
461 | + $nk = $rw - (int)$rw; |
|
462 | 462 | if ($nk < 0.5) { |
463 | - $rw = (int) $rw; |
|
463 | + $rw = (int)$rw; |
|
464 | 464 | } else { |
465 | - $rw = (int) ($rw + 1); |
|
465 | + $rw = (int)($rw + 1); |
|
466 | 466 | } |
467 | 467 | |
468 | 468 | return [ |
@@ -481,8 +481,8 @@ discard block |
||
481 | 481 | $lat_base = 52.15517440; |
482 | 482 | $lon_base = 5.38720621; |
483 | 483 | |
484 | - for ($i = 0; $i <= 6; $i ++) { |
|
485 | - for ($j = 0; $j <= 5; $j ++) { |
|
484 | + for ($i = 0; $i <= 6; $i++) { |
|
485 | + for ($j = 0; $j <= 5; $j++) { |
|
486 | 486 | $rpq[$i][$j] = 0; |
487 | 487 | $spq[$i][$j] = 0; |
488 | 488 | } |
@@ -517,8 +517,8 @@ discard block |
||
517 | 517 | $xOrigin = 0; |
518 | 518 | $yOrigin = 0; |
519 | 519 | |
520 | - for ($q = 0; $q <= 5; $q ++) { |
|
521 | - for ($p = 0; $p <= 6; $p ++) { |
|
520 | + for ($q = 0; $q <= 5; $q++) { |
|
521 | + for ($p = 0; $p <= 6; $p++) { |
|
522 | 522 | $xOrigin = $xOrigin + ($rpq[$p][$q] * ((pow($dlat, $p)) * (pow($dlon, $q)))); |
523 | 523 | $yOrigin = $yOrigin + ($spq[$p][$q] * ((pow($dlat, $p)) * (pow($dlon, $q)))); |
524 | 524 | } |
@@ -526,7 +526,7 @@ discard block |
||
526 | 526 | $xOrigin = $xOrigin + $rdx_base; |
527 | 527 | $yOrigin = $yOrigin + $rdy_base; |
528 | 528 | |
529 | - return 'X ' . floor($xOrigin) . ' Y ' . floor($yOrigin); |
|
529 | + return 'X '.floor($xOrigin).' Y '.floor($yOrigin); |
|
530 | 530 | } |
531 | 531 | |
532 | 532 | // returns string |
@@ -586,13 +586,13 @@ discard block |
||
586 | 586 | |
587 | 587 | public static function parseRequestLat($name) |
588 | 588 | { |
589 | - if (!isset($_REQUEST[$name . 'NS']) || !isset($_REQUEST[$name . 'Lat']) || !isset($_REQUEST[$name . 'LatMin'])) { |
|
589 | + if (!isset($_REQUEST[$name.'NS']) || !isset($_REQUEST[$name.'Lat']) || !isset($_REQUEST[$name.'LatMin'])) { |
|
590 | 590 | return false; |
591 | 591 | } |
592 | 592 | |
593 | - $coordNS = $_REQUEST[$name . 'NS']; |
|
594 | - $coordLat = $_REQUEST[$name . 'Lat'] + 0; |
|
595 | - $coordLatMin = str_replace(',', '.', $_REQUEST[$name . 'LatMin']) + 0; |
|
593 | + $coordNS = $_REQUEST[$name.'NS']; |
|
594 | + $coordLat = $_REQUEST[$name.'Lat'] + 0; |
|
595 | + $coordLatMin = str_replace(',', '.', $_REQUEST[$name.'LatMin']) + 0; |
|
596 | 596 | |
597 | 597 | $lat = $coordLat + $coordLatMin / 60; |
598 | 598 | if ($coordNS == 'S') { |
@@ -604,13 +604,13 @@ discard block |
||
604 | 604 | |
605 | 605 | public static function parseRequestLon($name) |
606 | 606 | { |
607 | - if (!isset($_REQUEST[$name . 'EW']) || !isset($_REQUEST[$name . 'Lon']) || !isset($_REQUEST[$name . 'LonMin'])) { |
|
607 | + if (!isset($_REQUEST[$name.'EW']) || !isset($_REQUEST[$name.'Lon']) || !isset($_REQUEST[$name.'LonMin'])) { |
|
608 | 608 | return false; |
609 | 609 | } |
610 | 610 | |
611 | - $coordEW = $_REQUEST[$name . 'EW']; |
|
612 | - $coordLon = $_REQUEST[$name . 'Lon'] + 0; |
|
613 | - $coordLonMin = str_replace(',', '.', $_REQUEST[$name . 'LonMin']) + 0; |
|
611 | + $coordEW = $_REQUEST[$name.'EW']; |
|
612 | + $coordLon = $_REQUEST[$name.'Lon'] + 0; |
|
613 | + $coordLonMin = str_replace(',', '.', $_REQUEST[$name.'LonMin']) + 0; |
|
614 | 614 | |
615 | 615 | $lon = $coordLon + $coordLonMin / 60; |
616 | 616 | if ($coordEW == 'W') { |
@@ -638,8 +638,8 @@ discard block |
||
638 | 638 | [ |
639 | 639 | 'http' => [ |
640 | 640 | 'method' => 'POST', |
641 | - 'header' => "Content-Type: application/x-www-form-urlencoded\r\n" . |
|
642 | - "Content-Length: " . strlen($params_str) . "\r\n", |
|
641 | + 'header' => "Content-Type: application/x-www-form-urlencoded\r\n". |
|
642 | + "Content-Length: ".strlen($params_str)."\r\n", |
|
643 | 643 | 'content' => $params_str, |
644 | 644 | ], |
645 | 645 | ] |
@@ -277,7 +277,7 @@ |
||
277 | 277 | ) { |
278 | 278 | return 'https' . strstr($url, '://'); |
279 | 279 | } elseif (strtolower(substr($url, 0, strlen($opt['page']['absolute_https_url']))) |
280 | - == $opt['page']['absolute_https_url'] |
|
280 | + == $opt['page']['absolute_https_url'] |
|
281 | 281 | && !$opt['page']['https']['active'] |
282 | 282 | ) { |
283 | 283 | return 'http' . strstr($url, '://'); |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | * TODO: accept-language des Browser auswerten |
11 | 11 | ***************************************************************************/ |
12 | 12 | |
13 | -require_once __DIR__ . '/../vendor/autoload.php'; |
|
13 | +require_once __DIR__.'/../vendor/autoload.php'; |
|
14 | 14 | |
15 | 15 | function __autoload($class_name) |
16 | 16 | { |
@@ -20,8 +20,8 @@ discard block |
||
20 | 20 | return; |
21 | 21 | } |
22 | 22 | |
23 | - $file1 = $opt['rootpath'] . 'lib2/' . $class_name . '.class.php'; |
|
24 | - $file2 = $opt['rootpath'] . 'lib2/logic/' . $class_name . '.class.php'; |
|
23 | + $file1 = $opt['rootpath'].'lib2/'.$class_name.'.class.php'; |
|
24 | + $file2 = $opt['rootpath'].'lib2/logic/'.$class_name.'.class.php'; |
|
25 | 25 | if (file_exists($file1)) { |
26 | 26 | require_once $file1; |
27 | 27 | } elseif (file_exists($file2)) { |
@@ -43,9 +43,9 @@ discard block |
||
43 | 43 | mb_regex_encoding('UTF-8'); |
44 | 44 | |
45 | 45 | // set options |
46 | -require_once $opt['rootpath'] . 'config2/settings-dist.inc.php'; |
|
47 | -require_once $opt['rootpath'] . 'config2/settings.inc.php'; |
|
48 | -require_once $opt['rootpath'] . 'config2/verify-settings.inc.php'; |
|
46 | +require_once $opt['rootpath'].'config2/settings-dist.inc.php'; |
|
47 | +require_once $opt['rootpath'].'config2/settings.inc.php'; |
|
48 | +require_once $opt['rootpath'].'config2/verify-settings.inc.php'; |
|
49 | 49 | |
50 | 50 | foreach ($opt['page']['banned_user_agents'] as $ua) { |
51 | 51 | if (strpos($useragent, $ua) !== false) { |
@@ -69,10 +69,10 @@ discard block |
||
69 | 69 | } |
70 | 70 | } |
71 | 71 | |
72 | -require_once $opt['rootpath'] . 'lib2/errorhandler.inc.php'; |
|
72 | +require_once $opt['rootpath'].'lib2/errorhandler.inc.php'; |
|
73 | 73 | configure_php(); |
74 | 74 | |
75 | -require $opt['rootpath'] . 'lib2/cookie.class.php'; |
|
75 | +require $opt['rootpath'].'lib2/cookie.class.php'; |
|
76 | 76 | normalize_settings(); |
77 | 77 | set_language(); |
78 | 78 | set_usercountry(); |
@@ -85,30 +85,30 @@ discard block |
||
85 | 85 | $opt['template']['style'] = $opt['template']['default']['style']; |
86 | 86 | } |
87 | 87 | |
88 | - if (!is_dir($opt['rootpath'] . 'templates2/' . $opt['template']['style'])) { |
|
88 | + if (!is_dir($opt['rootpath'].'templates2/'.$opt['template']['style'])) { |
|
89 | 89 | $opt['template']['style'] = $opt['template']['default']['style']; |
90 | 90 | } |
91 | 91 | } else { |
92 | 92 | $opt['template']['style'] = $opt['template']['default']['style']; |
93 | 93 | } |
94 | -$opt['stylepath'] = $opt['rootpath'] . 'templates2/' . $opt['template']['style'] . '/'; |
|
94 | +$opt['stylepath'] = $opt['rootpath'].'templates2/'.$opt['template']['style'].'/'; |
|
95 | 95 | |
96 | 96 | check_useragent(); |
97 | 97 | |
98 | 98 | /* setup smarty |
99 | 99 | * |
100 | 100 | */ |
101 | -require $opt['rootpath'] . 'lib2/OcSmarty.class.php'; |
|
101 | +require $opt['rootpath'].'lib2/OcSmarty.class.php'; |
|
102 | 102 | $tpl = new OcSmarty(); |
103 | 103 | |
104 | 104 | // include all we need |
105 | -require_once $opt['rootpath'] . 'lib2/logic/const.inc.php'; |
|
106 | -require_once $opt['rootpath'] . 'lib2/error.inc.php'; |
|
107 | -require_once $opt['rootpath'] . 'lib2/util.inc.php'; |
|
108 | -require_once $opt['rootpath'] . 'lib2/db.inc.php'; |
|
109 | -require_once $opt['rootpath'] . 'lib2/login.class.php'; |
|
110 | -require_once $opt['rootpath'] . 'lib2/menu.class.php'; |
|
111 | -require_once $opt['rootpath'] . 'lib2/logic/labels.inc.php'; |
|
105 | +require_once $opt['rootpath'].'lib2/logic/const.inc.php'; |
|
106 | +require_once $opt['rootpath'].'lib2/error.inc.php'; |
|
107 | +require_once $opt['rootpath'].'lib2/util.inc.php'; |
|
108 | +require_once $opt['rootpath'].'lib2/db.inc.php'; |
|
109 | +require_once $opt['rootpath'].'lib2/login.class.php'; |
|
110 | +require_once $opt['rootpath'].'lib2/menu.class.php'; |
|
111 | +require_once $opt['rootpath'].'lib2/logic/labels.inc.php'; |
|
112 | 112 | // require_once $opt['rootpath'] . 'lib2/throttle.inc.php'; |
113 | 113 | |
114 | 114 | // apply post configuration |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | $login->userid > 0 && |
124 | 124 | sql_value("SELECT `email_problems` FROM `user` WHERE `user_id`='&1'", 0, $login->userid) != 0 |
125 | 125 | ) { |
126 | - header("Location: verifyemail.php?page=" . basename($_SERVER['REQUEST_URI'])); |
|
126 | + header("Location: verifyemail.php?page=".basename($_SERVER['REQUEST_URI'])); |
|
127 | 127 | exit; |
128 | 128 | } |
129 | 129 | |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | |
150 | 150 | if (isset($opt['logic']['cachemaps']['wmsurl']) && strstr($opt['logic']['cachemaps']['wmsurl'], '://')) { |
151 | 151 | $opt['logic']['cachemaps']['wmsurl'] = |
152 | - $opt['page']['protocol'] . strstr($opt['logic']['cachemaps']['wmsurl'], '://'); |
|
152 | + $opt['page']['protocol'].strstr($opt['logic']['cachemaps']['wmsurl'], '://'); |
|
153 | 153 | } |
154 | 154 | } |
155 | 155 | |
@@ -234,7 +234,7 @@ discard block |
||
234 | 234 | $cookie->set('locale', $opt['template']['locale'], $opt['template']['default']['locale']); |
235 | 235 | } |
236 | 236 | |
237 | - bindtextdomain('messages', $opt['rootpath'] . 'cache2/translate'); |
|
237 | + bindtextdomain('messages', $opt['rootpath'].'cache2/translate'); |
|
238 | 238 | set_php_locale(); |
239 | 239 | textdomain('messages'); |
240 | 240 | } |
@@ -275,12 +275,12 @@ discard block |
||
275 | 275 | if (strtolower(substr($url, 0, strlen($opt['page']['absolute_http_url']))) == $opt['page']['absolute_http_url'] |
276 | 276 | && $opt['page']['https']['active'] |
277 | 277 | ) { |
278 | - return 'https' . strstr($url, '://'); |
|
278 | + return 'https'.strstr($url, '://'); |
|
279 | 279 | } elseif (strtolower(substr($url, 0, strlen($opt['page']['absolute_https_url']))) |
280 | 280 | == $opt['page']['absolute_https_url'] |
281 | 281 | && !$opt['page']['https']['active'] |
282 | 282 | ) { |
283 | - return 'http' . strstr($url, '://'); |
|
283 | + return 'http'.strstr($url, '://'); |
|
284 | 284 | } else { |
285 | 285 | return $url; |
286 | 286 | } |
@@ -185,10 +185,10 @@ discard block |
||
185 | 185 | // & escaped? |
186 | 186 | $escapesCount = 0; |
187 | 187 | while ((($nextarg - $escapesCount - 1) > 0) && (substr($sql, $nextarg - $escapesCount - 1, 1) == '\\')) { |
188 | - $escapesCount ++; |
|
188 | + $escapesCount++; |
|
189 | 189 | } |
190 | 190 | if (($escapesCount % 2) == 1) { |
191 | - $nextarg ++; |
|
191 | + $nextarg++; |
|
192 | 192 | } else { |
193 | 193 | $nextchar = substr($sql, $nextarg + 1, 1); |
194 | 194 | if (is_numeric($nextchar)) { |
@@ -199,7 +199,7 @@ discard block |
||
199 | 199 | while (preg_match('/^[0-9]{1}/', $nextchar) == 1) { |
200 | 200 | $arg .= $nextchar; |
201 | 201 | |
202 | - $arglength ++; |
|
202 | + $arglength++; |
|
203 | 203 | $nextchar = substr($sql, $nextarg + $arglength + 1, 1); |
204 | 204 | } |
205 | 205 | |
@@ -225,13 +225,13 @@ discard block |
||
225 | 225 | // strip apostroph and insert NULL |
226 | 226 | $filtered_sql = substr($filtered_sql, 0, strlen($filtered_sql) - 1); |
227 | 227 | $filtered_sql .= 'NULL'; |
228 | - $sqlpos ++; |
|
228 | + $sqlpos++; |
|
229 | 229 | } else { |
230 | 230 | $filtered_sql .= 'NULL'; |
231 | 231 | } |
232 | 232 | } |
233 | 233 | |
234 | - $sqlpos ++; |
|
234 | + $sqlpos++; |
|
235 | 235 | } else { |
236 | 236 | $arglength = 0; |
237 | 237 | $arg = ''; |
@@ -241,7 +241,7 @@ discard block |
||
241 | 241 | while (preg_match('/^[a-zA-Z0-9_]{1}/', $nextchar) == 1) { |
242 | 242 | $arg .= $nextchar; |
243 | 243 | |
244 | - $arglength ++; |
|
244 | + $arglength++; |
|
245 | 245 | $nextchar = substr($sql, $nextarg + $arglength + 1, 1); |
246 | 246 | } |
247 | 247 | |
@@ -263,7 +263,7 @@ discard block |
||
263 | 263 | $filtered_sql .= '`'; |
264 | 264 | } |
265 | 265 | |
266 | - $filtered_sql .= sql_escape_backtick($opt['db']['placeholder']['tmpdb']) . '`.`' . sql_escape_backtick($db['temptables'][$arg]); |
|
266 | + $filtered_sql .= sql_escape_backtick($opt['db']['placeholder']['tmpdb']).'`.`'.sql_escape_backtick($db['temptables'][$arg]); |
|
267 | 267 | |
268 | 268 | if (substr($sql, $nextarg + $arglength + 1, 1) != '`') { |
269 | 269 | $filtered_sql .= '`'; |
@@ -288,12 +288,12 @@ discard block |
||
288 | 288 | $escapesCount = 0; |
289 | 289 | while ((($nextarg - $escapesCount - 1) > 0) |
290 | 290 | && (substr($filtered_sql, $nextarg - $escapesCount - 1, 1) == '\\')) { |
291 | - $escapesCount ++; |
|
291 | + $escapesCount++; |
|
292 | 292 | } |
293 | 293 | if (($escapesCount % 2) == 0) { |
294 | 294 | // strip escapes of & |
295 | - $filtered_sql = substr($filtered_sql, 0, $nextarg) . '&' . substr($filtered_sql, $nextarg + 2); |
|
296 | - $nextarg --; |
|
295 | + $filtered_sql = substr($filtered_sql, 0, $nextarg).'&'.substr($filtered_sql, $nextarg + 2); |
|
296 | + $nextarg--; |
|
297 | 297 | } |
298 | 298 | |
299 | 299 | $nextarg = strpos($filtered_sql, '\&', $nextarg + 2); |
@@ -310,7 +310,7 @@ discard block |
||
310 | 310 | */ |
311 | 311 | |
312 | 312 | if (isset($db['debug']) && ($db['debug'] == true)) { |
313 | - require_once $opt['rootpath'] . 'lib2/sqldebugger.class.php'; |
|
313 | + require_once $opt['rootpath'].'lib2/sqldebugger.class.php'; |
|
314 | 314 | $result = $sqldebugger->execute($filtered_sql, $dblink, ($dblink === $db['dblink_slave']), $db['slave_server']); |
315 | 315 | if ($result === false) { |
316 | 316 | sql_error($filtered_sql); |
@@ -318,7 +318,7 @@ discard block |
||
318 | 318 | } else { |
319 | 319 | // measure time |
320 | 320 | if ($opt['db']['warn']['time'] > 0) { |
321 | - require_once $opt['rootpath'] . 'lib2/bench.inc.php'; |
|
321 | + require_once $opt['rootpath'].'lib2/bench.inc.php'; |
|
322 | 322 | $cSqlExecution = new Cbench; |
323 | 323 | $cSqlExecution->start(); |
324 | 324 | } |
@@ -332,8 +332,8 @@ discard block |
||
332 | 332 | $cSqlExecution->stop(); |
333 | 333 | |
334 | 334 | if ($cSqlExecution->diff() > $opt['db']['warn']['time']) { |
335 | - $ua = isset($_SERVER['HTTP_USER_AGENT']) ? "\r\n" . $_SERVER['HTTP_USER_AGENT'] : ""; |
|
336 | - sql_warn("execution took " . $cSqlExecution->diff() . " seconds" . $ua); |
|
335 | + $ua = isset($_SERVER['HTTP_USER_AGENT']) ? "\r\n".$_SERVER['HTTP_USER_AGENT'] : ""; |
|
336 | + sql_warn("execution took ".$cSqlExecution->diff()." seconds".$ua); |
|
337 | 337 | } |
338 | 338 | } |
339 | 339 | } |
@@ -774,7 +774,7 @@ discard block |
||
774 | 774 | } |
775 | 775 | |
776 | 776 | if ($db['dblink'] !== false) { |
777 | - mysql_query("SET NAMES '" . mysql_real_escape_string($opt['charset']['mysql'], $db['dblink']) . "'", $db['dblink']); |
|
777 | + mysql_query("SET NAMES '".mysql_real_escape_string($opt['charset']['mysql'], $db['dblink'])."'", $db['dblink']); |
|
778 | 778 | |
779 | 779 | //database connection established ... set the used database |
780 | 780 | if (@mysql_select_db($opt['db']['placeholder']['db'], $db['dblink']) == false) { |
@@ -837,7 +837,7 @@ discard block |
||
837 | 837 | AND `online`= 1 |
838 | 838 | AND (TIMESTAMP(NOW())-TIMESTAMP(`last_check`)+`time_diff`<'&1') |
839 | 839 | ORDER BY `w` DESC LIMIT 1", |
840 | - - 1, |
|
840 | + -1, |
|
841 | 841 | $nMaxTimeDiff |
842 | 842 | ); |
843 | 843 | |
@@ -898,7 +898,7 @@ discard block |
||
898 | 898 | sql_error(); |
899 | 899 | } |
900 | 900 | |
901 | - mysql_query("SET NAMES '" . mysql_real_escape_string($opt['charset']['mysql'], $db['dblink_slave']) . "'", $db['dblink_slave']); |
|
901 | + mysql_query("SET NAMES '".mysql_real_escape_string($opt['charset']['mysql'], $db['dblink_slave'])."'", $db['dblink_slave']); |
|
902 | 902 | |
903 | 903 | // initialize temp tables on slave server |
904 | 904 | $rs = sqlf_slave("SELECT `threadid`, `name` FROM `sys_temptables` WHERE `threadid`='&1'", mysql_thread_id($db['dblink_slave'])); |
@@ -1010,7 +1010,7 @@ discard block |
||
1010 | 1010 | $errno = mysql_errno(); |
1011 | 1011 | $error = mysql_error(); |
1012 | 1012 | if ($sqlstatement != "") { |
1013 | - $error .= "\n\nSQL statement: " . $sqlstatement; |
|
1013 | + $error .= "\n\nSQL statement: ".$sqlstatement; |
|
1014 | 1014 | } |
1015 | 1015 | |
1016 | 1016 | if ($db['error'] == true) { |
@@ -1019,7 +1019,7 @@ discard block |
||
1019 | 1019 | // could not load translations from database) |
1020 | 1020 | |
1021 | 1021 | if ($opt['db']['error']['display'] == true) { |
1022 | - $errmsg = 'MySQL error recursion (' . $errno . '): ' . $error; |
|
1022 | + $errmsg = 'MySQL error recursion ('.$errno.'): '.$error; |
|
1023 | 1023 | } else { |
1024 | 1024 | $errmsg = ""; |
1025 | 1025 | } |
@@ -1034,13 +1034,13 @@ discard block |
||
1034 | 1034 | } |
1035 | 1035 | |
1036 | 1036 | if ($opt['db']['error']['mail'] != '') { |
1037 | - $subject = '[' . $opt['page']['domain'] . '] SQL error'; |
|
1037 | + $subject = '['.$opt['page']['domain'].'] SQL error'; |
|
1038 | 1038 | if (admin_errormail($opt['db']['error']['mail'], |
1039 | 1039 | $subject, |
1040 | - str_replace("\n", "\r\n", $error) . "\n" . print_r(debug_backtrace(), true), |
|
1041 | - "From: " . $opt['mail']['from'] |
|
1040 | + str_replace("\n", "\r\n", $error)."\n".print_r(debug_backtrace(), true), |
|
1041 | + "From: ".$opt['mail']['from'] |
|
1042 | 1042 | )) { |
1043 | - require_once $opt['rootpath'] . 'lib2/mail.class.php'; |
|
1043 | + require_once $opt['rootpath'].'lib2/mail.class.php'; |
|
1044 | 1044 | |
1045 | 1045 | $mail = new mail(); |
1046 | 1046 | $mail->subject = $subject; |
@@ -1060,13 +1060,13 @@ discard block |
||
1060 | 1060 | if ($opt['gui'] == GUI_HTML) { |
1061 | 1061 | if (isset($tpl)) { |
1062 | 1062 | if ($opt['db']['error']['display'] == true) { |
1063 | - $tpl->error('MySQL error (' . $errno . '): ' . $error); |
|
1063 | + $tpl->error('MySQL error ('.$errno.'): '.$error); |
|
1064 | 1064 | } else { |
1065 | 1065 | $tpl->error('A database command could not be performed.'); |
1066 | 1066 | } |
1067 | 1067 | } else { |
1068 | 1068 | if ($opt['db']['error']['display'] == true) { |
1069 | - die('<html><body>' . htmlspecialchars('MySQL error (' . $errno . '): ' . str_replace("\n,", "<br />", $error)) . '</body></html>'); |
|
1069 | + die('<html><body>'.htmlspecialchars('MySQL error ('.$errno.'): '.str_replace("\n,", "<br />", $error)).'</body></html>'); |
|
1070 | 1070 | } else { |
1071 | 1071 | die('<html><body>A database command could not be performed</body></html>'); |
1072 | 1072 | } |
@@ -1074,7 +1074,7 @@ discard block |
||
1074 | 1074 | } else { |
1075 | 1075 | // CLI script, simple text output |
1076 | 1076 | if ($opt['db']['error']['display'] == true) { |
1077 | - die('MySQL error (' . $errno . '): ' . $error . "\n"); |
|
1077 | + die('MySQL error ('.$errno.'): '.$error."\n"); |
|
1078 | 1078 | } else { |
1079 | 1079 | die("A database command could not be performed.\n"); |
1080 | 1080 | } |
@@ -1086,13 +1086,13 @@ discard block |
||
1086 | 1086 | global $opt; |
1087 | 1087 | |
1088 | 1088 | if ($opt['db']['error']['mail'] != '') { |
1089 | - $subject = '[' . $opt['page']['domain'] . '] SQL error'; |
|
1089 | + $subject = '['.$opt['page']['domain'].'] SQL error'; |
|
1090 | 1090 | if (admin_errormail($opt['db']['error']['mail'], |
1091 | 1091 | $subject, |
1092 | - $warnmessage . "\n" . print_r(debug_backtrace(), true), |
|
1093 | - "From: " . $opt['mail']['from'] |
|
1092 | + $warnmessage."\n".print_r(debug_backtrace(), true), |
|
1093 | + "From: ".$opt['mail']['from'] |
|
1094 | 1094 | )) { |
1095 | - require_once $opt['rootpath'] . 'lib2/mail.class.php'; |
|
1095 | + require_once $opt['rootpath'].'lib2/mail.class.php'; |
|
1096 | 1096 | $mail = new mail(); |
1097 | 1097 | $mail->name = 'sql_warn'; |
1098 | 1098 | $mail->subject = $subject; |
@@ -1112,7 +1112,7 @@ discard block |
||
1112 | 1112 | fwrite($f, "SET NAMES 'utf8';\n"); |
1113 | 1113 | |
1114 | 1114 | if ($truncate == true) { |
1115 | - fwrite($f, "TRUNCATE TABLE `" . sql_escape($table) . "`;\n"); |
|
1115 | + fwrite($f, "TRUNCATE TABLE `".sql_escape($table)."`;\n"); |
|
1116 | 1116 | } |
1117 | 1117 | |
1118 | 1118 | while ($r = sql_fetch_assoc($rs)) { |
@@ -1120,19 +1120,19 @@ discard block |
||
1120 | 1120 | $values = array(); |
1121 | 1121 | |
1122 | 1122 | foreach ($r as $k => $v) { |
1123 | - $fields[] = '`' . sql_escape($k) . '`'; |
|
1123 | + $fields[] = '`'.sql_escape($k).'`'; |
|
1124 | 1124 | if ($v === null) { |
1125 | 1125 | $values[] = "NULL"; |
1126 | 1126 | } else { |
1127 | - $values[] = "'" . sql_escape($v) . "'"; |
|
1127 | + $values[] = "'".sql_escape($v)."'"; |
|
1128 | 1128 | } |
1129 | 1129 | } |
1130 | 1130 | unset($r); |
1131 | 1131 | |
1132 | 1132 | fwrite( |
1133 | 1133 | $f, |
1134 | - "INSERT INTO `" . sql_escape($table) . "` (" . implode(', ', $fields) . ")" |
|
1135 | - . " VALUES (" . implode(', ', $values) . ");\n" |
|
1134 | + "INSERT INTO `".sql_escape($table)."` (".implode(', ', $fields).")" |
|
1135 | + . " VALUES (".implode(', ', $values).");\n" |
|
1136 | 1136 | ); |
1137 | 1137 | } |
1138 | 1138 | } |
@@ -1143,14 +1143,14 @@ discard block |
||
1143 | 1143 | $rsIndex = sql("SHOW INDEX FROM `&1`", $table); |
1144 | 1144 | while ($r = sql_fetch_assoc($rsIndex)) { |
1145 | 1145 | if ($r['Key_name'] == 'PRIMARY') { |
1146 | - $primary[] = '`' . sql_escape($r['Column_name']) . '` ASC'; |
|
1146 | + $primary[] = '`'.sql_escape($r['Column_name']).'` ASC'; |
|
1147 | 1147 | } |
1148 | 1148 | } |
1149 | 1149 | sql_free_result($rsIndex); |
1150 | 1150 | |
1151 | - $sql = "SELECT * FROM `" . sql_escape($table) . "`"; |
|
1151 | + $sql = "SELECT * FROM `".sql_escape($table)."`"; |
|
1152 | 1152 | if (count($primary) > 0) { |
1153 | - $sql .= ' ORDER BY ' . implode(', ', $primary); |
|
1153 | + $sql .= ' ORDER BY '.implode(', ', $primary); |
|
1154 | 1154 | } |
1155 | 1155 | |
1156 | 1156 | $rs = sql($sql); |
@@ -1196,8 +1196,8 @@ discard block |
||
1196 | 1196 | $sTableSql = preg_replace("/,\n +?(KEY )?`okapi_syncbase`.+?(,)?\n/", "\\2\n", $sTableSql); |
1197 | 1197 | |
1198 | 1198 | fwrite($f, "SET NAMES 'utf8';\n"); |
1199 | - fwrite($f, "DROP TABLE IF EXISTS `" . sql_escape($table) . "`;\n"); |
|
1200 | - fwrite($f, $sTableSql . " ;\n"); |
|
1199 | + fwrite($f, "DROP TABLE IF EXISTS `".sql_escape($table)."`;\n"); |
|
1200 | + fwrite($f, $sTableSql." ;\n"); |
|
1201 | 1201 | } |
1202 | 1202 | |
1203 | 1203 | function sql_export_structure_to_file($filename, $table) |
@@ -16,12 +16,12 @@ discard block |
||
16 | 16 | } |
17 | 17 | |
18 | 18 | $opt['rootpath'] = '../'; |
19 | -require_once __DIR__ . '/../lib/common.inc.php'; |
|
20 | -require_once __DIR__ . '/../lib2/charset.inc.php'; |
|
21 | -require_once __DIR__ . '/../lib2/const.inc.php'; |
|
22 | -require_once __DIR__ . '/../lib2/logic/data-license.inc.php'; |
|
23 | -require_once __DIR__ . '/../lib2/logic/npas.inc.php'; |
|
24 | -require_once __DIR__ .' /../lib2/logic/geomath.class.php'; |
|
19 | +require_once __DIR__.'/../lib/common.inc.php'; |
|
20 | +require_once __DIR__.'/../lib2/charset.inc.php'; |
|
21 | +require_once __DIR__.'/../lib2/const.inc.php'; |
|
22 | +require_once __DIR__.'/../lib2/logic/data-license.inc.php'; |
|
23 | +require_once __DIR__.'/../lib2/logic/npas.inc.php'; |
|
24 | +require_once __DIR__.' /../lib2/logic/geomath.class.php'; |
|
25 | 25 | |
26 | 26 | if ($error == true) { |
27 | 27 | echo 'Unable to connect to database'; |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | sql('DELETE FROM `xmlsession_data` WHERE `session_id`=&1', $r['id']); |
106 | 106 | |
107 | 107 | // delete files |
108 | - $path = $zip_basedir . 'ocxml11/' . $r['id']; |
|
108 | + $path = $zip_basedir.'ocxml11/'.$r['id']; |
|
109 | 109 | if (is_dir($path)) { |
110 | 110 | unlinkrecursiv($path); |
111 | 111 | } |
@@ -191,7 +191,7 @@ discard block |
||
191 | 191 | if (isset($_REQUEST['country'])) { |
192 | 192 | $country = $_REQUEST['country']; |
193 | 193 | |
194 | - if (sqlValue('SELECT COUNT(*) FROM `countries` WHERE `short`=\'' . sql_escape($country) . '\'', 0) != 1) { |
|
194 | + if (sqlValue('SELECT COUNT(*) FROM `countries` WHERE `short`=\''.sql_escape($country).'\'', 0) != 1) { |
|
195 | 195 | die('Unknown country'); |
196 | 196 | } |
197 | 197 | |
@@ -236,13 +236,13 @@ discard block |
||
236 | 236 | $selection['type'] = 3; |
237 | 237 | if (isset($_REQUEST['wp'])) { |
238 | 238 | $selection['cacheid'] = sqlValue( |
239 | - "SELECT `cache_id` FROM `caches` WHERE `wp_oc`='" . sql_escape($_REQUEST['wp']) . "'", |
|
239 | + "SELECT `cache_id` FROM `caches` WHERE `wp_oc`='".sql_escape($_REQUEST['wp'])."'", |
|
240 | 240 | 0 |
241 | 241 | ); |
242 | 242 | } else { |
243 | 243 | if (isset($_REQUEST['uuid'])) { |
244 | 244 | $selection['cacheid'] = sqlValue( |
245 | - "SELECT `cache_id` FROM `caches` WHERE `uuid`='" . sql_escape($_REQUEST['uuid']) . "'", |
|
245 | + "SELECT `cache_id` FROM `caches` WHERE `uuid`='".sql_escape($_REQUEST['uuid'])."'", |
|
246 | 246 | 0 |
247 | 247 | ); |
248 | 248 | } else { |
@@ -301,23 +301,23 @@ discard block |
||
301 | 301 | $xmloutput = ''; |
302 | 302 | if ($bXmlDecl == '1') { |
303 | 303 | if ($sCharset == 'iso-8859-1') { |
304 | - $xmloutput .= '<?xml version="1.0" encoding="iso-8859-1" standalone="yes" ?>' . "\n"; |
|
304 | + $xmloutput .= '<?xml version="1.0" encoding="iso-8859-1" standalone="yes" ?>'."\n"; |
|
305 | 305 | } else { |
306 | 306 | if ($sCharset == 'utf-8') { |
307 | - $xmloutput .= '<?xml version="1.0" encoding="utf-8" standalone="yes" ?>' . "\n"; |
|
307 | + $xmloutput .= '<?xml version="1.0" encoding="utf-8" standalone="yes" ?>'."\n"; |
|
308 | 308 | } |
309 | 309 | } |
310 | 310 | } |
311 | 311 | if ($bOcXmlTag == '1') { |
312 | - $xmloutput .= '<ocxmlsession>' . "\n"; |
|
312 | + $xmloutput .= '<ocxmlsession>'."\n"; |
|
313 | 313 | } |
314 | - $xmloutput .= ' <sessionid>' . $sessionid . '</sessionid>' . "\n"; |
|
315 | - $xmloutput .= ' <records user="' . $recordcount['users'] . |
|
316 | - '" cache="' . $recordcount['caches'] . |
|
317 | - '" cachedesc="' . $recordcount['cachedescs'] . |
|
318 | - '" cachelog="' . $recordcount['cachelogs'] . |
|
319 | - '" picture="' . $recordcount['pictures'] . |
|
320 | - '" removeobject="' . $recordcount['removedobjects'] . '" />' . "\n"; |
|
314 | + $xmloutput .= ' <sessionid>'.$sessionid.'</sessionid>'."\n"; |
|
315 | + $xmloutput .= ' <records user="'.$recordcount['users']. |
|
316 | + '" cache="'.$recordcount['caches']. |
|
317 | + '" cachedesc="'.$recordcount['cachedescs']. |
|
318 | + '" cachelog="'.$recordcount['cachelogs']. |
|
319 | + '" picture="'.$recordcount['pictures']. |
|
320 | + '" removeobject="'.$recordcount['removedobjects'].'" />'."\n"; |
|
321 | 321 | if ($bOcXmlTag == '1') { |
322 | 322 | $xmloutput .= '</ocxmlsession>'; |
323 | 323 | } |
@@ -386,7 +386,7 @@ discard block |
||
386 | 386 | |
387 | 387 | $logtypes = []; |
388 | 388 | $rs = sql('SELECT `id`, `de` FROM log_types'); |
389 | - for ($i = 0; $i < mysql_num_rows($rs); $i ++) { |
|
389 | + for ($i = 0; $i < mysql_num_rows($rs); $i++) { |
|
390 | 390 | $r = sql_fetch_array($rs); |
391 | 391 | $logtypes[$r['id']] = $r['de']; |
392 | 392 | } |
@@ -394,7 +394,7 @@ discard block |
||
394 | 394 | |
395 | 395 | $cachetypes = []; |
396 | 396 | $rs = sql('SELECT `id`, `short`, `de` FROM cache_type'); |
397 | - for ($i = 0; $i < mysql_num_rows($rs); $i ++) { |
|
397 | + for ($i = 0; $i < mysql_num_rows($rs); $i++) { |
|
398 | 398 | $r = sql_fetch_array($rs); |
399 | 399 | $cachetypes[$r['id']]['de'] = $r['de']; |
400 | 400 | $cachetypes[$r['id']]['short'] = $r['short']; |
@@ -403,7 +403,7 @@ discard block |
||
403 | 403 | |
404 | 404 | $cachestatus = []; |
405 | 405 | $rs = sql('SELECT `id`, `de` FROM cache_status'); |
406 | - for ($i = 0; $i < mysql_num_rows($rs); $i ++) { |
|
406 | + for ($i = 0; $i < mysql_num_rows($rs); $i++) { |
|
407 | 407 | $r = sql_fetch_array($rs); |
408 | 408 | $cachestatus[$r['id']]['de'] = $r['de']; |
409 | 409 | } |
@@ -411,7 +411,7 @@ discard block |
||
411 | 411 | |
412 | 412 | $counties = []; |
413 | 413 | $rs = sql('SELECT `short`, `de` FROM countries'); |
414 | - for ($i = 0; $i < mysql_num_rows($rs); $i ++) { |
|
414 | + for ($i = 0; $i < mysql_num_rows($rs); $i++) { |
|
415 | 415 | $r = sql_fetch_array($rs); |
416 | 416 | $counties[$r['short']]['de'] = $r['de']; |
417 | 417 | } |
@@ -419,7 +419,7 @@ discard block |
||
419 | 419 | |
420 | 420 | $cachesizes = []; |
421 | 421 | $rs = sql('SELECT `id`, `de` FROM cache_size'); |
422 | - for ($i = 0; $i < mysql_num_rows($rs); $i ++) { |
|
422 | + for ($i = 0; $i < mysql_num_rows($rs); $i++) { |
|
423 | 423 | $r = sql_fetch_array($rs); |
424 | 424 | $cachesizes[$r['id']]['de'] = $r['de']; |
425 | 425 | } |
@@ -427,7 +427,7 @@ discard block |
||
427 | 427 | |
428 | 428 | $languages = []; |
429 | 429 | $rs = sql('SELECT `short`, `de` FROM languages'); |
430 | - for ($i = 0; $i < mysql_num_rows($rs); $i ++) { |
|
430 | + for ($i = 0; $i < mysql_num_rows($rs); $i++) { |
|
431 | 431 | $r = sql_fetch_array($rs); |
432 | 432 | $languages[$r['short']]['de'] = $r['de']; |
433 | 433 | } |
@@ -438,32 +438,32 @@ discard block |
||
438 | 438 | $objecttypes['3'] = 'cachedesc'; |
439 | 439 | $objecttypes['1'] = 'cachelog'; |
440 | 440 | $objecttypes['6'] = 'picture'; |
441 | - $objecttypes['8'] = 'cachelist'; // not implemented yet |
|
441 | + $objecttypes['8'] = 'cachelist'; // not implemented yet |
|
442 | 442 | |
443 | 443 | /* end now a few dynamically loaded constants */ |
444 | 444 | |
445 | 445 | // temporäre Datei erstellen |
446 | - if (!is_dir($zip_basedir . 'ocxml11/' . $sessionid)) { |
|
447 | - mkdir($zip_basedir . 'ocxml11/' . $sessionid); |
|
446 | + if (!is_dir($zip_basedir.'ocxml11/'.$sessionid)) { |
|
447 | + mkdir($zip_basedir.'ocxml11/'.$sessionid); |
|
448 | 448 | } |
449 | 449 | |
450 | 450 | $fileid = 1; |
451 | 451 | while (file_exists( |
452 | - $zip_basedir . 'ocxml11/' . $sessionid . '/' . $sessionid . '-' . $filenr . '-' . $fileid . '.xml' |
|
452 | + $zip_basedir.'ocxml11/'.$sessionid.'/'.$sessionid.'-'.$filenr.'-'.$fileid.'.xml' |
|
453 | 453 | )) { |
454 | - $fileid ++; |
|
454 | + $fileid++; |
|
455 | 455 | } |
456 | 456 | |
457 | - $xmlfilename = $zip_basedir . 'ocxml11/' . $sessionid . '/' . $sessionid . '-' . $filenr . '-' . $fileid . '.xml'; |
|
457 | + $xmlfilename = $zip_basedir.'ocxml11/'.$sessionid.'/'.$sessionid.'-'.$filenr.'-'.$fileid.'.xml'; |
|
458 | 458 | |
459 | 459 | $f = fopen($xmlfilename, 'w'); |
460 | 460 | |
461 | 461 | if ($bXmlDecl == '1') { |
462 | 462 | if ($sCharset == 'iso-8859-1') { |
463 | - fwrite($f, '<?xml version="1.0" encoding="iso-8859-1" standalone="no" ?>' . "\n"); |
|
463 | + fwrite($f, '<?xml version="1.0" encoding="iso-8859-1" standalone="no" ?>'."\n"); |
|
464 | 464 | } else { |
465 | 465 | if ($sCharset == 'utf-8') { |
466 | - fwrite($f, '<?xml version="1.0" encoding="UTF-8" standalone="no" ?>' . "\n"); |
|
466 | + fwrite($f, '<?xml version="1.0" encoding="UTF-8" standalone="no" ?>'."\n"); |
|
467 | 467 | } |
468 | 468 | } |
469 | 469 | } |
@@ -471,7 +471,7 @@ discard block |
||
471 | 471 | if ($bDocType == '1') { |
472 | 472 | fwrite( |
473 | 473 | $f, |
474 | - '<!DOCTYPE oc11xml PUBLIC "-//Opencaching Network//DTD OCXml V 1.' . ($ocxmlversion % 10) . '//EN" "http://www.opencaching.de/xml/ocxml' . $ocxmlversion . '.dtd">' . "\n" |
|
474 | + '<!DOCTYPE oc11xml PUBLIC "-//Opencaching Network//DTD OCXml V 1.'.($ocxmlversion % 10).'//EN" "http://www.opencaching.de/xml/ocxml'.$ocxmlversion.'.dtd">'."\n" |
|
475 | 475 | ); |
476 | 476 | } |
477 | 477 | if ($bOcXmlTag == '1') { |
@@ -479,30 +479,30 @@ discard block |
||
479 | 479 | $r = sql_fetch_array($rs); |
480 | 480 | fwrite( |
481 | 481 | $f, |
482 | - '<oc11xml version="1.' . ($ocxmlversion % 10) . '" date="' . date( |
|
482 | + '<oc11xml version="1.'.($ocxmlversion % 10).'" date="'.date( |
|
483 | 483 | $sDateformat, |
484 | 484 | strtotime($r['date_created']) |
485 | - ) . '" since="' . date($sDateformat, strtotime($r['modified_since'])) . '">' . "\n" |
|
485 | + ).'" since="'.date($sDateformat, strtotime($r['modified_since'])).'">'."\n" |
|
486 | 486 | ); |
487 | 487 | mysql_free_result($rs); |
488 | 488 | } |
489 | 489 | |
490 | 490 | if ($bAttrlist == '1') { |
491 | 491 | $rs = sql("SELECT SQL_BUFFER_RESULT `id`, `name`, `icon_large`, `icon_no`, `icon_undef` FROM `cache_attrib`"); |
492 | - fwrite($f, $t1 . '<attrlist>' . "\n"); |
|
492 | + fwrite($f, $t1.'<attrlist>'."\n"); |
|
493 | 493 | while ($r = sql_fetch_assoc($rs)) { |
494 | 494 | fwrite( |
495 | 495 | $f, |
496 | - $t2 . '<attr id="' . $r['id'] . '" icon_large="' . xmlentities( |
|
497 | - $opt['page']['default_absolute_url'] . $r['icon_large'] |
|
498 | - ) . '" icon_no="' . xmlentities( |
|
499 | - $opt['page']['default_absolute_url'] . $r['icon_no'] |
|
500 | - ) . '" icon_undef="' . xmlentities( |
|
501 | - $opt['page']['default_absolute_url'] . $r['icon_undef'] |
|
502 | - ) . '">' . xmlcdata($r['name']) . '</attr>' . "\n" |
|
496 | + $t2.'<attr id="'.$r['id'].'" icon_large="'.xmlentities( |
|
497 | + $opt['page']['default_absolute_url'].$r['icon_large'] |
|
498 | + ).'" icon_no="'.xmlentities( |
|
499 | + $opt['page']['default_absolute_url'].$r['icon_no'] |
|
500 | + ).'" icon_undef="'.xmlentities( |
|
501 | + $opt['page']['default_absolute_url'].$r['icon_undef'] |
|
502 | + ).'">'.xmlcdata($r['name']).'</attr>'."\n" |
|
503 | 503 | ); |
504 | 504 | } |
505 | - fwrite($f, $t1 . '</attrlist>' . "\n"); |
|
505 | + fwrite($f, $t1.'</attrlist>'."\n"); |
|
506 | 506 | sql_free_result($rs); |
507 | 507 | } |
508 | 508 | |
@@ -510,18 +510,18 @@ discard block |
||
510 | 510 | 'SELECT SQL_BUFFER_RESULT `user`.`user_id` `id`, `user`.`node` `node`, `user`.`uuid` `uuid`, `user`.`username` `username`, `user`.`pmr_flag` `pmr_flag`, `user`.`date_created` `date_created`, `user`.`last_modified` `last_modified` FROM `tmpxml_users`, `user` WHERE `tmpxml_users`.`id`=`user`.`user_id`' |
511 | 511 | ); |
512 | 512 | while ($r = sql_fetch_array($rs)) { |
513 | - fwrite($f, $t1 . '<user>' . "\n"); |
|
513 | + fwrite($f, $t1.'<user>'."\n"); |
|
514 | 514 | |
515 | - fwrite($f, $t2 . '<id id="' . $r['id'] . '" node="' . $r['node'] . '">' . $r['uuid'] . '</id>' . "\n"); |
|
516 | - fwrite($f, $t2 . '<username>' . xmlcdata($r['username']) . '</username>' . "\n"); |
|
517 | - fwrite($f, $t2 . '<pmr>' . (($r['pmr_flag'] == 0) ? '0' : '1') . '</pmr>' . "\n"); |
|
518 | - fwrite($f, $t2 . '<datecreated>' . date($sDateformat, strtotime($r['date_created'])) . '</datecreated>' . "\n"); |
|
515 | + fwrite($f, $t2.'<id id="'.$r['id'].'" node="'.$r['node'].'">'.$r['uuid'].'</id>'."\n"); |
|
516 | + fwrite($f, $t2.'<username>'.xmlcdata($r['username']).'</username>'."\n"); |
|
517 | + fwrite($f, $t2.'<pmr>'.(($r['pmr_flag'] == 0) ? '0' : '1').'</pmr>'."\n"); |
|
518 | + fwrite($f, $t2.'<datecreated>'.date($sDateformat, strtotime($r['date_created'])).'</datecreated>'."\n"); |
|
519 | 519 | fwrite( |
520 | 520 | $f, |
521 | - $t2 . '<lastmodified>' . date($sDateformat, strtotime($r['last_modified'])) . '</lastmodified>' . "\n" |
|
521 | + $t2.'<lastmodified>'.date($sDateformat, strtotime($r['last_modified'])).'</lastmodified>'."\n" |
|
522 | 522 | ); |
523 | 523 | |
524 | - fwrite($f, $t1 . '</user>' . "\n"); |
|
524 | + fwrite($f, $t1.'</user>'."\n"); |
|
525 | 525 | } |
526 | 526 | mysql_free_result($rs); |
527 | 527 | |
@@ -550,8 +550,8 @@ discard block |
||
550 | 550 | } // return as micro in old interface version |
551 | 551 | |
552 | 552 | if ($ocxmlversion >= 15) { |
553 | - $statusflags = ' needs_maintenance="' . $r['needs_maintenance'] . '" listing_outdated="' . $r['listing_outdated'] . '"'; |
|
554 | - $gccom2 = ' gccom2="' . xmlentities($r['wp_gc_maintained']) . '"'; |
|
553 | + $statusflags = ' needs_maintenance="'.$r['needs_maintenance'].'" listing_outdated="'.$r['listing_outdated'].'"'; |
|
554 | + $gccom2 = ' gccom2="'.xmlentities($r['wp_gc_maintained']).'"'; |
|
555 | 555 | $nccom = ''; |
556 | 556 | } else { |
557 | 557 | $statusflags = ''; |
@@ -559,74 +559,74 @@ discard block |
||
559 | 559 | $nccom = ' nccom=""'; |
560 | 560 | } |
561 | 561 | |
562 | - fwrite($f, $t1 . '<cache>' . "\n"); |
|
562 | + fwrite($f, $t1.'<cache>'."\n"); |
|
563 | 563 | |
564 | - fwrite($f, $t2 . '<id id="' . $r['id'] . '" node="' . $r['node'] . '">' . $r['uuid'] . '</id>' . "\n"); |
|
564 | + fwrite($f, $t2.'<id id="'.$r['id'].'" node="'.$r['node'].'">'.$r['uuid'].'</id>'."\n"); |
|
565 | 565 | fwrite( |
566 | 566 | $f, |
567 | - $t2 . '<userid id="' . $r['user_id'] . '" uuid="' . $r['useruuid'] . '">' . xmlcdata( |
|
567 | + $t2.'<userid id="'.$r['user_id'].'" uuid="'.$r['useruuid'].'">'.xmlcdata( |
|
568 | 568 | $r['username'] |
569 | - ) . '</userid>' . "\n" |
|
569 | + ).'</userid>'."\n" |
|
570 | 570 | ); |
571 | - fwrite($f, $t2 . '<name>' . xmlcdata(($bAllowView ? $r['name'] : '')) . '</name>' . "\n"); |
|
571 | + fwrite($f, $t2.'<name>'.xmlcdata(($bAllowView ? $r['name'] : '')).'</name>'."\n"); |
|
572 | 572 | fwrite( |
573 | 573 | $f, |
574 | - $t2 . '<longitude>' . sprintf('%01.5f', ($bAllowView ? $r['longitude'] : 0)) . '</longitude>' . "\n" |
|
574 | + $t2.'<longitude>'.sprintf('%01.5f', ($bAllowView ? $r['longitude'] : 0)).'</longitude>'."\n" |
|
575 | 575 | ); |
576 | - fwrite($f, $t2 . '<latitude>' . sprintf('%01.5f', ($bAllowView ? $r['latitude'] : 0)) . '</latitude>' . "\n"); |
|
576 | + fwrite($f, $t2.'<latitude>'.sprintf('%01.5f', ($bAllowView ? $r['latitude'] : 0)).'</latitude>'."\n"); |
|
577 | 577 | fwrite( |
578 | 578 | $f, |
579 | - $t2 . '<type id="' . $r['type'] . '" short="' . xmlentities( |
|
579 | + $t2.'<type id="'.$r['type'].'" short="'.xmlentities( |
|
580 | 580 | $cachetypes[$r['type']]['short'] |
581 | - ) . '">' . xmlcdata($cachetypes[$r['type']]['de']) . '</type>' . "\n" |
|
581 | + ).'">'.xmlcdata($cachetypes[$r['type']]['de']).'</type>'."\n" |
|
582 | 582 | ); |
583 | 583 | fwrite( |
584 | 584 | $f, |
585 | - $t2 . '<status id="' . $r['status'] . '"' . $statusflags . '>' . xmlcdata( |
|
585 | + $t2.'<status id="'.$r['status'].'"'.$statusflags.'>'.xmlcdata( |
|
586 | 586 | $cachestatus[$r['status']]['de'] |
587 | - ) . '</status>' . "\n" |
|
587 | + ).'</status>'."\n" |
|
588 | 588 | ); |
589 | 589 | fwrite( |
590 | 590 | $f, |
591 | - $t2 . '<country id="' . $r['country'] . '">' . xmlcdata( |
|
591 | + $t2.'<country id="'.$r['country'].'">'.xmlcdata( |
|
592 | 592 | $counties[$r['country']]['de'] |
593 | - ) . '</country>' . "\n" |
|
593 | + ).'</country>'."\n" |
|
594 | 594 | ); |
595 | - fwrite($f, $t2 . '<size id="' . $r['size'] . '">' . xmlcdata($cachesizes[$r['size']]['de']) . '</size>' . "\n"); |
|
596 | - fwrite($f, $t2 . '<desclanguages>' . $r['desclanguages'] . '</desclanguages>' . "\n"); |
|
597 | - fwrite($f, $t2 . '<difficulty>' . sprintf('%01.1f', $r['difficulty'] / 2) . '</difficulty>' . "\n"); |
|
598 | - fwrite($f, $t2 . '<terrain>' . sprintf('%01.1f', $r['terrain'] / 2) . '</terrain>' . "\n"); |
|
599 | - fwrite($f, $t2 . '<rating waylength="' . $r['way_length'] . '" needtime="' . $r['search_time'] . '" />' . "\n"); |
|
595 | + fwrite($f, $t2.'<size id="'.$r['size'].'">'.xmlcdata($cachesizes[$r['size']]['de']).'</size>'."\n"); |
|
596 | + fwrite($f, $t2.'<desclanguages>'.$r['desclanguages'].'</desclanguages>'."\n"); |
|
597 | + fwrite($f, $t2.'<difficulty>'.sprintf('%01.1f', $r['difficulty'] / 2).'</difficulty>'."\n"); |
|
598 | + fwrite($f, $t2.'<terrain>'.sprintf('%01.1f', $r['terrain'] / 2).'</terrain>'."\n"); |
|
599 | + fwrite($f, $t2.'<rating waylength="'.$r['way_length'].'" needtime="'.$r['search_time'].'" />'."\n"); |
|
600 | 600 | fwrite( |
601 | 601 | $f, |
602 | - $t2 . '<waypoints oc="' . xmlentities($r['wp_oc']) . '" gccom="' . xmlentities( |
|
602 | + $t2.'<waypoints oc="'.xmlentities($r['wp_oc']).'" gccom="'.xmlentities( |
|
603 | 603 | $r['wp_gc'] |
604 | - ) . '"' . $gccom2 . $nccom . ' />' . "\n" |
|
604 | + ).'"'.$gccom2.$nccom.' />'."\n" |
|
605 | 605 | ); |
606 | - fwrite($f, $t2 . '<datehidden>' . date($sDateformat, strtotime($r['date_hidden'])) . '</datehidden>' . "\n"); |
|
606 | + fwrite($f, $t2.'<datehidden>'.date($sDateformat, strtotime($r['date_hidden'])).'</datehidden>'."\n"); |
|
607 | 607 | if ($ocxmlversion >= 12) { |
608 | - $pd = ' ispublishdate="' . $r['is_publishdate'] . '"'; |
|
608 | + $pd = ' ispublishdate="'.$r['is_publishdate'].'"'; |
|
609 | 609 | } else { |
610 | 610 | $pd = ""; |
611 | 611 | } |
612 | 612 | fwrite( |
613 | 613 | $f, |
614 | - $t2 . '<datecreated' . $pd . '>' . date( |
|
614 | + $t2.'<datecreated'.$pd.'>'.date( |
|
615 | 615 | $sDateformat, |
616 | 616 | strtotime($r['date_created']) |
617 | - ) . '</datecreated>' . "\n" |
|
617 | + ).'</datecreated>'."\n" |
|
618 | 618 | ); |
619 | 619 | fwrite( |
620 | 620 | $f, |
621 | - $t2 . '<lastmodified>' . date($sDateformat, strtotime($r['last_modified'])) . '</lastmodified>' . "\n" |
|
621 | + $t2.'<lastmodified>'.date($sDateformat, strtotime($r['last_modified'])).'</lastmodified>'."\n" |
|
622 | 622 | ); |
623 | 623 | if ($ocxmlversion >= 14) { |
624 | 624 | fwrite( |
625 | 625 | $f, |
626 | - $t2 . '<listing_lastmodified>' . date( |
|
626 | + $t2.'<listing_lastmodified>'.date( |
|
627 | 627 | $sDateformat, |
628 | 628 | strtotime($r['listing_last_modified']) |
629 | - ) . '</listing_lastmodified>' . "\n" |
|
629 | + ).'</listing_lastmodified>'."\n" |
|
630 | 630 | ); |
631 | 631 | } |
632 | 632 | |
@@ -637,16 +637,16 @@ discard block |
||
637 | 637 | WHERE `caches_attributes`.`cache_id`='&1'", |
638 | 638 | $r['id'] |
639 | 639 | ); |
640 | - fwrite($f, $t2 . '<attributes>' . "\n"); |
|
640 | + fwrite($f, $t2.'<attributes>'."\n"); |
|
641 | 641 | while ($rAttribute = sql_fetch_assoc($rsAttributes)) { |
642 | 642 | fwrite( |
643 | 643 | $f, |
644 | - $t3 . '<attribute id="' . ($rAttribute['id'] + 0) . '">' . xmlcdata( |
|
644 | + $t3.'<attribute id="'.($rAttribute['id'] + 0).'">'.xmlcdata( |
|
645 | 645 | $rAttribute['name'] |
646 | - ) . '</attribute>' . "\n" |
|
646 | + ).'</attribute>'."\n" |
|
647 | 647 | ); |
648 | 648 | } |
649 | - fwrite($f, $t2 . '</attributes>' . "\n"); |
|
649 | + fwrite($f, $t2.'</attributes>'."\n"); |
|
650 | 650 | sql_free_result($rsAttributes); |
651 | 651 | |
652 | 652 | if ($ocxmlversion >= 13) { |
@@ -661,23 +661,23 @@ discard block |
||
661 | 661 | ORDER BY `coordinates`.`id` ASC", |
662 | 662 | $r['id'] |
663 | 663 | ); |
664 | - fwrite($f, $t2 . '<wpts>' . "\n"); |
|
664 | + fwrite($f, $t2.'<wpts>'."\n"); |
|
665 | 665 | while ($rWaypoint = sql_fetch_assoc($rsWaypoints)) { |
666 | 666 | fwrite( |
667 | 667 | $f, |
668 | - $t3 . '<wpt id="' . ($rWaypoint['id'] + 0) . '" type="' . ($rWaypoint['type'] + 0) . '" typename="' . xmlentities( |
|
668 | + $t3.'<wpt id="'.($rWaypoint['id'] + 0).'" type="'.($rWaypoint['type'] + 0).'" typename="'.xmlentities( |
|
669 | 669 | $rWaypoint['type_name'] |
670 | - ) . '" longitude="' . sprintf('%01.5f', $rWaypoint['longitude']) . '" latitude="' . sprintf( |
|
670 | + ).'" longitude="'.sprintf('%01.5f', $rWaypoint['longitude']).'" latitude="'.sprintf( |
|
671 | 671 | '%01.5f', |
672 | 672 | $rWaypoint['latitude'] |
673 | - ) . '">' . xmlcdata($rWaypoint['description']) . '</wpt>' . "\n" |
|
673 | + ).'">'.xmlcdata($rWaypoint['description']).'</wpt>'."\n" |
|
674 | 674 | ); |
675 | 675 | } |
676 | - fwrite($f, $t2 . '</wpts>' . "\n"); |
|
676 | + fwrite($f, $t2.'</wpts>'."\n"); |
|
677 | 677 | sql_free_result($rsWaypoints); |
678 | 678 | } |
679 | 679 | |
680 | - fwrite($f, $t1 . '</cache>' . "\n"); |
|
680 | + fwrite($f, $t1.'</cache>'."\n"); |
|
681 | 681 | } |
682 | 682 | mysql_free_result($rs); |
683 | 683 | |
@@ -697,18 +697,18 @@ discard block |
||
697 | 697 | while ($r = sql_fetch_array($rs)) { |
698 | 698 | $bAllowView = ($r['allow_user_view'] == 1); |
699 | 699 | |
700 | - fwrite($f, $t1 . '<cachedesc>' . "\n"); |
|
700 | + fwrite($f, $t1.'<cachedesc>'."\n"); |
|
701 | 701 | |
702 | - fwrite($f, $t2 . '<id id="' . $r['id'] . '" node="' . $r['node'] . '">' . $r['uuid'] . '</id>' . "\n"); |
|
703 | - fwrite($f, $t2 . '<cacheid id="' . $r['cache_id'] . '">' . $r['cacheuuid'] . '</cacheid>' . "\n"); |
|
702 | + fwrite($f, $t2.'<id id="'.$r['id'].'" node="'.$r['node'].'">'.$r['uuid'].'</id>'."\n"); |
|
703 | + fwrite($f, $t2.'<cacheid id="'.$r['cache_id'].'">'.$r['cacheuuid'].'</cacheid>'."\n"); |
|
704 | 704 | |
705 | 705 | fwrite( |
706 | 706 | $f, |
707 | - $t2 . '<language id="' . $r['language'] . '">' . xmlcdata( |
|
707 | + $t2.'<language id="'.$r['language'].'">'.xmlcdata( |
|
708 | 708 | $languages[$r['language']]['de'] |
709 | - ) . '</language>' . "\n" |
|
709 | + ).'</language>'."\n" |
|
710 | 710 | ); |
711 | - fwrite($f, $t2 . '<shortdesc>' . xmlcdata(($bAllowView ? $r['short_desc'] : '')) . '</shortdesc>' . "\n"); |
|
711 | + fwrite($f, $t2.'<shortdesc>'.xmlcdata(($bAllowView ? $r['short_desc'] : '')).'</shortdesc>'."\n"); |
|
712 | 712 | |
713 | 713 | $desc = $r['desc']; |
714 | 714 | if ($r['desc_html'] == 0) { |
@@ -727,10 +727,10 @@ discard block |
||
727 | 727 | true |
728 | 728 | ); |
729 | 729 | if ($bLicense) { |
730 | - fwrite($f, $t2 . '<license>' . xmlcdata($disclaimer) . '</license>' . "\n"); |
|
730 | + fwrite($f, $t2.'<license>'.xmlcdata($disclaimer).'</license>'."\n"); |
|
731 | 731 | } else { |
732 | 732 | if ($disclaimer != "") { |
733 | - $desc .= "<p><em>" . $disclaimer . "</em></p>"; |
|
733 | + $desc .= "<p><em>".$disclaimer."</em></p>"; |
|
734 | 734 | } |
735 | 735 | } |
736 | 736 | |
@@ -738,21 +738,21 @@ discard block |
||
738 | 738 | |
739 | 739 | fwrite( |
740 | 740 | $f, |
741 | - $t2 . '<desc html="' . (($r['desc_html'] == 1) ? '1' : '0') . '">' . xmlcdata( |
|
741 | + $t2.'<desc html="'.(($r['desc_html'] == 1) ? '1' : '0').'">'.xmlcdata( |
|
742 | 742 | ($bAllowView ? $desc : '') |
743 | - ) . '</desc>' . "\n" |
|
743 | + ).'</desc>'."\n" |
|
744 | 744 | ); |
745 | 745 | |
746 | 746 | $r['hint'] = mb_ereg_replace('<br />', '', $r['hint']); |
747 | 747 | $r['hint'] = html_entity_decode($r['hint'], ENT_COMPAT, 'UTF-8'); |
748 | 748 | |
749 | - fwrite($f, $t2 . '<hint>' . xmlcdata(($bAllowView ? $r['hint'] : '')) . '</hint>' . "\n"); |
|
749 | + fwrite($f, $t2.'<hint>'.xmlcdata(($bAllowView ? $r['hint'] : '')).'</hint>'."\n"); |
|
750 | 750 | fwrite( |
751 | 751 | $f, |
752 | - $t2 . '<lastmodified>' . date($sDateformat, strtotime($r['last_modified'])) . '</lastmodified>' . "\n" |
|
752 | + $t2.'<lastmodified>'.date($sDateformat, strtotime($r['last_modified'])).'</lastmodified>'."\n" |
|
753 | 753 | ); |
754 | 754 | |
755 | - fwrite($f, $t1 . '</cachedesc>' . "\n"); |
|
755 | + fwrite($f, $t1.'</cachedesc>'."\n"); |
|
756 | 756 | } |
757 | 757 | mysql_free_result($rs); |
758 | 758 | |
@@ -793,7 +793,7 @@ discard block |
||
793 | 793 | } |
794 | 794 | |
795 | 795 | if ($ocxmlversion >= 13) { |
796 | - $teamcomment = ' teamcomment="' . $r['oc_team_comment'] . '"'; |
|
796 | + $teamcomment = ' teamcomment="'.$r['oc_team_comment'].'"'; |
|
797 | 797 | } else { |
798 | 798 | $teamcomment = ''; |
799 | 799 | if ($r['type'] > 8) { |
@@ -802,51 +802,51 @@ discard block |
||
802 | 802 | } |
803 | 803 | |
804 | 804 | if ($ocxmlversion >= 15) { |
805 | - $statusflags = ' needs_maintenance="' . $r['needs_maintenance'] . '" listing_outdated="' . $r['listing_outdated'] . '"'; |
|
805 | + $statusflags = ' needs_maintenance="'.$r['needs_maintenance'].'" listing_outdated="'.$r['listing_outdated'].'"'; |
|
806 | 806 | } else { |
807 | 807 | $statusflags = ''; |
808 | 808 | } |
809 | 809 | |
810 | - fwrite($f, $t1 . '<cachelog>' . "\n"); |
|
811 | - fwrite($f, $t2 . '<id id="' . $r['id'] . '" node="' . $r['node'] . '">' . $r['uuid'] . '</id>' . "\n"); |
|
812 | - fwrite($f, $t2 . '<cacheid id="' . $r['cache_id'] . '">' . $r['cacheuuid'] . '</cacheid>' . "\n"); |
|
810 | + fwrite($f, $t1.'<cachelog>'."\n"); |
|
811 | + fwrite($f, $t2.'<id id="'.$r['id'].'" node="'.$r['node'].'">'.$r['uuid'].'</id>'."\n"); |
|
812 | + fwrite($f, $t2.'<cacheid id="'.$r['cache_id'].'">'.$r['cacheuuid'].'</cacheid>'."\n"); |
|
813 | 813 | fwrite( |
814 | 814 | $f, |
815 | - $t2 . '<userid id="' . $r['user_id'] . '" uuid="' . $r['useruuid'] . '">' . xmlcdata( |
|
815 | + $t2.'<userid id="'.$r['user_id'].'" uuid="'.$r['useruuid'].'">'.xmlcdata( |
|
816 | 816 | $r['username'] |
817 | - ) . '</userid>' . "\n" |
|
817 | + ).'</userid>'."\n" |
|
818 | 818 | ); |
819 | 819 | fwrite( |
820 | 820 | $f, |
821 | - $t2 . '<logtype id="' . $r['type'] . '" recommended="' . $r['recommended'] . '"' . $teamcomment . $statusflags . '>' . xmlcdata( |
|
821 | + $t2.'<logtype id="'.$r['type'].'" recommended="'.$r['recommended'].'"'.$teamcomment.$statusflags.'>'.xmlcdata( |
|
822 | 822 | $logtypes[$r['type']] |
823 | - ) . '</logtype>' . "\n" |
|
823 | + ).'</logtype>'."\n" |
|
824 | 824 | ); |
825 | 825 | fwrite( |
826 | 826 | $f, |
827 | - $t2 . '<date>' . date( |
|
827 | + $t2.'<date>'.date( |
|
828 | 828 | $ocxmlversion >= 13 ? $sDateformat : $sDateshort, |
829 | 829 | strtotime($r['date']) |
830 | - ) . '</date>' . "\n" |
|
830 | + ).'</date>'."\n" |
|
831 | 831 | ); |
832 | 832 | fwrite( |
833 | 833 | $f, |
834 | - $t2 . '<text html="' . $r['text_html'] . '">' . xmlcdata( |
|
834 | + $t2.'<text html="'.$r['text_html'].'">'.xmlcdata( |
|
835 | 835 | ($bAllowView ? $r['text'] : '') |
836 | - ) . '</text>' . "\n" |
|
836 | + ).'</text>'."\n" |
|
837 | 837 | ); |
838 | - fwrite($f, $t2 . '<datecreated>' . date($sDateformat, strtotime($r['date_created'])) . '</datecreated>' . "\n"); |
|
838 | + fwrite($f, $t2.'<datecreated>'.date($sDateformat, strtotime($r['date_created'])).'</datecreated>'."\n"); |
|
839 | 839 | fwrite( |
840 | 840 | $f, |
841 | - $t2 . '<lastmodified>' . date($sDateformat, strtotime($r['last_modified'])) . '</lastmodified>' . "\n" |
|
841 | + $t2.'<lastmodified>'.date($sDateformat, strtotime($r['last_modified'])).'</lastmodified>'."\n" |
|
842 | 842 | ); |
843 | 843 | if ($ocxmlversion >= 14) { |
844 | 844 | fwrite( |
845 | 845 | $f, |
846 | - $t2 . '<log_lastmodified>' . date( |
|
846 | + $t2.'<log_lastmodified>'.date( |
|
847 | 847 | $sDateformat, |
848 | 848 | strtotime($r['log_last_modified']) |
849 | - ) . '</log_lastmodified>' . "\n" |
|
849 | + ).'</log_lastmodified>'."\n" |
|
850 | 850 | ); |
851 | 851 | } |
852 | 852 | |
@@ -861,10 +861,10 @@ discard block |
||
861 | 861 | false, |
862 | 862 | true |
863 | 863 | ); |
864 | - fwrite($f, $t2 . '<license>' . xmlcdata($disclaimer) . '</license>' . "\n"); |
|
864 | + fwrite($f, $t2.'<license>'.xmlcdata($disclaimer).'</license>'."\n"); |
|
865 | 865 | } |
866 | 866 | |
867 | - fwrite($f, $t1 . '</cachelog>' . "\n"); |
|
867 | + fwrite($f, $t1.'</cachelog>'."\n"); |
|
868 | 868 | } |
869 | 869 | mysql_free_result($rs); |
870 | 870 | |
@@ -894,30 +894,30 @@ discard block |
||
894 | 894 | while ($r = sql_fetch_array($rs)) { |
895 | 895 | $bAllowView = ($r['auv'] == 1); |
896 | 896 | |
897 | - fwrite($f, $t1 . '<picture>' . "\n"); |
|
898 | - fwrite($f, $t2 . '<id id="' . $r['id'] . '" node="' . $r['node'] . '">' . $r['uuid'] . '</id>' . "\n"); |
|
899 | - fwrite($f, $t2 . '<url>' . xmlcdata(($bAllowView ? $r['url'] : '')) . '</url>' . "\n"); |
|
900 | - fwrite($f, $t2 . '<title>' . xmlcdata(($bAllowView ? $r['title'] : '')) . '</title>' . "\n"); |
|
897 | + fwrite($f, $t1.'<picture>'."\n"); |
|
898 | + fwrite($f, $t2.'<id id="'.$r['id'].'" node="'.$r['node'].'">'.$r['uuid'].'</id>'."\n"); |
|
899 | + fwrite($f, $t2.'<url>'.xmlcdata(($bAllowView ? $r['url'] : '')).'</url>'."\n"); |
|
900 | + fwrite($f, $t2.'<title>'.xmlcdata(($bAllowView ? $r['title'] : '')).'</title>'."\n"); |
|
901 | 901 | fwrite( |
902 | 902 | $f, |
903 | - $t2 . '<object id="' . $r['object_id'] . '" type="' . $r['object_type'] . '" typename="' . xmlentities( |
|
903 | + $t2.'<object id="'.$r['object_id'].'" type="'.$r['object_type'].'" typename="'.xmlentities( |
|
904 | 904 | $objecttypes[$r['object_type']] |
905 | - ) . '">' . object_id2uuid($r['object_id'], $r['object_type']) . '</object>' . "\n" |
|
905 | + ).'">'.object_id2uuid($r['object_id'], $r['object_type']).'</object>'."\n" |
|
906 | 906 | ); |
907 | 907 | if ($ocxmlversion >= 13) { |
908 | 908 | fwrite( |
909 | 909 | $f, |
910 | - $t2 . '<picattr spoiler="' . $r['spoiler'] . '" display="' . $r['display'] . '" preview="' . $r['mappreview'] . '" />' . "\n" |
|
910 | + $t2.'<picattr spoiler="'.$r['spoiler'].'" display="'.$r['display'].'" preview="'.$r['mappreview'].'" />'."\n" |
|
911 | 911 | ); |
912 | 912 | } else { |
913 | - fwrite($f, $t2 . '<attributes spoiler="' . $r['spoiler'] . '" display="' . $r['display'] . '" />' . "\n"); |
|
913 | + fwrite($f, $t2.'<attributes spoiler="'.$r['spoiler'].'" display="'.$r['display'].'" />'."\n"); |
|
914 | 914 | } |
915 | - fwrite($f, $t2 . '<datecreated>' . date($sDateformat, strtotime($r['date_created'])) . '</datecreated>' . "\n"); |
|
915 | + fwrite($f, $t2.'<datecreated>'.date($sDateformat, strtotime($r['date_created'])).'</datecreated>'."\n"); |
|
916 | 916 | fwrite( |
917 | 917 | $f, |
918 | - $t2 . '<lastmodified>' . date($sDateformat, strtotime($r['last_modified'])) . '</lastmodified>' . "\n" |
|
918 | + $t2.'<lastmodified>'.date($sDateformat, strtotime($r['last_modified'])).'</lastmodified>'."\n" |
|
919 | 919 | ); |
920 | - fwrite($f, $t2 . '<position>' . $r['seq'] . '</position>' . "\n"); |
|
920 | + fwrite($f, $t2.'<position>'.$r['seq'].'</position>'."\n"); |
|
921 | 921 | |
922 | 922 | if ($bLicense) { |
923 | 923 | $lang = ($sLanguage != "" ? $sLanguage : $r['language']); |
@@ -930,10 +930,10 @@ discard block |
||
930 | 930 | false, |
931 | 931 | true |
932 | 932 | ); |
933 | - fwrite($f, $t2 . '<license>' . xmlcdata($disclaimer) . '</license>' . "\n"); |
|
933 | + fwrite($f, $t2.'<license>'.xmlcdata($disclaimer).'</license>'."\n"); |
|
934 | 934 | } |
935 | 935 | |
936 | - fwrite($f, $t1 . '</picture>' . "\n"); |
|
936 | + fwrite($f, $t1.'</picture>'."\n"); |
|
937 | 937 | } |
938 | 938 | mysql_free_result($rs); |
939 | 939 | |
@@ -943,31 +943,31 @@ discard block |
||
943 | 943 | FROM `tmpxml_removedobjects`, `removed_objects` WHERE `removed_objects`.`id`=`tmpxml_removedobjects`.`id`' |
944 | 944 | ); |
945 | 945 | while ($r = sql_fetch_array($rs)) { |
946 | - fwrite($f, $t1 . '<removedobject>' . "\n"); |
|
947 | - fwrite($f, $t2 . '<id id="' . $r['id'] . '" node="' . $r['node'] . '" />' . "\n"); |
|
946 | + fwrite($f, $t1.'<removedobject>'."\n"); |
|
947 | + fwrite($f, $t2.'<id id="'.$r['id'].'" node="'.$r['node'].'" />'."\n"); |
|
948 | 948 | fwrite( |
949 | 949 | $f, |
950 | - $t2 . '<object id="' . $r['localid'] . '" type="' . $r['type'] . '" typename="' . xmlentities( |
|
950 | + $t2.'<object id="'.$r['localid'].'" type="'.$r['type'].'" typename="'.xmlentities( |
|
951 | 951 | $objecttypes[$r['type']] |
952 | - ) . '">' . $r['uuid'] . '</object>' . "\n" |
|
952 | + ).'">'.$r['uuid'].'</object>'."\n" |
|
953 | 953 | ); |
954 | - fwrite($f, $t2 . '<removeddate>' . date($sDateformat, strtotime($r['removed_date'])) . '</removeddate>' . "\n"); |
|
955 | - fwrite($f, $t1 . '</removedobject>' . "\n"); |
|
954 | + fwrite($f, $t2.'<removeddate>'.date($sDateformat, strtotime($r['removed_date'])).'</removeddate>'."\n"); |
|
955 | + fwrite($f, $t1.'</removedobject>'."\n"); |
|
956 | 956 | } |
957 | 957 | mysql_free_result($rs); |
958 | 958 | |
959 | 959 | if ($bOcXmlTag == '1') { |
960 | - fwrite($f, '</oc11xml>' . "\n"); |
|
960 | + fwrite($f, '</oc11xml>'."\n"); |
|
961 | 961 | } |
962 | 962 | |
963 | 963 | fclose($f); |
964 | 964 | |
965 | - $rel_xmlfile = 'ocxml11/' . $sessionid . '/' . $sessionid . '-' . $filenr . '-' . $fileid . '.xml'; |
|
966 | - $rel_zipfile = 'ocxml11/' . $sessionid . '/' . $sessionid . '-' . $filenr . '-' . $fileid; |
|
965 | + $rel_xmlfile = 'ocxml11/'.$sessionid.'/'.$sessionid.'-'.$filenr.'-'.$fileid.'.xml'; |
|
966 | + $rel_zipfile = 'ocxml11/'.$sessionid.'/'.$sessionid.'-'.$filenr.'-'.$fileid; |
|
967 | 967 | |
968 | 968 | // zippen und url-redirect |
969 | 969 | if ($ziptype == '0') { |
970 | - tpl_redirect($zip_wwwdir . $rel_xmlfile); |
|
970 | + tpl_redirect($zip_wwwdir.$rel_xmlfile); |
|
971 | 971 | exit; |
972 | 972 | } else { |
973 | 973 | if ($ziptype == 'zip') { |
@@ -987,17 +987,17 @@ discard block |
||
987 | 987 | |
988 | 988 | $call = |
989 | 989 | $safemode_zip |
990 | - . ' --type=' . escapeshellcmd($ziptype) |
|
991 | - . ' --src=' . escapeshellcmd($rel_xmlfile) |
|
992 | - . ' --dst=' . escapeshellcmd($rel_zipfile); |
|
990 | + . ' --type='.escapeshellcmd($ziptype) |
|
991 | + . ' --src='.escapeshellcmd($rel_xmlfile) |
|
992 | + . ' --dst='.escapeshellcmd($rel_zipfile); |
|
993 | 993 | system($call); |
994 | 994 | |
995 | 995 | // datei vorhanden? |
996 | - if (!file_exists($zip_basedir . $rel_zipfile)) { |
|
996 | + if (!file_exists($zip_basedir.$rel_zipfile)) { |
|
997 | 997 | die('all ok, but zip failed - internal server error'); |
998 | 998 | } |
999 | 999 | |
1000 | - tpl_redirect($zip_wwwdir . $rel_zipfile); |
|
1000 | + tpl_redirect($zip_wwwdir.$rel_zipfile); |
|
1001 | 1001 | |
1002 | 1002 | exit; |
1003 | 1003 | } |
@@ -1049,7 +1049,7 @@ discard block |
||
1049 | 1049 | } |
1050 | 1050 | sql( |
1051 | 1051 | "INSERT INTO xmlsession_data (`session_id`, `object_type`, `object_id`) |
1052 | - SELECT &1, 2, `cache_id` FROM `caches` WHERE " . $wherefield . " >= '&2' AND `status`!=5", |
|
1052 | + SELECT &1, 2, `cache_id` FROM `caches` WHERE " . $wherefield." >= '&2' AND `status`!=5", |
|
1053 | 1053 | $sessionid, |
1054 | 1054 | $sModifiedSince |
1055 | 1055 | ); |
@@ -1139,35 +1139,35 @@ discard block |
||
1139 | 1139 | 'longitude', |
1140 | 1140 | 'latitude', |
1141 | 1141 | 'cache_coordinates' |
1142 | - ) . ' `distance` '; |
|
1142 | + ).' `distance` '; |
|
1143 | 1143 | $sql .= 'FROM `caches`, `cache_coordinates` WHERE '; |
1144 | 1144 | $sql .= '`cache_coordinates`.`cache_id`=`caches`.`cache_id`'; |
1145 | 1145 | $sql .= ' AND `caches`.`status`!=5'; |
1146 | - $sql .= ' AND `cache_coordinates`.`latitude` > ' . |
|
1146 | + $sql .= ' AND `cache_coordinates`.`latitude` > '. |
|
1147 | 1147 | geomath::getMinLat( |
1148 | 1148 | $selection['lon'], |
1149 | 1149 | $selection['lat'], |
1150 | 1150 | $selection['distance'] |
1151 | 1151 | ); |
1152 | - $sql .= ' AND `cache_coordinates`.`latitude` < ' . |
|
1152 | + $sql .= ' AND `cache_coordinates`.`latitude` < '. |
|
1153 | 1153 | geomath::getMaxLat( |
1154 | 1154 | $selection['lon'], |
1155 | 1155 | $selection['lat'], |
1156 | 1156 | $selection['distance'] |
1157 | 1157 | ); |
1158 | - $sql .= ' AND `cache_coordinates`.`longitude` >' . |
|
1158 | + $sql .= ' AND `cache_coordinates`.`longitude` >'. |
|
1159 | 1159 | geomath::getMinLon( |
1160 | 1160 | $selection['lon'], |
1161 | 1161 | $selection['lat'], |
1162 | 1162 | $selection['distance'] |
1163 | 1163 | ); |
1164 | - $sql .= ' AND `cache_coordinates`.`longitude` < ' . |
|
1164 | + $sql .= ' AND `cache_coordinates`.`longitude` < '. |
|
1165 | 1165 | geomath::getMaxLon( |
1166 | 1166 | $selection['lon'], |
1167 | 1167 | $selection['lat'], |
1168 | 1168 | $selection['distance'] |
1169 | 1169 | ); |
1170 | - $sql .= ' HAVING `distance` < ' . ($selection['distance'] + 0); |
|
1170 | + $sql .= ' HAVING `distance` < '.($selection['distance'] + 0); |
|
1171 | 1171 | |
1172 | 1172 | sql($sql); |
1173 | 1173 | } else { |
@@ -1309,7 +1309,7 @@ discard block |
||
1309 | 1309 | // echo $startat . ' ' . $endat . '<br><br>'; |
1310 | 1310 | // echo '<table>'; |
1311 | 1311 | // echo '<tr><td>sql-start</td><td>sql-count</td><td>count</td><td>begin</td><td>end</td></tr>'; |
1312 | - for ($i = 0; $i < 6; $i ++) { |
|
1312 | + for ($i = 0; $i < 6; $i++) { |
|
1313 | 1313 | if (($startat >= $recordnr[$i]) && ($startat + 500 < $recordnr[$i + 1])) { |
1314 | 1314 | if ($recordnr[$i + 1] - $startat > 500) { |
1315 | 1315 | $limits[$i] = ['start' => $startat - $recordnr[$i], 'count' => 500]; |
@@ -1412,7 +1412,7 @@ discard block |
||
1412 | 1412 | $str = output_convert($str); |
1413 | 1413 | $str = mb_ereg_replace(']]>', ']] >', $str); |
1414 | 1414 | |
1415 | - return '<![CDATA[' . filterevilchars($str) . ']]>'; |
|
1415 | + return '<![CDATA['.filterevilchars($str).']]>'; |
|
1416 | 1416 | } else { |
1417 | 1417 | return xmlentities($str); |
1418 | 1418 | } |
@@ -1431,7 +1431,7 @@ discard block |
||
1431 | 1431 | $from[4] = '\''; |
1432 | 1432 | $to[4] = '''; |
1433 | 1433 | |
1434 | - for ($i = 0; $i <= 4; $i ++) { |
|
1434 | + for ($i = 0; $i <= 4; $i++) { |
|
1435 | 1435 | $str = mb_ereg_replace($from[$i], $to[$i], $str); |
1436 | 1436 | } |
1437 | 1437 | |
@@ -1510,13 +1510,13 @@ discard block |
||
1510 | 1510 | |
1511 | 1511 | $hDir = opendir($path); |
1512 | 1512 | if ($hDir === false) { |
1513 | - ++ $notunlinked; |
|
1513 | + ++$notunlinked; |
|
1514 | 1514 | } else { |
1515 | 1515 | while (false !== ($file = readdir($hDir))) { |
1516 | 1516 | if (($file != '.') && ($file != '..')) { |
1517 | - if (is_dir($path . $file)) { |
|
1518 | - if (unlinkrecursiv($path . $file . '/') == false) { |
|
1519 | - $notunlinked ++; |
|
1517 | + if (is_dir($path.$file)) { |
|
1518 | + if (unlinkrecursiv($path.$file.'/') == false) { |
|
1519 | + $notunlinked++; |
|
1520 | 1520 | } |
1521 | 1521 | } else { |
1522 | 1522 | if ((mb_substr($file, - 4) == '.zip') || |
@@ -1524,9 +1524,9 @@ discard block |
||
1524 | 1524 | (mb_substr($file, - 4) == '.bz2') || |
1525 | 1525 | (mb_substr($file, - 4) == '.xml') |
1526 | 1526 | ) { |
1527 | - @unlink($path . $file); |
|
1527 | + @unlink($path.$file); |
|
1528 | 1528 | } else { |
1529 | - $notunlinked ++; |
|
1529 | + $notunlinked++; |
|
1530 | 1530 | } |
1531 | 1531 | } |
1532 | 1532 | } |
@@ -9,10 +9,10 @@ discard block |
||
9 | 9 | * Unicode Reminder メモ |
10 | 10 | ***************************************************************************/ |
11 | 11 | |
12 | -require_once __DIR__ . '/lib/consts.inc.php'; |
|
12 | +require_once __DIR__.'/lib/consts.inc.php'; |
|
13 | 13 | $opt['gui'] = GUI_HTML; |
14 | -require_once __DIR__ . '/lib/common.inc.php'; |
|
15 | -require_once __DIR__ . '/lib2/edithelper.inc.php'; |
|
14 | +require_once __DIR__.'/lib/common.inc.php'; |
|
15 | +require_once __DIR__.'/lib2/edithelper.inc.php'; |
|
16 | 16 | |
17 | 17 | //Preprocessing |
18 | 18 | if ($error == false) { |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | $tplname = 'login'; |
27 | 27 | |
28 | 28 | tpl_set_var('username', ''); |
29 | - tpl_set_var('target', htmlspecialchars('newdesc.php?cacheid=' . urlencode($cache_id), ENT_COMPAT, 'UTF-8')); |
|
29 | + tpl_set_var('target', htmlspecialchars('newdesc.php?cacheid='.urlencode($cache_id), ENT_COMPAT, 'UTF-8')); |
|
30 | 30 | tpl_set_var('message', $login_required); |
31 | 31 | tpl_set_var('helplink', helppagelink('login')); |
32 | 32 | } else { |
@@ -40,15 +40,15 @@ discard block |
||
40 | 40 | if ($cache_record['user_id'] == $usr['userid']) { |
41 | 41 | $tplname = 'newdesc'; |
42 | 42 | |
43 | - require $stylepath . '/newdesc.inc.php'; |
|
43 | + require $stylepath.'/newdesc.inc.php'; |
|
44 | 44 | |
45 | 45 | //get the posted data |
46 | 46 | $show_all_langs = isset($_POST['show_all_langs']) ? $_POST['show_all_langs'] : 0; |
47 | - $short_desc = isset($_POST['short_desc']) ? $_POST['short_desc'] : ''; // Ocprop |
|
47 | + $short_desc = isset($_POST['short_desc']) ? $_POST['short_desc'] : ''; // Ocprop |
|
48 | 48 | |
49 | - $hints = isset($_POST['hints']) ? $_POST['hints'] : ''; // Ocprop |
|
50 | - $sel_lang = isset($_POST['desc_lang']) ? $_POST['desc_lang'] : $default_lang; // Ocprop |
|
51 | - $desc = isset($_POST['desc']) ? $_POST['desc'] : ''; // Ocprop |
|
49 | + $hints = isset($_POST['hints']) ? $_POST['hints'] : ''; // Ocprop |
|
50 | + $sel_lang = isset($_POST['desc_lang']) ? $_POST['desc_lang'] : $default_lang; // Ocprop |
|
51 | + $desc = isset($_POST['desc']) ? $_POST['desc'] : ''; // Ocprop |
|
52 | 52 | |
53 | 53 | // read descMode; if not set, initialize from user profile |
54 | 54 | if (isset($_POST['descMode'])) { // Ocprop |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | $oldDescMode = $descMode; |
66 | 66 | } |
67 | 67 | } else { |
68 | - if (sqlValue("SELECT `no_htmledit_flag` FROM `user` WHERE `user_id`='" . sql_escape($usr['userid']) . "'", 1) == 1) { |
|
68 | + if (sqlValue("SELECT `no_htmledit_flag` FROM `user` WHERE `user_id`='".sql_escape($usr['userid'])."'", 1) == 1) { |
|
69 | 69 | $descMode = 1; |
70 | 70 | } else { |
71 | 71 | $descMode = 3; |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | // do not use slave server for the next time ... |
132 | 132 | db_slave_exclude(); |
133 | 133 | |
134 | - tpl_redirect('editcache.php?cacheid=' . urlencode($cache_id)); |
|
134 | + tpl_redirect('editcache.php?cacheid='.urlencode($cache_id)); |
|
135 | 135 | exit; |
136 | 136 | } |
137 | 137 | } elseif (isset($_POST['show_all_langs_submit'])) { |
@@ -145,11 +145,11 @@ discard block |
||
145 | 145 | FROM `languages_list_default` |
146 | 146 | LEFT JOIN `cache_desc` |
147 | 147 | ON `languages_list_default`.`show`=`cache_desc`.`language` |
148 | - AND `cache_desc`.`cache_id`='" . sql_escape($cache_id) . "' |
|
149 | - WHERE `languages_list_default`.`lang`='" . sql_escape($locale) . "' |
|
148 | + AND `cache_desc`.`cache_id`='" . sql_escape($cache_id)."' |
|
149 | + WHERE `languages_list_default`.`lang`='" . sql_escape($locale)."' |
|
150 | 150 | AND ISNULL(`cache_desc`.`cache_id`)", |
151 | 151 | 0 |
152 | - ) == 0 ) { |
|
152 | + ) == 0) { |
|
153 | 153 | $show_all_langs = 1; |
154 | 154 | } |
155 | 155 | } |
@@ -183,13 +183,13 @@ discard block |
||
183 | 183 | if ($sSelected != '') { |
184 | 184 | $selected = true; |
185 | 185 | } |
186 | - $langoptions .= '<option value="' . htmlspecialchars($rLanguage['short'], ENT_COMPAT, 'UTF-8') . '"' . $sSelected . '>' . htmlspecialchars($rLanguage['name'], ENT_COMPAT, 'UTF-8') . '</option>' . "\n"; |
|
186 | + $langoptions .= '<option value="'.htmlspecialchars($rLanguage['short'], ENT_COMPAT, 'UTF-8').'"'.$sSelected.'>'.htmlspecialchars($rLanguage['name'], ENT_COMPAT, 'UTF-8').'</option>'."\n"; |
|
187 | 187 | } |
188 | 188 | sql_free_result($rsLanguages); |
189 | 189 | if ($langoptions == '') { |
190 | 190 | // We get here if someone has added descriptions for all avaiable languages, which |
191 | 191 | // is very unlikely to happen ever. Just for completeness (see issue #108): |
192 | - tpl_redirect('editcache.php?cacheid=' . urlencode($cache_id)); |
|
192 | + tpl_redirect('editcache.php?cacheid='.urlencode($cache_id)); |
|
193 | 193 | } |
194 | 194 | |
195 | 195 | tpl_set_var('langoptions', $langoptions); |
@@ -199,8 +199,7 @@ discard block |
||
199 | 199 | tpl_set_var('name', htmlspecialchars($cache_record['name'], ENT_COMPAT, 'UTF-8')); |
200 | 200 | tpl_set_var('cacheid', htmlspecialchars($cache_id, ENT_COMPAT, 'UTF-8')); |
201 | 201 | |
202 | - tpl_set_var('lang_message', $desc_lang_exists ? $lang_message : |
|
203 | - (isset($_POST['submitform']) && $sel_lang == '0' ? $error_no_lang_selected : '')); |
|
202 | + tpl_set_var('lang_message', $desc_lang_exists ? $lang_message : (isset($_POST['submitform']) && $sel_lang == '0' ? $error_no_lang_selected : '')); |
|
204 | 203 | |
205 | 204 | tpl_set_var('show_all_langs', $show_all_langs); |
206 | 205 | tpl_set_var('show_all_langs_submit', ($show_all_langs == 0) ? $show_all_langs_submit : ''); |
@@ -213,16 +212,16 @@ discard block |
||
213 | 212 | tpl_set_var('descMode', $descMode); |
214 | 213 | tpl_set_var('htmlnotice', $descMode == 2 ? $htmlnotice : ''); |
215 | 214 | |
216 | - $headers = tpl_get_var('htmlheaders') . "\n"; |
|
215 | + $headers = tpl_get_var('htmlheaders')."\n"; |
|
217 | 216 | if ($descMode == 3) { |
218 | 217 | // TinyMCE |
219 | - $headers .= '<script language="javascript" type="text/javascript" src="resource2/tinymce/tiny_mce_gzip.js"></script>' . "\n"; |
|
220 | - $headers .= '<script language="javascript" type="text/javascript" src="resource2/tinymce/config/desc.js.php?cacheid=' . ($cache_id + 0) . '&lang=' . strtolower($locale) . '"></script>' . "\n"; |
|
218 | + $headers .= '<script language="javascript" type="text/javascript" src="resource2/tinymce/tiny_mce_gzip.js"></script>'."\n"; |
|
219 | + $headers .= '<script language="javascript" type="text/javascript" src="resource2/tinymce/config/desc.js.php?cacheid='.($cache_id + 0).'&lang='.strtolower($locale).'"></script>'."\n"; |
|
221 | 220 | } |
222 | - $headers .= '<script language="javascript" type="text/javascript" src="' . editorJsPath() . '"></script>' . "\n"; |
|
221 | + $headers .= '<script language="javascript" type="text/javascript" src="'.editorJsPath().'"></script>'."\n"; |
|
223 | 222 | tpl_set_var('htmlheaders', $headers); |
224 | 223 | |
225 | - tpl_set_var('reset', $reset); // obsolete |
|
224 | + tpl_set_var('reset', $reset); // obsolete |
|
226 | 225 | tpl_set_var('submit', $submit); |
227 | 226 | } else { |
228 | 227 | //TODO: not the owner |
@@ -12,13 +12,13 @@ discard block |
||
12 | 12 | ***************************************************************************/ |
13 | 13 | |
14 | 14 | // needs absolute rootpath because called as cronjob |
15 | -$rootpath = __DIR__ . '/../../'; |
|
16 | -require_once $rootpath . 'lib/clicompatbase.inc.php'; |
|
17 | -require_once $rootpath . 'lib2/translate.class.php'; |
|
18 | -require_once __DIR__ . '/settings.inc.php'; |
|
19 | -require_once $rootpath . 'lib/consts.inc.php'; |
|
20 | -require_once $rootpath . 'lib/logic.inc.php'; |
|
21 | -require_once $rootpath . 'lib2/edithelper.inc.php'; |
|
15 | +$rootpath = __DIR__.'/../../'; |
|
16 | +require_once $rootpath.'lib/clicompatbase.inc.php'; |
|
17 | +require_once $rootpath.'lib2/translate.class.php'; |
|
18 | +require_once __DIR__.'/settings.inc.php'; |
|
19 | +require_once $rootpath.'lib/consts.inc.php'; |
|
20 | +require_once $rootpath.'lib/logic.inc.php'; |
|
21 | +require_once $rootpath.'lib2/edithelper.inc.php'; |
|
22 | 22 | |
23 | 23 | if (!cronjobs_enabled()) { |
24 | 24 | exit; |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | WHERE cache_logs.cache_id=caches.cache_id |
52 | 52 | AND cache_logs.owner_notified=0" |
53 | 53 | ); |
54 | -for ($i = 0; $i < mysql_num_rows($rsNewLogs); $i ++) { |
|
54 | +for ($i = 0; $i < mysql_num_rows($rsNewLogs); $i++) { |
|
55 | 55 | $rNewLog = sql_fetch_array($rsNewLogs); |
56 | 56 | |
57 | 57 | $rsNotified = sql( |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | // See http://forum.opencaching.de/index.php?topic=3123.0 on AOL. |
103 | 103 | if (sqlValue( |
104 | 104 | "SELECT `email_problems` = 0 OR DATEDIFF(NOW(),`last_email_problem`) > 1+DATEDIFF(`last_email_problem`,`first_email_problem`) |
105 | - FROM `user` WHERE `user_id`='" . sql_escape($rcw['user_id']) . "'", |
|
105 | + FROM `user` WHERE `user_id`='" . sql_escape($rcw['user_id'])."'", |
|
106 | 106 | 1 |
107 | 107 | )) { |
108 | 108 | process_log_watch($rcw['user_id'], $rcw['log_id']); |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | |
116 | 116 | /* begin send out everything that has to be sent */ |
117 | 117 | |
118 | -$email_headers = 'From: "' . $mailfrom . '" <' . $mailfrom . '>'; |
|
118 | +$email_headers = 'From: "'.$mailfrom.'" <'.$mailfrom.'>'; |
|
119 | 119 | |
120 | 120 | $rsUsers = sql( |
121 | 121 | "SELECT |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | WHERE `user`.`watchmail_nextmail`<NOW()", |
135 | 135 | $opt['template']['default']['locale'] |
136 | 136 | ); |
137 | -for ($i = 0; $i < mysql_num_rows($rsUsers); $i ++) { |
|
137 | +for ($i = 0; $i < mysql_num_rows($rsUsers); $i++) { |
|
138 | 138 | $rUser = sql_fetch_array($rsUsers); |
139 | 139 | |
140 | 140 | if ($rUser['watchmail_nextmail'] != '0000-00-00 00:00:00') { |
@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | ); |
159 | 159 | if (mysql_num_rows($rsWatchesOwner) > 0) { |
160 | 160 | $logtexts = ''; |
161 | - for ($j = 0; $j < mysql_num_rows($rsWatchesOwner); $j ++) { |
|
161 | + for ($j = 0; $j < mysql_num_rows($rsWatchesOwner); $j++) { |
|
162 | 162 | $rWatch = sql_fetch_array($rsWatchesOwner); |
163 | 163 | $logtexts .= $rWatch['watchtext']; |
164 | 164 | } |
@@ -183,7 +183,7 @@ discard block |
||
183 | 183 | ); |
184 | 184 | if (mysql_num_rows($rsWatchesLog) > 0) { |
185 | 185 | $logtexts = ''; |
186 | - for ($j = 0; $j < mysql_num_rows($rsWatchesLog); $j ++) { |
|
186 | + for ($j = 0; $j < mysql_num_rows($rsWatchesLog); $j++) { |
|
187 | 187 | $rWatch = sql_fetch_array($rsWatchesLog); |
188 | 188 | $logtexts .= $rWatch['watchtext']; |
189 | 189 | } |
@@ -209,7 +209,7 @@ discard block |
||
209 | 209 | if (is_existent_maildomain(getToMailDomain($mailadr))) { |
210 | 210 | $language = $rUser['language'] ? $rUser['language'] : $opt['template']['default']['locale']; |
211 | 211 | $mailsubject = |
212 | - '[' . $maildomain . '] ' . $translate->t( |
|
212 | + '['.$maildomain.'] '.$translate->t( |
|
213 | 213 | 'Your watchlist of', |
214 | 214 | '', |
215 | 215 | basename(__FILE__), |
@@ -217,11 +217,11 @@ discard block |
||
217 | 217 | '', |
218 | 218 | 1, |
219 | 219 | $language |
220 | - ) . ' ' . date($opt['locale'][$language]['format']['phpdate']); |
|
220 | + ).' '.date($opt['locale'][$language]['format']['phpdate']); |
|
221 | 221 | mb_send_mail($mailadr, $mailsubject, $mailbody, $email_headers); |
222 | 222 | |
223 | 223 | // logentry($module, $eventid, $userid, $objectid1, $objectid2, $logtext, $details) |
224 | - logentry('watchlist', 2, $rUser['user_id'], 0, 0, 'Sending mail to ' . $mailadr, []); |
|
224 | + logentry('watchlist', 2, $rUser['user_id'], 0, 0, 'Sending mail to '.$mailadr, []); |
|
225 | 225 | } |
226 | 226 | } |
227 | 227 | |
@@ -320,7 +320,7 @@ discard block |
||
320 | 320 | |
321 | 321 | $logtext = html2plaintext($rLog['text'], $rLog['text_html'] == 0, EMAIL_LINEWRAP); |
322 | 322 | |
323 | - $language = sqlValue("SELECT `language` FROM `user` WHERE `user_id`='" . sql_escape($user_id) . "'", null); |
|
323 | + $language = sqlValue("SELECT `language` FROM `user` WHERE `user_id`='".sql_escape($user_id)."'", null); |
|
324 | 324 | if (!$language) { |
325 | 325 | $language = $opt['template']['default']['locale']; |
326 | 326 | } |
@@ -331,7 +331,7 @@ discard block |
||
331 | 331 | } |
332 | 332 | |
333 | 333 | $watchtext = |
334 | - '{date} ' . $translate->t( |
|
334 | + '{date} '.$translate->t( |
|
335 | 335 | '{user} has logged your cache "{cachename}":', |
336 | 336 | '', |
337 | 337 | basename(__FILE__), |
@@ -339,7 +339,7 @@ discard block |
||
339 | 339 | '', |
340 | 340 | 1, |
341 | 341 | $language |
342 | - ) . ' {action}{maintenance_flags}' . "\n" . '{shortlink_url}{wp_oc}' . "\n\n" . '{text}' . "\n\n\n\n"; |
|
342 | + ).' {action}{maintenance_flags}'."\n".'{shortlink_url}{wp_oc}'."\n\n".'{text}'."\n\n\n\n"; |
|
343 | 343 | |
344 | 344 | $watchtext = mb_ereg_replace('{date}', date($dateformat, strtotime($rLog['logdate'])), $watchtext); |
345 | 345 | $watchtext = mb_ereg_replace('{wp_oc}', $rLog['wp_oc'], $watchtext); |
@@ -349,7 +349,7 @@ discard block |
||
349 | 349 | $watchtext = mb_ereg_replace('{action}', get_logtype_name($rLog['type'], $language), $watchtext); |
350 | 350 | $watchtext = insert_maintenance_flags($rLog, $language, $watchtext); |
351 | 351 | |
352 | - $domain = sqlValue("SELECT `domain` FROM `user` WHERE `user_id`='" . sql_escape($user_id) . "'", null); |
|
352 | + $domain = sqlValue("SELECT `domain` FROM `user` WHERE `user_id`='".sql_escape($user_id)."'", null); |
|
353 | 353 | $urls = get_site_urls($domain); |
354 | 354 | if ($urls['shortlink_url']) { |
355 | 355 | $watchtext = mb_ereg_replace("{shortlink_url}", $urls['shortlink_url'], $watchtext); |
@@ -403,7 +403,7 @@ discard block |
||
403 | 403 | |
404 | 404 | $logtext = html2plaintext($rLog['text'], $rLog['text_html'] == 0, EMAIL_LINEWRAP); |
405 | 405 | |
406 | - $language = sqlValue("SELECT `language` FROM `user` WHERE `user_id`='" . sql_escape($user_id) . "'", null); |
|
406 | + $language = sqlValue("SELECT `language` FROM `user` WHERE `user_id`='".sql_escape($user_id)."'", null); |
|
407 | 407 | if (!$language) { |
408 | 408 | $language = $opt['template']['default']['locale']; |
409 | 409 | } |
@@ -414,7 +414,7 @@ discard block |
||
414 | 414 | } |
415 | 415 | |
416 | 416 | $watchtext = |
417 | - '{date} ' . $translate->t( |
|
417 | + '{date} '.$translate->t( |
|
418 | 418 | '{user} has logged the cache "{cachename}":', |
419 | 419 | '', |
420 | 420 | basename(__FILE__), |
@@ -422,7 +422,7 @@ discard block |
||
422 | 422 | '', |
423 | 423 | 1, |
424 | 424 | $language |
425 | - ) . ' {action}{maintenance_flags}' . "\n" . '{shortlink_url}{wp_oc}' . "\n{cachelists}\n" . '{text}' . "\n\n\n\n"; |
|
425 | + ).' {action}{maintenance_flags}'."\n".'{shortlink_url}{wp_oc}'."\n{cachelists}\n".'{text}'."\n\n\n\n"; |
|
426 | 426 | |
427 | 427 | $watchtext = mb_ereg_replace('{date}', date($dateformat, strtotime($rLog['logdate'])), $watchtext); |
428 | 428 | $watchtext = mb_ereg_replace('{wp_oc}', $rLog['wp_oc'], $watchtext); |
@@ -455,7 +455,7 @@ discard block |
||
455 | 455 | '', |
456 | 456 | 1, |
457 | 457 | $language |
458 | - ) . ' ' . $cachelist_names[0] . "\n"; |
|
458 | + ).' '.$cachelist_names[0]."\n"; |
|
459 | 459 | break; |
460 | 460 | default: |
461 | 461 | $cachelists = |
@@ -467,11 +467,11 @@ discard block |
||
467 | 467 | '', |
468 | 468 | 1, |
469 | 469 | $language |
470 | - ) . ' ' . implode(', ', $cachelist_names) . "\n"; |
|
470 | + ).' '.implode(', ', $cachelist_names)."\n"; |
|
471 | 471 | } |
472 | 472 | $watchtext = mb_ereg_replace('{cachelists}', $cachelists, $watchtext); |
473 | 473 | |
474 | - $domain = sqlValue("SELECT `domain` FROM `user` WHERE `user_id`='" . sql_escape($user_id) . "'", null); |
|
474 | + $domain = sqlValue("SELECT `domain` FROM `user` WHERE `user_id`='".sql_escape($user_id)."'", null); |
|
475 | 475 | $urls = get_site_urls($domain); |
476 | 476 | if ($urls['shortlink_url']) { |
477 | 477 | $watchtext = mb_ereg_replace("{shortlink_url}", $urls['shortlink_url'], $watchtext); |
@@ -562,7 +562,7 @@ discard block |
||
562 | 562 | } |
563 | 563 | |
564 | 564 | if (file_exists($PidFile)) { |
565 | - echo "Error: Pidfile (" . $PidFile . ") already present at " . __FILE__ . ":" . __LINE__ . "!\n"; |
|
565 | + echo "Error: Pidfile (".$PidFile.") already present at ".__FILE__.":".__LINE__."!\n"; |
|
566 | 566 | |
567 | 567 | return false; |
568 | 568 | } else { |
@@ -572,7 +572,7 @@ discard block |
||
572 | 572 | |
573 | 573 | return true; |
574 | 574 | } else { |
575 | - echo "can't create Pidfile $PidFile at " . __FILE__ . ":" . __LINE__ . "!\n"; |
|
575 | + echo "can't create Pidfile $PidFile at ".__FILE__.":".__LINE__."!\n"; |
|
576 | 576 | |
577 | 577 | return false; |
578 | 578 | } |
@@ -588,7 +588,7 @@ discard block |
||
588 | 588 | $pid_daemon = fgets($pidfile, 20); |
589 | 589 | fclose($pidfile); |
590 | 590 | |
591 | - $pid_daemon = (int) $pid_daemon; |
|
591 | + $pid_daemon = (int)$pid_daemon; |
|
592 | 592 | |
593 | 593 | // process running? |
594 | 594 | if (posix_kill($pid_daemon, 0)) { |
@@ -597,7 +597,7 @@ discard block |
||
597 | 597 | false; |
598 | 598 | } else { |
599 | 599 | // no, remove pid_file |
600 | - echo "process not running, removing old pid_file (" . $PidFile . ")\n"; |
|
600 | + echo "process not running, removing old pid_file (".$PidFile.")\n"; |
|
601 | 601 | unlink($PidFile); |
602 | 602 | |
603 | 603 | return true; |
@@ -619,10 +619,10 @@ discard block |
||
619 | 619 | unlink($PidFile); |
620 | 620 | } |
621 | 621 | } else { |
622 | - echo "Error: can't delete own pidfile (" . $PidFile . ") at " . __FILE__ . ":" . __LINE__ . "!\n"; |
|
622 | + echo "Error: can't delete own pidfile (".$PidFile.") at ".__FILE__.":".__LINE__."!\n"; |
|
623 | 623 | } |
624 | 624 | |
625 | 625 | if ($message) { |
626 | - echo $message . "\n"; |
|
626 | + echo $message."\n"; |
|
627 | 627 | } |
628 | 628 | } |
@@ -22,13 +22,13 @@ discard block |
||
22 | 22 | tpl_set_var('loginbox', ' '); |
23 | 23 | tpl_set_var( |
24 | 24 | 'functionsbox', |
25 | - '<a href="index.php?page=suche">' . t('Search') . '</a> | <a href="index.php?page=sitemap">' . t('Sitemap') . '</a>' |
|
25 | + '<a href="index.php?page=suche">'.t('Search').'</a> | <a href="index.php?page=sitemap">'.t('Sitemap').'</a>' |
|
26 | 26 | ); |
27 | 27 | tpl_set_var('runtime', ''); |
28 | 28 | |
29 | 29 | //set up main template specific string |
30 | 30 | $sLoggedOut = |
31 | - '<form action="' . ($opt['page']['https']['force_login'] ? $opt['page']['absolute_https_url'] : '') . 'login.php" method="post" enctype="application/x-www-form-urlencoded" name="login" dir="ltr" style="display: inline;"><b>' |
|
31 | + '<form action="'.($opt['page']['https']['force_login'] ? $opt['page']['absolute_https_url'] : '').'login.php" method="post" enctype="application/x-www-form-urlencoded" name="login" dir="ltr" style="display: inline;"><b>' |
|
32 | 32 | . t('User:') |
33 | 33 | . '</b> <input name="email" size="10" type="text" class="textboxes" value="" /> <b>' |
34 | 34 | . t('Password:') |
@@ -43,14 +43,14 @@ discard block |
||
43 | 43 | . '</a></b>'; |
44 | 44 | |
45 | 45 | // target in Loginbox setzen |
46 | -$target = basename($_SERVER['PHP_SELF']) . '?'; |
|
46 | +$target = basename($_SERVER['PHP_SELF']).'?'; |
|
47 | 47 | |
48 | 48 | // REQUEST-Variablen durchlaufen und an target anhaengen |
49 | 49 | $allowed = ['cacheid', 'userid', 'logid', 'desclang', 'descid']; |
50 | 50 | reset($_REQUEST); |
51 | 51 | while (list ($varname, $varvalue) = each($_REQUEST)) { |
52 | 52 | if (in_array($varname, $allowed)) { |
53 | - $target .= $varname . '=' . $varvalue . '&'; |
|
53 | + $target .= $varname.'='.$varvalue.'&'; |
|
54 | 54 | } |
55 | 55 | } |
56 | 56 | if (mb_substr($target, - 1) == '?' || mb_substr($target, - 1) == '&') { |
@@ -76,10 +76,10 @@ discard block |
||
76 | 76 | '<tr><td class="spacer" colspan="2"></td></tr> |
77 | 77 | <tr> |
78 | 78 | <td class="help" colspan="2"> |
79 | - <img src="lang/de/ocstyle/images/misc/hint.gif" border="0" width="15" height="11" alt="' . t('Notice') . '" title="' . t('Notice') . '" /> |
|
79 | + <img src="lang/de/ocstyle/images/misc/hint.gif" border="0" width="15" height="11" alt="' . t('Notice').'" title="'.t('Notice').'" /> |
|
80 | 80 | ' . t('Your HTML code will be changed again by a special filter. This is necessary to avoid dangerous HTML-tags, |
81 | 81 | such as <script>. A list of allowed HTML tags, you can find |
82 | - <a href="articles.php?page=htmltags">here</a>') . ' |
|
82 | + <a href="articles.php?page=htmltags">here</a>').' |
|
83 | 83 | </td> |
84 | 84 | </tr> |
85 | 85 | '; |
@@ -5,7 +5,7 @@ discard block |
||
5 | 5 | * Unicode Reminder メモ |
6 | 6 | ***************************************************************************/ |
7 | 7 | |
8 | -require __DIR__ . '/lib2/web.inc.php'; |
|
8 | +require __DIR__.'/lib2/web.inc.php'; |
|
9 | 9 | |
10 | 10 | $login->verify(); |
11 | 11 | |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | $login->hasAdminPriv(ADMIN_USER) ? 1 : 0 |
40 | 40 | ) == 0) { |
41 | 41 | if ($debug == 1) { |
42 | - die('Debug: line ' . __LINE__); |
|
42 | + die('Debug: line '.__LINE__); |
|
43 | 43 | } else { |
44 | 44 | $tpl->redirect(thumbpath('extern', 1)); |
45 | 45 | } |
@@ -57,14 +57,14 @@ discard block |
||
57 | 57 | $login->hasAdminPriv(ADMIN_USER) ? 1 : 0 |
58 | 58 | ) == 0) { |
59 | 59 | if ($debug == 1) { |
60 | - die('Debug: line ' . __LINE__); |
|
60 | + die('Debug: line '.__LINE__); |
|
61 | 61 | } else { |
62 | 62 | $tpl->redirect(thumbpath('extern', 2)); |
63 | 63 | } |
64 | 64 | } |
65 | 65 | } else { |
66 | 66 | if ($debug == 1) { |
67 | - die('Debug: line ' . __LINE__); |
|
67 | + die('Debug: line '.__LINE__); |
|
68 | 68 | } else { |
69 | 69 | $tpl->redirect(thumbpath('intern', $default_object_type)); |
70 | 70 | } |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | |
73 | 73 | if ($r['local'] == 0) { |
74 | 74 | if ($debug == 1) { |
75 | - die('Debug: line ' . __LINE__); |
|
75 | + die('Debug: line '.__LINE__); |
|
76 | 76 | } else { |
77 | 77 | $tpl->redirect(thumbpath('extern', $r['object_type'])); |
78 | 78 | } |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | |
81 | 81 | if (($r['spoiler'] == 1) && ($showspoiler != 1)) { |
82 | 82 | if ($debug == 1) { |
83 | - die('Debug: line ' . __LINE__); |
|
83 | + die('Debug: line '.__LINE__); |
|
84 | 84 | } else { |
85 | 85 | $tpl->redirect(thumbpath('spoiler', $r['object_type'])); |
86 | 86 | } |
@@ -89,9 +89,9 @@ discard block |
||
89 | 89 | $imgurl = $r['url']; |
90 | 90 | $urlparts = mb_split('/', $imgurl); |
91 | 91 | |
92 | - if (!file_exists($opt['logic']['pictures']['dir'] . '/' . $urlparts[count($urlparts) - 1])) { |
|
92 | + if (!file_exists($opt['logic']['pictures']['dir'].'/'.$urlparts[count($urlparts) - 1])) { |
|
93 | 93 | if ($debug == 1) { |
94 | - die('Debug: line ' . __LINE__); |
|
94 | + die('Debug: line '.__LINE__); |
|
95 | 95 | } else { |
96 | 96 | $tpl->redirect(thumbpath('intern', $r['object_type'])); |
97 | 97 | } |
@@ -104,11 +104,11 @@ discard block |
||
104 | 104 | } |
105 | 105 | |
106 | 106 | if (!file_exists( |
107 | - $opt['logic']['pictures']['thumb_dir'] . '/' . mb_substr( |
|
107 | + $opt['logic']['pictures']['thumb_dir'].'/'.mb_substr( |
|
108 | 108 | $urlparts[count($urlparts) - 1], |
109 | 109 | 0, |
110 | 110 | 1 |
111 | - ) . '/' . mb_substr($urlparts[count($urlparts) - 1], 1, 1) . '/' . $urlparts[count($urlparts) - 1] |
|
111 | + ).'/'.mb_substr($urlparts[count($urlparts) - 1], 1, 1).'/'.$urlparts[count($urlparts) - 1] |
|
112 | 112 | ) |
113 | 113 | ) { |
114 | 114 | $bGenerate = true; |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | if ($bGenerate) { |
118 | 118 | if ($r['unknown_format'] == 1) { |
119 | 119 | if ($debug == 1) { |
120 | - die('Debug: line ' . __LINE__); |
|
120 | + die('Debug: line '.__LINE__); |
|
121 | 121 | } else { |
122 | 122 | $tpl->redirect(thumbpath('format', $r['object_type'])); |
123 | 123 | } |
@@ -128,11 +128,11 @@ discard block |
||
128 | 128 | $filenameparts = mb_split('\\.', $filename); |
129 | 129 | $extension = mb_strtolower($filenameparts[count($filenameparts) - 1]); |
130 | 130 | |
131 | - if (mb_strpos(';' . $opt['logic']['pictures']['extensions'] . ';', ';' . $extension . ';') === false) { |
|
131 | + if (mb_strpos(';'.$opt['logic']['pictures']['extensions'].';', ';'.$extension.';') === false) { |
|
132 | 132 | sql("UPDATE `pictures` SET `unknown_format`=1 WHERE `uuid`='&1'", $r['uuid']); |
133 | 133 | |
134 | 134 | if ($debug == 1) { |
135 | - die('Debug: line ' . __LINE__); |
|
135 | + die('Debug: line '.__LINE__); |
|
136 | 136 | } else { |
137 | 137 | $tpl->redirect(thumbpath('format', $r['object_type'])); |
138 | 138 | } |
@@ -143,20 +143,20 @@ discard block |
||
143 | 143 | } |
144 | 144 | switch ($extension) { |
145 | 145 | case 'jpg': |
146 | - $im = imagecreatefromjpeg($opt['logic']['pictures']['dir'] . '/' . $filename); |
|
146 | + $im = imagecreatefromjpeg($opt['logic']['pictures']['dir'].'/'.$filename); |
|
147 | 147 | break; |
148 | 148 | |
149 | 149 | case 'gif': |
150 | - $im = imagecreatefromgif($opt['logic']['pictures']['dir'] . '/' . $filename); |
|
150 | + $im = imagecreatefromgif($opt['logic']['pictures']['dir'].'/'.$filename); |
|
151 | 151 | break; |
152 | 152 | |
153 | 153 | case 'png': |
154 | - $im = imagecreatefrompng($opt['logic']['pictures']['dir'] . '/' . $filename); |
|
154 | + $im = imagecreatefrompng($opt['logic']['pictures']['dir'].'/'.$filename); |
|
155 | 155 | break; |
156 | 156 | |
157 | 157 | case 'bmp': |
158 | - require $opt['rootpath'] . 'lib2/imagebmp.inc.php'; |
|
159 | - $im = imagecreatefrombmp($opt['logic']['pictures']['dir'] . '/' . $filename); |
|
158 | + require $opt['rootpath'].'lib2/imagebmp.inc.php'; |
|
159 | + $im = imagecreatefrombmp($opt['logic']['pictures']['dir'].'/'.$filename); |
|
160 | 160 | break; |
161 | 161 | } |
162 | 162 | |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | sql("UPDATE `pictures` SET `unknown_format`=1 WHERE `uuid`='&1'", $r['uuid']); |
165 | 165 | |
166 | 166 | if ($debug == 1) { |
167 | - die('Debug: line ' . __LINE__); |
|
167 | + die('Debug: line '.__LINE__); |
|
168 | 168 | } else { |
169 | 169 | $tpl->redirect(thumbpath('format', $r['object_type'])); |
170 | 170 | } |
@@ -201,15 +201,15 @@ discard block |
||
201 | 201 | imagecopyresampled($thumbimage, $im, 0, 0, 0, 0, $thumbwidth, $thumbheight, $imwidth, $imheight); |
202 | 202 | |
203 | 203 | // Create directory |
204 | - if (!file_exists($opt['logic']['pictures']['thumb_dir'] . '/' . mb_substr($filename, 0, 1))) { |
|
205 | - mkdir($opt['logic']['pictures']['thumb_dir'] . '/' . mb_substr($filename, 0, 1)); |
|
204 | + if (!file_exists($opt['logic']['pictures']['thumb_dir'].'/'.mb_substr($filename, 0, 1))) { |
|
205 | + mkdir($opt['logic']['pictures']['thumb_dir'].'/'.mb_substr($filename, 0, 1)); |
|
206 | 206 | } |
207 | 207 | if (!file_exists( |
208 | - $opt['logic']['pictures']['thumb_dir'] . '/' . mb_substr($filename, 0, 1) . '/' . mb_substr($filename, 1, 1) |
|
208 | + $opt['logic']['pictures']['thumb_dir'].'/'.mb_substr($filename, 0, 1).'/'.mb_substr($filename, 1, 1) |
|
209 | 209 | ) |
210 | 210 | ) { |
211 | 211 | mkdir( |
212 | - $opt['logic']['pictures']['thumb_dir'] . '/' . mb_substr($filename, 0, 1) . '/' . mb_substr( |
|
212 | + $opt['logic']['pictures']['thumb_dir'].'/'.mb_substr($filename, 0, 1).'/'.mb_substr( |
|
213 | 213 | $filename, |
214 | 214 | 1, |
215 | 215 | 1 |
@@ -218,48 +218,48 @@ discard block |
||
218 | 218 | } |
219 | 219 | |
220 | 220 | $savedir = |
221 | - $opt['logic']['pictures']['thumb_dir'] . '/' |
|
222 | - . mb_substr($filename, 0, 1) . '/' |
|
221 | + $opt['logic']['pictures']['thumb_dir'].'/' |
|
222 | + . mb_substr($filename, 0, 1).'/' |
|
223 | 223 | . mb_substr($filename, 1, 1); |
224 | 224 | |
225 | 225 | switch ($extension) { |
226 | 226 | case 'jpg': |
227 | - imagejpeg($thumbimage, $savedir . '/' . $filename); |
|
227 | + imagejpeg($thumbimage, $savedir.'/'.$filename); |
|
228 | 228 | break; |
229 | 229 | |
230 | 230 | case 'gif': |
231 | - imagegif($thumbimage, $savedir . '/' . $filename); |
|
231 | + imagegif($thumbimage, $savedir.'/'.$filename); |
|
232 | 232 | break; |
233 | 233 | |
234 | 234 | case 'png': |
235 | - imagepng($thumbimage, $savedir . '/' . $filename); |
|
235 | + imagepng($thumbimage, $savedir.'/'.$filename); |
|
236 | 236 | break; |
237 | 237 | |
238 | 238 | case 'bmp': |
239 | - imagebmp($thumbimage, $savedir . '/' . $filename); |
|
239 | + imagebmp($thumbimage, $savedir.'/'.$filename); |
|
240 | 240 | break; |
241 | 241 | } |
242 | 242 | |
243 | 243 | sql( |
244 | 244 | "UPDATE `pictures` SET `thumb_last_generated`=NOW(), `thumb_url`='&1' WHERE `uuid`='&2'", |
245 | - $opt['logic']['pictures']['thumb_url'] . '/' . mb_substr($filename, 0, 1) . '/' . mb_substr( |
|
245 | + $opt['logic']['pictures']['thumb_url'].'/'.mb_substr($filename, 0, 1).'/'.mb_substr( |
|
246 | 246 | $filename, |
247 | 247 | 1, |
248 | 248 | 1 |
249 | - ) . '/' . $filename, |
|
249 | + ).'/'.$filename, |
|
250 | 250 | $r['uuid'] |
251 | 251 | ); |
252 | 252 | |
253 | 253 | if ($debug == 1) { |
254 | - die($opt['logic']['pictures']['thumb_url'] . '/' . $filename); |
|
254 | + die($opt['logic']['pictures']['thumb_url'].'/'.$filename); |
|
255 | 255 | } else { |
256 | 256 | $tpl->redirect( |
257 | 257 | use_current_protocol( |
258 | - $opt['logic']['pictures']['thumb_url'] . '/' . mb_substr($filename, 0, 1) . '/' . mb_substr( |
|
258 | + $opt['logic']['pictures']['thumb_url'].'/'.mb_substr($filename, 0, 1).'/'.mb_substr( |
|
259 | 259 | $filename, |
260 | 260 | 1, |
261 | 261 | 1 |
262 | - ) . '/' . $filename |
|
262 | + ).'/'.$filename |
|
263 | 263 | ) |
264 | 264 | ); |
265 | 265 | } |
@@ -272,7 +272,7 @@ discard block |
||
272 | 272 | } |
273 | 273 | } else { |
274 | 274 | if ($debug == 1) { |
275 | - die('Debug: line ' . __LINE__); |
|
275 | + die('Debug: line '.__LINE__); |
|
276 | 276 | } else { |
277 | 277 | $tpl->redirect(thumbpath('404', $default_object_type)); |
278 | 278 | } |
@@ -287,18 +287,18 @@ discard block |
||
287 | 287 | || ($object_type != 1 && $object_type != 2) |
288 | 288 | ) { |
289 | 289 | if ($debug == 1) { |
290 | - die('Debug: line ' . __LINE__); |
|
290 | + die('Debug: line '.__LINE__); |
|
291 | 291 | } else { |
292 | 292 | $name = 'intern'; |
293 | 293 | $object_type = $default_object_type; |
294 | 294 | } |
295 | 295 | } |
296 | 296 | |
297 | - $imgdir = 'resource2/' . $opt['template']['style'] . '/images/thumb/'; |
|
298 | - $filename = 'thumb' . $name . '_' . $object_type . '.gif'; |
|
299 | - $thumbpath = $imgdir . strtolower($opt['template']['locale']) . '/' . $filename; |
|
297 | + $imgdir = 'resource2/'.$opt['template']['style'].'/images/thumb/'; |
|
298 | + $filename = 'thumb'.$name.'_'.$object_type.'.gif'; |
|
299 | + $thumbpath = $imgdir.strtolower($opt['template']['locale']).'/'.$filename; |
|
300 | 300 | if (!file_exists($thumbpath)) { |
301 | - $thumbpath = $imgdir . 'en/' . $filename; |
|
301 | + $thumbpath = $imgdir.'en/'.$filename; |
|
302 | 302 | } |
303 | 303 | |
304 | 304 | return $thumbpath; |