diff --git a/doc/changes.txt b/doc/changes.txt index f4c9a0a2..42c51882 100644 --- a/doc/changes.txt +++ b/doc/changes.txt @@ -8,6 +8,9 @@ for Database changelog, see htdocs/doc/sql/db-changes.txt Opencaching Network Implementation Version 2.0 Changes File + +This list is incomplete. + 27.08.2010 (Oliver) - modified translation system (see translation.php, "scan source files" added) diff --git a/doc/cracklib.txt b/doc/cracklib.txt deleted file mode 100644 index 8236818c..00000000 --- a/doc/cracklib.txt +++ /dev/null @@ -1,37 +0,0 @@ - - Opencaching Network Implementation Version 2.0 - - - 22 May 2007 - - Copyright (C) 2007 opencaching.de - - cracklib Information - - 1) Install cracklib - - Download and Install - http://sourceforge.net/projects/cracklib - - Use the small wordlist shipped with the package. - - 2) Install php-extension - - Downlad pecl-extension - http://pecl.php.net/get/crack-0.4.tgz - - Extract the content - # cd into the source-directory - # phpize - # ./configure - # make - # copy crack.so to your php-extension directory - - set php.ini - [Crack] - crack.default_dictionary = "/usr/local/share/cracklib/pw_dict" - - Further reading: - http://www.php.net/manual/de/function.crack-check.php - http://www.phpbar.de/w/PECL - http://pecl.php.net/package/crack diff --git a/doc/directories.html b/doc/directories.html deleted file mode 100644 index c0d3a998..00000000 --- a/doc/directories.html +++ /dev/null @@ -1,141 +0,0 @@ - - -

Directory structure

-

This documentation is outdated.

- -

Preface

-

- The overall directory structure seems to be complex and redudant. - The reason for this is that we still have to support the directory structure of - previous source codes. Some of these directories can be removed in future - when the old source codes have been updated to use the current template - engine. Some other directories should be kept in future, because some - geocache listings or other website may reference to files inside that - directories. This document will first explain the currently intended directory - structure and after that explain the obsolete directories. You should only - use the new directory structure in new developments.
-
- All directories in this document will reference to trunk as base directory. - Other branches and tags should use the same directory structure. -

- -

Directories

- -

code

-

- All files that have to be uploaded to the webserver are contained in this - directory. -

- -

code/bin

-

- Command line utilities for Opencaching administration and utlilities used - by the PHP code. This directory should only contain the binary itself. Config - files and libraries should be placed in the appropriate directory. -

- -

code/config

-

- Contains configuration files. The source code is delivered with an default - configuration (settings-dist.inc.php). In the local webserver configuration - (settings.inc.php) only values have to be included that differ from the default - configuration. An example of this configuration is delivered with - (settings-sample.inc.php). -

- -

code/htdocs

-

- This directory should be the document root of the apache configuration. Only - these files have to be accessible for web users. -

- -

code/lib

-

- Contains Opencaching business logic files and classes.
- Subdirectories may be created for storing a set of classes that contain to - the same functionality like "search modules". -

- -

code/template

-

- Smarty HTML templates. -

- -

code/upload

-

- Directory containing all files that the users have uploaded. A seperate - structure of subdirectories may be created for each upload functionality - (e.g. GPX files or images). -

- -

code/webcache

-

- Directory for caching files used to generate or speed up site processing. - Like compiled smarty files or caching of the menu structure. -

- -

documentation

-

- See documentation for details. -

- -

resource

-

- Contains files that were used to generate images and other "generated content".
- Subdirectory structure may be used where appropriate. -

- -

Obsolete directories

-

- Existing sources have been copied to code/htdocs because in previous codes, there - was no strict seperation between "inside" and "ouside" the public accessbile root - directory of the web server. -

-

- There are 2 template engines used in the opencaching source code.
- The first one is a self-written template engine (refered as "old") and the - second one is smarty (refered as "new").
- You can determine what source code is used when you - look into the first code lines of the file. If the soruce file - includes "lib/common.inc.php" the old template system is used. If it includes - "lib2/web.inc.php", the new template engine is used.
- Directories ending with "2" belong to the new template engine. Directories - without a "2" at the end belong the the old template engine. -

- -

code/htdocs/cache

-

code/htdocs/cache2

-

code/htdocs/cache2/smarty/cache

-

code/htdocs/cache2/smarty/compiled

-

code/htdocs/cache2/translate

-

code/htdocs/config2

-

code/htdocs/doc

-

code/htdocs/doc/sql/static-data

-

code/htdocs/doc/sql/stored-proc

-

code/htdocs/doc/sql/tables

-

code/htdocs/doc2

-

code/htdocs/doc2/images

