@@ -5,9 +5,9 @@ discard block |
||
5 | 5 | * Unicode Reminder メモ |
6 | 6 | ***************************************************************************/ |
7 | 7 | |
8 | -$opt['rootpath'] = __DIR__ . '/../../'; |
|
9 | -require_once $opt['rootpath'] . 'lib2/web.inc.php'; |
|
10 | -require_once $opt['rootpath'] . 'lib2/logic/cache.class.php'; |
|
8 | +$opt['rootpath'] = __DIR__.'/../../'; |
|
9 | +require_once $opt['rootpath'].'lib2/web.inc.php'; |
|
10 | +require_once $opt['rootpath'].'lib2/logic/cache.class.php'; |
|
11 | 11 | |
12 | 12 | header('Content-type: text/html; charset=utf-8'); |
13 | 13 | |
@@ -35,14 +35,14 @@ discard block |
||
35 | 35 | } else { |
36 | 36 | echo $cache->getCacheId(); |
37 | 37 | echo ';'; |
38 | - echo '"' . mb_ereg_replace('"', '\"', $cache->getName()) . '"'; |
|
38 | + echo '"'.mb_ereg_replace('"', '\"', $cache->getName()).'"'; |
|
39 | 39 | echo ';'; |
40 | - echo '"' . mb_ereg_replace('"', '\"', $cache->getUsername()) . '"'; |
|
40 | + echo '"'.mb_ereg_replace('"', '\"', $cache->getUsername()).'"'; |
|
41 | 41 | echo ';'; |
42 | - echo '"' . mb_ereg_replace('"', '\"', $cache->getWPOC()) . '"'; |
|
42 | + echo '"'.mb_ereg_replace('"', '\"', $cache->getWPOC()).'"'; |
|
43 | 43 | echo ';'; |
44 | - echo '"' . mb_ereg_replace('"', '\"', $cache->getWPGC()) . '"'; |
|
44 | + echo '"'.mb_ereg_replace('"', '\"', $cache->getWPGC()).'"'; |
|
45 | 45 | echo ';'; |
46 | - echo '""'; // obsolete Navicache WP |
|
46 | + echo '""'; // obsolete Navicache WP |
|
47 | 47 | } |
48 | 48 | } |
@@ -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 | } |
@@ -192,7 +192,7 @@ discard block |
||
192 | 192 | if (isset($_REQUEST['country'])) { |
193 | 193 | $country = $_REQUEST['country']; |
194 | 194 | |
195 | - if (sqlValue('SELECT COUNT(*) FROM `countries` WHERE `short`=\'' . sql_escape($country) . '\'', 0) != 1) { |
|
195 | + if (sqlValue('SELECT COUNT(*) FROM `countries` WHERE `short`=\''.sql_escape($country).'\'', 0) != 1) { |
|
196 | 196 | die('Unknown country'); |
197 | 197 | } |
198 | 198 | |
@@ -237,13 +237,13 @@ discard block |
||
237 | 237 | $selection['type'] = 3; |
238 | 238 | if (isset($_REQUEST['wp'])) { |
239 | 239 | $selection['cacheid'] = sqlValue( |
240 | - "SELECT `cache_id` FROM `caches` WHERE `wp_oc`='" . sql_escape($_REQUEST['wp']) . "'", |
|
240 | + "SELECT `cache_id` FROM `caches` WHERE `wp_oc`='".sql_escape($_REQUEST['wp'])."'", |
|
241 | 241 | 0 |
242 | 242 | ); |
243 | 243 | } else { |
244 | 244 | if (isset($_REQUEST['uuid'])) { |
245 | 245 | $selection['cacheid'] = sqlValue( |
246 | - "SELECT `cache_id` FROM `caches` WHERE `uuid`='" . sql_escape($_REQUEST['uuid']) . "'", |
|
246 | + "SELECT `cache_id` FROM `caches` WHERE `uuid`='".sql_escape($_REQUEST['uuid'])."'", |
|
247 | 247 | 0 |
248 | 248 | ); |
249 | 249 | } else { |
@@ -302,23 +302,23 @@ discard block |
||
302 | 302 | $xmloutput = ''; |
303 | 303 | if ($bXmlDecl == '1') { |
304 | 304 | if ($sCharset == 'iso-8859-1') { |
305 | - $xmloutput .= '<?xml version="1.0" encoding="iso-8859-1" standalone="yes" ?>' . "\n"; |
|
305 | + $xmloutput .= '<?xml version="1.0" encoding="iso-8859-1" standalone="yes" ?>'."\n"; |
|
306 | 306 | } else { |
307 | 307 | if ($sCharset == 'utf-8') { |
308 | - $xmloutput .= '<?xml version="1.0" encoding="utf-8" standalone="yes" ?>' . "\n"; |
|
308 | + $xmloutput .= '<?xml version="1.0" encoding="utf-8" standalone="yes" ?>'."\n"; |
|
309 | 309 | } |
310 | 310 | } |
311 | 311 | } |
312 | 312 | if ($bOcXmlTag == '1') { |
313 | - $xmloutput .= '<ocxmlsession>' . "\n"; |
|
313 | + $xmloutput .= '<ocxmlsession>'."\n"; |
|
314 | 314 | } |
315 | - $xmloutput .= ' <sessionid>' . $sessionid . '</sessionid>' . "\n"; |
|
316 | - $xmloutput .= ' <records user="' . $recordcount['users'] . |
|
317 | - '" cache="' . $recordcount['caches'] . |
|
318 | - '" cachedesc="' . $recordcount['cachedescs'] . |
|
319 | - '" cachelog="' . $recordcount['cachelogs'] . |
|
320 | - '" picture="' . $recordcount['pictures'] . |
|
321 | - '" removeobject="' . $recordcount['removedobjects'] . '" />' . "\n"; |
|
315 | + $xmloutput .= ' <sessionid>'.$sessionid.'</sessionid>'."\n"; |
|
316 | + $xmloutput .= ' <records user="'.$recordcount['users']. |
|
317 | + '" cache="'.$recordcount['caches']. |
|
318 | + '" cachedesc="'.$recordcount['cachedescs']. |
|
319 | + '" cachelog="'.$recordcount['cachelogs']. |
|
320 | + '" picture="'.$recordcount['pictures']. |
|
321 | + '" removeobject="'.$recordcount['removedobjects'].'" />'."\n"; |
|
322 | 322 | if ($bOcXmlTag == '1') { |
323 | 323 | $xmloutput .= '</ocxmlsession>'; |
324 | 324 | } |
@@ -387,7 +387,7 @@ discard block |
||
387 | 387 | |
388 | 388 | $logtypes = []; |
389 | 389 | $rs = sql('SELECT `id`, `de` FROM log_types'); |
390 | - for ($i = 0; $i < mysql_num_rows($rs); $i ++) { |
|
390 | + for ($i = 0; $i < mysql_num_rows($rs); $i++) { |
|
391 | 391 | $r = sql_fetch_array($rs); |
392 | 392 | $logtypes[$r['id']] = $r['de']; |
393 | 393 | } |
@@ -395,7 +395,7 @@ discard block |
||
395 | 395 | |
396 | 396 | $cachetypes = []; |
397 | 397 | $rs = sql('SELECT `id`, `short`, `de` FROM cache_type'); |
398 | - for ($i = 0; $i < mysql_num_rows($rs); $i ++) { |
|
398 | + for ($i = 0; $i < mysql_num_rows($rs); $i++) { |
|
399 | 399 | $r = sql_fetch_array($rs); |
400 | 400 | $cachetypes[$r['id']]['de'] = $r['de']; |
401 | 401 | $cachetypes[$r['id']]['short'] = $r['short']; |
@@ -404,7 +404,7 @@ discard block |
||
404 | 404 | |
405 | 405 | $cachestatus = []; |
406 | 406 | $rs = sql('SELECT `id`, `de` FROM cache_status'); |
407 | - for ($i = 0; $i < mysql_num_rows($rs); $i ++) { |
|
407 | + for ($i = 0; $i < mysql_num_rows($rs); $i++) { |
|
408 | 408 | $r = sql_fetch_array($rs); |
409 | 409 | $cachestatus[$r['id']]['de'] = $r['de']; |
410 | 410 | } |
@@ -412,7 +412,7 @@ discard block |
||
412 | 412 | |
413 | 413 | $counties = []; |
414 | 414 | $rs = sql('SELECT `short`, `de` FROM countries'); |
415 | - for ($i = 0; $i < mysql_num_rows($rs); $i ++) { |
|
415 | + for ($i = 0; $i < mysql_num_rows($rs); $i++) { |
|
416 | 416 | $r = sql_fetch_array($rs); |
417 | 417 | $counties[$r['short']]['de'] = $r['de']; |
418 | 418 | } |
@@ -420,7 +420,7 @@ discard block |
||
420 | 420 | |
421 | 421 | $cachesizes = []; |
422 | 422 | $rs = sql('SELECT `id`, `de` FROM cache_size'); |
423 | - for ($i = 0; $i < mysql_num_rows($rs); $i ++) { |
|
423 | + for ($i = 0; $i < mysql_num_rows($rs); $i++) { |
|
424 | 424 | $r = sql_fetch_array($rs); |
425 | 425 | $cachesizes[$r['id']]['de'] = $r['de']; |
426 | 426 | } |
@@ -428,7 +428,7 @@ discard block |
||
428 | 428 | |
429 | 429 | $languages = []; |
430 | 430 | $rs = sql('SELECT `short`, `de` FROM languages'); |
431 | - for ($i = 0; $i < mysql_num_rows($rs); $i ++) { |
|
431 | + for ($i = 0; $i < mysql_num_rows($rs); $i++) { |
|
432 | 432 | $r = sql_fetch_array($rs); |
433 | 433 | $languages[$r['short']]['de'] = $r['de']; |
434 | 434 | } |
@@ -439,32 +439,32 @@ discard block |
||
439 | 439 | $objecttypes['3'] = 'cachedesc'; |
440 | 440 | $objecttypes['1'] = 'cachelog'; |
441 | 441 | $objecttypes['6'] = 'picture'; |
442 | - $objecttypes['8'] = 'cachelist'; // not implemented yet |
|
442 | + $objecttypes['8'] = 'cachelist'; // not implemented yet |
|
443 | 443 | |
444 | 444 | /* end now a few dynamically loaded constants */ |
445 | 445 | |
446 | 446 | // temporäre Datei erstellen |
447 | - if (!is_dir($zip_basedir . 'ocxml11/' . $sessionid)) { |
|
448 | - mkdir($zip_basedir . 'ocxml11/' . $sessionid); |
|
447 | + if (!is_dir($zip_basedir.'ocxml11/'.$sessionid)) { |
|
448 | + mkdir($zip_basedir.'ocxml11/'.$sessionid); |
|
449 | 449 | } |
450 | 450 | |
451 | 451 | $fileid = 1; |
452 | 452 | while (file_exists( |
453 | - $zip_basedir . 'ocxml11/' . $sessionid . '/' . $sessionid . '-' . $filenr . '-' . $fileid . '.xml' |
|
453 | + $zip_basedir.'ocxml11/'.$sessionid.'/'.$sessionid.'-'.$filenr.'-'.$fileid.'.xml' |
|
454 | 454 | )) { |
455 | - $fileid ++; |
|
455 | + $fileid++; |
|
456 | 456 | } |
457 | 457 | |
458 | - $xmlfilename = $zip_basedir . 'ocxml11/' . $sessionid . '/' . $sessionid . '-' . $filenr . '-' . $fileid . '.xml'; |
|
458 | + $xmlfilename = $zip_basedir.'ocxml11/'.$sessionid.'/'.$sessionid.'-'.$filenr.'-'.$fileid.'.xml'; |
|
459 | 459 | |
460 | 460 | $f = fopen($xmlfilename, 'w'); |
461 | 461 | |
462 | 462 | if ($bXmlDecl == '1') { |
463 | 463 | if ($sCharset == 'iso-8859-1') { |
464 | - fwrite($f, '<?xml version="1.0" encoding="iso-8859-1" standalone="no" ?>' . "\n"); |
|
464 | + fwrite($f, '<?xml version="1.0" encoding="iso-8859-1" standalone="no" ?>'."\n"); |
|
465 | 465 | } else { |
466 | 466 | if ($sCharset == 'utf-8') { |
467 | - fwrite($f, '<?xml version="1.0" encoding="UTF-8" standalone="no" ?>' . "\n"); |
|
467 | + fwrite($f, '<?xml version="1.0" encoding="UTF-8" standalone="no" ?>'."\n"); |
|
468 | 468 | } |
469 | 469 | } |
470 | 470 | } |
@@ -472,7 +472,7 @@ discard block |
||
472 | 472 | if ($bDocType == '1') { |
473 | 473 | fwrite( |
474 | 474 | $f, |
475 | - '<!DOCTYPE oc11xml PUBLIC "-//Opencaching Network//DTD OCXml V 1.' . ($ocxmlversion % 10) . '//EN" "http://www.opencaching.de/xml/ocxml' . $ocxmlversion . '.dtd">' . "\n" |
|
475 | + '<!DOCTYPE oc11xml PUBLIC "-//Opencaching Network//DTD OCXml V 1.'.($ocxmlversion % 10).'//EN" "http://www.opencaching.de/xml/ocxml'.$ocxmlversion.'.dtd">'."\n" |
|
476 | 476 | ); |
477 | 477 | } |
478 | 478 | if ($bOcXmlTag == '1') { |
@@ -480,30 +480,30 @@ discard block |
||
480 | 480 | $r = sql_fetch_array($rs); |
481 | 481 | fwrite( |
482 | 482 | $f, |
483 | - '<oc11xml version="1.' . ($ocxmlversion % 10) . '" date="' . date( |
|
483 | + '<oc11xml version="1.'.($ocxmlversion % 10).'" date="'.date( |
|
484 | 484 | $sDateformat, |
485 | 485 | strtotime($r['date_created']) |
486 | - ) . '" since="' . date($sDateformat, strtotime($r['modified_since'])) . '">' . "\n" |
|
486 | + ).'" since="'.date($sDateformat, strtotime($r['modified_since'])).'">'."\n" |
|
487 | 487 | ); |
488 | 488 | mysql_free_result($rs); |
489 | 489 | } |
490 | 490 | |
491 | 491 | if ($bAttrlist == '1') { |
492 | 492 | $rs = sql("SELECT SQL_BUFFER_RESULT `id`, `name`, `icon_large`, `icon_no`, `icon_undef` FROM `cache_attrib`"); |
493 | - fwrite($f, $t1 . '<attrlist>' . "\n"); |
|
493 | + fwrite($f, $t1.'<attrlist>'."\n"); |
|
494 | 494 | while ($r = sql_fetch_assoc($rs)) { |
495 | 495 | fwrite( |
496 | 496 | $f, |
497 | - $t2 . '<attr id="' . $r['id'] . '" icon_large="' . xmlentities( |
|
498 | - $opt['page']['default_absolute_url'] . $r['icon_large'] |
|
499 | - ) . '" icon_no="' . xmlentities( |
|
500 | - $opt['page']['default_absolute_url'] . $r['icon_no'] |
|
501 | - ) . '" icon_undef="' . xmlentities( |
|
502 | - $opt['page']['default_absolute_url'] . $r['icon_undef'] |
|
503 | - ) . '">' . xmlcdata($r['name']) . '</attr>' . "\n" |
|
497 | + $t2.'<attr id="'.$r['id'].'" icon_large="'.xmlentities( |
|
498 | + $opt['page']['default_absolute_url'].$r['icon_large'] |
|
499 | + ).'" icon_no="'.xmlentities( |
|
500 | + $opt['page']['default_absolute_url'].$r['icon_no'] |
|
501 | + ).'" icon_undef="'.xmlentities( |
|
502 | + $opt['page']['default_absolute_url'].$r['icon_undef'] |
|
503 | + ).'">'.xmlcdata($r['name']).'</attr>'."\n" |
|
504 | 504 | ); |
505 | 505 | } |
506 | - fwrite($f, $t1 . '</attrlist>' . "\n"); |
|
506 | + fwrite($f, $t1.'</attrlist>'."\n"); |
|
507 | 507 | sql_free_result($rs); |
508 | 508 | } |
509 | 509 | |
@@ -511,18 +511,18 @@ discard block |
||
511 | 511 | '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`' |
512 | 512 | ); |
513 | 513 | while ($r = sql_fetch_array($rs)) { |
514 | - fwrite($f, $t1 . '<user>' . "\n"); |
|
514 | + fwrite($f, $t1.'<user>'."\n"); |
|
515 | 515 | |
516 | - fwrite($f, $t2 . '<id id="' . $r['id'] . '" node="' . $r['node'] . '">' . $r['uuid'] . '</id>' . "\n"); |
|
517 | - fwrite($f, $t2 . '<username>' . xmlcdata($r['username']) . '</username>' . "\n"); |
|
518 | - fwrite($f, $t2 . '<pmr>' . (($r['pmr_flag'] == 0) ? '0' : '1') . '</pmr>' . "\n"); |
|
519 | - fwrite($f, $t2 . '<datecreated>' . date($sDateformat, strtotime($r['date_created'])) . '</datecreated>' . "\n"); |
|
516 | + fwrite($f, $t2.'<id id="'.$r['id'].'" node="'.$r['node'].'">'.$r['uuid'].'</id>'."\n"); |
|
517 | + fwrite($f, $t2.'<username>'.xmlcdata($r['username']).'</username>'."\n"); |
|
518 | + fwrite($f, $t2.'<pmr>'.(($r['pmr_flag'] == 0) ? '0' : '1').'</pmr>'."\n"); |
|
519 | + fwrite($f, $t2.'<datecreated>'.date($sDateformat, strtotime($r['date_created'])).'</datecreated>'."\n"); |
|
520 | 520 | fwrite( |
521 | 521 | $f, |
522 | - $t2 . '<lastmodified>' . date($sDateformat, strtotime($r['last_modified'])) . '</lastmodified>' . "\n" |
|
522 | + $t2.'<lastmodified>'.date($sDateformat, strtotime($r['last_modified'])).'</lastmodified>'."\n" |
|
523 | 523 | ); |
524 | 524 | |
525 | - fwrite($f, $t1 . '</user>' . "\n"); |
|
525 | + fwrite($f, $t1.'</user>'."\n"); |
|
526 | 526 | } |
527 | 527 | mysql_free_result($rs); |
528 | 528 | |
@@ -551,8 +551,8 @@ discard block |
||
551 | 551 | } // return as micro in old interface version |
552 | 552 | |
553 | 553 | if ($ocxmlversion >= 15) { |
554 | - $statusflags = ' needs_maintenance="' . $r['needs_maintenance'] . '" listing_outdated="' . $r['listing_outdated'] . '"'; |
|
555 | - $gccom2 = ' gccom2="' . xmlentities($r['wp_gc_maintained']) . '"'; |
|
554 | + $statusflags = ' needs_maintenance="'.$r['needs_maintenance'].'" listing_outdated="'.$r['listing_outdated'].'"'; |
|
555 | + $gccom2 = ' gccom2="'.xmlentities($r['wp_gc_maintained']).'"'; |
|
556 | 556 | $nccom = ''; |
557 | 557 | } else { |
558 | 558 | $statusflags = ''; |
@@ -560,74 +560,74 @@ discard block |
||
560 | 560 | $nccom = ' nccom=""'; |
561 | 561 | } |
562 | 562 | |
563 | - fwrite($f, $t1 . '<cache>' . "\n"); |
|
563 | + fwrite($f, $t1.'<cache>'."\n"); |
|
564 | 564 | |
565 | - fwrite($f, $t2 . '<id id="' . $r['id'] . '" node="' . $r['node'] . '">' . $r['uuid'] . '</id>' . "\n"); |
|
565 | + fwrite($f, $t2.'<id id="'.$r['id'].'" node="'.$r['node'].'">'.$r['uuid'].'</id>'."\n"); |
|
566 | 566 | fwrite( |
567 | 567 | $f, |
568 | - $t2 . '<userid id="' . $r['user_id'] . '" uuid="' . $r['useruuid'] . '">' . xmlcdata( |
|
568 | + $t2.'<userid id="'.$r['user_id'].'" uuid="'.$r['useruuid'].'">'.xmlcdata( |
|
569 | 569 | $r['username'] |
570 | - ) . '</userid>' . "\n" |
|
570 | + ).'</userid>'."\n" |
|
571 | 571 | ); |
572 | - fwrite($f, $t2 . '<name>' . xmlcdata(($bAllowView ? $r['name'] : '')) . '</name>' . "\n"); |
|
572 | + fwrite($f, $t2.'<name>'.xmlcdata(($bAllowView ? $r['name'] : '')).'</name>'."\n"); |
|
573 | 573 | fwrite( |
574 | 574 | $f, |
575 | - $t2 . '<longitude>' . sprintf('%01.5f', ($bAllowView ? $r['longitude'] : 0)) . '</longitude>' . "\n" |
|
575 | + $t2.'<longitude>'.sprintf('%01.5f', ($bAllowView ? $r['longitude'] : 0)).'</longitude>'."\n" |
|
576 | 576 | ); |
577 | - fwrite($f, $t2 . '<latitude>' . sprintf('%01.5f', ($bAllowView ? $r['latitude'] : 0)) . '</latitude>' . "\n"); |
|
577 | + fwrite($f, $t2.'<latitude>'.sprintf('%01.5f', ($bAllowView ? $r['latitude'] : 0)).'</latitude>'."\n"); |
|
578 | 578 | fwrite( |
579 | 579 | $f, |
580 | - $t2 . '<type id="' . $r['type'] . '" short="' . xmlentities( |
|
580 | + $t2.'<type id="'.$r['type'].'" short="'.xmlentities( |
|
581 | 581 | $cachetypes[$r['type']]['short'] |
582 | - ) . '">' . xmlcdata($cachetypes[$r['type']]['de']) . '</type>' . "\n" |
|
582 | + ).'">'.xmlcdata($cachetypes[$r['type']]['de']).'</type>'."\n" |
|
583 | 583 | ); |
584 | 584 | fwrite( |
585 | 585 | $f, |
586 | - $t2 . '<status id="' . $r['status'] . '"' . $statusflags . '>' . xmlcdata( |
|
586 | + $t2.'<status id="'.$r['status'].'"'.$statusflags.'>'.xmlcdata( |
|
587 | 587 | $cachestatus[$r['status']]['de'] |
588 | - ) . '</status>' . "\n" |
|
588 | + ).'</status>'."\n" |
|
589 | 589 | ); |
590 | 590 | fwrite( |
591 | 591 | $f, |
592 | - $t2 . '<country id="' . $r['country'] . '">' . xmlcdata( |
|
592 | + $t2.'<country id="'.$r['country'].'">'.xmlcdata( |
|
593 | 593 | $counties[$r['country']]['de'] |
594 | - ) . '</country>' . "\n" |
|
594 | + ).'</country>'."\n" |
|
595 | 595 | ); |
596 | - fwrite($f, $t2 . '<size id="' . $r['size'] . '">' . xmlcdata($cachesizes[$r['size']]['de']) . '</size>' . "\n"); |
|
597 | - fwrite($f, $t2 . '<desclanguages>' . $r['desclanguages'] . '</desclanguages>' . "\n"); |
|
598 | - fwrite($f, $t2 . '<difficulty>' . sprintf('%01.1f', $r['difficulty'] / 2) . '</difficulty>' . "\n"); |
|
599 | - fwrite($f, $t2 . '<terrain>' . sprintf('%01.1f', $r['terrain'] / 2) . '</terrain>' . "\n"); |
|
600 | - fwrite($f, $t2 . '<rating waylength="' . $r['way_length'] . '" needtime="' . $r['search_time'] . '" />' . "\n"); |
|
596 | + fwrite($f, $t2.'<size id="'.$r['size'].'">'.xmlcdata($cachesizes[$r['size']]['de']).'</size>'."\n"); |
|
597 | + fwrite($f, $t2.'<desclanguages>'.$r['desclanguages'].'</desclanguages>'."\n"); |
|
598 | + fwrite($f, $t2.'<difficulty>'.sprintf('%01.1f', $r['difficulty'] / 2).'</difficulty>'."\n"); |
|
599 | + fwrite($f, $t2.'<terrain>'.sprintf('%01.1f', $r['terrain'] / 2).'</terrain>'."\n"); |
|
600 | + fwrite($f, $t2.'<rating waylength="'.$r['way_length'].'" needtime="'.$r['search_time'].'" />'."\n"); |
|
601 | 601 | fwrite( |
602 | 602 | $f, |
603 | - $t2 . '<waypoints oc="' . xmlentities($r['wp_oc']) . '" gccom="' . xmlentities( |
|
603 | + $t2.'<waypoints oc="'.xmlentities($r['wp_oc']).'" gccom="'.xmlentities( |
|
604 | 604 | $r['wp_gc'] |
605 | - ) . '"' . $gccom2 . $nccom . ' />' . "\n" |
|
605 | + ).'"'.$gccom2.$nccom.' />'."\n" |
|
606 | 606 | ); |
607 | - fwrite($f, $t2 . '<datehidden>' . date($sDateformat, strtotime($r['date_hidden'])) . '</datehidden>' . "\n"); |
|
607 | + fwrite($f, $t2.'<datehidden>'.date($sDateformat, strtotime($r['date_hidden'])).'</datehidden>'."\n"); |
|
608 | 608 | if ($ocxmlversion >= 12) { |
609 | - $pd = ' ispublishdate="' . $r['is_publishdate'] . '"'; |
|
609 | + $pd = ' ispublishdate="'.$r['is_publishdate'].'"'; |
|
610 | 610 | } else { |
611 | 611 | $pd = ""; |
612 | 612 | } |
613 | 613 | fwrite( |
614 | 614 | $f, |
615 | - $t2 . '<datecreated' . $pd . '>' . date( |
|
615 | + $t2.'<datecreated'.$pd.'>'.date( |
|
616 | 616 | $sDateformat, |
617 | 617 | strtotime($r['date_created']) |
618 | - ) . '</datecreated>' . "\n" |
|
618 | + ).'</datecreated>'."\n" |
|
619 | 619 | ); |
620 | 620 | fwrite( |
621 | 621 | $f, |
622 | - $t2 . '<lastmodified>' . date($sDateformat, strtotime($r['last_modified'])) . '</lastmodified>' . "\n" |
|
622 | + $t2.'<lastmodified>'.date($sDateformat, strtotime($r['last_modified'])).'</lastmodified>'."\n" |
|
623 | 623 | ); |
624 | 624 | if ($ocxmlversion >= 14) { |
625 | 625 | fwrite( |
626 | 626 | $f, |
627 | - $t2 . '<listing_lastmodified>' . date( |
|
627 | + $t2.'<listing_lastmodified>'.date( |
|
628 | 628 | $sDateformat, |
629 | 629 | strtotime($r['listing_last_modified']) |
630 | - ) . '</listing_lastmodified>' . "\n" |
|
630 | + ).'</listing_lastmodified>'."\n" |
|
631 | 631 | ); |
632 | 632 | } |
633 | 633 | |
@@ -638,16 +638,16 @@ discard block |
||
638 | 638 | WHERE `caches_attributes`.`cache_id`='&1'", |
639 | 639 | $r['id'] |
640 | 640 | ); |
641 | - fwrite($f, $t2 . '<attributes>' . "\n"); |
|
641 | + fwrite($f, $t2.'<attributes>'."\n"); |
|
642 | 642 | while ($rAttribute = sql_fetch_assoc($rsAttributes)) { |
643 | 643 | fwrite( |
644 | 644 | $f, |
645 | - $t3 . '<attribute id="' . ($rAttribute['id'] + 0) . '">' . xmlcdata( |
|
645 | + $t3.'<attribute id="'.($rAttribute['id'] + 0).'">'.xmlcdata( |
|
646 | 646 | $rAttribute['name'] |
647 | - ) . '</attribute>' . "\n" |
|
647 | + ).'</attribute>'."\n" |
|
648 | 648 | ); |
649 | 649 | } |
650 | - fwrite($f, $t2 . '</attributes>' . "\n"); |
|
650 | + fwrite($f, $t2.'</attributes>'."\n"); |
|
651 | 651 | sql_free_result($rsAttributes); |
652 | 652 | |
653 | 653 | if ($ocxmlversion >= 13) { |
@@ -662,23 +662,23 @@ discard block |
||
662 | 662 | ORDER BY `coordinates`.`id` ASC", |
663 | 663 | $r['id'] |
664 | 664 | ); |
665 | - fwrite($f, $t2 . '<wpts>' . "\n"); |
|
665 | + fwrite($f, $t2.'<wpts>'."\n"); |
|
666 | 666 | while ($rWaypoint = sql_fetch_assoc($rsWaypoints)) { |
667 | 667 | fwrite( |
668 | 668 | $f, |
669 | - $t3 . '<wpt id="' . ($rWaypoint['id'] + 0) . '" type="' . ($rWaypoint['type'] + 0) . '" typename="' . xmlentities( |
|
669 | + $t3.'<wpt id="'.($rWaypoint['id'] + 0).'" type="'.($rWaypoint['type'] + 0).'" typename="'.xmlentities( |
|
670 | 670 | $rWaypoint['type_name'] |
671 | - ) . '" longitude="' . sprintf('%01.5f', $rWaypoint['longitude']) . '" latitude="' . sprintf( |
|
671 | + ).'" longitude="'.sprintf('%01.5f', $rWaypoint['longitude']).'" latitude="'.sprintf( |
|
672 | 672 | '%01.5f', |
673 | 673 | $rWaypoint['latitude'] |
674 | - ) . '">' . xmlcdata($rWaypoint['description']) . '</wpt>' . "\n" |
|
674 | + ).'">'.xmlcdata($rWaypoint['description']).'</wpt>'."\n" |
|
675 | 675 | ); |
676 | 676 | } |
677 | - fwrite($f, $t2 . '</wpts>' . "\n"); |
|
677 | + fwrite($f, $t2.'</wpts>'."\n"); |
|
678 | 678 | sql_free_result($rsWaypoints); |
679 | 679 | } |
680 | 680 | |
681 | - fwrite($f, $t1 . '</cache>' . "\n"); |
|
681 | + fwrite($f, $t1.'</cache>'."\n"); |
|
682 | 682 | } |
683 | 683 | mysql_free_result($rs); |
684 | 684 | |
@@ -698,18 +698,18 @@ discard block |
||
698 | 698 | while ($r = sql_fetch_array($rs)) { |
699 | 699 | $bAllowView = ($r['allow_user_view'] == 1); |
700 | 700 | |
701 | - fwrite($f, $t1 . '<cachedesc>' . "\n"); |
|
701 | + fwrite($f, $t1.'<cachedesc>'."\n"); |
|
702 | 702 | |
703 | - fwrite($f, $t2 . '<id id="' . $r['id'] . '" node="' . $r['node'] . '">' . $r['uuid'] . '</id>' . "\n"); |
|
704 | - fwrite($f, $t2 . '<cacheid id="' . $r['cache_id'] . '">' . $r['cacheuuid'] . '</cacheid>' . "\n"); |
|
703 | + fwrite($f, $t2.'<id id="'.$r['id'].'" node="'.$r['node'].'">'.$r['uuid'].'</id>'."\n"); |
|
704 | + fwrite($f, $t2.'<cacheid id="'.$r['cache_id'].'">'.$r['cacheuuid'].'</cacheid>'."\n"); |
|
705 | 705 | |
706 | 706 | fwrite( |
707 | 707 | $f, |
708 | - $t2 . '<language id="' . $r['language'] . '">' . xmlcdata( |
|
708 | + $t2.'<language id="'.$r['language'].'">'.xmlcdata( |
|
709 | 709 | $languages[$r['language']]['de'] |
710 | - ) . '</language>' . "\n" |
|
710 | + ).'</language>'."\n" |
|
711 | 711 | ); |
712 | - fwrite($f, $t2 . '<shortdesc>' . xmlcdata(($bAllowView ? $r['short_desc'] : '')) . '</shortdesc>' . "\n"); |
|
712 | + fwrite($f, $t2.'<shortdesc>'.xmlcdata(($bAllowView ? $r['short_desc'] : '')).'</shortdesc>'."\n"); |
|
713 | 713 | |
714 | 714 | $desc = $r['desc']; |
715 | 715 | if ($r['desc_html'] == 0) { |
@@ -728,10 +728,10 @@ discard block |
||
728 | 728 | true |
729 | 729 | ); |
730 | 730 | if ($bLicense) { |
731 | - fwrite($f, $t2 . '<license>' . xmlcdata($disclaimer) . '</license>' . "\n"); |
|
731 | + fwrite($f, $t2.'<license>'.xmlcdata($disclaimer).'</license>'."\n"); |
|
732 | 732 | } else { |
733 | 733 | if ($disclaimer != "") { |
734 | - $desc .= "<p><em>" . $disclaimer . "</em></p>"; |
|
734 | + $desc .= "<p><em>".$disclaimer."</em></p>"; |
|
735 | 735 | } |
736 | 736 | } |
737 | 737 | |
@@ -739,21 +739,21 @@ discard block |
||
739 | 739 | |
740 | 740 | fwrite( |
741 | 741 | $f, |
742 | - $t2 . '<desc html="' . (($r['desc_html'] == 1) ? '1' : '0') . '">' . xmlcdata( |
|
742 | + $t2.'<desc html="'.(($r['desc_html'] == 1) ? '1' : '0').'">'.xmlcdata( |
|
743 | 743 | ($bAllowView ? $desc : '') |
744 | - ) . '</desc>' . "\n" |
|
744 | + ).'</desc>'."\n" |
|
745 | 745 | ); |
746 | 746 | |
747 | 747 | $r['hint'] = mb_ereg_replace('<br />', '', $r['hint']); |
748 | 748 | $r['hint'] = html_entity_decode($r['hint'], ENT_COMPAT, 'UTF-8'); |
749 | 749 | |
750 | - fwrite($f, $t2 . '<hint>' . xmlcdata(($bAllowView ? $r['hint'] : '')) . '</hint>' . "\n"); |
|
750 | + fwrite($f, $t2.'<hint>'.xmlcdata(($bAllowView ? $r['hint'] : '')).'</hint>'."\n"); |
|
751 | 751 | fwrite( |
752 | 752 | $f, |
753 | - $t2 . '<lastmodified>' . date($sDateformat, strtotime($r['last_modified'])) . '</lastmodified>' . "\n" |
|
753 | + $t2.'<lastmodified>'.date($sDateformat, strtotime($r['last_modified'])).'</lastmodified>'."\n" |
|
754 | 754 | ); |
755 | 755 | |
756 | - fwrite($f, $t1 . '</cachedesc>' . "\n"); |
|
756 | + fwrite($f, $t1.'</cachedesc>'."\n"); |
|
757 | 757 | } |
758 | 758 | mysql_free_result($rs); |
759 | 759 | |
@@ -794,7 +794,7 @@ discard block |
||
794 | 794 | } |
795 | 795 | |
796 | 796 | if ($ocxmlversion >= 13) { |
797 | - $teamcomment = ' teamcomment="' . $r['oc_team_comment'] . '"'; |
|
797 | + $teamcomment = ' teamcomment="'.$r['oc_team_comment'].'"'; |
|
798 | 798 | } else { |
799 | 799 | $teamcomment = ''; |
800 | 800 | if ($r['type'] > 8) { |
@@ -803,51 +803,51 @@ discard block |
||
803 | 803 | } |
804 | 804 | |
805 | 805 | if ($ocxmlversion >= 15) { |
806 | - $statusflags = ' needs_maintenance="' . $r['needs_maintenance'] . '" listing_outdated="' . $r['listing_outdated'] . '"'; |
|
806 | + $statusflags = ' needs_maintenance="'.$r['needs_maintenance'].'" listing_outdated="'.$r['listing_outdated'].'"'; |
|
807 | 807 | } else { |
808 | 808 | $statusflags = ''; |
809 | 809 | } |
810 | 810 | |
811 | - fwrite($f, $t1 . '<cachelog>' . "\n"); |
|
812 | - fwrite($f, $t2 . '<id id="' . $r['id'] . '" node="' . $r['node'] . '">' . $r['uuid'] . '</id>' . "\n"); |
|
813 | - fwrite($f, $t2 . '<cacheid id="' . $r['cache_id'] . '">' . $r['cacheuuid'] . '</cacheid>' . "\n"); |
|
811 | + fwrite($f, $t1.'<cachelog>'."\n"); |
|
812 | + fwrite($f, $t2.'<id id="'.$r['id'].'" node="'.$r['node'].'">'.$r['uuid'].'</id>'."\n"); |
|
813 | + fwrite($f, $t2.'<cacheid id="'.$r['cache_id'].'">'.$r['cacheuuid'].'</cacheid>'."\n"); |
|
814 | 814 | fwrite( |
815 | 815 | $f, |
816 | - $t2 . '<userid id="' . $r['user_id'] . '" uuid="' . $r['useruuid'] . '">' . xmlcdata( |
|
816 | + $t2.'<userid id="'.$r['user_id'].'" uuid="'.$r['useruuid'].'">'.xmlcdata( |
|
817 | 817 | $r['username'] |
818 | - ) . '</userid>' . "\n" |
|
818 | + ).'</userid>'."\n" |
|
819 | 819 | ); |
820 | 820 | fwrite( |
821 | 821 | $f, |
822 | - $t2 . '<logtype id="' . $r['type'] . '" recommended="' . $r['recommended'] . '"' . $teamcomment . $statusflags . '>' . xmlcdata( |
|
822 | + $t2.'<logtype id="'.$r['type'].'" recommended="'.$r['recommended'].'"'.$teamcomment.$statusflags.'>'.xmlcdata( |
|
823 | 823 | $logtypes[$r['type']] |
824 | - ) . '</logtype>' . "\n" |
|
824 | + ).'</logtype>'."\n" |
|
825 | 825 | ); |
826 | 826 | fwrite( |
827 | 827 | $f, |
828 | - $t2 . '<date>' . date( |
|
828 | + $t2.'<date>'.date( |
|
829 | 829 | $ocxmlversion >= 13 ? $sDateformat : $sDateshort, |
830 | 830 | strtotime($r['date']) |
831 | - ) . '</date>' . "\n" |
|
831 | + ).'</date>'."\n" |
|
832 | 832 | ); |
833 | 833 | fwrite( |
834 | 834 | $f, |
835 | - $t2 . '<text html="' . $r['text_html'] . '">' . xmlcdata( |
|
835 | + $t2.'<text html="'.$r['text_html'].'">'.xmlcdata( |
|
836 | 836 | ($bAllowView ? $r['text'] : '') |
837 | - ) . '</text>' . "\n" |
|
837 | + ).'</text>'."\n" |
|
838 | 838 | ); |
839 | - fwrite($f, $t2 . '<datecreated>' . date($sDateformat, strtotime($r['date_created'])) . '</datecreated>' . "\n"); |
|
839 | + fwrite($f, $t2.'<datecreated>'.date($sDateformat, strtotime($r['date_created'])).'</datecreated>'."\n"); |
|
840 | 840 | fwrite( |
841 | 841 | $f, |
842 | - $t2 . '<lastmodified>' . date($sDateformat, strtotime($r['last_modified'])) . '</lastmodified>' . "\n" |
|
842 | + $t2.'<lastmodified>'.date($sDateformat, strtotime($r['last_modified'])).'</lastmodified>'."\n" |
|
843 | 843 | ); |
844 | 844 | if ($ocxmlversion >= 14) { |
845 | 845 | fwrite( |
846 | 846 | $f, |
847 | - $t2 . '<log_lastmodified>' . date( |
|
847 | + $t2.'<log_lastmodified>'.date( |
|
848 | 848 | $sDateformat, |
849 | 849 | strtotime($r['log_last_modified']) |
850 | - ) . '</log_lastmodified>' . "\n" |
|
850 | + ).'</log_lastmodified>'."\n" |
|
851 | 851 | ); |
852 | 852 | } |
853 | 853 | |
@@ -862,10 +862,10 @@ discard block |
||
862 | 862 | false, |
863 | 863 | true |
864 | 864 | ); |
865 | - fwrite($f, $t2 . '<license>' . xmlcdata($disclaimer) . '</license>' . "\n"); |
|
865 | + fwrite($f, $t2.'<license>'.xmlcdata($disclaimer).'</license>'."\n"); |
|
866 | 866 | } |
867 | 867 | |
868 | - fwrite($f, $t1 . '</cachelog>' . "\n"); |
|
868 | + fwrite($f, $t1.'</cachelog>'."\n"); |
|
869 | 869 | } |
870 | 870 | mysql_free_result($rs); |
871 | 871 | |
@@ -895,30 +895,30 @@ discard block |
||
895 | 895 | while ($r = sql_fetch_array($rs)) { |
896 | 896 | $bAllowView = ($r['auv'] == 1); |
897 | 897 | |
898 | - fwrite($f, $t1 . '<picture>' . "\n"); |
|
899 | - fwrite($f, $t2 . '<id id="' . $r['id'] . '" node="' . $r['node'] . '">' . $r['uuid'] . '</id>' . "\n"); |
|
900 | - fwrite($f, $t2 . '<url>' . xmlcdata(($bAllowView ? $r['url'] : '')) . '</url>' . "\n"); |
|
901 | - fwrite($f, $t2 . '<title>' . xmlcdata(($bAllowView ? $r['title'] : '')) . '</title>' . "\n"); |
|
898 | + fwrite($f, $t1.'<picture>'."\n"); |
|
899 | + fwrite($f, $t2.'<id id="'.$r['id'].'" node="'.$r['node'].'">'.$r['uuid'].'</id>'."\n"); |
|
900 | + fwrite($f, $t2.'<url>'.xmlcdata(($bAllowView ? $r['url'] : '')).'</url>'."\n"); |
|
901 | + fwrite($f, $t2.'<title>'.xmlcdata(($bAllowView ? $r['title'] : '')).'</title>'."\n"); |
|
902 | 902 | fwrite( |
903 | 903 | $f, |
904 | - $t2 . '<object id="' . $r['object_id'] . '" type="' . $r['object_type'] . '" typename="' . xmlentities( |
|
904 | + $t2.'<object id="'.$r['object_id'].'" type="'.$r['object_type'].'" typename="'.xmlentities( |
|
905 | 905 | $objecttypes[$r['object_type']] |
906 | - ) . '">' . object_id2uuid($r['object_id'], $r['object_type']) . '</object>' . "\n" |
|
906 | + ).'">'.object_id2uuid($r['object_id'], $r['object_type']).'</object>'."\n" |
|
907 | 907 | ); |
908 | 908 | if ($ocxmlversion >= 13) { |
909 | 909 | fwrite( |
910 | 910 | $f, |
911 | - $t2 . '<picattr spoiler="' . $r['spoiler'] . '" display="' . $r['display'] . '" preview="' . $r['mappreview'] . '" />' . "\n" |
|
911 | + $t2.'<picattr spoiler="'.$r['spoiler'].'" display="'.$r['display'].'" preview="'.$r['mappreview'].'" />'."\n" |
|
912 | 912 | ); |
913 | 913 | } else { |
914 | - fwrite($f, $t2 . '<attributes spoiler="' . $r['spoiler'] . '" display="' . $r['display'] . '" />' . "\n"); |
|
914 | + fwrite($f, $t2.'<attributes spoiler="'.$r['spoiler'].'" display="'.$r['display'].'" />'."\n"); |
|
915 | 915 | } |
916 | - fwrite($f, $t2 . '<datecreated>' . date($sDateformat, strtotime($r['date_created'])) . '</datecreated>' . "\n"); |
|
916 | + fwrite($f, $t2.'<datecreated>'.date($sDateformat, strtotime($r['date_created'])).'</datecreated>'."\n"); |
|
917 | 917 | fwrite( |
918 | 918 | $f, |
919 | - $t2 . '<lastmodified>' . date($sDateformat, strtotime($r['last_modified'])) . '</lastmodified>' . "\n" |
|
919 | + $t2.'<lastmodified>'.date($sDateformat, strtotime($r['last_modified'])).'</lastmodified>'."\n" |
|
920 | 920 | ); |
921 | - fwrite($f, $t2 . '<position>' . $r['seq'] . '</position>' . "\n"); |
|
921 | + fwrite($f, $t2.'<position>'.$r['seq'].'</position>'."\n"); |
|
922 | 922 | |
923 | 923 | if ($bLicense) { |
924 | 924 | $lang = ($sLanguage != "" ? $sLanguage : $r['language']); |
@@ -931,10 +931,10 @@ discard block |
||
931 | 931 | false, |
932 | 932 | true |
933 | 933 | ); |
934 | - fwrite($f, $t2 . '<license>' . xmlcdata($disclaimer) . '</license>' . "\n"); |
|
934 | + fwrite($f, $t2.'<license>'.xmlcdata($disclaimer).'</license>'."\n"); |
|
935 | 935 | } |
936 | 936 | |
937 | - fwrite($f, $t1 . '</picture>' . "\n"); |
|
937 | + fwrite($f, $t1.'</picture>'."\n"); |
|
938 | 938 | } |
939 | 939 | mysql_free_result($rs); |
940 | 940 | |
@@ -944,31 +944,31 @@ discard block |
||
944 | 944 | FROM `tmpxml_removedobjects`, `removed_objects` WHERE `removed_objects`.`id`=`tmpxml_removedobjects`.`id`' |
945 | 945 | ); |
946 | 946 | while ($r = sql_fetch_array($rs)) { |
947 | - fwrite($f, $t1 . '<removedobject>' . "\n"); |
|
948 | - fwrite($f, $t2 . '<id id="' . $r['id'] . '" node="' . $r['node'] . '" />' . "\n"); |
|
947 | + fwrite($f, $t1.'<removedobject>'."\n"); |
|
948 | + fwrite($f, $t2.'<id id="'.$r['id'].'" node="'.$r['node'].'" />'."\n"); |
|
949 | 949 | fwrite( |
950 | 950 | $f, |
951 | - $t2 . '<object id="' . $r['localid'] . '" type="' . $r['type'] . '" typename="' . xmlentities( |
|
951 | + $t2.'<object id="'.$r['localid'].'" type="'.$r['type'].'" typename="'.xmlentities( |
|
952 | 952 | $objecttypes[$r['type']] |
953 | - ) . '">' . $r['uuid'] . '</object>' . "\n" |
|
953 | + ).'">'.$r['uuid'].'</object>'."\n" |
|
954 | 954 | ); |
955 | - fwrite($f, $t2 . '<removeddate>' . date($sDateformat, strtotime($r['removed_date'])) . '</removeddate>' . "\n"); |
|
956 | - fwrite($f, $t1 . '</removedobject>' . "\n"); |
|
955 | + fwrite($f, $t2.'<removeddate>'.date($sDateformat, strtotime($r['removed_date'])).'</removeddate>'."\n"); |
|
956 | + fwrite($f, $t1.'</removedobject>'."\n"); |
|
957 | 957 | } |
958 | 958 | mysql_free_result($rs); |
959 | 959 | |
960 | 960 | if ($bOcXmlTag == '1') { |
961 | - fwrite($f, '</oc11xml>' . "\n"); |
|
961 | + fwrite($f, '</oc11xml>'."\n"); |
|
962 | 962 | } |
963 | 963 | |
964 | 964 | fclose($f); |
965 | 965 | |
966 | - $rel_xmlfile = 'ocxml11/' . $sessionid . '/' . $sessionid . '-' . $filenr . '-' . $fileid . '.xml'; |
|
967 | - $rel_zipfile = 'ocxml11/' . $sessionid . '/' . $sessionid . '-' . $filenr . '-' . $fileid; |
|
966 | + $rel_xmlfile = 'ocxml11/'.$sessionid.'/'.$sessionid.'-'.$filenr.'-'.$fileid.'.xml'; |
|
967 | + $rel_zipfile = 'ocxml11/'.$sessionid.'/'.$sessionid.'-'.$filenr.'-'.$fileid; |
|
968 | 968 | |
969 | 969 | // zippen und url-redirect |
970 | 970 | if ($ziptype == '0') { |
971 | - tpl_redirect($zip_wwwdir . $rel_xmlfile); |
|
971 | + tpl_redirect($zip_wwwdir.$rel_xmlfile); |
|
972 | 972 | exit; |
973 | 973 | } else { |
974 | 974 | if ($ziptype == 'zip') { |
@@ -986,17 +986,17 @@ discard block |
||
986 | 986 | } |
987 | 987 | } |
988 | 988 | |
989 | - $call = $safemode_zip . ' --type=' . escapeshellcmd($ziptype) . ' --src=' . escapeshellcmd( |
|
989 | + $call = $safemode_zip.' --type='.escapeshellcmd($ziptype).' --src='.escapeshellcmd( |
|
990 | 990 | $rel_xmlfile |
991 | - ) . ' --dst=' . escapeshellcmd($rel_zipfile); |
|
991 | + ).' --dst='.escapeshellcmd($rel_zipfile); |
|
992 | 992 | system($call); |
993 | 993 | |
994 | 994 | // datei vorhanden? |
995 | - if (!file_exists($zip_basedir . $rel_zipfile)) { |
|
995 | + if (!file_exists($zip_basedir.$rel_zipfile)) { |
|
996 | 996 | die('all ok, but zip failed - internal server error'); |
997 | 997 | } |
998 | 998 | |
999 | - tpl_redirect($zip_wwwdir . $rel_zipfile); |
|
999 | + tpl_redirect($zip_wwwdir.$rel_zipfile); |
|
1000 | 1000 | |
1001 | 1001 | exit; |
1002 | 1002 | } |
@@ -1048,7 +1048,7 @@ discard block |
||
1048 | 1048 | } |
1049 | 1049 | sql( |
1050 | 1050 | "INSERT INTO xmlsession_data (`session_id`, `object_type`, `object_id`) |
1051 | - SELECT &1, 2, `cache_id` FROM `caches` WHERE " . $wherefield . " >= '&2' AND `status`!=5", |
|
1051 | + SELECT &1, 2, `cache_id` FROM `caches` WHERE " . $wherefield." >= '&2' AND `status`!=5", |
|
1052 | 1052 | $sessionid, |
1053 | 1053 | $sModifiedSince |
1054 | 1054 | ); |
@@ -1137,31 +1137,31 @@ discard block |
||
1137 | 1137 | 'longitude', |
1138 | 1138 | 'latitude', |
1139 | 1139 | 'cache_coordinates' |
1140 | - ) . ' `distance` '; |
|
1140 | + ).' `distance` '; |
|
1141 | 1141 | $sql .= 'FROM `caches`, `cache_coordinates` WHERE '; |
1142 | 1142 | $sql .= '`cache_coordinates`.`cache_id`=`caches`.`cache_id`'; |
1143 | 1143 | $sql .= ' AND `caches`.`status`!=5'; |
1144 | - $sql .= ' AND `cache_coordinates`.`latitude` > ' . geomath::getMinLat( |
|
1144 | + $sql .= ' AND `cache_coordinates`.`latitude` > '.geomath::getMinLat( |
|
1145 | 1145 | $selection['lon'], |
1146 | 1146 | $selection['lat'], |
1147 | 1147 | $selection['distance'] |
1148 | 1148 | ); |
1149 | - $sql .= ' AND `cache_coordinates`.`latitude` < ' . geomath::getMaxLat( |
|
1149 | + $sql .= ' AND `cache_coordinates`.`latitude` < '.geomath::getMaxLat( |
|
1150 | 1150 | $selection['lon'], |
1151 | 1151 | $selection['lat'], |
1152 | 1152 | $selection['distance'] |
1153 | 1153 | ); |
1154 | - $sql .= ' AND `cache_coordinates`.`longitude` >' . geomath::getMinLon( |
|
1154 | + $sql .= ' AND `cache_coordinates`.`longitude` >'.geomath::getMinLon( |
|
1155 | 1155 | $selection['lon'], |
1156 | 1156 | $selection['lat'], |
1157 | 1157 | $selection['distance'] |
1158 | 1158 | ); |
1159 | - $sql .= ' AND `cache_coordinates`.`longitude` < ' . geomath::getMaxLon( |
|
1159 | + $sql .= ' AND `cache_coordinates`.`longitude` < '.geomath::getMaxLon( |
|
1160 | 1160 | $selection['lon'], |
1161 | 1161 | $selection['lat'], |
1162 | 1162 | $selection['distance'] |
1163 | 1163 | ); |
1164 | - $sql .= ' HAVING `distance` < ' . ($selection['distance'] + 0); |
|
1164 | + $sql .= ' HAVING `distance` < '.($selection['distance'] + 0); |
|
1165 | 1165 | |
1166 | 1166 | sql($sql); |
1167 | 1167 | } else { |
@@ -1300,7 +1300,7 @@ discard block |
||
1300 | 1300 | // echo $startat . ' ' . $endat . '<br><br>'; |
1301 | 1301 | // echo '<table>'; |
1302 | 1302 | // echo '<tr><td>sql-start</td><td>sql-count</td><td>count</td><td>begin</td><td>end</td></tr>'; |
1303 | - for ($i = 0; $i < 6; $i ++) { |
|
1303 | + for ($i = 0; $i < 6; $i++) { |
|
1304 | 1304 | if (($startat >= $recordnr[$i]) && ($startat + 500 < $recordnr[$i + 1])) { |
1305 | 1305 | if ($recordnr[$i + 1] - $startat > 500) { |
1306 | 1306 | $limits[$i] = ['start' => $startat - $recordnr[$i], 'count' => 500]; |
@@ -1403,7 +1403,7 @@ discard block |
||
1403 | 1403 | $str = output_convert($str); |
1404 | 1404 | $str = mb_ereg_replace(']]>', ']] >', $str); |
1405 | 1405 | |
1406 | - return '<![CDATA[' . filterevilchars($str) . ']]>'; |
|
1406 | + return '<![CDATA['.filterevilchars($str).']]>'; |
|
1407 | 1407 | } else { |
1408 | 1408 | return xmlentities($str); |
1409 | 1409 | } |
@@ -1422,7 +1422,7 @@ discard block |
||
1422 | 1422 | $from[4] = '\''; |
1423 | 1423 | $to[4] = '''; |
1424 | 1424 | |
1425 | - for ($i = 0; $i <= 4; $i ++) { |
|
1425 | + for ($i = 0; $i <= 4; $i++) { |
|
1426 | 1426 | $str = mb_ereg_replace($from[$i], $to[$i], $str); |
1427 | 1427 | } |
1428 | 1428 | |
@@ -1501,13 +1501,13 @@ discard block |
||
1501 | 1501 | |
1502 | 1502 | $hDir = opendir($path); |
1503 | 1503 | if ($hDir === false) { |
1504 | - ++ $notunlinked; |
|
1504 | + ++$notunlinked; |
|
1505 | 1505 | } else { |
1506 | 1506 | while (false !== ($file = readdir($hDir))) { |
1507 | 1507 | if (($file != '.') && ($file != '..')) { |
1508 | - if (is_dir($path . $file)) { |
|
1509 | - if (unlinkrecursiv($path . $file . '/') == false) { |
|
1510 | - $notunlinked ++; |
|
1508 | + if (is_dir($path.$file)) { |
|
1509 | + if (unlinkrecursiv($path.$file.'/') == false) { |
|
1510 | + $notunlinked++; |
|
1511 | 1511 | } |
1512 | 1512 | } else { |
1513 | 1513 | if ((mb_substr($file, - 4) == '.zip') || |
@@ -1515,9 +1515,9 @@ discard block |
||
1515 | 1515 | (mb_substr($file, - 4) == '.bz2') || |
1516 | 1516 | (mb_substr($file, - 4) == '.xml') |
1517 | 1517 | ) { |
1518 | - @unlink($path . $file); |
|
1518 | + @unlink($path.$file); |
|
1519 | 1519 | } else { |
1520 | - $notunlinked ++; |
|
1520 | + $notunlinked++; |
|
1521 | 1521 | } |
1522 | 1522 | } |
1523 | 1523 | } |
@@ -13,12 +13,12 @@ discard block |
||
13 | 13 | * Unicode Reminder メモ |
14 | 14 | *****************************************************************************/ |
15 | 15 | |
16 | -require_once __DIR__ . '/lib/consts.inc.php'; |
|
16 | +require_once __DIR__.'/lib/consts.inc.php'; |
|
17 | 17 | $opt['gui'] = GUI_HTML; |
18 | -require_once __DIR__ . '/lib/common.inc.php'; |
|
19 | -require_once __DIR__ . '/lib2/logic/logtypes.inc.php'; |
|
20 | -require_once __DIR__ . '/lib/recommendation.inc.php'; |
|
21 | -require_once __DIR__ . '/lib2/edithelper.inc.php'; |
|
18 | +require_once __DIR__.'/lib/common.inc.php'; |
|
19 | +require_once __DIR__.'/lib2/logic/logtypes.inc.php'; |
|
20 | +require_once __DIR__.'/lib/recommendation.inc.php'; |
|
21 | +require_once __DIR__.'/lib2/edithelper.inc.php'; |
|
22 | 22 | |
23 | 23 | //Preprocessing |
24 | 24 | if ($error == false) { |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | tpl_set_var('username', ''); |
35 | 35 | tpl_set_var('message_start', ''); |
36 | 36 | tpl_set_var('message_end', ''); |
37 | - tpl_set_var('target', 'editlog.php?logid=' . urlencode($log_id)); |
|
37 | + tpl_set_var('target', 'editlog.php?logid='.urlencode($log_id)); |
|
38 | 38 | tpl_set_var('message', $login_required); |
39 | 39 | tpl_set_var('helplink', helppagelink('login')); |
40 | 40 | } else { |
@@ -72,8 +72,8 @@ discard block |
||
72 | 72 | if (($log_record !== false && (($log_record['status'] != 6) || ($log_record['cache_user_id'] == $login->userid && $log_record['user_id'] == $login->userid)) && |
73 | 73 | $log_record['status'] != 7) || $useradmin |
74 | 74 | ) { |
75 | - require $stylepath . '/editlog.inc.php'; |
|
76 | - require $stylepath . '/rating.inc.php'; |
|
75 | + require $stylepath.'/editlog.inc.php'; |
|
76 | + require $stylepath.'/rating.inc.php'; |
|
77 | 77 | |
78 | 78 | if ($log_record['node'] != $oc_nodeid) { |
79 | 79 | tpl_errorMsg('editlog', $error_wrong_node); |
@@ -133,9 +133,9 @@ discard block |
||
133 | 133 | |
134 | 134 | // check if user has exceeded his top 10% limit |
135 | 135 | $is_top = sqlValue( |
136 | - "SELECT COUNT(`cache_id`) FROM `cache_rating` WHERE `user_id`='" . sql_escape( |
|
136 | + "SELECT COUNT(`cache_id`) FROM `cache_rating` WHERE `user_id`='".sql_escape( |
|
137 | 137 | $usr['userid'] |
138 | - ) . "' AND `cache_id`='" . sql_escape($log_record['cache_id']) . "'", |
|
138 | + )."' AND `cache_id`='".sql_escape($log_record['cache_id'])."'", |
|
139 | 139 | 0 |
140 | 140 | ); |
141 | 141 | $user_founds = sqlValue( |
@@ -144,11 +144,11 @@ discard block |
||
144 | 144 | LEFT JOIN `stat_user` ON `user`.`user_id`=`stat_user`.`user_id` |
145 | 145 | WHERE `user`.`user_id`='" . sql_escape( |
146 | 146 | $usr['userid'] |
147 | - ) . "'", |
|
147 | + )."'", |
|
148 | 148 | 0 |
149 | 149 | ); |
150 | 150 | $user_tops = sqlValue( |
151 | - "SELECT COUNT(`user_id`) FROM `cache_rating` WHERE `user_id`='" . sql_escape($usr['userid']) . "'", |
|
151 | + "SELECT COUNT(`user_id`) FROM `cache_rating` WHERE `user_id`='".sql_escape($usr['userid'])."'", |
|
152 | 152 | 0 |
153 | 153 | ); |
154 | 154 | |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | $rating_msg = mb_ereg_replace( |
157 | 157 | '{chk_sel}', |
158 | 158 | ($is_top ? 'checked' : ''), |
159 | - $rating_allowed . '<br />' . $rating_stat |
|
159 | + $rating_allowed.'<br />'.$rating_stat |
|
160 | 160 | ); |
161 | 161 | $rating_msg = mb_ereg_replace('{max}', floor($user_founds * rating_percentage / 100), $rating_msg); |
162 | 162 | $rating_msg = mb_ereg_replace('{curr}', $user_tops, $rating_msg); |
@@ -169,14 +169,14 @@ discard block |
||
169 | 169 | } |
170 | 170 | |
171 | 171 | if ($user_tops) { |
172 | - $rating_msg .= '<br />' . $rating_maywithdraw; |
|
172 | + $rating_msg .= '<br />'.$rating_maywithdraw; |
|
173 | 173 | } |
174 | 174 | } |
175 | 175 | |
176 | 176 | tpl_set_var('rating_message', mb_ereg_replace('{rating_msg}', $rating_msg, $rating_tpl)); |
177 | 177 | |
178 | 178 | if (isset($_POST['descMode'])) { |
179 | - $descMode = $_POST['descMode'] + 0; // Ocprop: 2 |
|
179 | + $descMode = $_POST['descMode'] + 0; // Ocprop: 2 |
|
180 | 180 | if (($descMode < 1) || ($descMode > 3)) { |
181 | 181 | $descMode = 3; |
182 | 182 | } |
@@ -325,14 +325,14 @@ discard block |
||
325 | 325 | if (is_latest_log($log_record['cache_id'], $log_record['log_id'])) { |
326 | 326 | $newstatus = sqlValue( |
327 | 327 | "SELECT `cache_status` FROM `log_types` |
328 | - WHERE `id`='" . sql_escape($log_type) . "'", |
|
328 | + WHERE `id`='" . sql_escape($log_type)."'", |
|
329 | 329 | false |
330 | 330 | ); |
331 | 331 | if ($newstatus && $newstatus != $log_record['status']) { |
332 | 332 | sql("SET @STATUS_CHANGE_USER_ID='&1'", $login->userid); |
333 | 333 | sql( |
334 | - "UPDATE `caches` SET `status`='" . sql_escape($newstatus) . "' |
|
335 | - WHERE `cache_id`='" . sql_escape($log_record['cache_id']) . "'" |
|
334 | + "UPDATE `caches` SET `status`='".sql_escape($newstatus)."' |
|
335 | + WHERE `cache_id`='" . sql_escape($log_record['cache_id'])."'" |
|
336 | 336 | ); |
337 | 337 | } |
338 | 338 | } |
@@ -340,7 +340,7 @@ discard block |
||
340 | 340 | //update user-stat if type changed |
341 | 341 | if ($log_record['logtype'] != $log_type) { |
342 | 342 | //call eventhandler |
343 | - require_once $opt['rootpath'] . 'lib/eventhandler.inc.php'; |
|
343 | + require_once $opt['rootpath'].'lib/eventhandler.inc.php'; |
|
344 | 344 | event_change_log_type($log_record['cache_id'], $usr['userid'] + 0); |
345 | 345 | } |
346 | 346 | |
@@ -381,7 +381,7 @@ discard block |
||
381 | 381 | |
382 | 382 | //display cache page |
383 | 383 | tpl_redirect( |
384 | - 'viewcache.php?cacheid=' . urlencode($log_record['cache_id']) . '&log=A#log' . urlencode( |
|
384 | + 'viewcache.php?cacheid='.urlencode($log_record['cache_id']).'&log=A#log'.urlencode( |
|
385 | 385 | $log_id |
386 | 386 | ) |
387 | 387 | ); |
@@ -403,9 +403,9 @@ discard block |
||
403 | 403 | $logtypeoptions = ''; |
404 | 404 | foreach ($allowed_logtypes as $logtype) { |
405 | 405 | $selected = ($log_record['logtype'] == $logtype ? ' selected="selected"' : ''); |
406 | - $logtypeoptions .= '<option value="' . $logtype . '"' . $selected . '>'; |
|
406 | + $logtypeoptions .= '<option value="'.$logtype.'"'.$selected.'>'; |
|
407 | 407 | $logtypeoptions .= htmlspecialchars($logtype_names[$logtype], ENT_COMPAT, 'UTF-8'); |
408 | - $logtypeoptions .= '</option>' . "\n"; |
|
408 | + $logtypeoptions .= '</option>'."\n"; |
|
409 | 409 | } |
410 | 410 | $disable_typechange = $disable_statuschange && $log_record['is_status_log']; |
411 | 411 | tpl_set_var('type_edit_disabled', $disable_typechange ? $type_edit_disabled : ''); |
@@ -434,7 +434,7 @@ discard block |
||
434 | 434 | tpl_set_var('logminute', htmlspecialchars($log_time_minute, ENT_COMPAT, 'UTF-8')); |
435 | 435 | tpl_set_var('cachename', htmlspecialchars($cache_name, ENT_COMPAT, 'UTF-8')); |
436 | 436 | tpl_set_var('cacheid', $log_record['cache_id']); |
437 | - tpl_set_var('reset', $reset); // obsolete |
|
437 | + tpl_set_var('reset', $reset); // obsolete |
|
438 | 438 | tpl_set_var('submit', $submit); |
439 | 439 | tpl_set_var('logid', $log_id); |
440 | 440 | tpl_set_var('date_message', !$date_ok ? $date_message : ''); |
@@ -448,7 +448,7 @@ discard block |
||
448 | 448 | // Text / normal HTML / HTML editor |
449 | 449 | tpl_set_var('use_tinymce', (($descMode == 3) ? 1 : 0)); |
450 | 450 | |
451 | - $headers = tpl_get_var('htmlheaders') . "\n"; |
|
451 | + $headers = tpl_get_var('htmlheaders')."\n"; |
|
452 | 452 | if ($descMode == 1) { |
453 | 453 | tpl_set_var('descMode', 1); |
454 | 454 | } else { |
@@ -456,15 +456,15 @@ discard block |
||
456 | 456 | tpl_set_var('descMode', 2); |
457 | 457 | } else { |
458 | 458 | // TinyMCE |
459 | - $headers .= '<script language="javascript" type="text/javascript" src="resource2/tinymce/tiny_mce_gzip.js"></script>' . "\n"; |
|
460 | - $headers .= '<script language="javascript" type="text/javascript" src="resource2/tinymce/config/log.js.php?logid=0&lang=' . |
|
459 | + $headers .= '<script language="javascript" type="text/javascript" src="resource2/tinymce/tiny_mce_gzip.js"></script>'."\n"; |
|
460 | + $headers .= '<script language="javascript" type="text/javascript" src="resource2/tinymce/config/log.js.php?logid=0&lang='. |
|
461 | 461 | strtolower( |
462 | 462 | $locale |
463 | - ) . '"></script>' . "\n"; |
|
463 | + ).'"></script>'."\n"; |
|
464 | 464 | tpl_set_var('descMode', 3); |
465 | 465 | } |
466 | 466 | } |
467 | - $headers .= '<script language="javascript" type="text/javascript" src="' . editorJsPath() . '"></script>' . "\n"; |
|
467 | + $headers .= '<script language="javascript" type="text/javascript" src="'.editorJsPath().'"></script>'."\n"; |
|
468 | 468 | tpl_set_var('htmlheaders', $headers); |
469 | 469 | |
470 | 470 | if ($use_log_pw == true && $log_pw != '') { |
@@ -485,12 +485,12 @@ discard block |
||
485 | 485 | $tmp_smiley = $smiley_link; |
486 | 486 | $tmp_smiley = mb_ereg_replace('{smiley_image}', $smiley['image'][$i], $tmp_smiley); |
487 | 487 | $tmp_smiley = mb_ereg_replace('{smiley_symbol}', $smiley['text'][$i], $tmp_smiley); |
488 | - $smilies = $smilies . ' ' . |
|
488 | + $smilies = $smilies.' '. |
|
489 | 489 | mb_ereg_replace( |
490 | 490 | '{smiley_file}', |
491 | 491 | $smiley['file'][$i], |
492 | 492 | $tmp_smiley |
493 | - ) . ' '; |
|
493 | + ).' '; |
|
494 | 494 | } |
495 | 495 | } |
496 | 496 | tpl_set_var('smileypath', $opt['template']['smiley']); |
@@ -517,7 +517,7 @@ discard block |
||
517 | 517 | $lastest_log_id = sqlValue( |
518 | 518 | " |
519 | 519 | SELECT `id` FROM `cache_logs` |
520 | - WHERE `cache_id`='" . sql_escape($cache_id) . "' |
|
520 | + WHERE `cache_id`='" . sql_escape($cache_id)."' |
|
521 | 521 | ORDER BY `order_date` DESC, `date_created` DESC, `id` DESC |
522 | 522 | LIMIT 1", |
523 | 523 | 0, |
@@ -5,15 +5,14 @@ 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 | $tpl->name = 'newcaches'; |
11 | 11 | $tpl->menuitem = MNU_START_NEWCACHES; |
12 | 12 | $tpl->change_country_inpage = true; |
13 | 13 | |
14 | 14 | $startat = isset($_REQUEST['startat']) ? floor($_REQUEST['startat'] + 0) : 0; |
15 | -$country = isset($_REQUEST['usercountry']) ? $_REQUEST['usercountry'] : |
|
16 | - (isset($_REQUEST['country']) ? $_REQUEST['country'] : ''); |
|
15 | +$country = isset($_REQUEST['usercountry']) ? $_REQUEST['usercountry'] : (isset($_REQUEST['country']) ? $_REQUEST['country'] : ''); |
|
17 | 16 | $cachetype = isset($_REQUEST['cachetype']) ? $_REQUEST['cachetype'] + 0 : 0; |
18 | 17 | $bEvents = ($cachetype == 6); |
19 | 18 | |
@@ -24,14 +23,14 @@ discard block |
||
24 | 23 | } |
25 | 24 | |
26 | 25 | $tpl->caching = true; |
27 | -$tpl->cache_id = $startat . "-" . $country . "-" . $cachetype; |
|
26 | +$tpl->cache_id = $startat."-".$country."-".$cachetype; |
|
28 | 27 | $tpl->cache_lifetime = 300; |
29 | 28 | if ($startat > 10 * $perpage) { |
30 | 29 | $tpl->cache_lifetime = 3600; |
31 | 30 | } |
32 | 31 | |
33 | 32 | if (!$tpl->is_cached()) { |
34 | - $cachetype_condition = ($cachetype ? " AND `caches`.`type` = " . sql_escape($cachetype) : ""); |
|
33 | + $cachetype_condition = ($cachetype ? " AND `caches`.`type` = ".sql_escape($cachetype) : ""); |
|
35 | 34 | if ($bEvents) { |
36 | 35 | $cachetype_condition .= " AND `date_hidden` >= curdate()"; |
37 | 36 | } |
@@ -50,14 +49,14 @@ discard block |
||
50 | 49 | INNER JOIN `user` ON `caches`.`user_id`=`user`.`user_id` |
51 | 50 | LEFT JOIN `countries` ON `countries`.`short` = `caches`.`country` |
52 | 51 | LEFT JOIN `sys_trans_text` ON `sys_trans_text`.`trans_id` = `countries`.`trans_id` |
53 | - AND `sys_trans_text`.`lang` = '" . sql_escape($opt['template']['locale']) . "' |
|
52 | + AND `sys_trans_text`.`lang` = '".sql_escape($opt['template']['locale'])."' |
|
54 | 53 | LEFT JOIN `caches_attributes` `ca` |
55 | 54 | ON `ca`.`cache_id`=`caches`.`cache_id` |
56 | 55 | AND `ca`.`attrib_id`=6 |
57 | - WHERE `caches`.`status` = 1" . ($country ? " AND `caches`.`country`='" . sql_escape($country) . "'" : "") . |
|
58 | - $cachetype_condition . " |
|
56 | + WHERE `caches`.`status` = 1" . ($country ? " AND `caches`.`country`='".sql_escape($country)."'" : ""). |
|
57 | + $cachetype_condition." |
|
59 | 58 | ORDER BY `caches`.`$date_field` $sort_order |
60 | - LIMIT " . sprintf("%d", $startat) . ', |
|
59 | + LIMIT ".sprintf("%d", $startat).', |
|
61 | 60 | ' . ($perpage + 0) |
62 | 61 | ); |
63 | 62 | // see also write_newcaches_urls() in sitemap.class.php |
@@ -70,8 +69,8 @@ discard block |
||
70 | 69 | $startat = isset($_REQUEST['startat']) ? $_REQUEST['startat'] + 0 : 0; |
71 | 70 | $cacheype_par = ($cachetype ? "&cachetype=$cachetype" : ""); |
72 | 71 | if ($country == '') { |
73 | - $count = sql_value_slave("SELECT COUNT(*) FROM `caches` WHERE `caches`.`status`=1" . $cachetype_condition, 0); |
|
74 | - $pager = new pager("newcaches.php?startat={offset}" . $cacheype_par); |
|
72 | + $count = sql_value_slave("SELECT COUNT(*) FROM `caches` WHERE `caches`.`status`=1".$cachetype_condition, 0); |
|
73 | + $pager = new pager("newcaches.php?startat={offset}".$cacheype_par); |
|
75 | 74 | } else { |
76 | 75 | $count = sql_value_slave( |
77 | 76 | "SELECT COUNT(*) |
@@ -81,7 +80,7 @@ discard block |
||
81 | 80 | 0, |
82 | 81 | $country |
83 | 82 | ); |
84 | - $pager = new pager("newcaches.php?country=" . $country . "&startat={offset}" . $cacheype_par); |
|
83 | + $pager = new pager("newcaches.php?country=".$country."&startat={offset}".$cacheype_par); |
|
85 | 84 | } |
86 | 85 | $pager->make_from_offset($startat, $count, 100); |
87 | 86 |
@@ -16,24 +16,24 @@ discard block |
||
16 | 16 | # [3] http://code.google.com/p/opencaching-api/issues/detail?id=132 |
17 | 17 | |
18 | 18 | $opt['rootpath'] = $GLOBALS['rootpath']; |
19 | - require $opt['rootpath'] . 'lib2/const.inc.php'; # (into the *local* scope!) |
|
20 | - require $opt['rootpath'] . 'config2/settings-dist.inc.php'; |
|
21 | - require $opt['rootpath'] . 'config2/settings.inc.php'; |
|
19 | + require $opt['rootpath'].'lib2/const.inc.php'; # (into the *local* scope!) |
|
20 | + require $opt['rootpath'].'config2/settings-dist.inc.php'; |
|
21 | + require $opt['rootpath'].'config2/settings.inc.php'; |
|
22 | 22 | |
23 | 23 | return array( |
24 | 24 | |
25 | 25 | # Settings which ARE NOT present in settings.inc.php: |
26 | 26 | |
27 | - 'OC_BRANCH' => 'oc.de', # Tell OKAPI to work in "OCDE mode". |
|
27 | + 'OC_BRANCH' => 'oc.de', # Tell OKAPI to work in "OCDE mode". |
|
28 | 28 | |
29 | 29 | # Settings which ARE present in settings.inc.php: |
30 | 30 | |
31 | 31 | 'ADMINS' => array($opt['db']['warn']['mail'], '[email protected]'), |
32 | 32 | 'FROM_FIELD' => $opt['mail']['contact'], |
33 | - 'DATA_LICENSE_URL' => $opt['page']['absolute_url'] . $opt['logic']['license']['terms'], |
|
33 | + 'DATA_LICENSE_URL' => $opt['page']['absolute_url'].$opt['logic']['license']['terms'], |
|
34 | 34 | 'DEBUG' => ($opt['debug'] & DEBUG_DEVELOPER != 0), |
35 | 35 | 'DEBUG_PREVENT_SEMAPHORES' |
36 | - => !$opt['php']['semaphores'], # not available on old developer system |
|
36 | + => !$opt['php']['semaphores'], # not available on old developer system |
|
37 | 37 | 'DB_SERVER' => $opt['db']['servername'], |
38 | 38 | 'DB_NAME' => $opt['db']['placeholder']['db'], |
39 | 39 | 'DB_USERNAME' => $opt['db']['username'], |
@@ -43,16 +43,16 @@ discard block |
||
43 | 43 | 'TIMEZONE' => $opt['php']['timezone'], |
44 | 44 | 'SITE_URL' => $opt['page']['absolute_url'], |
45 | 45 | 'REGISTRATION_URL' => $opt['page']['https']['mode'] != HTTPS_DISABLED |
46 | - ? 'https://' . $opt['page']['domain'] . '/register.php' |
|
47 | - : $opt['page']['absolute_url'] . 'register.php', |
|
46 | + ? 'https://'.$opt['page']['domain'].'/register.php' |
|
47 | + : $opt['page']['absolute_url'].'register.php', |
|
48 | 48 | 'VAR_DIR' => $opt['okapi']['var_dir'], |
49 | 49 | 'IMAGES_DIR' => rtrim($opt['logic']['pictures']['dir'], '/'), |
50 | 50 | 'IMAGES_URL' => rtrim($opt['logic']['pictures']['url'], '/').'/', |
51 | 51 | 'IMAGE_MAX_UPLOAD_SIZE' => 2 * $opt['logic']['pictures']['maxsize'], |
52 | - 'IMAGE_MAX_PIXEL_COUNT' => 786432, # 1024 x 768; TODO: move PICTURE_MAX_LONG_SIDE to settings |
|
53 | - 'SITE_LOGO' => $opt['page']['absolute_url'] . 'resource2/' . $opt['template']['default']['style'] . '/images/oclogo/oc_logo_alpha3.png', |
|
52 | + 'IMAGE_MAX_PIXEL_COUNT' => 786432, # 1024 x 768; TODO: move PICTURE_MAX_LONG_SIDE to settings |
|
53 | + 'SITE_LOGO' => $opt['page']['absolute_url'].'resource2/'.$opt['template']['default']['style'].'/images/oclogo/oc_logo_alpha3.png', |
|
54 | 54 | 'OC_NODE_ID' => $opt['logic']['node']['id'], |
55 | - 'OC_COOKIE_NAME' => $opt['session']['cookiename'] . 'data', |
|
55 | + 'OC_COOKIE_NAME' => $opt['session']['cookiename'].'data', |
|
56 | 56 | 'OCDE_HTML_PURIFIER_SETTINGS' |
57 | 57 | => $opt['html_purifier'], |
58 | 58 | 'GITHUB_ACCESS_TOKEN' => $opt['okapi']['github_access_token'], |
@@ -7,4 +7,4 @@ |
||
7 | 7 | * Activation page shortcut to keep URLs in activation Emails short |
8 | 8 | ***************************************************************************/ |
9 | 9 | |
10 | -require __DIR__ . '/activation.php'; |
|
10 | +require __DIR__.'/activation.php'; |
@@ -11,11 +11,11 @@ discard block |
||
11 | 11 | } |
12 | 12 | |
13 | 13 | // include librarys |
14 | -require __DIR__ . '/lib2/web.inc.php'; |
|
15 | -require_once __DIR__ . '/lib2/logic/cache.class.php'; |
|
16 | -require_once __DIR__ . '/lib2/logic/user.class.php'; |
|
17 | -require_once __DIR__ . '/lib2/logic/cachelog.class.php'; |
|
18 | -require_once __DIR__ . '/lib2/edithelper.inc.php'; |
|
14 | +require __DIR__.'/lib2/web.inc.php'; |
|
15 | +require_once __DIR__.'/lib2/logic/cache.class.php'; |
|
16 | +require_once __DIR__.'/lib2/logic/user.class.php'; |
|
17 | +require_once __DIR__.'/lib2/logic/cachelog.class.php'; |
|
18 | +require_once __DIR__.'/lib2/edithelper.inc.php'; |
|
19 | 19 | |
20 | 20 | // prepare template and menue |
21 | 21 | $tpl->name = 'log_cache'; |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | // get logtext editormode (from form or from userprofile) |
122 | 122 | // 1 = text; 2 = HTML; 3 = tinyMCE |
123 | 123 | if (isset($_POST['descMode'])) { |
124 | - $descMode = $_POST['descMode'] + 0; // Ocprop: 2 |
|
124 | + $descMode = $_POST['descMode'] + 0; // Ocprop: 2 |
|
125 | 125 | if (($descMode < 1) || ($descMode > 3)) { |
126 | 126 | $descMode = 3; |
127 | 127 | } |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | if ($descMode == 3) { |
147 | 147 | $tpl->add_header_javascript('resource2/tinymce/tiny_mce_gzip.js'); |
148 | 148 | $tpl->add_header_javascript( |
149 | - 'resource2/tinymce/config/log.js.php?lang=' . strtolower($opt['template']['locale']) |
|
149 | + 'resource2/tinymce/config/log.js.php?lang='.strtolower($opt['template']['locale']) |
|
150 | 150 | ); |
151 | 151 | } |
152 | 152 | $tpl->add_header_javascript(editorJsPath()); |
@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | if (is_numeric($logDateMonth) |
159 | 159 | && is_numeric($logDateDay) |
160 | 160 | && is_numeric($logDateYear) |
161 | - && ($logTimeHour . $logTimeMinute == "" || is_numeric($logTimeHour)) |
|
161 | + && ($logTimeHour.$logTimeMinute == "" || is_numeric($logTimeHour)) |
|
162 | 162 | && ($logTimeMinute == "" || is_numeric($logTimeMinute)) |
163 | 163 | ) { |
164 | 164 | $validate['dateOk'] = checkdate($logDateMonth, $logDateDay, $logDateYear) |
@@ -223,7 +223,7 @@ discard block |
||
223 | 223 | * set seconds 00:00:01, means "00:00 was logged" |
224 | 224 | * set seconds 00:00:00, means "no time was logged" |
225 | 225 | */ |
226 | - $logTimeSecond = ($logTimeHour . $logTimeMinute != "" |
|
226 | + $logTimeSecond = ($logTimeHour.$logTimeMinute != "" |
|
227 | 227 | && $logTimeHour == 0 |
228 | 228 | && $logTimeMinute == 0) + 0; |
229 | 229 | |
@@ -279,7 +279,7 @@ discard block |
||
279 | 279 | } |
280 | 280 | |
281 | 281 | // finished, redirect to listing |
282 | - $tpl->redirect('viewcache.php?cacheid=' . $cache->getCacheId()); |
|
282 | + $tpl->redirect('viewcache.php?cacheid='.$cache->getCacheId()); |
|
283 | 283 | } |
284 | 284 | |
285 | 285 | // assign values to template |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | $img = null; |
160 | 160 | |
161 | 161 | if (substr($folder, - 1) != '/') { |
162 | - $folder = $folder . '/'; |
|
162 | + $folder = $folder.'/'; |
|
163 | 163 | } |
164 | 164 | |
165 | 165 | $fileList = []; |
@@ -177,22 +177,22 @@ discard block |
||
177 | 177 | |
178 | 178 | if (count($fileList) > 0) { |
179 | 179 | $imageNumber = floor(time() / $interval) % count($fileList); |
180 | - $img = $folder . $fileList[$imageNumber]; |
|
180 | + $img = $folder.$fileList[$imageNumber]; |
|
181 | 181 | } |
182 | 182 | |
183 | 183 | if ($img != null) { |
184 | 184 | $imageInfo = pathinfo($img); |
185 | - header('Content-type: ' . $extList[$imageInfo['extension']]); |
|
185 | + header('Content-type: '.$extList[$imageInfo['extension']]); |
|
186 | 186 | |
187 | 187 | // Cache-Lebensdauer (in Minuten) |
188 | - $exp_gmt = gmdate("D, d M Y H:i:s", time() + $interval) . " GMT"; |
|
189 | - $mod_gmt = gmdate("D, d M Y H:i:s", time()) . " GMT"; |
|
188 | + $exp_gmt = gmdate("D, d M Y H:i:s", time() + $interval)." GMT"; |
|
189 | + $mod_gmt = gmdate("D, d M Y H:i:s", time())." GMT"; |
|
190 | 190 | |
191 | - header("Expires: " . $exp_gmt); |
|
192 | - header("Last-Modified: " . $mod_gmt); |
|
193 | - header("Cache-Control: public, max-age=" . $interval); |
|
191 | + header("Expires: ".$exp_gmt); |
|
192 | + header("Last-Modified: ".$mod_gmt); |
|
193 | + header("Cache-Control: public, max-age=".$interval); |
|
194 | 194 | // Speziell f�r MSIE 5 |
195 | - header("Cache-Control: pre-check=" . $interval, false); |
|
195 | + header("Cache-Control: pre-check=".$interval, false); |
|
196 | 196 | |
197 | 197 | readfile($img); |
198 | 198 | } else { |
@@ -6,4 +6,4 @@ |
||
6 | 6 | ***************************************************************************/ |
7 | 7 | |
8 | 8 | $nongc = true; |
9 | -require __DIR__ . '/map2.php'; |
|
9 | +require __DIR__.'/map2.php'; |