@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | $zipper['bzip2'] = 'nice --adjustment=19 bzip2 -1 -c {src} > {dst}'; |
21 | 21 | |
22 | 22 | if ($argv[1] == '--help') { |
23 | - echo $argv[0] . " --type=<ziptype> --src=<source> --dst=<destination> |
|
23 | + echo $argv[0]." --type=<ziptype> --src=<source> --dst=<destination> |
|
24 | 24 | --type can be zip, gzip or bzip2 |
25 | 25 | --src relative* path to source file |
26 | 26 | --dst relative* path to destination file |
@@ -36,11 +36,11 @@ discard block |
||
36 | 36 | 6 |
37 | 37 | ) != '--dst=') |
38 | 38 | ) { |
39 | - die("wrong paramter\nuse " . $argv[0] . " --help\n"); |
|
39 | + die("wrong paramter\nuse ".$argv[0]." --help\n"); |
|
40 | 40 | } |
41 | 41 | |
42 | 42 | if (isset($argv[4])) { |
43 | - die("wrong paramter\nuse " . $argv[0] . " --help\n"); |
|
43 | + die("wrong paramter\nuse ".$argv[0]." --help\n"); |
|
44 | 44 | } |
45 | 45 | |
46 | 46 | $type = substr($argv[1], 7); |
@@ -48,26 +48,26 @@ discard block |
||
48 | 48 | $dst = substr($argv[3], 6); |
49 | 49 | |
50 | 50 | if (!isset($zipper[$type])) { |
51 | - die("invaild zip type\nuse " . $argv[0] . " --help\n"); |
|
51 | + die("invaild zip type\nuse ".$argv[0]." --help\n"); |
|
52 | 52 | } |
53 | 53 | |
54 | 54 | if (checkpath($src) == false) { |
55 | - die("invaild src\nuse " . $argv[0] . " --help\n"); |
|
55 | + die("invaild src\nuse ".$argv[0]." --help\n"); |
|
56 | 56 | } |
57 | 57 | |
58 | 58 | if (checkpath($dst) == false) { |
59 | - die("invaild dst\nuse " . $argv[0] . " --help\n"); |
|
59 | + die("invaild dst\nuse ".$argv[0]." --help\n"); |
|
60 | 60 | } |
61 | 61 | |
62 | -$src = $basedir . $src; |
|
63 | -$dst = $basedir . $dst; |
|
62 | +$src = $basedir.$src; |
|
63 | +$dst = $basedir.$dst; |
|
64 | 64 | |
65 | 65 | if (!file_exists($src)) { |
66 | - die("error: source not exist\nuse " . $argv[0] . " --help\n"); |
|
66 | + die("error: source not exist\nuse ".$argv[0]." --help\n"); |
|
67 | 67 | } |
68 | 68 | |
69 | 69 | if (file_exists($dst)) { |
70 | - die("error: destination already exists\nuse " . $argv[0] . " --help\n"); |
|
70 | + die("error: destination already exists\nuse ".$argv[0]." --help\n"); |
|
71 | 71 | } |
72 | 72 | |
73 | 73 | $cmd = $zipper[$type]; |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | return false; |
85 | 85 | } |
86 | 86 | |
87 | - for ($i = 0; $i < count($parts); $i ++) { |
|
87 | + for ($i = 0; $i < count($parts); $i++) { |
|
88 | 88 | if (($parts[$i] == '..') || ($parts[$i] == '.')) { |
89 | 89 | return false; |
90 | 90 | } |
@@ -43,7 +43,7 @@ |
||
43 | 43 | $rLastLog = mysql_fetch_array($rs); |
44 | 44 | mysql_free_result($rs); |
45 | 45 | |
46 | - mysql_query("PURGE MASTER LOGS TO '" . mysql_real_escape_string($rLastLog[0], $dblink) . "'", $dblink); |
|
46 | + mysql_query("PURGE MASTER LOGS TO '".mysql_real_escape_string($rLastLog[0], $dblink)."'", $dblink); |
|
47 | 47 | } |
48 | 48 | |
49 | 49 | mysql_close($dblink); |
@@ -22,12 +22,12 @@ |
||
22 | 22 | |
23 | 23 | // Bilder downloaden? |
24 | 24 | $opt['pictures']['download'] = 1; |
25 | -$opt['pictures']['directory'] = $rootpath . 'images/uploads/'; |
|
25 | +$opt['pictures']['directory'] = $rootpath.'images/uploads/'; |
|
26 | 26 | $opt['pictures']['url'] = 'http://www.so-komm-ich-uebers-web-da.hin/www.opencaching.de/html/images/uploads/'; |
27 | 27 | |
28 | 28 | // Sessions verwenden? |
29 | 29 | $opt['session'] = 1; |
30 | -$opt['zip'] = 'gzip'; // 0; zip; bzip2; gzip |
|
30 | +$opt['zip'] = 'gzip'; // 0; zip; bzip2; gzip |
|
31 | 31 | |
32 | 32 | // Gebietsauswahl nach Land |
33 | 33 | $opt['bycountry'] = 0; |
@@ -27,12 +27,12 @@ discard block |
||
27 | 27 | * - Test mit aktuellem OC.de-Stand |
28 | 28 | ***************************************************************************/ |
29 | 29 | |
30 | -$rootpath = __DIR__ . '/../../htdocs/'; |
|
30 | +$rootpath = __DIR__.'/../../htdocs/'; |
|
31 | 31 | |
32 | 32 | // chdir to proper directory (needed for cronjobs) |
33 | 33 | chdir(substr(realpath($_SERVER['PHP_SELF']), 0, strrpos(realpath($_SERVER['PHP_SELF']), '/'))); |
34 | 34 | |
35 | -require_once $rootpath . 'lib/clicompatbase.inc.php'; |
|
35 | +require_once $rootpath.'lib/clicompatbase.inc.php'; |
|
36 | 36 | require_once 'xml2array.inc.php'; |
37 | 37 | require_once 'settings.php'; |
38 | 38 | |
@@ -67,16 +67,16 @@ discard block |
||
67 | 67 | $nFileNr = 0; |
68 | 68 | $rs = sql('SELECT `id`, `url` FROM `pictures` WHERE `local`=0'); |
69 | 69 | while ($r = sql_fetch_array($rs)) { |
70 | - $nFileNr ++; |
|
70 | + $nFileNr++; |
|
71 | 71 | $fileparts = mb_split('/', $r['url']); |
72 | 72 | $filename = $fileparts[count($fileparts) - 1]; |
73 | 73 | |
74 | - echo 'Downloading file ' . $nFileNr . ' of ' . $rCount['c'] . ': ' . $filename . "\n"; |
|
74 | + echo 'Downloading file '.$nFileNr.' of '.$rCount['c'].': '.$filename."\n"; |
|
75 | 75 | |
76 | 76 | $success = true; |
77 | - if (!file_exists($opt['pictures']['directory'] . $filename)) { |
|
78 | - if (!@copy($r['url'], $opt['pictures']['directory'] . $filename)) { |
|
79 | - echo 'error: Download nicht erfolgreich' . "\n"; |
|
77 | + if (!file_exists($opt['pictures']['directory'].$filename)) { |
|
78 | + if (!@copy($r['url'], $opt['pictures']['directory'].$filename)) { |
|
79 | + echo 'error: Download nicht erfolgreich'."\n"; |
|
80 | 80 | $success = false; |
81 | 81 | } |
82 | 82 | } |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | if ($success == true) { |
85 | 85 | sql( |
86 | 86 | "UPDATE `pictures` SET `local`=1, `url`='&1' WHERE `id`='&2'", |
87 | - $opt['pictures']['url'] . $filename, |
|
87 | + $opt['pictures']['url'].$filename, |
|
88 | 88 | $r['id'] |
89 | 89 | ); |
90 | 90 | } |
@@ -196,7 +196,7 @@ discard block |
||
196 | 196 | |
197 | 197 | if ($opt['session'] == 1) { |
198 | 198 | // records abfragen |
199 | - $sessionfile = $opt['tmpdir'] . 'session.xml'; |
|
199 | + $sessionfile = $opt['tmpdir'].'session.xml'; |
|
200 | 200 | if (file_exists($sessionfile)) { |
201 | 201 | unlink($sessionfile); |
202 | 202 | } |
@@ -215,21 +215,21 @@ discard block |
||
215 | 215 | $recordscount += $session['OCXMLSESSION']['RECORDS']['PICTURE']; |
216 | 216 | $recordscount += $session['OCXMLSESSION']['RECORDS']['REMOVEOBJECT']; |
217 | 217 | |
218 | - echo 'Abruf seit ' . $lastUpdate . "\n"; |
|
218 | + echo 'Abruf seit '.$lastUpdate."\n"; |
|
219 | 219 | echo "------------------------\n"; |
220 | - echo 'Session-Id: ' . $sessionid . "\n"; |
|
221 | - echo 'User: ' . $session['OCXMLSESSION']['RECORDS']['USER'] . "\n"; |
|
222 | - echo 'Cache: ' . $session['OCXMLSESSION']['RECORDS']['CACHE'] . "\n"; |
|
223 | - echo 'Cachdesc: ' . $session['OCXMLSESSION']['RECORDS']['CACHEDESC'] . "\n"; |
|
224 | - echo 'Cachelog: ' . $session['OCXMLSESSION']['RECORDS']['CACHELOG'] . "\n"; |
|
225 | - echo 'Picture: ' . $session['OCXMLSESSION']['RECORDS']['PICTURE'] . "\n"; |
|
226 | - echo 'Removedobject: ' . $session['OCXMLSESSION']['RECORDS']['REMOVEOBJECT'] . "\n"; |
|
220 | + echo 'Session-Id: '.$sessionid."\n"; |
|
221 | + echo 'User: '.$session['OCXMLSESSION']['RECORDS']['USER']."\n"; |
|
222 | + echo 'Cache: '.$session['OCXMLSESSION']['RECORDS']['CACHE']."\n"; |
|
223 | + echo 'Cachdesc: '.$session['OCXMLSESSION']['RECORDS']['CACHEDESC']."\n"; |
|
224 | + echo 'Cachelog: '.$session['OCXMLSESSION']['RECORDS']['CACHELOG']."\n"; |
|
225 | + echo 'Picture: '.$session['OCXMLSESSION']['RECORDS']['PICTURE']."\n"; |
|
226 | + echo 'Removedobject: '.$session['OCXMLSESSION']['RECORDS']['REMOVEOBJECT']."\n"; |
|
227 | 227 | echo "------------------------\n"; |
228 | - echo 'Summe: ' . $recordscount . "\n"; |
|
228 | + echo 'Summe: '.$recordscount."\n"; |
|
229 | 229 | |
230 | 230 | $filescount = ($recordscount + (500 - $recordscount % 500)) / 500; |
231 | 231 | |
232 | - echo 'Anzahl der Pakete: ' . $filescount . "\n"; |
|
232 | + echo 'Anzahl der Pakete: '.$filescount."\n"; |
|
233 | 233 | echo "\n"; |
234 | 234 | |
235 | 235 | if ($recordscount == 0) { |
@@ -237,20 +237,20 @@ discard block |
||
237 | 237 | exit; |
238 | 238 | } |
239 | 239 | |
240 | - for ($i = 1; $i <= $filescount; $i ++) { |
|
241 | - echo "Download Paket: " . $i . ' von ' . $filescount . "\n"; |
|
240 | + for ($i = 1; $i <= $filescount; $i++) { |
|
241 | + echo "Download Paket: ".$i.' von '.$filescount."\n"; |
|
242 | 242 | |
243 | 243 | $fileurl = $opt['url_getsession']; |
244 | 244 | $fileurl = mb_ereg_replace('{sessionid}', $sessionid, $fileurl); |
245 | 245 | $fileurl = mb_ereg_replace('{file}', $i, $fileurl); |
246 | 246 | $fileurl = mb_ereg_replace('{zip}', $opt['zip'], $fileurl); |
247 | - $target = $opt['tmpdir'] . $sessionid . '-' . sprintf('%04d', $i) . $fileext; |
|
247 | + $target = $opt['tmpdir'].$sessionid.'-'.sprintf('%04d', $i).$fileext; |
|
248 | 248 | |
249 | 249 | copy($fileurl, $target); |
250 | 250 | } |
251 | 251 | } else { |
252 | - echo 'Download ...' . "\n"; |
|
253 | - $target = $opt['tmpdir'] . date('YmdHis') . $fileext; |
|
252 | + echo 'Download ...'."\n"; |
|
253 | + $target = $opt['tmpdir'].date('YmdHis').$fileext; |
|
254 | 254 | copy($url, $target); |
255 | 255 | } |
256 | 256 | } |
@@ -262,24 +262,24 @@ discard block |
||
262 | 262 | // alle zips entpacken |
263 | 263 | $hDir = opendir($opt['tmpdir']); |
264 | 264 | while (false !== ($file = readdir($hDir))) { |
265 | - if (is_file($opt['tmpdir'] . $file)) { |
|
265 | + if (is_file($opt['tmpdir'].$file)) { |
|
266 | 266 | $bCopy = false; |
267 | 267 | if (mb_substr($file, mb_strrpos($file, '.')) == '.zip') { |
268 | - echo 'Unzipping file ' . $file . "\n"; |
|
268 | + echo 'Unzipping file '.$file."\n"; |
|
269 | 269 | system( |
270 | - $opt['unzip'] . ' --type=zip --src="' . $opt['rel_tmpdir'] . '/' . $file . '" --dst="' . $opt['rel_tmpdir'] . '"' |
|
270 | + $opt['unzip'].' --type=zip --src="'.$opt['rel_tmpdir'].'/'.$file.'" --dst="'.$opt['rel_tmpdir'].'"' |
|
271 | 271 | ); |
272 | 272 | } else { |
273 | 273 | if (mb_substr($file, mb_strrpos($file, '.')) == '.gz') { |
274 | - echo 'Unzipping file ' . $file . "\n"; |
|
274 | + echo 'Unzipping file '.$file."\n"; |
|
275 | 275 | system( |
276 | - $opt['unzip'] . ' --type=gzip --src="' . $opt['rel_tmpdir'] . '/' . $file . '" --dst="' . $opt['rel_tmpdir'] . '"' |
|
276 | + $opt['unzip'].' --type=gzip --src="'.$opt['rel_tmpdir'].'/'.$file.'" --dst="'.$opt['rel_tmpdir'].'"' |
|
277 | 277 | ); |
278 | 278 | } else { |
279 | 279 | if (mb_substr($file, mb_strrpos($file, '.')) == '.bz2') { |
280 | - echo 'Unzipping file ' . $file . "\n"; |
|
280 | + echo 'Unzipping file '.$file."\n"; |
|
281 | 281 | system( |
282 | - $opt['unzip'] . ' --type=bzip2 --src="' . $opt['rel_tmpdir'] . '/' . $file . '" --dst="' . $opt['rel_tmpdir'] . '"' |
|
282 | + $opt['unzip'].' --type=bzip2 --src="'.$opt['rel_tmpdir'].'/'.$file.'" --dst="'.$opt['rel_tmpdir'].'"' |
|
283 | 283 | ); |
284 | 284 | } else { |
285 | 285 | if (mb_substr($file, mb_strrpos($file, '.')) == '.xml') { |
@@ -291,16 +291,16 @@ discard block |
||
291 | 291 | |
292 | 292 | // und jetzt die gezippte Datei verschieben |
293 | 293 | $archivdir = $opt['archivdir']; |
294 | - $archivdir .= $opt['curdb'] . '/'; |
|
294 | + $archivdir .= $opt['curdb'].'/'; |
|
295 | 295 | |
296 | 296 | if (!is_dir($archivdir)) { |
297 | 297 | mkdir($archivdir); |
298 | 298 | } |
299 | 299 | |
300 | 300 | if ($bCopy == true) { |
301 | - copy($opt['tmpdir'] . $file, $archivdir . '/' . $file); |
|
301 | + copy($opt['tmpdir'].$file, $archivdir.'/'.$file); |
|
302 | 302 | } else { |
303 | - rename($opt['tmpdir'] . $file, $archivdir . '/' . $file); |
|
303 | + rename($opt['tmpdir'].$file, $archivdir.'/'.$file); |
|
304 | 304 | } |
305 | 305 | } |
306 | 306 | } |
@@ -315,9 +315,9 @@ discard block |
||
315 | 315 | |
316 | 316 | $hDir = opendir($opt['tmpdir']); |
317 | 317 | while (false !== ($file = readdir($hDir))) { |
318 | - if (is_file($opt['tmpdir'] . $file)) { |
|
318 | + if (is_file($opt['tmpdir'].$file)) { |
|
319 | 319 | if ($file != '.cvsignore') { |
320 | - $files[] = $opt['tmpdir'] . $file; |
|
320 | + $files[] = $opt['tmpdir'].$file; |
|
321 | 321 | } |
322 | 322 | } |
323 | 323 | } |
@@ -331,7 +331,7 @@ discard block |
||
331 | 331 | |
332 | 332 | function importxmlfile($file) |
333 | 333 | { |
334 | - echo 'Importing file ' . $file . "\n"; |
|
334 | + echo 'Importing file '.$file."\n"; |
|
335 | 335 | |
336 | 336 | $xmlReader = new xmlReader(); |
337 | 337 | $xmlReader->open($file); |
@@ -411,11 +411,11 @@ discard block |
||
411 | 411 | if ($sSubElement != '') { |
412 | 412 | // vorheriges element zuerst schlißen |
413 | 413 | $sSubElement = ''; |
414 | - $nRecursionLevel --; |
|
414 | + $nRecursionLevel--; |
|
415 | 415 | } |
416 | 416 | |
417 | 417 | $sSubElement = mb_strtoupper($xmlReader->name); |
418 | - $nRecursionLevel ++; |
|
418 | + $nRecursionLevel++; |
|
419 | 419 | |
420 | 420 | // attribute auslesen |
421 | 421 | if ($xmlReader->moveToFirstAttribute()) { |
@@ -432,7 +432,7 @@ discard block |
||
432 | 432 | } else { |
433 | 433 | if ($xmlReader->nodeType == XMLReader::END_ELEMENT) { |
434 | 434 | $sSubElement = ''; |
435 | - $nRecursionLevel --; |
|
435 | + $nRecursionLevel--; |
|
436 | 436 | } |
437 | 437 | } |
438 | 438 | } |
@@ -459,7 +459,7 @@ discard block |
||
459 | 459 | ImportRemovedObjectArray($node['REMOVEDOBJECT']); |
460 | 460 | break; |
461 | 461 | default: |
462 | - echo 'Unknown Element "' . $xmlReader->name . '", skipping' . "\n"; |
|
462 | + echo 'Unknown Element "'.$xmlReader->name.'", skipping'."\n"; |
|
463 | 463 | break; |
464 | 464 | } |
465 | 465 | } |
@@ -481,9 +481,9 @@ discard block |
||
481 | 481 | |
482 | 482 | $hDir = opendir($opt['tmpdir']); |
483 | 483 | while (false !== ($file = readdir($hDir))) { |
484 | - if (is_file($opt['tmpdir'] . $file)) { |
|
484 | + if (is_file($opt['tmpdir'].$file)) { |
|
485 | 485 | if ($file != '.cvsignore') { |
486 | - unlink($opt['tmpdir'] . $file); |
|
486 | + unlink($opt['tmpdir'].$file); |
|
487 | 487 | } |
488 | 488 | } |
489 | 489 | } |
@@ -501,14 +501,14 @@ discard block |
||
501 | 501 | // andere DB connecten? |
502 | 502 | if (mb_substr($arg, 0, 5) == '--db=') { |
503 | 503 | if (!is_numeric(mb_substr($arg, 5))) { |
504 | - die('invalid alternative DB' . "\n"); |
|
504 | + die('invalid alternative DB'."\n"); |
|
505 | 505 | } |
506 | 506 | |
507 | 507 | $nDb = mb_substr($arg, 5); |
508 | 508 | |
509 | 509 | if ($nDb != 0) { |
510 | 510 | if (!isset($opt['db'][$nDb])) { |
511 | - die('invalid alternative DB' . "\n"); |
|
511 | + die('invalid alternative DB'."\n"); |
|
512 | 512 | } |
513 | 513 | |
514 | 514 | mysql_close($dblink); |
@@ -517,7 +517,7 @@ discard block |
||
517 | 517 | sql("SET NAMES 'utf8'"); |
518 | 518 | sql('USE `&1`', $opt['db'][1]['name']); |
519 | 519 | } else { |
520 | - die('Connect to alternative DB failed' . "\n"); |
|
520 | + die('Connect to alternative DB failed'."\n"); |
|
521 | 521 | } |
522 | 522 | |
523 | 523 | $opt['curdb'] = $nDb; |
@@ -531,7 +531,7 @@ discard block |
||
531 | 531 | sql("SET NAMES 'utf8'"); |
532 | 532 | sql('USE `&1`', $dbname); |
533 | 533 | } else { |
534 | - die('Connect to alternative DB failed' . "\n"); |
|
534 | + die('Connect to alternative DB failed'."\n"); |
|
535 | 535 | } |
536 | 536 | } |
537 | 537 | } |
@@ -544,7 +544,7 @@ discard block |
||
544 | 544 | !isset($r['USERNAME']['__DATA']) || |
545 | 545 | !isset($r['LASTMODIFIED']['__DATA']) |
546 | 546 | ) { |
547 | - echo 'warn: ImportUserArray required element not defined' . "\n"; |
|
547 | + echo 'warn: ImportUserArray required element not defined'."\n"; |
|
548 | 548 | |
549 | 549 | return; |
550 | 550 | } |
@@ -637,7 +637,7 @@ discard block |
||
637 | 637 | !isset($r['DATECREATED']['__DATA']) || |
638 | 638 | !isset($r['LASTMODIFIED']['__DATA']) |
639 | 639 | ) { |
640 | - echo 'warn: ImportCacheArray required element not defined' . "\n"; |
|
640 | + echo 'warn: ImportCacheArray required element not defined'."\n"; |
|
641 | 641 | |
642 | 642 | return; |
643 | 643 | } |
@@ -808,7 +808,7 @@ discard block |
||
808 | 808 | !isset($r['LANGUAGE']['__ATTR']['ID']) || |
809 | 809 | !isset($r['LASTMODIFIED']['__DATA']) |
810 | 810 | ) { |
811 | - echo 'error: ImportCacheDescArray required element not defined' . "\n"; |
|
811 | + echo 'error: ImportCacheDescArray required element not defined'."\n"; |
|
812 | 812 | |
813 | 813 | return; |
814 | 814 | } |
@@ -965,7 +965,7 @@ discard block |
||
965 | 965 | !isset($r['DATECREATED']['__DATA']) || |
966 | 966 | !isset($r['LASTMODIFIED']['__DATA']) |
967 | 967 | ) { |
968 | - echo 'error: ImportCachelogArray required element not defined' . "\n"; |
|
968 | + echo 'error: ImportCachelogArray required element not defined'."\n"; |
|
969 | 969 | |
970 | 970 | return; |
971 | 971 | } |
@@ -996,7 +996,7 @@ discard block |
||
996 | 996 | |
997 | 997 | // logtype gültig? |
998 | 998 | if (sqlValue( |
999 | - "SELECT COUNT(*) FROM `log_types` WHERE `id`='" . sql_escape($r['LOGTYPE']['__ATTR']['ID']) . "'", |
|
999 | + "SELECT COUNT(*) FROM `log_types` WHERE `id`='".sql_escape($r['LOGTYPE']['__ATTR']['ID'])."'", |
|
1000 | 1000 | 0 |
1001 | 1001 | ) == 0 |
1002 | 1002 | ) { |
@@ -1070,7 +1070,7 @@ discard block |
||
1070 | 1070 | !isset($r['DATECREATED']['__DATA']) || |
1071 | 1071 | !isset($r['LASTMODIFIED']['__DATA']) |
1072 | 1072 | ) { |
1073 | - echo 'error: ImportPictureArray required element not defined ' . "\n"; |
|
1073 | + echo 'error: ImportPictureArray required element not defined '."\n"; |
|
1074 | 1074 | |
1075 | 1075 | return; |
1076 | 1076 | } |
@@ -1171,7 +1171,7 @@ discard block |
||
1171 | 1171 | !isset($r['OBJECT']['__DATA']) || |
1172 | 1172 | !isset($r['REMOVEDDATE']['__DATA']) |
1173 | 1173 | ) { |
1174 | - echo 'error: ImportRemovedObjectArray required element not defined' . "\n"; |
|
1174 | + echo 'error: ImportRemovedObjectArray required element not defined'."\n"; |
|
1175 | 1175 | |
1176 | 1176 | return; |
1177 | 1177 | } |
@@ -1283,12 +1283,12 @@ discard block |
||
1283 | 1283 | |
1284 | 1284 | function importError($recordtype, $uuid, $r, $info) |
1285 | 1285 | { |
1286 | - echo 'error: ' . $recordtype . ' (' . $uuid . '): ' . $info . "\n"; |
|
1286 | + echo 'error: '.$recordtype.' ('.$uuid.'): '.$info."\n"; |
|
1287 | 1287 | } |
1288 | 1288 | |
1289 | 1289 | function importWarn($recordtype, $uuid, $r, $info) |
1290 | 1290 | { |
1291 | - echo 'warn: ' . $recordtype . ' (' . $uuid . '): ' . $info . "\n"; |
|
1291 | + echo 'warn: '.$recordtype.' ('.$uuid.'): '.$info."\n"; |
|
1292 | 1292 | } |
1293 | 1293 | |
1294 | 1294 | function restorevalues() |
@@ -8,8 +8,8 @@ discard block |
||
8 | 8 | // statistical data for cache and log activity map |
9 | 9 | // optional script to be released locally into htdocs/api/stat |
10 | 10 | |
11 | -$opt['rootpath'] = __DIR__ . '/../../htdocs/'; |
|
12 | -require $opt['rootpath'] . 'lib2/web.inc.php'; |
|
11 | +$opt['rootpath'] = __DIR__.'/../../htdocs/'; |
|
12 | +require $opt['rootpath'].'lib2/web.inc.php'; |
|
13 | 13 | |
14 | 14 | error_reporting(error_reporting() & ~E_NOTICE); |
15 | 15 | |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | $year = substr($cache['date_created'], 0, 4); |
27 | 27 | if ($year >= 2005 && $year <= date("Y") && ($lat != 0 || $long != 0)) { |
28 | 28 | $years[$year] = true; |
29 | - $liste[$lat][$long]["caches"][$year] ++; |
|
29 | + $liste[$lat][$long]["caches"][$year]++; |
|
30 | 30 | } |
31 | 31 | } |
32 | 32 | mysql_free_result($rs); |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | $year = substr($cache["date"], 0, 4); |
51 | 51 | if ($year >= 2005 && $year <= date("Y") && ($lat != 0 || $long != 0)) { |
52 | 52 | $years[$year] = true; |
53 | - $liste[$lat][$long]["logs"][$year] ++; |
|
53 | + $liste[$lat][$long]["logs"][$year]++; |
|
54 | 54 | } |
55 | 55 | } |
56 | 56 | mysql_free_result($rs); |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | while ($cache = sql_fetch_assoc($rs)) { |
68 | 68 | $lat = floor($cache["latitude"] / $grid); |
69 | 69 | $long = floor($cache["longitude"] / $grid); |
70 | - $liste[$lat][$long]["caches"]["all"] ++; |
|
70 | + $liste[$lat][$long]["caches"]["all"]++; |
|
71 | 71 | $liste[$lat][$long]["logs"]["all"] += $cache["logs"]; |
72 | 72 | } |
73 | 73 | mysql_free_result($rs); |
@@ -89,11 +89,11 @@ discard block |
||
89 | 89 | |
90 | 90 | foreach ($liste as $lat => $liste2) { |
91 | 91 | foreach ($liste2 as $long => $cachecounts) { |
92 | - echo ($lat * $grid + 0.5 * $grid) . ',' . ($long * $grid + 0.5 * $grid) . ',' . |
|
93 | - $cachecounts['caches']['all'] . ',' . |
|
92 | + echo ($lat * $grid + 0.5 * $grid).','.($long * $grid + 0.5 * $grid).','. |
|
93 | + $cachecounts['caches']['all'].','. |
|
94 | 94 | $cachecounts['logs']['all']; |
95 | 95 | foreach ($years as $year => $dummy) { |
96 | - echo ',' . $cachecounts["caches"][$year] . ',' . $cachecounts["logs"][$year]; |
|
96 | + echo ','.$cachecounts["caches"][$year].','.$cachecounts["logs"][$year]; |
|
97 | 97 | } |
98 | 98 | echo "\r\n"; |
99 | 99 | } |
@@ -8,8 +8,8 @@ discard block |
||
8 | 8 | // list of new images |
9 | 9 | // optional script to be released locally into htdocs/api/stat |
10 | 10 | |
11 | -$opt['rootpath'] = __DIR__ . '/../../htdocs/'; |
|
12 | -require $opt['rootpath'] . 'lib2/web.inc.php'; |
|
11 | +$opt['rootpath'] = __DIR__.'/../../htdocs/'; |
|
12 | +require $opt['rootpath'].'lib2/web.inc.php'; |
|
13 | 13 | |
14 | 14 | if (!isset($_REQUEST['since'])) { |
15 | 15 | exit; |
@@ -23,6 +23,6 @@ discard block |
||
23 | 23 | $since |
24 | 24 | ); |
25 | 25 | while ($pic = sql_fetch_assoc($rs)) { |
26 | - echo $pic['url'] . "\n"; |
|
26 | + echo $pic['url']."\n"; |
|
27 | 27 | } |
28 | 28 | mysql_free_result($rs); |
@@ -5,7 +5,7 @@ |
||
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 = 'event_attendance'; |
11 | 11 | $tpl->popup = true; |
@@ -5,7 +5,7 @@ |
||
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 = 'event_attendance'; |
11 | 11 | $tpl->popup = true; |
@@ -5,7 +5,7 @@ |
||
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 = 'event_attendance'; |
11 | 11 | $tpl->popup = true; |