-

code/htdocs/download

-

code/htdocs/html

-

code/htdocs/images

-

code/htdocs/lang/de/ocstyle

-

code/htdocs/lang/de/ocstyle/email

-

code/htdocs/lang/de/ocstyle/images

-

code/htdocs/lang/de/ocstyle/js

-

code/htdocs/lang/de/ocstyle/lib

-

code/htdocs/lib

-

code/htdocs/lib2

-

code/htdocs/lib2/logic

-

code/htdocs/resource2/misc

-

code/htdocs/resource2/ocstyle

-

code/htdocs/resource2/tinymce

-

code/htdocs/statpics

-

code/htdocs/templates/mail

-

code/htdocs/templates/ocstyle

-

code/htdocs/templates/ocstyle/articles

-

code/htdocs/util

-

code/htdocs/util2

-

code/htdocs/xml

- - - \ No newline at end of file diff --git a/doc/edit-permissions.txt b/doc/edit-permissions.txt index 50c65956..54bc9fee 100644 --- a/doc/edit-permissions.txt +++ b/doc/edit-permissions.txt @@ -4,49 +4,42 @@ Rechteverwaltung -Rechte gelten jeweils für alle zuordneten Objekte +Rechte gelten jeweils für alle zuordneten Objekte z.B. Beschreibung und Bilder. -Für Caches +Für Caches Jeder Besitzer ADMIN_USER Anzeigen *1 X X Anlegen X Bearbeiten X *2 -Löschen *3 +Löschen *1 wenn Status 1-3 - - *2 Status ändern - GC-Wegpunkt ändern - Beschreibung mit Fixtext ersetzen (Urheberrechtsverletzung) - Bild mit Fixbild ersetzen (Urheberrechtsverletzung) - Erzeugt auch E-Mail an den Owner - - *3 Zusammen mit Logs, Beschreibung und Bildern - Erzeugt auch E-Mail an den Owner + *2 Status ändern -Für Cachelogs - - Jeder Log-Besitzer Cache-Besitzer ADMIN_USER -Anzeigen *1 *1 X X -Anlegen X X X X -Bearbeiten X -Löschen X *2 *2 - - *1 wenn Cache-Status 1-3 - - *2 Mit Löschkommentar der an den Owner geschickt wird - - -Für Beschreibungen und Bilder +Für Cachebeschreibungen und Bilder Jeder Besitzer ADMIN_USER Anzeigen *1 X X Anlegen X -Bearbeiten -Löschen X +Bearbeiten X +Löschen X *1 wenn Cache-Status 1-3 + + +Für Cachelogs + + Jeder Log-Besitzer Cache-Besitzer ADMIN_USER +Anzeigen *1 *1 X X +Anlegen X X X *4 +Bearbeiten X *2 +Löschen X *3 + + *1 wenn Cache-Status 1-3 (suboptiomal beim Log-Besitzer) + *2 geplant: Spoierflag setzen (siehe Todo #97) + *3 mit Löschkommentar der an den Owner geschickt wird + *4 mit OC-Team-Flag beim Abarbeiten einer Cachemeldung diff --git a/doc/index.html b/doc/index.html deleted file mode 100644 index 2662d65a..00000000 --- a/doc/index.html +++ /dev/null @@ -1,38 +0,0 @@ - - -

Opencaching source code documentation

-

- Documentation is grouped into the following main parts:
-
-

- If you are interested in writing 3rd party applications, you - only need to know the licensing and API documentation.
- However, some knowledge of the database schema may be heplfull.
-
- Before reading other documents, you may want to inform youself about - the directory structure.
-

- -

License

-

- License -

- -

Administraton

- -

Database

- -

Code

- Repository usage
- Directory structure
- -

API

- - - \ No newline at end of file diff --git a/doc/replication.txt b/doc/replication.txt index e42fe56b..854a367c 100644 --- a/doc/replication.txt +++ b/doc/replication.txt @@ -47,11 +47,11 @@ You need to configure each slave database in the configuration see settings-dist.inc.php for available options. - 3.2 util2/replication_monitor/replication_monitor.sh + 3.2 local/prodsys/replication_monitor.sh This script updates a timestamp in the database every 10 seconds. This timestamp will be replicated to each slave and can therefore - detect in a reliable way what time lack is in the binary log. + detect in a reliable way what time lag is in the binary log. See remarks in the script how to install and use it. @@ -64,7 +64,7 @@ The DB user requires privilege "REPLICATION CLIENT". If you require SSL replication, this may be a security risk. - 3.4 util2/replication_monitor/purge_master_logs.php + 3.4 local/prodsys/purge_master_logs.php This script purges old binary logs that are no more required by any slave. @@ -111,8 +111,12 @@ 5.2 Scripts using slave servers + getNew.class.php -> 404.php, index.php + logpics.inc.php -> index.php, myhome.php, newlogpics.php, viewcache.php + map2.php newcaches.php newcachesrest.php newlogs.php search.php + search1.php tops.php diff --git a/doc/repository.html b/doc/repository.html deleted file mode 100644 index 570f74a9..00000000 --- a/doc/repository.html +++ /dev/null @@ -1,41 +0,0 @@ - - -

Repository usage

- -

SVN update

-

- When doing an SVN update watch for changes in the following files: -

- In most cases you have to review the changes and update your configuration - or database. The update is done manually. - -

- -

SVN commit

-

- Commit your changes to the dev branch when you have finished the developlment.
- When these changes have been tested, they will be merged into the trunk. -

- - \ No newline at end of file diff --git a/htdocs/api/ping.php b/htdocs/api/ping.php new file mode 100644 index 00000000..f486e2fa --- /dev/null +++ b/htdocs/api/ping.php @@ -0,0 +1,9 @@ + \ No newline at end of file diff --git a/htdocs/editcache.php b/htdocs/editcache.php index 266f0c24..307b8121 100644 --- a/htdocs/editcache.php +++ b/htdocs/editcache.php @@ -101,7 +101,7 @@ function getWaypoints($cacheid) } //here we read all used information from the form if submitted, otherwise from DB - $cache_name = isset($_POST['name']) ? $_POST['name'] : $cache_record['name']; // Ocprop + $cache_name = trim(isset($_POST['name']) ? $_POST['name'] : $cache_record['name']); // Ocprop $cache_type = isset($_POST['type']) ? $_POST['type'] : $cache_record['type']; if (!isset($_POST['size'])) { @@ -220,10 +220,9 @@ function getWaypoints($cacheid) // name $name_not_ok = false; - if(isset($_POST['name'])) + if($cache_name == "") { - if($_POST['name'] == "") - $name_not_ok = true; + $name_not_ok = true; } if (isset($_POST['latNS'])) diff --git a/htdocs/newcache.php b/htdocs/newcache.php index 6654af40..61f6f4df 100644 --- a/htdocs/newcache.php +++ b/htdocs/newcache.php @@ -119,7 +119,7 @@ tpl_set_var('lat_min', htmlspecialchars($lat_min, ENT_COMPAT, 'UTF-8')); //name - $name = isset($_POST['name']) ? $_POST['name'] : ''; // Ocprop + $name = isset($_POST['name']) ? trim($_POST['name']) : ''; // Ocprop tpl_set_var('name', htmlspecialchars($name, ENT_COMPAT, 'UTF-8')); //shortdesc diff --git a/htdocs/search.php b/htdocs/search.php index 8646136b..a6640c98 100644 --- a/htdocs/search.php +++ b/htdocs/search.php @@ -1197,9 +1197,7 @@ } else // by name { - // Some names start with spaces ... - // caches.name is not indexed, so ltrimming won't cost performance. - $sql .= 'LTRIM(`caches`.`name`) ASC'; + $sql .= '`caches`.`name` ASC'; } // range of output diff --git a/htdocs/util/archive/.htaccess b/htdocs/util/archive/.htaccess deleted file mode 100644 index 4a242eec..00000000 --- a/htdocs/util/archive/.htaccess +++ /dev/null @@ -1,4 +0,0 @@ -AuthUserFile /path/to/passwdfile/.htpasswd -AuthName "OC-Admin" -AuthType Basic -require valid-user \ No newline at end of file diff --git a/htdocs/util/archive/index.html b/htdocs/util/archive/index.html deleted file mode 100644 index 3e6cee51..00000000 --- a/htdocs/util/archive/index.html +++ /dev/null @@ -1,20 +0,0 @@ - - -Caches archivieren - - - - - - - - - <body> - - <p>Diese Seite verwendet Frames. Frames werden von Ihrem Browser aber nicht - unterstützt.</p> - - </body> - - - \ No newline at end of file diff --git a/htdocs/util/archive/list.php b/htdocs/util/archive/list.php deleted file mode 100644 index 132a8e2c..00000000 --- a/htdocs/util/archive/list.php +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - -
- - -
-' . $rCache['wp_oc'] . '
'; - } - mysql_free_result($rsCaches); -?> - - diff --git a/htdocs/util/archive/top.php b/htdocs/util/archive/top.php deleted file mode 100644 index 32529433..00000000 --- a/htdocs/util/archive/top.php +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - Archivieren - - \ No newline at end of file diff --git a/htdocs/util/caches_repairnames/index.php b/htdocs/util/caches_repairnames/index.php deleted file mode 100644 index cfadc45c..00000000 --- a/htdocs/util/caches_repairnames/index.php +++ /dev/null @@ -1,59 +0,0 @@ -#!/usr/local/bin/php -q - \ No newline at end of file diff --git a/htdocs/util/delete/.htaccess b/htdocs/util/delete/.htaccess deleted file mode 100644 index 4a242eec..00000000 --- a/htdocs/util/delete/.htaccess +++ /dev/null @@ -1,4 +0,0 @@ -AuthUserFile /path/to/passwdfile/.htpasswd -AuthName "OC-Admin" -AuthType Basic -require valid-user \ No newline at end of file diff --git a/htdocs/util/delete/cache.php b/htdocs/util/delete/cache.php deleted file mode 100644 index 9cea4b39..00000000 --- a/htdocs/util/delete/cache.php +++ /dev/null @@ -1,182 +0,0 @@ - - - -
- -
- -'; - echo ''; - - $rsDescs = sql("SELECT COUNT(*) `count` FROM `cache_desc` WHERE `cache_id`='&1'", $r['cacheid']); - $rDescs = sql_fetch_array($rsDescs); - mysql_free_result($rsDescs); - echo ''; - - $rsVisits = sql("SELECT COUNT(*) `count` FROM `cache_visits` WHERE `cache_id`='&1'", $r['cacheid']); - $rVisits = sql_fetch_array($rsVisits); - mysql_free_result($rsVisits); - echo ''; - - $rsLogs = sql("SELECT COUNT(*) `count` FROM `cache_logs` WHERE `cache_id`='&1'", $r['cacheid']); - $rLogs = sql_fetch_array($rsLogs); - mysql_free_result($rsLogs); - echo ''; - - $rsPictures = sql("SELECT COUNT(*) `count` FROM `pictures` WHERE `object_id`='&1' AND object_type=2", $r['cacheid']); - $rPictures = sql_fetch_array($rsPictures); - mysql_free_result($rsPictures); - echo ''; - - echo ' - - - '; - echo ''; - echo ''; - - // nach alternativem cache suchen - $rsSecond = sql("SELECT `caches`.`cache_id` `cacheid`, `caches`.`name` `name`, `cache_status`.`de` `status` FROM `caches`, `cache_status` WHERE `caches`.`status`=`cache_status`.`id` AND `caches`.`longitude`='&1' AND `caches`.`latitude`='&2' AND `caches`.`cache_id` != '&3'", $r['longitude'], $r['latitude'], $r['cacheid']); - while ($rSecond = sql_fetch_assoc($rsSecond)) - { - echo ''; - echo ''; - } - mysql_free_result($rsSecond); -?> -
Name:' . htmlspecialchars($r['name'], ENT_COMPAT, 'UTF-8') . '
Status:' . htmlspecialchars($r['status'], ENT_COMPAT, 'UTF-8') . '
Beschreibungen:' . htmlspecialchars($rDescs['count'], ENT_COMPAT, 'UTF-8') . '
Aufruf-Records:' . htmlspecialchars($rVisits['count'], ENT_COMPAT, 'UTF-8') . '
Logeinträge:' . htmlspecialchars($rLogs['count'], ENT_COMPAT, 'UTF-8') . '
Bilder:' . htmlspecialchars($rPictures['count'], ENT_COMPAT, 'UTF-8') . '
  -
- - -
- -
-
  
  
Doppellisting:' . htmlspecialchars($rSecond['name'], ENT_COMPAT, 'UTF-8') . '
Status:' . $rSecond['status'] . '
- - - - - -
- - Cacheid - -
- - diff --git a/htdocs/util/delete/user.php b/htdocs/util/delete/user.php deleted file mode 100644 index 8e34346d..00000000 --- a/htdocs/util/delete/user.php +++ /dev/null @@ -1,137 +0,0 @@ - 0) - die('Es sind noch Caches vorhanden! Suchen'); - - // pictures - $rs = sql("SELECT `pictures`.`id`, `pictures`.`url` FROM `pictures` INNER JOIN `cache_logs` ON `pictures`.`object_type`=1 AND `pictures`.`object_id`=`cache_logs`.`id` WHERE `cache_logs`.`user_id`='&1'", $userid); - while ($r = sql_fetch_assoc($rs)) - { - $filename = $r['url']; - while (mb_strpos($filename, '/') !== false) - $filename = mb_substr($filename, mb_strpos($filename, '/') + 1); - - if (is_file($picdir . '/' . $filename)) - { - unlink($picdir . '/' . $filename); - echo $filename . "
"; - } - - sql("DELETE FROM `pictures` WHERE `id`='&1'", $r['id']); - } - - // statpic - if (is_file($rootpath . 'images/statpics/statpic' . $userid . '.jpg')) - unlink($rootpath . 'images/statpics/statpic' . $userid . '.jpg'); - - // queries - sql("DELETE FROM `queries` WHERE `user_id`=&1", $userid); - - // watches_notified - sql("DELETE FROM `watches_notified` WHERE `user_id`=&1", $userid); - - // cache_logs - $rs = sql("SELECT `id`, `cache_id`, `type` FROM `cache_logs` WHERE `user_id`=&1", $userid); - while ($r = sql_fetch_assoc($rs)) - { - sql("DELETE FROM `cache_logs` WHERE `id`=&1", $r['id']); - } - - // user - sql("DELETE FROM `user` WHERE `user_id`=&1", $userid); - - echo 'Benutzer gelöscht'; - - exit; - } - else if ($action == 'showuser') - { - $username = isset($_REQUEST['username']) ? $_REQUEST['username'] : ''; - - $rs = sql("SELECT `user`.`user_id`, `user`.`username`, `user`.`email`, `user`.`activation_code`, `user`.`is_active_flag`, `stat_user`.`hidden`, `stat_user`.`found`, `stat_user`.`note`, `stat_user`.`notfound` FROM `user` LEFT JOIN `stat_user` ON `user`.`user_id`=`stat_user`.`user_id` WHERE (`user`.`username`='&1' OR `user`.`email`='&1') LIMIT 1", $username); - if (mysql_num_rows($rs) != 0) - { - $r = sql_fetch_assoc($rs); - sql_free_result($rs); -?> - - -
- -
- -'; - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - - echo ' - - - '; - echo ''; - echo ''; -?> -
Name:' . htmlspecialchars($r['username'], ENT_COMPAT, 'UTF-8') . '
EMail:' . $r['email'] . '
Aktivierungscode:' . $r['activation_code'] . '
Letzter Login:' . sqlValue("SELECT MAX(`last_login`) FROM `sys_sessions` WHERE `user_id`='" . sql_escape($r['user_id']) . "'", '0') . '
Aktiv:' . $r['is_active_flag'] . '
Versteckt:' . ($r['hidden']+0) . '
Logeinträge:' . ($r['found'] + $r['note'] + $r['notfound']) . '
  -
- - -
- -
-
  
  
- - - - - -
- - Benutzername - -
- - diff --git a/htdocs/util/fonts/.htaccess b/htdocs/util/fonts/.htaccess deleted file mode 100644 index d75c7092..00000000 --- a/htdocs/util/fonts/.htaccess +++ /dev/null @@ -1,4 +0,0 @@ - -Order Deny,Allow -Deny from All - diff --git a/htdocs/util/fonts/verdana.ttf b/htdocs/util/fonts/verdana.ttf deleted file mode 100644 index 754a9b7b..00000000 Binary files a/htdocs/util/fonts/verdana.ttf and /dev/null differ diff --git a/htdocs/util/google-earth/README b/htdocs/util/google-earth/README new file mode 100644 index 00000000..bac98805 --- /dev/null +++ b/htdocs/util/google-earth/README @@ -0,0 +1,3 @@ +This DUPLICATE of util2/google-earth has to be retained, +because it can be referenced from anywhere else and local +copyies of opencaching.kml may exist. diff --git a/htdocs/util/google-earth/caches.php b/htdocs/util/google-earth/caches.php index ff314cbe..84c9cf8c 100644 --- a/htdocs/util/google-earth/caches.php +++ b/htdocs/util/google-earth/caches.php @@ -1,333 +1,5 @@ - Beschreibung ansehen
Von {username}
 
{typeimgurl} Art: {type}
Größe: {size}
Schwierigkeit: {difficulty} von 5.0
Gelände: {terrain} von 5.0
]]>
- {name} - - {lon} - {lat} - 5000 - 0 - 3 - - #{icon} - - {lon},{lat},0 - - -'; - - $kmlHead = -' - - - - - - - - - - - - - - Geocaches (Opencaching) - 0 - '; - - $kmlFoot = ' - - - '; - - $kmlTimeFormat = 'Y-m-d\TH:i:s\Z'; - - // header("Content-type: application/vnd.google-earth.kml"); - // header("Content-Disposition: attachment; filename=ge.kml"); - - echo mb_ereg_replace('{urlbase}', xmlentities($opt['page']['absolute_url']), $kmlHead); - - if ((abs($lon_from - $lon_to) > 2) || (abs($lat_from - $lat_to) > 2)) - { - echoZoomIn($lon_from, $lon_to, $lat_from, $lat_to); - } - else - { - $rs = sql("SELECT `caches`.`cache_id` AS `cacheid`, `caches`.`longitude` AS `longitude`, `caches`.`latitude` AS `latitude`, `caches`.`type` AS `type`, `caches`.`date_hidden` AS `date_hidden`, `caches`.`name` AS `name`, `cache_type`.`de` AS `typedesc`, `cache_size`.`de` AS `sizedesc`, `caches`.`terrain` AS `terrain`, `caches`.`difficulty` AS `difficulty`, `user`.`username` AS `username` - FROM `caches` - INNER JOIN `cache_type` ON `caches`.`type`=`cache_type`.`id` - INNER JOIN `cache_size` ON `caches`.`size`=`cache_size`.`id` - INNER JOIN `user` ON `caches`.`user_id`=`user`.`user_id` - WHERE `caches`.`status`=1 AND - `caches`.`longitude`>='&1' AND - `caches`.`longitude`<='&2' AND - `caches`.`latitude`>='&3' AND - `caches`.`latitude`<='&4'", - $lon_from, $lon_to, $lat_from, $lat_to); - - $nCount = 0; - while ($r = sql_fetch_array($rs)) - { - $nCount = $nCount + 1; - $thisline = $kmlLine; - - // icon suchen - switch ($r['type']) - { - case 2: - $icon = 'tradi'; - $typeimgurl = 'Normaler Cache'; - break; - case 3: - $icon = 'multi'; - $typeimgurl = 'Multicache'; - break; - case 4: - $icon = 'virtual'; - $typeimgurl = 'virtueller Cache'; - break; - case 5: - $icon = 'webcam'; - $typeimgurl = 'Webcam Cache'; - break; - case 6: - $icon = 'event'; - $typeimgurl = 'Event Cache'; - break; - case 7: - $icon = 'myst'; - $typeimgurl = 'Event Cache'; - break; - case 8: - $icon = 'math'; - $typeimgurl = 'Event Cache'; - break; - case 9: - $icon = 'moving'; - $typeimgurl = 'Event Cache'; - break; - case 10: - $icon = 'drivein'; - $typeimgurl = 'Event Cache'; - break; - default: - $icon = 'unknown'; - $typeimgurl = 'unbekannter Cachetyp'; - break; - } - $thisline = mb_ereg_replace('{icon}', $icon, $thisline); - $thisline = mb_ereg_replace('{typeimgurl}', $typeimgurl, $thisline); - - $lat = sprintf('%01.5f', $r['latitude']); - $thisline = mb_ereg_replace('{lat}', $lat, $thisline); - - $lon = sprintf('%01.5f', $r['longitude']); - $thisline = mb_ereg_replace('{lon}', $lon, $thisline); - - $time = date($kmlTimeFormat, strtotime($r['date_hidden'])); - $thisline = mb_ereg_replace('{time}', $time, $thisline); - - $thisline = mb_ereg_replace('{name}', xmlentities($r['name']), $thisline); - - if (($r['status'] == 2) || ($r['status'] == 3)) - { - if ($r['status'] == 2) - $thisline = mb_ereg_replace('{archivedflag}', 'Momentan nicht verfügbar', $thisline); - else - $thisline = mb_ereg_replace('{archivedflag}', 'Archiviert!, ', $thisline); - } - else - $thisline = mb_ereg_replace('{archivedflag}', '', $thisline); - - $thisline = mb_ereg_replace('{type}', xmlentities($r['typedesc']), $thisline); - $thisline = mb_ereg_replace('{size}', xmlentities($r['sizedesc']), $thisline); - - $difficulty = sprintf('%01.1f', $r['difficulty'] / 2); - $thisline = mb_ereg_replace('{difficulty}', $difficulty, $thisline); - - $terrain = sprintf('%01.1f', $r['terrain'] / 2); - $thisline = mb_ereg_replace('{terrain}', $terrain, $thisline); - - $time = date($kmlTimeFormat, strtotime($r['date_hidden'])); - $thisline = mb_ereg_replace('{time}', $time, $thisline); - - $thisline = mb_ereg_replace('{username}', xmlentities($r['username']), $thisline); - $thisline = mb_ereg_replace('{cacheid}', xmlentities($r['cacheid']), $thisline); - - $thisline = mb_ereg_replace('{urlbase}', xmlentities($opt['page']['absolute_url']), $thisline); - - echo $thisline; - } - sql_free_result($rs); - } - - echo $kmlFoot; - exit; - -function echoZoomIn($lon_from, $lon_to, $lat_from, $lat_to) -{ - $nColumnsCount = 60; - $sZoomIn = - ' - - - - - - ####### ####### ####### # # - # # # # # ## ## - # # # # # # # # # - # # # # # # # # - # # # # # # # - # # # # # # # - ####### ####### ####### # # - - - ### # # - # ## # - # # # # - # # # # - # # # # - # # ## - ### # # - - - - - -'; - - // prepare lines - $sZoomIn = str_replace("\r", "", $sZoomIn); - $sLines = split("\n", $sZoomIn); - for ($i = 0; $i < count($sLines); $i++) - $sLines[$i] = str_pad($sLines[$i], ($nColumnsCount-1), ' '); - - $nDegreePerLine = ($lat_to - $lat_from) / count($sLines); - $nDegreePerColumn = ($lon_to - $lon_from) / $nColumnsCount; - - for ($nLine = 0; $nLine < count($sLines); $nLine++) - { - for ($nColumn = 0; $nColumn < $nColumnsCount; $nColumn++) - { - if (substr($sLines[$nLine], $nColumn, 1) == '#') - { - $nLat = $lat_to - $nDegreePerLine * $nLine; - $nLon = $lon_from + $nDegreePerColumn * $nColumn; - - echo ' - - - - - ' . $nLon . ' - ' . $nLat . ' - 5000 - 0 - 3 - - - ' . $nLon . ',' . $nLat . ',0 - - - '; - - } - } - } -} - -?> +?> \ No newline at end of file diff --git a/htdocs/util/google-earth/opencaching.kml b/htdocs/util/google-earth/opencaching.kml index 5ed692af..88767abc 100644 --- a/htdocs/util/google-earth/opencaching.kml +++ b/htdocs/util/google-earth/opencaching.kml @@ -11,7 +11,7 @@ Opencaching - http://www.opencaching.de/util/google-earth/caches.php + http://www.opencaching.de/util2/google-earth/caches.php 1 onStop diff --git a/htdocs/util/mkdefault_desclang/.htaccess b/htdocs/util/mkdefault_desclang/.htaccess deleted file mode 100644 index d75c7092..00000000 --- a/htdocs/util/mkdefault_desclang/.htaccess +++ /dev/null @@ -1,4 +0,0 @@ - -Order Deny,Allow -Deny from All - diff --git a/htdocs/util/mkdefault_desclang/index.php b/htdocs/util/mkdefault_desclang/index.php deleted file mode 100755 index 13fe74cd..00000000 --- a/htdocs/util/mkdefault_desclang/index.php +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/local/bin/php -q - \ No newline at end of file diff --git a/htdocs/util/ping.php b/htdocs/util/ping.php deleted file mode 100644 index d78dc5f2..00000000 --- a/htdocs/util/ping.php +++ /dev/null @@ -1,11 +0,0 @@ - \ No newline at end of file diff --git a/htdocs/util/stats/rank.php b/htdocs/util/stats/rank.php deleted file mode 100644 index ad49c62a..00000000 --- a/htdocs/util/stats/rank.php +++ /dev/null @@ -1,14 +0,0 @@ - diff --git a/htdocs/util/caches_repairnames/.htaccess b/htdocs/util2/cache_repairnames/.htaccess similarity index 100% rename from htdocs/util/caches_repairnames/.htaccess rename to htdocs/util2/cache_repairnames/.htaccess diff --git a/htdocs/util2/cache_repairnames/repairnames.php b/htdocs/util2/cache_repairnames/repairnames.php new file mode 100644 index 00000000..ac1799fb --- /dev/null +++ b/htdocs/util2/cache_repairnames/repairnames.php @@ -0,0 +1,28 @@ +#!/usr/local/bin/php -q + diff --git a/htdocs/util2/info/.htaccess b/htdocs/util2/info/.htaccess new file mode 100644 index 00000000..82aaecaa --- /dev/null +++ b/htdocs/util2/info/.htaccess @@ -0,0 +1,4 @@ + +Order Allow,Deny +Allow from All + diff --git a/htdocs/util/header.php b/htdocs/util2/info/headers.php similarity index 100% rename from htdocs/util/header.php rename to htdocs/util2/info/headers.php diff --git a/local/prodsys/Contents b/local/prodsys/Contents deleted file mode 100644 index 3b510ed6..00000000 --- a/local/prodsys/Contents +++ /dev/null @@ -1,2 +0,0 @@ -This directory contains files which will reside outside the code directory tree -on a production system. \ No newline at end of file diff --git a/local/prodsys/README b/local/prodsys/README new file mode 100644 index 00000000..24d984c7 --- /dev/null +++ b/local/prodsys/README @@ -0,0 +1,2 @@ +This directory contains files which usually will reside outside +the code directory tree on a production system. \ No newline at end of file diff --git a/local/prodsys/replication_monitor.sh b/local/prodsys/replication_monitor.sh new file mode 100644 index 00000000..998e3353 --- /dev/null +++ b/local/prodsys/replication_monitor.sh @@ -0,0 +1,769 @@ + + + + + + + + + opencaching/code/htdocs/util2/replication_monitor/replication_monitor.sh at master · OpencachingTeam/opencaching + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+
+ + + + + +
+ + + + + +
+ + +
+
+ + + + + +
+ + This repository + + +
+
+ +
+ + +
This repository
+
+ +
+ + +
All repositories
+
+ +
+
+
+ + + + + + + + +
+ +
+ + + + + + + + + + + + +
+
+ + + + + + + + +
+ +
+
+ + +
    + +
  • +
    + +
    + + + + + Watch + + + +
    +
    +
    + Notification status + +
    + +
    + +
    + +
    + +

    Not watching

    + You only receive notifications for discussions in which you participate or are @mentioned. + + + Watch + +
    +
    + +
    + +
    + +

    Watching

    + You receive notifications for all discussions in this repository. + + + Unwatch + +
    +
    + +
    + +
    + +

    Ignoring

    + You do not receive any notifications for discussions in this repository. + + + Stop ignoring + +
    +
    + +
    + +
    +
    +
    + +
    +
  • + +
  • + + + +
  • + + +
  • + + Fork + + +
  • + + +
+ +

+ public + + + /opencaching + + + Octocat-spinner-32 + + + + forked from totsubo/se2de-merge + +

+
+
+ +
+ +
+ +
+ + + + + + +
+ + + + + +
+

HTTPS clone URL

+ + + + +
+ + + +
+

SSH clone URL

+ + + + +
+ + + +
+

Subversion checkout URL

+ + + + +
+ + + +

You can clone with + HTTPS, + SSH, + Subversion, + and other methods. +

+ + + + + Clone in Desktop + + + + + + Download ZIP + + +
+
+ +
+ + + + + + + + +Show File Finder + +
+ + + +
+ + + branch: + master + + +
+ +
+
+ Switch branches/tags + +
+ +
+
+ +
+
+ +
+
+ +
+ +
+ + +
+ + master +
+
+ + ocde_updates +
+
+ + ocdegpx +
+ +
+ + ocdetest +
+
+ + ocsedev +
+
+ + ocseprod +
+
+ + rootpath +
+
+ +
Nothing to show
+
+ +
+
+ + +
+ +
Nothing to show
+
+ +
+
+
+ + +
+ + + +
+ + + + + + + +
+ + +
+
+
+
+ + file + 45 lines (40 sloc) + 1.248 kb +
+ + +
+
+ + + + + +
+ 1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 + + +
#!/bin/bash
#
# Opencaching replication monitor bash script
#
# This script writes every 10 seconds the current timestamp to
# table sys_repl_timestamp. This enables the cron-module
# repliaction_monitor to check if the mysql replication slave(s) is up to
# date and online.
#
# You should place this bash script outside the PHP configured
# open_basedir restriction and place a cronjob entry that
# executes every 5 minutes or place it in rc.3 or rc.5
# (run this script on the master database server, not on any slave!)
#
# If you setup a cronjob call it with parameter "-q" to prevent
# output of running-message.
#

# begin of configuration
PIDFILE=/var/run/oc_replication_monitor.pid
DBHOST=oc
DBNAME=oc
DBUSER=oc
DBPASSWORD=oc
# end of configuration

if [ -f $PIDFILE ]; then
if [ -d /proc/`cat $PIDFILE` ]; then
if (readlink /proc/`cat $PIDFILE`/exe | grep -q /bin/bash); then
if [ "$1" != "-q" ]; then
echo "replication_monitor running with pid `cat $PIDFILE`, exiting"
      fi
exit
fi
fi
fi

echo $$ > $PIDFILE

while [ 1 ]
do
mysql -h$DBHOST -u$DBUSER -p$DBPASSWORD $DBNAME --execute="INSERT INTO sys_repl_timestamp (id, data) VALUES (1, NOW()) ON DUPLICATE KEY UPDATE data=NOW();"
  sleep 10
done
+
+
+ +
+
+ + + + +
+
+ +
+ +
+
+ + + + +
+ +
+ + +
+
+
+ +
+
+
+
+
+
+ +
+ + + +
+ + + Something went wrong with that request. Please try again. +
+ + + + + diff --git a/local/stat/newimages.php b/local/stat/newimages.php new file mode 100644 index 00000000..d1f76370 --- /dev/null +++ b/local/stat/newimages.php @@ -0,0 +1,26 @@ += '2013' AND date_created >= '&1' + ORDER BY date_created", + $since); +while ($pic = sql_fetch_assoc($rs)) + echo $pic['url'] . "\n"; +mysql_free_result($rs); + +?> + \ No newline at end of file