status logging
@@ -148,4 +148,24 @@
|
||||
sql("ALTER TABLE `nuts_layer` COMMENT = 'static content'");
|
||||
}
|
||||
|
||||
function dbv_104() // added maintenance logs and OC team comments
|
||||
{
|
||||
sql("ALTER TABLE `log_types_text` COMMENT = 'obsolete'");
|
||||
sql("ALTER TABLE `cache_logtype` COMMENT = 'obsolete'");
|
||||
sql("ALTER TABLE `log_types` CHANGE COLUMN `cache_status` `cache_status` tinyint(1) NOT NULL default '0'");
|
||||
sql("ALTER TABLE `log_types` CHANGE COLUMN `en` `en` varchar(60) NOT NULL");
|
||||
if (!field_exists('stat_caches','maintenance'))
|
||||
sql("ALTER TABLE `stat_caches` ADD COLUMN `maintenance` smallint(5) unsigned NOT NULL AFTER `will_attend`");
|
||||
if (!field_exists('stat_cache_logs','maintenance'))
|
||||
sql("ALTER TABLE `stat_cache_logs` ADD COLUMN `maintenance` smallint(5) unsigned NOT NULL AFTER `will_attend`");
|
||||
if (!field_exists('stat_user','maintenance'))
|
||||
sql("ALTER TABLE `stat_user` ADD COLUMN `maintenance` smallint(5) unsigned NOT NULL AFTER `will_attend`");
|
||||
if (!field_exists('cache_logs','oc_team_comment'))
|
||||
sql("ALTER TABLE `cache_logs` ADD COLUMN `oc_team_comment` tinyint(1) NOT NULL default '0' AFTER `type`");
|
||||
if (!field_exists('cache_logs_archived','oc_team_comment'))
|
||||
sql("ALTER TABLE `cache_logs_archived` ADD COLUMN `oc_team_comment` tinyint(1) NOT NULL default '0' AFTER `type`");
|
||||
// The new fields need not to be initialized, as these are new features and all
|
||||
// values are initally zero.
|
||||
}
|
||||
|
||||
?>
|
@@ -43,36 +43,6 @@
|
||||
{
|
||||
$tpl->redirect('mailto.php?userid=' . urlencode($reporterid));
|
||||
}
|
||||
elseif ((isset($_REQUEST['statusActive']) ||
|
||||
isset($_REQUEST['statusTNA']) ||
|
||||
isset($_REQUEST['statusArchived']) ||
|
||||
isset($_REQUEST['statusLockedVisible']) ||
|
||||
isset($_REQUEST['statusLockedInvisible']))
|
||||
&& $adminid == $login->userid)
|
||||
{
|
||||
$cache = new cache($cacheid);
|
||||
|
||||
if ($cache->exist() == false)
|
||||
$tpl->error(ERROR_CACHE_NOT_EXISTS);
|
||||
|
||||
if ($cache->allowView() == false)
|
||||
$tpl->error(ERROR_NO_ACCESS);
|
||||
|
||||
if (isset($_REQUEST['statusActive']))
|
||||
$cache->setStatus(1);
|
||||
else if (isset($_REQUEST['statusTNA']))
|
||||
$cache->setStatus(2);
|
||||
else if (isset($_REQUEST['statusArchived']))
|
||||
$cache->setStatus(3);
|
||||
else if (isset($_REQUEST['statusLockedVisible']))
|
||||
$cache->setStatus(6);
|
||||
else if (isset($_REQUEST['statusLockedInvisible']))
|
||||
$cache->setStatus(7);
|
||||
|
||||
$cache->save();
|
||||
|
||||
$tpl->redirect('adminreports.php?id=' . urlencode($rid));
|
||||
}
|
||||
elseif (isset($_REQUEST['done']) && $adminid == $login->userid)
|
||||
{
|
||||
sql("UPDATE `cache_reports` SET `status`=3 WHERE `id`=&1", $rid);
|
||||
|
@@ -17,7 +17,6 @@
|
||||
-- languages_list_default
|
||||
-- logentries_types
|
||||
-- log_types
|
||||
-- log_types_text
|
||||
-- news_topics
|
||||
-- nodes
|
||||
-- object_types
|
||||
@@ -621,25 +620,16 @@ INSERT INTO `languages_list_default` (`lang`, `show`) VALUES ('IT', 'SK');
|
||||
-- Table log_types
|
||||
SET NAMES 'utf8';
|
||||
TRUNCATE TABLE `log_types`;
|
||||
INSERT INTO `log_types` (`id`, `name`, `trans_id`, `permission`, `cache_status`, `de`, `en`, `icon_small`, `allow_rating`, `require_password`) VALUES ('1', 'Found', '56', 'C', '0', 'gefunden', 'Found', 'log/16x16-found.png', '1', '1');
|
||||
INSERT INTO `log_types` (`id`, `name`, `trans_id`, `permission`, `cache_status`, `de`, `en`, `icon_small`, `allow_rating`, `require_password`) VALUES ('2', 'Not found', '497', 'C', '0', 'nicht gefunden', 'Not found', 'log/16x16-dnf.png', '0', '0');
|
||||
INSERT INTO `log_types` (`id`, `name`, `trans_id`, `permission`, `cache_status`, `de`, `en`, `icon_small`, `allow_rating`, `require_password`) VALUES ('3', 'Note', '20', 'A', '0', 'Bemerkung', 'Note', 'log/16x16-note.png', '0', '0');
|
||||
INSERT INTO `log_types` (`id`, `name`, `trans_id`, `permission`, `cache_status`, `de`, `en`, `icon_small`, `allow_rating`, `require_password`) VALUES ('7', 'Attended', '498', 'C', '0', 'teilgenommen', 'Attended', 'log/16x16-attended.png', '1', '1');
|
||||
INSERT INTO `log_types` (`id`, `name`, `trans_id`, `permission`, `cache_status`, `de`, `en`, `icon_small`, `allow_rating`, `require_password`) VALUES ('8', 'Will attend', '499', 'C', '0', 'will dabei sein', 'Will attend', 'log/16x16-will_attend.png', '0', '0');
|
||||
|
||||
-- Table log_types_text
|
||||
SET NAMES 'utf8';
|
||||
TRUNCATE TABLE `log_types_text`;
|
||||
INSERT INTO `log_types_text` (`id`, `log_types_id`, `lang`, `text_combo`, `text_listing`) VALUES ('1', '1', 'DE', 'gefunden', 'hat den Cache gefunden');
|
||||
INSERT INTO `log_types_text` (`id`, `log_types_id`, `lang`, `text_combo`, `text_listing`) VALUES ('2', '2', 'DE', 'nicht gefunden', 'hat den Cache nicht gefunden');
|
||||
INSERT INTO `log_types_text` (`id`, `log_types_id`, `lang`, `text_combo`, `text_listing`) VALUES ('3', '3', 'DE', 'Bemerkung', 'hat eine Bemerkung geschrieben');
|
||||
INSERT INTO `log_types_text` (`id`, `log_types_id`, `lang`, `text_combo`, `text_listing`) VALUES ('4', '4', 'DE', 'gesperrt', 'hat den Cache gesperrt');
|
||||
INSERT INTO `log_types_text` (`id`, `log_types_id`, `lang`, `text_combo`, `text_listing`) VALUES ('5', '5', 'DE', 'fregegeben', 'hat den Cache wieder freigegeben');
|
||||
INSERT INTO `log_types_text` (`id`, `log_types_id`, `lang`, `text_combo`, `text_listing`) VALUES ('6', '6', 'DE', 'entfernt', 'hat den Cache entfernt');
|
||||
INSERT INTO `log_types_text` (`id`, `log_types_id`, `lang`, `text_combo`, `text_listing`) VALUES ('13', '7', 'EN', 'attended', 'attended the event');
|
||||
INSERT INTO `log_types_text` (`id`, `log_types_id`, `lang`, `text_combo`, `text_listing`) VALUES ('14', '8', 'EN', 'will attend', 'will attend the event');
|
||||
INSERT INTO `log_types_text` (`id`, `log_types_id`, `lang`, `text_combo`, `text_listing`) VALUES ('15', '7', 'DE', 'Teilgenommen', 'hat am Event teilgenommen');
|
||||
INSERT INTO `log_types_text` (`id`, `log_types_id`, `lang`, `text_combo`, `text_listing`) VALUES ('16', '8', 'DE', 'will dabei sein', 'beabsichtigt, am Event teilzunehmen');
|
||||
INSERT INTO `log_types` (`id`, `name`, `trans_id`, `permission`, `cache_status`, `de`, `en`, `icon_small`, `allow_rating`, `require_password`) VALUES ('1', 'Found', '56', 'C', '0', 'gefunden', 'found', 'log/16x16-found.png', '1', '1');
|
||||
INSERT INTO `log_types` (`id`, `name`, `trans_id`, `permission`, `cache_status`, `de`, `en`, `icon_small`, `allow_rating`, `require_password`) VALUES ('2', 'Not found', '497', 'C', '0', 'nicht gefunden', 'not found', 'log/16x16-dnf.png', '0', '0');
|
||||
INSERT INTO `log_types` (`id`, `name`, `trans_id`, `permission`, `cache_status`, `de`, `en`, `icon_small`, `allow_rating`, `require_password`) VALUES ('3', 'Note', '20', 'A', '0', 'Bemerkung', 'note', 'log/16x16-note.png', '0', '0');
|
||||
INSERT INTO `log_types` (`id`, `name`, `trans_id`, `permission`, `cache_status`, `de`, `en`, `icon_small`, `allow_rating`, `require_password`) VALUES ('7', 'Attended', '498', 'C', '0', 'teilgenommen', 'attended', 'log/16x16-attended.png', '1', '1');
|
||||
INSERT INTO `log_types` (`id`, `name`, `trans_id`, `permission`, `cache_status`, `de`, `en`, `icon_small`, `allow_rating`, `require_password`) VALUES ('8', 'Will attend', '499', 'C', '0', 'möchte teilnehmen', 'will attend', 'log/16x16-will_attend.png', '0', '0');
|
||||
INSERT INTO `log_types` (`id`, `name`, `trans_id`, `permission`, `cache_status`, `de`, `en`, `icon_small`, `allow_rating`, `require_password`) VALUES ('9', 'Archived', '1916', 'C', '3', 'archiviert', 'archived', 'log/16x16-archived.png', '0', '0');
|
||||
INSERT INTO `log_types` (`id`, `name`, `trans_id`, `permission`, `cache_status`, `de`, `en`, `icon_small`, `allow_rating`, `require_password`) VALUES ('10', 'Ready for search', '2020', 'C', '1', 'kann gesucht werden', 'ready for search', 'log/16x16-active.png', '0', '0');
|
||||
INSERT INTO `log_types` (`id`, `name`, `trans_id`, `permission`, `cache_status`, `de`, `en`, `icon_small`, `allow_rating`, `require_password`) VALUES ('11', 'Temporary not available', '2021', 'C', '2', 'momentan nicht verfügbar', 'temporarily not available', 'log/16x16-disabled.png', '0', '0');
|
||||
INSERT INTO `log_types` (`id`, `name`, `trans_id`, `permission`, `cache_status`, `de`, `en`, `icon_small`, `allow_rating`, `require_password`) VALUES ('13', 'Locked', '2023', 'C', '6', 'gesperrt', 'locked', 'log/16x16-locked.png', '0', '0');
|
||||
INSERT INTO `log_types` (`id`, `name`, `trans_id`, `permission`, `cache_status`, `de`, `en`, `icon_small`, `allow_rating`, `require_password`) VALUES ('14', 'Locked, invisible', '2024', 'C', '7', 'gesperrt, versteckt', 'locked, invisible', 'log/16x16-locked-invisible.png', '0', '0');
|
||||
|
||||
-- Table logentries_types
|
||||
SET NAMES 'utf8';
|
||||
@@ -1593,8 +1583,8 @@ INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('717', 'Last upd
|
||||
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('718', 'Waypoint', '2010-08-28 11:48:04');
|
||||
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('719', 'Also listed at', '2010-08-28 11:48:04');
|
||||
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('720', 'Notes', '2010-08-28 11:48:04');
|
||||
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('721', 'Watched', '2010-08-28 11:48:04');
|
||||
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('722', 'Ignored', '2010-08-28 11:48:04');
|
||||
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('721', 'Watchers', '2010-08-28 11:48:04');
|
||||
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('722', 'Ignorers', '2010-08-28 11:48:04');
|
||||
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('723', 'Page visits', '2010-08-28 11:48:04');
|
||||
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('724', 'Cache attributes', '2010-08-28 11:48:04');
|
||||
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('725', 'Additional hint', '2010-08-28 11:48:04');
|
||||
@@ -2457,8 +2447,28 @@ INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2014', 'with al
|
||||
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2015', 'Safari Cache', '2013-04-25 23:00:00');
|
||||
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2016', 'This geocache can be found at different places. The places to look for are explained in the cache description. They must be located \"away from home\" and exist for a considerable period of time, so that they can be re-visited later. There is no container and no logbook; instead the find must be documented by a photo and noting the coordinates.', '2013-04-25 23:00:00');
|
||||
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2017', 'Only virtual caches can be safari caches.', '2013-04-25 23:00:00');
|
||||
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2020', 'ready for search', '2013-04-25 23:00:00');
|
||||
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2021', 'temporarily not available', '2013-04-25 23:00:00');
|
||||
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2023', 'locked', '2013-04-25 23:00:00');
|
||||
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2024', 'locked, invisible', '2013-04-25 23:00:00');
|
||||
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2025', '%2 has archived %1', '2013-04-25 23:00:00');
|
||||
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2026', '%2 has maintainted %1', '2013-04-25 23:00:00');
|
||||
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2027', '%2 has disabled %1', '2013-04-25 23:00:00');
|
||||
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2028', '%2 has locked %1', '2013-04-25 23:00:00');
|
||||
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2029', 'OC team comment', '2013-04-25 23:00:00');
|
||||
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2030', 'Maintenance logs', '2013-04-25 23:00:00');
|
||||
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2031', 'To change the state, you need to <a href=\"log.php?cacheid=%1\">log</a> the new state.', '2013-05-12 22:00:00');
|
||||
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2035', '%1 has archived the cache', '2013-04-25 23:00:00');
|
||||
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2036', '%1 has maintained the cache', '2013-04-25 23:00:00');
|
||||
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2037', '%1 has disabled the cache', '2013-04-25 23:00:00');
|
||||
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2038', '%1 has locked the cache', '2013-04-25 23:00:00');
|
||||
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2039', '%1 has locked and hidden the cache', '2013-04-25 23:00:00');
|
||||
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2040', 'Deleted text:', '2013-04-25 23:00:00');
|
||||
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2041', 'total', '2013-04-25 23:00:00');
|
||||
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2046', 'Watcher', '2013-05-14 13:48:04');
|
||||
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2047', 'Ignorer', '2013-05-14 13:48:04');
|
||||
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2048', 'Maintenance log', '2013-05-14 13:48:04');
|
||||
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2049', 'Page visit', '2013-05-14 13:48:04');
|
||||
|
||||
-- Table sys_trans_ref
|
||||
SET NAMES 'utf8';
|
||||
@@ -6246,8 +6256,28 @@ INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUE
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2015', 'DE', 'Safari-Cache', '2013-04-25 23:00:00');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2016', 'DE', 'Dieser Geocache kann an verschiedenen Orten gefunden werden. Die gesuchten Orte sind in der Cachebeschreibung erläutert. Sie müssen sich „außer Haus“ befinden und über längere Zeit Bestand haben, sodass man sie nach einiger Zeit wieder besuchen kann. Es gibt keinen Behälter und kein Logbuch, sondern der Fund ist mit einem Foto und den Koordinaten des Ortes zu dokumentieren.', '2013-04-25 23:00:00');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2017', 'DE', 'Das Safari-Attribut kann nur bei virtuellen Caches gesetzt werden.', '2013-04-25 23:00:00');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2020', 'DE', 'kann gesucht werden', '2013-02-19 05:48:07');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2021', 'DE', 'momentan nicht verfügbar', '2013-02-19 05:48:07');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2023', 'DE', 'gesperrt', '2013-02-19 05:48:07');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2024', 'DE', 'gesperrt, versteckt', '2013-02-19 05:48:07');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2025', 'DE', '%2 has %1 archiviert', '2013-02-19 05:48:07');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2026', 'DE', '%2 has %1 gewartet', '2013-02-19 05:48:07');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2027', 'DE', '%2 has %1 deaktiviert', '2013-02-19 05:48:07');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2028', 'DE', '%2 has %1 gesperrt', '2013-02-19 05:48:07');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2029', 'DE', 'OC-Team-Kommentar', '2013-02-19 05:48:07');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2030', 'DE', 'Wartungslogs', '2013-02-19 05:48:07');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2031', 'DE', 'Um den Status zu ändern, mussst du den neuen Status <a href=\"log.php?cacheid=%1\">loggen</a>.', '2013-02-19 05:48:07');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2035', 'DE', '%1 hat den Cache archiviert', '2013-04-25 23:00:00');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2036', 'DE', '%1 hat den Cache gewartet', '2013-04-25 23:00:00');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2037', 'DE', '%1 hat den Cache deaktiviert', '2013-04-25 23:00:00');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2038', 'DE', '%1 hat den Cache gesperrt', '2013-04-25 23:00:00');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2039', 'DE', '%1 hat den Cache gesperrt und versteckt', '2013-04-25 23:00:00');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2040', 'DE', 'Gelöschter Text:', '2013-04-25 23:00:00');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2041', 'DE', 'insgesamt', '2013-04-25 23:00:00');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2046', 'DE', 'Beobachter', '2013-04-25 23:00:00');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2047', 'DE', 'Ignorierer', '2013-04-25 23:00:00');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2048', 'DE', 'Wartungslog', '2013-04-25 23:00:00');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2049', 'DE', 'Aufruf', '2013-04-25 23:00:00');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1', 'EN', 'Reorder IDs \r', '2010-09-02 00:15:30');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2', 'EN', 'The database could not be reconnected.', '2010-08-28 11:48:07');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('3', 'EN', 'Testing – please do not login', '2010-08-28 11:48:07');
|
||||
@@ -6936,8 +6966,8 @@ INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUE
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('718', 'EN', 'Waypoint', '2010-08-28 11:48:08');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('719', 'EN', 'Also listed at', '2010-08-28 11:48:08');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('720', 'EN', 'Notes', '2010-08-28 11:48:08');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('721', 'EN', 'Watched', '2010-08-28 11:48:08');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('722', 'EN', 'Ignored', '2010-08-28 11:48:08');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('721', 'EN', 'Watchers', '2010-08-28 11:48:08');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('722', 'EN', 'Ignorers', '2010-08-28 11:48:08');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('723', 'EN', 'Page visits', '2010-08-28 11:48:08');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('724', 'EN', 'Cache attributes', '2010-08-28 11:48:08');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('725', 'EN', 'Additional hint', '2010-08-28 11:48:08');
|
||||
@@ -7765,6 +7795,17 @@ INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUE
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1980', 'EN', 'For \'Found\' and \'Not found\' logs: Date and (optional) time of the cache search.', '2013-02-19 05:48:07');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1981', 'EN', 'The following cache listings have been reset to the state before %1', '2013-02-19 05:48:07');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2010', 'EN', 'Large Map', '2013-02-19 05:48:07');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2020', 'EN', 'ready for search', '2013-02-19 05:48:07');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2021', 'EN', 'temporarily not available', '2013-02-19 05:48:07');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2023', 'EN', 'locked', '2013-02-19 05:48:07');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2024', 'EN', 'locked, invisible', '2013-02-19 05:48:07');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2025', 'EN', '%2 has archived %1', '2013-02-19 05:48:07');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2026', 'EN', '%2 has maintainted %1', '2013-02-19 05:48:07');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2027', 'EN', '%2 has disabled %1', '2013-02-19 05:48:07');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2028', 'EN', '%2 has locked %1', '2013-02-19 05:48:07');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2029', 'EN', 'OC team comment', '2013-02-19 05:48:07');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2030', 'EN', 'Maintenance logs', '2013-02-19 05:48:07');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2031', 'EN', 'To change the state, you need to <a href="log.php?cacheid=%1">log</a> the new state.', '2013-05-12 22:00:00');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1', 'ES', 'Reordenar ID', '2010-12-09 00:17:55');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2', 'ES', 'La base de datos no se pudo conectar.', '2010-12-09 00:17:55');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('3', 'ES', 'En pruebas - por favor, no entre.', '2010-12-09 00:17:55');
|
||||
@@ -9227,6 +9268,10 @@ INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUE
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1963', 'ES', 'Acerca de Opencaching', '2010-12-09 00:17:56');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1968', 'ES', 'más', '2013-02-19 05:48:07');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2002', 'ES', 'Geocaches encontrados', '2010-12-09 00:17:57');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2020', 'ES', 'disponible', '2013-02-19 05:48:07');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2021', 'ES', 'temporalmente no disponible', '2013-02-19 05:48:07');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2023', 'ES', 'cerrado', '2013-02-19 05:48:07');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2024', 'ES', 'cerrado, invisible', '2013-02-19 05:48:07');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('6', 'FR', 'Pseudo', '2010-08-28 11:48:08');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('7', 'FR', 'Quite', '2010-10-04 00:17:39');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('24', 'FR', 'Prénom', '2010-10-04 00:17:39');
|
||||
@@ -9785,7 +9830,7 @@ INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUE
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('493', 'IT', 'Indirizzo email', '2010-08-31 20:06:23');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('494', 'IT', 'Disponibile', '2010-09-01 23:48:28');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('495', 'IT', 'Temporaneamente disabilitata', '2010-08-31 20:06:23');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('496', 'IT', 'archiviata', '2013-04-16 16:45:19');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('496', 'IT', 'Archiviata', '2013-04-16 16:45:19');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('497', 'IT', 'Non trovata', '2010-08-31 20:06:23');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('498', 'IT', 'Partecipato', '2010-09-01 23:48:28');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('499', 'IT', 'Parteciperò', '2010-08-31 20:06:23');
|
||||
@@ -10799,6 +10844,10 @@ INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUE
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2012', 'IT', 'con 5 log', '2010-09-01 23:48:28');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2013', 'IT', 'con 10 log', '2010-09-01 23:48:28');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2014', 'IT', 'con tutti i log', '2010-09-01 23:48:28');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2020', 'IT', 'disponibile', '2013-02-19 05:48:07');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2021', 'IT', 'temporaneamente non disponibile', '2013-02-19 05:48:07');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2023', 'IT', 'chiusa', '2013-02-19 05:48:07');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2024', 'IT', 'chiusa, invisibile', '2013-02-19 05:48:07');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('922', 'JA', 'JA', '2011-05-15 16:04:51');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1', 'NL', 'ID\'s opnieuw sorteren', '2011-02-04 19:49:56');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2', 'NL', 'De verbinding met de database kon niet hersteld worden.', '2011-02-04 19:49:56');
|
||||
|
@@ -269,6 +269,7 @@
|
||||
DECLARE nNotFound INT DEFAULT 0;
|
||||
DECLARE nNote INT DEFAULT 0;
|
||||
DECLARE nWillAttend INT DEFAULT 0;
|
||||
DECLARE nMaintenance INT DEFAULT 0;
|
||||
DECLARE nDate DATE DEFAULT NULL;
|
||||
|
||||
IF nLogType = 1 THEN SET nFound=1; END IF;
|
||||
@@ -276,22 +277,24 @@
|
||||
IF nLogType = 3 THEN SET nNote=1; END IF;
|
||||
IF nLogType = 7 THEN SET nFound=1; END IF;
|
||||
IF nLogType = 8 THEN SET nWillAttend=1; END IF;
|
||||
IF nLogType IN (9,10,11,13,14) THEN SET nMaintenance=1; END IF;
|
||||
|
||||
IF bLogRemoved = TRUE THEN
|
||||
SET nFound = -nFound;
|
||||
SET nNotFound = -nNotFound;
|
||||
SET nNote = -nNote;
|
||||
SET nWillAttend = -nWillAttend;
|
||||
SET nMaintenance = -nMaintenance;
|
||||
END IF;
|
||||
|
||||
UPDATE `stat_cache_logs` SET `found`=IF(`found`+nFound>0, `found`+nFound, 0), `notfound`=IF(`notfound`+nNotFound>0, `notfound`+nNotFound, 0), `note`=IF(`note`+nNote>0, `note`+nNote, 0), `will_attend`=IF(`will_attend`+nWillAttend>0, `will_attend`+nWillAttend, 0) WHERE `cache_id`=nCacheId AND `user_id`=nUserId;
|
||||
UPDATE `stat_cache_logs` SET `found`=IF(`found`+nFound>0, `found`+nFound, 0), `notfound`=IF(`notfound`+nNotFound>0, `notfound`+nNotFound, 0), `note`=IF(`note`+nNote>0, `note`+nNote, 0), `will_attend`=IF(`will_attend`+nWillAttend>0, `will_attend`+nWillAttend, 0), `maintenance`=IF(`maintenance`+nMaintenance>0, `maintenance`+nMaintenance, 0) WHERE `cache_id`=nCacheId AND `user_id`=nUserId;
|
||||
IF ROW_COUNT() = 0 THEN
|
||||
INSERT IGNORE INTO `stat_cache_logs` (`cache_id`, `user_id`, `found`, `notfound`, `note`, `will_attend`) VALUES (nCacheId, nUserId, IF(nFound>0, nFound, 0), IF(nNotFound>0, nNotFound, 0), IF(nNote>0, nNote, 0), IF(nWillAttend>0, nWillAttend, 0));
|
||||
INSERT IGNORE INTO `stat_cache_logs` (`cache_id`, `user_id`, `found`, `notfound`, `note`, `will_attend`, `maintenance`) VALUES (nCacheId, nUserId, IF(nFound>0, nFound, 0), IF(nNotFound>0, nNotFound, 0), IF(nNote>0, nNote, 0), IF(nWillAttend>0, nWillAttend, 0), IF(nMaintenance>0, nMaintenance, 0));
|
||||
END IF;
|
||||
|
||||
UPDATE `stat_caches` SET `found`=IF(`found`+nFound>0, `found`+nFound, 0), `notfound`=IF(`notfound`+nNotFound>0, `notfound`+nNotFound, 0), `note`=IF(`note`+nNote>0, `note`+nNote, 0), `will_attend`=IF(`will_attend`+nWillAttend>0, `will_attend`+nWillAttend, 0) WHERE `cache_id`=nCacheId;
|
||||
UPDATE `stat_caches` SET `found`=IF(`found`+nFound>0, `found`+nFound, 0), `notfound`=IF(`notfound`+nNotFound>0, `notfound`+nNotFound, 0), `note`=IF(`note`+nNote>0, `note`+nNote, 0), `will_attend`=IF(`will_attend`+nWillAttend>0, `will_attend`+nWillAttend, 0), `maintenance`=IF(`maintenance`+nMaintenance>0, `maintenance`+nMaintenance, 0) WHERE `cache_id`=nCacheId;
|
||||
IF ROW_COUNT() = 0 THEN
|
||||
INSERT IGNORE INTO `stat_caches` (`cache_id`, `found`, `notfound`, `note`, `will_attend`) VALUES (nCacheId, IF(nFound>0, nFound, 0), IF(nNotFound>0, nNotFound, 0), IF(nNote>0, nNote, 0), IF(nWillAttend>0, nWillAttend, 0));
|
||||
INSERT IGNORE INTO `stat_caches` (`cache_id`, `found`, `notfound`, `note`, `will_attend`, `maintenance`) VALUES (nCacheId, IF(nFound>0, nFound, 0), IF(nNotFound>0, nNotFound, 0), IF(nNote>0, nNote, 0), IF(nWillAttend>0, nWillAttend, 0), IF(nMaintenance>0, nMaintenance, 0));
|
||||
END IF;
|
||||
|
||||
IF nFound!=0 THEN
|
||||
@@ -299,9 +302,9 @@
|
||||
UPDATE `stat_caches` SET `last_found`=nDate WHERE `cache_id`=nCacheId;
|
||||
END IF;
|
||||
|
||||
UPDATE `stat_user` SET `found`=IF(`found`+nFound>0, `found`+nFound, 0), `notfound`=IF(`notfound`+nNotFound>0, `notfound`+nNotFound, 0), `note`=IF(`note`+nNote>0, `note`+nNote, 0), `will_attend`=IF(`will_attend`+nWillAttend>0, `will_attend`+nWillAttend, 0) WHERE `user_id`=nUserId;
|
||||
UPDATE `stat_user` SET `found`=IF(`found`+nFound>0, `found`+nFound, 0), `notfound`=IF(`notfound`+nNotFound>0, `notfound`+nNotFound, 0), `note`=IF(`note`+nNote>0, `note`+nNote, 0), `will_attend`=IF(`will_attend`+nWillAttend>0, `will_attend`+nWillAttend, 0), `maintenance`=IF(`maintenance`+nMaintenance>0, `maintenance`+nMaintenance, 0) WHERE `user_id`=nUserId;
|
||||
IF ROW_COUNT() = 0 THEN
|
||||
INSERT IGNORE INTO `stat_user` (`user_id`, `found`, `notfound`, `note`, `will_attend`) VALUES (nUserId, IF(nFound>0, nFound, 0), IF(nNotFound>0, nNotFound, 0), IF(nNote>0, nNote, 0), IF(nWillAttend>0, nWillAttend, 0));
|
||||
INSERT IGNORE INTO `stat_user` (`user_id`, `found`, `notfound`, `note`, `will_attend`, `maintenance`) VALUES (nUserId, IF(nFound>0, nFound, 0), IF(nNotFound>0, nNotFound, 0), IF(nNote>0, nNote, 0), IF(nWillAttend>0, nWillAttend, 0), IF(nMaintenance>0, nMaintenance, 0));
|
||||
END IF;
|
||||
|
||||
CALL sp_refresh_statpic(nUserId);
|
||||
@@ -317,52 +320,35 @@
|
||||
INSERT IGNORE INTO `stat_caches` (`cache_id`) SELECT `cache_id` FROM `cache_logs` GROUP BY `cache_id`;
|
||||
INSERT IGNORE INTO `stat_cache_logs` (`cache_id`, `user_id`) SELECT `cache_id`, `user_id` FROM `cache_logs`;
|
||||
|
||||
/* stat_user.found */
|
||||
UPDATE `stat_user`, (SELECT `user_id`, COUNT(*) AS `count` FROM `cache_logs` WHERE `type` IN (1, 7) GROUP BY `user_id`) AS `tblFound` SET `stat_user`.`found`=`tblFound`.`count` WHERE `stat_user`.`user_id`=`tblFound`.`user_id`;
|
||||
/* This implementation is less performant than the previouse code (up to ~ commit 4ed7ee0),
|
||||
but the old did not update any values to zero - these entries were ignored!
|
||||
-- following 2013-05-12 */
|
||||
|
||||
/* stat_caches */
|
||||
UPDATE `stat_caches` SET
|
||||
`found` = (SELECT COUNT(*) FROM `cache_logs` WHERE `type` IN (1, 7) AND `cache_logs`.`cache_id` = `stat_caches`.`cache_id`),
|
||||
`last_found` = (SELECT MAX(`date`) FROM `cache_logs` WHERE `type` IN (1, 7) AND `cache_logs`.`cache_id` = `stat_caches`.`cache_id`),
|
||||
`notfound`= (SELECT COUNT(*) FROM `cache_logs` WHERE `type` IN (2) AND `cache_logs`.`cache_id` = `stat_caches`.`cache_id`),
|
||||
`note`= (SELECT COUNT(*) FROM `cache_logs` WHERE `type` IN (3) AND `cache_logs`.`cache_id` = `stat_caches`.`cache_id`),
|
||||
`will_attend`= (SELECT COUNT(*) FROM `cache_logs` WHERE `type` IN (8) AND `cache_logs`.`cache_id` = `stat_caches`.`cache_id`),
|
||||
`maintenance`= (SELECT COUNT(*) FROM `cache_logs` WHERE `type` IN (9,10,11,13,14) AND `cache_logs`.`cache_id` = `stat_caches`.`cache_id`);
|
||||
|
||||
/* stat_cache_logs */
|
||||
UPDATE `stat_cache_logs` SET
|
||||
`found` = (SELECT COUNT(*) FROM `cache_logs` WHERE `type` IN (1, 7) AND `cache_logs`.`cache_id` = `stat_cache_logs`.`cache_id` AND `cache_logs`.`user_id` = `stat_cache_logs`.`user_id`),
|
||||
`notfound`= (SELECT COUNT(*) FROM `cache_logs` WHERE `type` IN (2) AND `cache_logs`.`cache_id` = `stat_cache_logs`.`cache_id` AND `cache_logs`.`user_id` = `stat_cache_logs`.`user_id`),
|
||||
`note`= (SELECT COUNT(*) FROM `cache_logs` WHERE `type` IN (3) AND `cache_logs`.`cache_id` = `stat_cache_logs`.`cache_id` AND `cache_logs`.`user_id` = `stat_cache_logs`.`user_id`),
|
||||
`will_attend`= (SELECT COUNT(*) FROM `cache_logs` WHERE `type` IN (8) AND `cache_logs`.`cache_id` = `stat_cache_logs`.`cache_id` AND `cache_logs`.`user_id` = `stat_cache_logs`.`user_id`),
|
||||
`maintenance`= (SELECT COUNT(*) FROM `cache_logs` WHERE `type` IN (9,10,11,13,14) AND `cache_logs`.`cache_id` = `stat_cache_logs`.`cache_id` AND `cache_logs`.`user_id` = `stat_cache_logs`.`user_id`);
|
||||
SET nModified=nModified+ROW_COUNT();
|
||||
|
||||
/* stat_cache_logs.notfound */
|
||||
UPDATE `stat_user`, (SELECT `user_id`, COUNT(*) AS `count` FROM `cache_logs` WHERE `type` IN (2) GROUP BY `user_id`) AS `tblNotFound` SET `stat_user`.`notfound`=`tblNotFound`.`count` WHERE `stat_user`.`user_id`=`tblNotFound`.`user_id`;
|
||||
SET nModified=nModified+ROW_COUNT();
|
||||
|
||||
/* stat_cache_logs.note */
|
||||
UPDATE `stat_user`, (SELECT `user_id`, COUNT(*) AS `count` FROM `cache_logs` WHERE `type` IN (3) GROUP BY `user_id`) AS `tblNote` SET `stat_user`.`note`=`tblNote`.`count` WHERE `stat_user`.`user_id`=`tblNote`.`user_id`;
|
||||
SET nModified=nModified+ROW_COUNT();
|
||||
|
||||
/* stat_cache_logs.will_attend */
|
||||
UPDATE `stat_user`, (SELECT `user_id`, COUNT(*) AS `count` FROM `cache_logs` WHERE `type` IN (8) GROUP BY `user_id`) AS `tblWillAttend` SET `stat_user`.`will_attend`=`tblWillAttend`.`count` WHERE `stat_user`.`user_id`=`tblWillAttend`.`user_id`;
|
||||
SET nModified=nModified+ROW_COUNT();
|
||||
|
||||
/* stat_caches.found and stat_caches.last_found */
|
||||
UPDATE `stat_caches`, (SELECT `cache_id`, COUNT(*) AS `count`, MAX(`date`) AS `last_found` FROM `cache_logs` WHERE `type` IN (1, 7) GROUP BY `cache_id`) AS `tblFound` SET `stat_caches`.`found`=`tblFound`.`count`, `stat_caches`.`last_found`=`tblFound`.`last_found` WHERE `stat_caches`.`cache_id`=`tblFound`.`cache_id`;
|
||||
SET nModified=nModified+ROW_COUNT();
|
||||
|
||||
/* stat_caches.notfound */
|
||||
UPDATE `stat_caches`, (SELECT `cache_id`, COUNT(*) AS `count` FROM `cache_logs` WHERE `type` IN (2) GROUP BY `cache_id`) AS `tblNotFound` SET `stat_caches`.`notfound`=`tblNotFound`.`count` WHERE `stat_caches`.`cache_id`=`tblNotFound`.`cache_id`;
|
||||
SET nModified=nModified+ROW_COUNT();
|
||||
|
||||
/* stat_caches.note */
|
||||
UPDATE `stat_caches`, (SELECT `cache_id`, COUNT(*) AS `count` FROM `cache_logs` WHERE `type` IN (3) GROUP BY `cache_id`) AS `tblNote` SET `stat_caches`.`note`=`tblNote`.`count` WHERE `stat_caches`.`cache_id`=`tblNote`.`cache_id`;
|
||||
SET nModified=nModified+ROW_COUNT();
|
||||
|
||||
/* stat_caches.will_attend */
|
||||
UPDATE `stat_caches`, (SELECT `cache_id`, COUNT(*) AS `count` FROM `cache_logs` WHERE `type` IN (8) GROUP BY `cache_id`) AS `tblWillAttend` SET `stat_caches`.`will_attend`=`tblWillAttend`.`count` WHERE `stat_caches`.`cache_id`=`tblWillAttend`.`cache_id`;
|
||||
SET nModified=nModified+ROW_COUNT();
|
||||
|
||||
/* stat_cache_logs.found */
|
||||
UPDATE `stat_cache_logs`, (SELECT `cache_id`, `user_id`, COUNT(*) AS `count` FROM `cache_logs` WHERE `type` IN (1, 7) GROUP BY `user_id`, `cache_id`) AS `tblFound` SET `stat_cache_logs`.`found`=`tblFound`.`count` WHERE `stat_cache_logs`.`cache_id`=`tblFound`.`cache_id` AND `stat_cache_logs`.`user_id`=`tblFound`.`user_id`;
|
||||
SET nModified=nModified+ROW_COUNT();
|
||||
|
||||
/* stat_cache_logs.notfound */
|
||||
UPDATE `stat_cache_logs`, (SELECT `cache_id`, `user_id`, COUNT(*) AS `count` FROM `cache_logs` WHERE `type` IN (2) GROUP BY `user_id`, `cache_id`) AS `tblNotFound` SET `stat_cache_logs`.`notfound`=`tblNotFound`.`count` WHERE `stat_cache_logs`.`cache_id`=`tblNotFound`.`cache_id` AND `stat_cache_logs`.`user_id`=`tblNotFound`.`user_id`;
|
||||
SET nModified=nModified+ROW_COUNT();
|
||||
|
||||
/* stat_cache_logs.note */
|
||||
UPDATE `stat_cache_logs`, (SELECT `cache_id`, `user_id`, COUNT(*) AS `count` FROM `cache_logs` WHERE `type` IN (3) GROUP BY `user_id`, `cache_id`) AS `tblNote` SET `stat_cache_logs`.`note`=`tblNote`.`count` WHERE `stat_cache_logs`.`cache_id`=`tblNote`.`cache_id` AND `stat_cache_logs`.`user_id`=`tblNote`.`user_id`;
|
||||
SET nModified=nModified+ROW_COUNT();
|
||||
|
||||
/* stat_cache_logs.will_attend */
|
||||
UPDATE `stat_cache_logs`, (SELECT `cache_id`, `user_id`, COUNT(*) AS `count` FROM `cache_logs` WHERE `type` IN (8) GROUP BY `user_id`, `cache_id`) AS `tblWillAttend` SET `stat_cache_logs`.`will_attend`=`tblWillAttend`.`count` WHERE `stat_cache_logs`.`cache_id`=`tblWillAttend`.`cache_id` AND `stat_cache_logs`.`user_id`=`tblWillAttend`.`user_id`;
|
||||
/* stat_user */
|
||||
UPDATE `stat_user` SET
|
||||
`found` = (SELECT COUNT(*) FROM `cache_logs` WHERE `type` IN (1, 7) AND `cache_logs`.`user_id` = `stat_user`.`user_id`),
|
||||
`notfound`= (SELECT COUNT(*) FROM `cache_logs` WHERE `type` IN (2) AND `cache_logs`.`user_id` = `stat_user`.`user_id`),
|
||||
`note`= (SELECT COUNT(*) FROM `cache_logs` WHERE `type` IN (3) AND `cache_logs`.`user_id` = `stat_user`.`user_id`),
|
||||
`will_attend`= (SELECT COUNT(*) FROM `cache_logs` WHERE `type` IN (8) AND `cache_logs`.`user_id` = `stat_user`.`user_id`),
|
||||
`maintenance`= (SELECT COUNT(*) FROM `cache_logs` WHERE `type` IN (9,10,11,13,14) AND `cache_logs`.`user_id` = `stat_user`.`user_id`);
|
||||
SET nModified=nModified+ROW_COUNT();
|
||||
|
||||
CALL sp_refreshall_statpic();
|
||||
@@ -906,6 +892,7 @@
|
||||
NEW.`cache_id`!=OLD.`cache_id` OR
|
||||
NEW.`user_id`!=OLD.`user_id` OR
|
||||
NEW.`type`!=OLD.`type` OR
|
||||
NEW.`oc_team_comment`!=OLD.`oc_team_comment` OR
|
||||
NEW.`date`!=OLD.`date` OR
|
||||
NEW.`text`!=OLD.`text` OR
|
||||
NEW.`text_html`!=OLD.`text_html` THEN
|
||||
|
@@ -10,6 +10,7 @@ CREATE TABLE `cache_logs` (
|
||||
`cache_id` int(10) unsigned NOT NULL,
|
||||
`user_id` int(10) unsigned NOT NULL,
|
||||
`type` tinyint(3) unsigned NOT NULL,
|
||||
`oc_team_comment` tinyint(1) NOT NULL default '0',
|
||||
`date` datetime NOT NULL,
|
||||
`text` mediumtext NOT NULL,
|
||||
`text_html` tinyint(1) NOT NULL default '0',
|
||||
|
@@ -10,6 +10,7 @@ CREATE TABLE `cache_logs_archived` (
|
||||
`cache_id` int(10) unsigned NOT NULL,
|
||||
`user_id` int(10) unsigned NOT NULL,
|
||||
`type` tinyint(3) unsigned NOT NULL,
|
||||
`oc_team_comment` tinyint(1) NOT NULL default '0',
|
||||
`date` datetime NOT NULL,
|
||||
`text` mediumtext NOT NULL,
|
||||
`text_html` tinyint(1) NOT NULL,
|
||||
|
@@ -5,4 +5,4 @@ CREATE TABLE `cache_logtype` (
|
||||
`log_type_id` tinyint(3) unsigned NOT NULL,
|
||||
PRIMARY KEY (`cache_type_id`,`log_type_id`),
|
||||
KEY `log_type_id` (`log_type_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ;
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='obsolete' ;
|
||||
|
@@ -5,9 +5,9 @@ CREATE TABLE `log_types` (
|
||||
`name` varchar(80) NOT NULL,
|
||||
`trans_id` int(10) unsigned NOT NULL,
|
||||
`permission` char(1) NOT NULL COMMENT 'obsolete',
|
||||
`cache_status` tinyint(1) NOT NULL default '0' COMMENT 'obsolete',
|
||||
`cache_status` tinyint(1) NOT NULL default '0',
|
||||
`de` varchar(60) NOT NULL COMMENT 'obsolete',
|
||||
`en` varchar(60) NOT NULL COMMENT 'obsolete',
|
||||
`en` varchar(60) NOT NULL,
|
||||
`icon_small` varchar(255) NOT NULL,
|
||||
`allow_rating` tinyint(1) NOT NULL,
|
||||
`require_password` tinyint(1) NOT NULL,
|
||||
|
@@ -7,5 +7,6 @@ CREATE TABLE `stat_cache_logs` (
|
||||
`notfound` smallint(5) unsigned NOT NULL,
|
||||
`note` smallint(5) unsigned NOT NULL,
|
||||
`will_attend` smallint(5) unsigned NOT NULL,
|
||||
`maintenance` smallint(5) unsigned NOT NULL,
|
||||
PRIMARY KEY (`cache_id`,`user_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='via trigger (cache_logs)' ;
|
||||
|
@@ -6,6 +6,7 @@ CREATE TABLE `stat_caches` (
|
||||
`notfound` smallint(5) unsigned NOT NULL,
|
||||
`note` smallint(5) unsigned NOT NULL,
|
||||
`will_attend` smallint(5) unsigned NOT NULL,
|
||||
`maintenance` smallint(5) unsigned NOT NULL,
|
||||
`last_found` date default NULL,
|
||||
`watch` smallint(5) unsigned NOT NULL,
|
||||
`ignore` smallint(5) unsigned NOT NULL,
|
||||
|
@@ -7,5 +7,6 @@ CREATE TABLE `stat_user` (
|
||||
`note` smallint(5) unsigned NOT NULL,
|
||||
`hidden` smallint(5) unsigned NOT NULL,
|
||||
`will_attend` smallint(5) unsigned NOT NULL,
|
||||
`maintenance` smallint(5) unsigned NOT NULL,
|
||||
PRIMARY KEY (`user_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='via trigger (user)' ;
|
||||
|
@@ -45,6 +45,7 @@
|
||||
<li>Element für Bildeigenschaften von <attributes> in <picattr> umbenannt, um Kollisionen mit dem Cache-Attribut-Element zu vermeiden.</li>
|
||||
<li>Vorschaubild-Flag (<em>preview</em>) zu <picattr> hinzugefügt.</li>
|
||||
<li>zusätzliche Logtypen 9 (archiviert), 10 (kann gesucht werden), 11 (momentan nicht verfügbar) und 13 (gesperrt)</li>
|
||||
<li><em>teamcomment</em>-Flag zum <logtype> hinzugefügt</li>
|
||||
</ul>
|
||||
|
||||
<p>Der XML-Doctype lautet in allen Versionen "oc11xml".</p>
|
||||
@@ -188,7 +189,7 @@
|
||||
<user id="113"
|
||||
uuid="CAA9E3C5-50DF-4E9E-191F-CECABA6A8A19"><![CDATA[Team
|
||||
Schnitzeljagd]]></user><BR>
|
||||
<logtype id="1" recommended="0"><![CDATA[Gefunden]]></type><br>
|
||||
<logtype id="1" recommended="0" teamcomment="0"><![CDATA[Gefunden]]></type><br>
|
||||
<date>2005-05-18 16:20:00</date><br>
|
||||
<text><![CDATA[Gut gefunden.&lt;br /&gt;<br>
|
||||
Gr&uuml;&szlig;e von&lt;br /&gt;<br>
|
||||
|
@@ -754,7 +754,8 @@ function getWaypoints($cacheid)
|
||||
while ($rStatus = sql_fetch_assoc($rsStatus))
|
||||
{
|
||||
$sSelected = ($rStatus['id'] == $status) ? ' selected="selected"' : '';
|
||||
$statusoptions .= '<option value="' . htmlspecialchars($rStatus['id'], ENT_COMPAT, 'UTF-8') . '"' . $sSelected . '>' . htmlspecialchars($rStatus['name'], ENT_COMPAT, 'UTF-8') . '</option>';
|
||||
if ($sSelected != '' || $status_old == 5)
|
||||
$statusoptions .= '<option value="' . htmlspecialchars($rStatus['id'], ENT_COMPAT, 'UTF-8') . '"' . $sSelected . '>' . htmlspecialchars($rStatus['name'], ENT_COMPAT, 'UTF-8') . '</option>';
|
||||
}
|
||||
sql_free_result($rsStatus);
|
||||
}
|
||||
@@ -763,6 +764,7 @@ function getWaypoints($cacheid)
|
||||
$statusoptions .= '<option value="7" selected="selected">' . htmlspecialchars(t("Locked, invisible"), ENT_COMPAT, 'UTF-8') . '</option>';
|
||||
}
|
||||
tpl_set_var('statusoptions', $statusoptions);
|
||||
tpl_set_var('statuschange', $status_old == 5 ? '' : mb_ereg_replace('%1',$cache_id,$status_change));
|
||||
|
||||
// show activation form?
|
||||
if($status_old == 5) // status = not yet published
|
||||
|
@@ -24,6 +24,7 @@
|
||||
|
||||
//prepare the templates and include all neccessary
|
||||
require_once('./lib/common.inc.php');
|
||||
require_once('./lib/logtypes.inc.php');
|
||||
require($stylepath.'/smilies.inc.php');
|
||||
require_once($opt['rootpath'] . '../lib/htmlpurifier-4.2.0/library/HTMLPurifier.auto.php');
|
||||
|
||||
@@ -57,7 +58,8 @@
|
||||
`cache_logs`.`text` AS `text`,
|
||||
`cache_logs`.`date` AS `date`,
|
||||
`cache_logs`.`user_id` AS `user_id`,
|
||||
`cache_logs`.`type` AS `logtype`,
|
||||
`cache_logs`.`type` AS `logtype`,
|
||||
`cache_logs`.`oc_team_comment` AS `oc_team_comment`,
|
||||
`cache_logs`.`text_html` AS `text_html`,
|
||||
`cache_logs`.`text_htmledit` AS `text_htmledit`,
|
||||
`caches`.`name` AS `cachename`,
|
||||
@@ -70,6 +72,7 @@
|
||||
$log_id);
|
||||
$log_record = sql_fetch_array($log_rs);
|
||||
sql_free_result($log_rs);
|
||||
|
||||
if ($log_record !== false &&
|
||||
(($log_record['status'] != 6 || ($log_record['cache_user_id'] == $login->userid && $log_record['user_id'] == $login->userid)) &&
|
||||
$log_record['status'] != 7) || $useradmin)
|
||||
@@ -101,6 +104,7 @@
|
||||
$log_time_minute = isset($_POST['logminute']) ? trim($_POST['logminute']) : (substr($log_record['date'],11) == "00:00:00" ? "" : date('i', strtotime($log_record['date'])));
|
||||
$top_option = isset($_POST['ratingoption']) ? $_POST['ratingoption']+0 : 0;
|
||||
$top_cache = isset($_POST['rating']) ? $_POST['rating']+0 : 0;
|
||||
$oc_team_comment = isset($_POST['teamcomment']) ? ($_POST['teamcomment'] != 0) : 0;
|
||||
|
||||
$log_pw = '';
|
||||
$use_log_pw = (($log_record['logpw'] == NULL) || ($log_record['logpw'] == '')) ? false : true;
|
||||
@@ -202,7 +206,7 @@
|
||||
$date_ok = false;
|
||||
}
|
||||
|
||||
$logtype_ok = sqlValue("SELECT COUNT(*) FROM cache_logtype WHERE cache_type_id='" . sql_escape($cache_type) . "' AND log_type_id='" . sql_escape($log_type) . "'", 0) > 0;
|
||||
$logtype_ok = logtype_ok($log_record['cache_id'], $log_type, $log_record['logtype']);
|
||||
|
||||
// not a found log? then ignore the rating
|
||||
if ($log_type != 1 && $log_type != 7)
|
||||
@@ -217,6 +221,10 @@
|
||||
$all_ok = false;
|
||||
}
|
||||
|
||||
// ignore unauthorized team comments
|
||||
if (!teamcomment_allowed($log_record['cache_id'], $log_type))
|
||||
$oc_team_comment = 0;
|
||||
|
||||
//store?
|
||||
if (isset($_POST['submitform']) && $date_ok && $logtype_ok && $pw_ok)
|
||||
{
|
||||
@@ -232,12 +240,14 @@
|
||||
|
||||
//store changed data
|
||||
sql("UPDATE `cache_logs` SET `type`='&1',
|
||||
`date`='&2',
|
||||
`text`='&3',
|
||||
`text_html`='&4',
|
||||
`text_htmledit`='&5'
|
||||
WHERE `id`='&6'",
|
||||
`oc_team_comment`='&2',
|
||||
`date`='&3',
|
||||
`text`='&4',
|
||||
`text_html`='&5',
|
||||
`text_htmledit`='&6'
|
||||
WHERE `id`='&7'",
|
||||
$log_type,
|
||||
$oc_team_comment,
|
||||
$log_date,
|
||||
(($descMode != 1) ? $log_text : nl2br($log_text)),
|
||||
(($descMode != 1) ? 1 : 0),
|
||||
@@ -270,23 +280,21 @@
|
||||
exit;
|
||||
}
|
||||
|
||||
//build logtypeoptions
|
||||
// build logtype options
|
||||
$logtype_names = get_logtype_names();
|
||||
$allowed_logtypes = get_cache_log_types($log_record['cache_id'], $log_record['logtype']);
|
||||
$logtypeoptions = '';
|
||||
$rsLogTypes = sql("SELECT `log_types`.`id`, IFNULL(`sys_trans_text`.`text`, `log_types`.`name`) AS `name`
|
||||
FROM `caches`
|
||||
INNER JOIN `cache_type` ON `caches`.`type`=`cache_type`.`id`
|
||||
INNER JOIN `cache_logtype` ON `cache_type`.`id`=`cache_logtype`.`cache_type_id`
|
||||
INNER JOIN `log_types` ON `cache_logtype`.`log_type_id`=`log_types`.`id`
|
||||
LEFT JOIN `sys_trans` ON `log_types`.`trans_id`=`sys_trans`.`id`
|
||||
LEFT JOIN `sys_trans_text` ON `sys_trans`.`id`=`sys_trans_text`.`trans_id` AND `sys_trans_text`.`lang`='" . sql_escape($locale) . "'
|
||||
WHERE `caches`.`cache_id`='" . ($log_record['cache_id']+0) . "'
|
||||
ORDER BY `log_types`.`id` ASC");
|
||||
while ($rLogTypes = sql_fetch_assoc($rsLogTypes))
|
||||
foreach ($allowed_logtypes as $logtype)
|
||||
{
|
||||
$sSelected = ($rLogTypes['id'] == $log_type) ? ' selected="selected"' : '';
|
||||
$logtypeoptions .= '<option value="' . $rLogTypes['id'] . '"' . $sSelected . '>' . htmlspecialchars($rLogTypes['name'], ENT_COMPAT, 'UTF-8') . '</option>' . "\n";
|
||||
$selected = ($log_record['logtype'] == $logtype ? ' selected="selected"' : '');
|
||||
$logtypeoptions .= '<option value="' . $logtype . '"' . $selected . '>' . htmlspecialchars($logtype_names[$logtype], ENT_COMPAT, 'UTF-8') . '</option>' . "\n";
|
||||
}
|
||||
sql_free_result($rsLogTypes);
|
||||
|
||||
if (teamcomment_allowed($log_record['cache_id'],3))
|
||||
tpl_set_var('teamcommentoption',
|
||||
mb_ereg_replace('{chk_sel}', ($oc_team_comment ? 'checked' : ''), $teamcomment_field));
|
||||
else
|
||||
tpl_set_var('teamcommentoption', '');
|
||||
|
||||
//set template vars
|
||||
tpl_set_var('cachename', htmlspecialchars($cache_name, ENT_COMPAT, 'UTF-8'));
|
||||
|
@@ -30,6 +30,7 @@
|
||||
$way_length_not_ok_message = '<span class="errormsg">' . t('The distance you have entered is invalid. Format aa.aaa') . '</span>';
|
||||
$sizemismatch_message = ' <span class="errormsg">' . t('For virtual and webcam caches, the cache size has to be -no container-!') . '</span>';
|
||||
$status_message = ' <span class="errormsg">' . t('The cache-status does not fit to your publishing options') . '</span>';
|
||||
$status_change = '<br /><div style="margin-top:6px"><img src="lang/de/ocstyle/images/misc/hint.gif" border="0" width="15" height="11" >' . t('To change the state, you need to <a href="log.php?cacheid=%1">log</a> the new state.') . '</div>';
|
||||
$diff_not_ok_message = ' <span class="errormsg">' . t('Choose both valuations!') . '</span>';
|
||||
$safari_not_allowed_message = '<span class="errormsg">' . t('Only virtual caches can be safari caches.') . '</span>';
|
||||
$nopictures = '<tr><td colspan="2">' . t('No pictures available') . '</td></tr>';
|
||||
|
@@ -137,7 +137,7 @@ function toggleAttr(id)
|
||||
<td>
|
||||
<select name="status" class="input200">
|
||||
{statusoptions}
|
||||
</select>{status_message}
|
||||
</select>{status_message}{statuschange}
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td class="spacer" colspan="2"></td></tr>
|
||||
|
@@ -25,4 +25,6 @@
|
||||
$log_pw_field = '<tr><td colspan="2">' . t('passwort to log:') . ' <input class="input100" type="text" name="log_pw" maxlength="20" value="" /> ' . t('(only for found logs)') . '</td></tr>
|
||||
<tr><td class="spacer" colspan="2"></td></tr>';
|
||||
$log_pw_field_pw_not_ok = '<tr><td colspan="2">' . t('passwort to log:') . ' <input type="text" name="log_pw" maxlength="20" size="20" value=""/><span class="errormsg"> ' . t('Invalid password!') . '</span></td></tr><tr><td class="spacer" colspan="2"></td></tr>';
|
||||
|
||||
$teamcomment_field = ' <input type="checkbox" name="teamcomment" value="1" class="checkbox" {chk_sel} id="teamcomment" /> <label for="teamcomment">' . t('OC team comment') . "</label>";
|
||||
?>
|
@@ -89,6 +89,7 @@ function _chkFound () {
|
||||
<select name="logtype" onChange="return _chkFound()">
|
||||
{logtypeoptions}
|
||||
</select>
|
||||
{teamcommentoption}
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td class="spacer" colspan="2"></td></tr>
|
||||
|
@@ -16,23 +16,7 @@
|
||||
function icon_log_type($icon_small, $text)
|
||||
{
|
||||
global $stylepath;
|
||||
return "<img src='$stylepath/images/$icon_small' width='16' height='16' align='middle' border='0' align='left' alt='$text' title='$text'>";
|
||||
}
|
||||
|
||||
function icon_cache_status($status, $text)
|
||||
{
|
||||
global $stylepath;
|
||||
switch($status)
|
||||
{
|
||||
case 1: $icon = "log/16x16-go.png"; break;
|
||||
case 2: $icon = "log/16x16-stop.png"; break;
|
||||
case 3: $icon = "log/16x16-trash.png"; break;
|
||||
case 4: $icon = "log/16x16-trash.png"; break;
|
||||
case 5: $icon = "log/16x16-stop.png"; break;
|
||||
|
||||
default: $icon = "log/16x16-go.png"; break;
|
||||
}
|
||||
return "<img src='$stylepath/images/$icon' width='16' height='16' align='middle' border='0' align='left' alt='$text' title='$text'>";
|
||||
return "<img src='resource2/ocstyle/images/$icon_small' width='16' height='16' align='middle' border='0' align='left' alt='$text' title='$text'>";
|
||||
}
|
||||
|
||||
function icon_difficulty($what, $difficulty)
|
||||
|
@@ -24,9 +24,9 @@
|
||||
$event_log_pw_field = '<tr><td colspan="2">' . t('passwort to log:') . ' <input class="input100" type="text" name="log_pw" maxlength="20" value="" /> (' . t('only for attended-logs') . ')</td></tr><tr><td class="spacer" colspan="2"></td></tr>';
|
||||
$other_log_pw_field = '<tr><td colspan="2">' . t('passwort to log:') . ' <input class="input100" type="text" name="log_pw" maxlength="20" value="" /> ' . t('(only for found-logs)') . '</td></tr><tr><td class="spacer" colspan="2"></td></tr>';
|
||||
$log_pw_field_pw_not_ok = '<tr><td colspan="2">' . t('passwort to log:') . ' <input type="text" name="log_pw" maxlength="20" size="20" value=""/><span class="errormsg"> ' . t('Invalid password!') . '</span></td></tr><tr><td class="spacer" colspan="2"></td></tr>';
|
||||
$teamcomment_field = ' <input type="checkbox" name="teamcomment" value="1" class="checkbox" {chk_sel} id="teamcomment" /> <label for="teamcomment">' . t('OC team comment') . '</label>';
|
||||
|
||||
$listed_only_oc = t('only listed here!');
|
||||
|
||||
$smiley_link = '<a href="javascript:insertSmiley(\'{smiley_text}\')">{smiley_image}</a>';
|
||||
|
||||
?>
|
@@ -84,6 +84,7 @@ function _chkFound () {
|
||||
<select name="logtype" onChange="return _chkFound()">
|
||||
{logtypeoptions}
|
||||
</select>
|
||||
{teamcommentoption}
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td class="spacer" colspan="2"></td></tr>
|
||||
|
127
htdocs/lib/logtypes.inc.php
Normal file
@@ -0,0 +1,127 @@
|
||||
<?php
|
||||
/****************************************************************************
|
||||
For license information see doc/license.txt
|
||||
|
||||
Unicode Reminder メモ
|
||||
|
||||
log type definitions and functions
|
||||
replaces the obsolete table `cache_logtype`
|
||||
|
||||
This is included in both, lib1 and lib2 code!
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
// return associative array (id => translated name) of all log types
|
||||
|
||||
function get_logtype_names()
|
||||
{
|
||||
global $locale, $opt;
|
||||
|
||||
if (!isset($locale)) $locale = $opt['template']['locale'];
|
||||
|
||||
$log_types = array();
|
||||
$rs = sql("SELECT `log_types`.`id`,
|
||||
IFNULL(`sys_trans_text`.`text`,`log_types`.`en`) AS `type_name`
|
||||
FROM `log_types`
|
||||
LEFT JOIN `sys_trans_text` ON `sys_trans_text`.`trans_id` = `log_types`.`trans_id` AND `sys_trans_text`.`lang`='" . sql_escape($locale) . "'");
|
||||
while ($r = sql_fetch_array($rs))
|
||||
$log_types[$r['id']] = $r['type_name'];
|
||||
sql_free_result($rs);
|
||||
|
||||
return $log_types;
|
||||
}
|
||||
|
||||
|
||||
// returns ordered array of allowed log types for a cache and the active user:
|
||||
// type_id => translated type name
|
||||
// first entry is default for new logs
|
||||
|
||||
function get_cache_log_types($cache_id, $old_logtype)
|
||||
{
|
||||
global $login;
|
||||
|
||||
// get input data
|
||||
$rs = sql("SELECT `type`, `status`, `user_id` FROM `caches` WHERE `cache_id`='&1'", $cache_id);
|
||||
$rCache = sql_fetch_array($rs);
|
||||
sql_free_result($rs);
|
||||
|
||||
$cache_type = $rCache['type'];
|
||||
$cache_status = $rCache['status'];
|
||||
$owner = $login->userid == ($rCache['user_id']);
|
||||
|
||||
if ($login->hasAdminPriv(ADMIN_USER))
|
||||
{
|
||||
$rs = sql("SELECT `id` FROM `cache_reports`
|
||||
WHERE `cacheid`='&1' AND `adminid`='&2' AND `status`=2",
|
||||
$cache_id, $login->userid);
|
||||
if ($r = sql_fetch_array($rs))
|
||||
$admin = $r['id'] != 0;
|
||||
else
|
||||
$admin = false;
|
||||
sql_free_result($rs);
|
||||
}
|
||||
|
||||
// build result list
|
||||
//
|
||||
// Pay attention to okapi/services/logs/submit.php when changing this!
|
||||
|
||||
$allowed_logtypes = array();
|
||||
if ($owner || $admin)
|
||||
{
|
||||
$allowed_logtypes[] = 3; // note
|
||||
if ($cache_status != 5 && (($cache_status != 4 && $cache_status != 7) || $admin))
|
||||
{
|
||||
$allowed_logtypes[] = 10; // ready for search
|
||||
$allowed_logtypes[] = 11; // temporarily not available
|
||||
$allowed_logtypes[] = 9; // archived
|
||||
$allowed_logtypes[] = 13; // locked
|
||||
}
|
||||
if ($admin || $old_logtype == 14)
|
||||
$allowed_logtypes[] = 14; // locked, invisible
|
||||
}
|
||||
if ($cache_type == 6) // event
|
||||
{
|
||||
$allowed_logtypes[] = 8; // will attend
|
||||
$allowed_logtypes[] = 7; // attended
|
||||
}
|
||||
else
|
||||
{
|
||||
$allowed_logtypes[] = 1; // found
|
||||
$allowed_logtypes[] = 2; // not found
|
||||
}
|
||||
if (!($owner || $admin))
|
||||
{
|
||||
$allowed_logtypes[] = 3; // note
|
||||
}
|
||||
|
||||
return $allowed_logtypes;
|
||||
}
|
||||
|
||||
|
||||
function logtype_ok($cache_id, $logtype_id, $old_logtype)
|
||||
{
|
||||
return in_array($logtype_id, get_cache_log_types($cache_id, $old_logtype));
|
||||
}
|
||||
|
||||
|
||||
function teamcomment_allowed($cache_id, $logtype_id)
|
||||
{
|
||||
global $login;
|
||||
|
||||
if (!$login->hasAdminPriv(ADMIN_USER))
|
||||
return false;
|
||||
elseif ($logtype_id != 3 && ($logtype_id < 9 || $logtype_id > 14))
|
||||
return false;
|
||||
else
|
||||
{
|
||||
$rs = sql("SELECT `user_id` FROM `caches` WHERE `cache_id`='&1'", $cache_id);
|
||||
if ($r = sql_fetch_array($rs))
|
||||
$allowed = $login->userid != $r['user_id'];
|
||||
else
|
||||
$allowed = false;
|
||||
sql_free_result($rs);
|
||||
return $allowed;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
@@ -142,6 +142,11 @@
|
||||
$gpxLogType[3] = 'Write note';
|
||||
$gpxLogType[7] = 'Attended';
|
||||
$gpxLogType[8] = 'Will attend';
|
||||
$gpxLogType[9] = 'Archive';
|
||||
$gpxLogType[10] = 'Owner Maintenance';
|
||||
$gpxLogType[11] = 'Temporarily Disable Listing';
|
||||
$gpxLogType[13] = 'Archive';
|
||||
$gpxLogType[14] = 'Archive';
|
||||
|
||||
$gpxSymNormal = 'Geocache';
|
||||
$gpxSymFound = 'Geocache Found';
|
||||
|
@@ -313,6 +313,7 @@ class cache
|
||||
`cache_logs`.`date` AS `date`,
|
||||
substr(`cache_logs`.`date`,12) AS `time`, /* 00:00:01 = 00:00 logged, 00:00:00 = no time */
|
||||
`cache_logs`.`type` AS `type`,
|
||||
`cache_logs`.`oc_team_comment` AS `oc_team_comment`,
|
||||
`cache_logs`.`text` AS `text`,
|
||||
`cache_logs`.`text_html` AS `texthtml`,
|
||||
`cache_logs`.`picture`,
|
||||
|
@@ -10,6 +10,7 @@
|
||||
|
||||
require_once($opt['rootpath'] . 'lib2/logic/rowEditor.class.php');
|
||||
require_once($opt['rootpath'] . 'lib2/logic/cache.class.php');
|
||||
require_once($opt['rootpath'] . 'lib/logtypes.inc.php');
|
||||
|
||||
class cachelog
|
||||
{
|
||||
@@ -58,6 +59,7 @@ class cachelog
|
||||
$this->reCacheLog->addInt('cache_id', 0, false);
|
||||
$this->reCacheLog->addInt('user_id', 0, false);
|
||||
$this->reCacheLog->addInt('type', 0, false);
|
||||
$this->reCacheLog->addInt('oc_team_comment', 0, false);
|
||||
$this->reCacheLog->addDate('date', time(), false);
|
||||
$this->reCacheLog->addString('text', '', false);
|
||||
$this->reCacheLog->addInt('text_html', 0, false);
|
||||
@@ -106,14 +108,24 @@ class cachelog
|
||||
{
|
||||
return $this->reCacheLog->getValue('type');
|
||||
}
|
||||
function setType($value)
|
||||
function setType($value,$force=false)
|
||||
{
|
||||
$nValidLogTypes = $this->getValidLogTypes();
|
||||
if (array_search($value, $nValidLogTypes) === false)
|
||||
return false;
|
||||
|
||||
if (!$force)
|
||||
{
|
||||
$nValidLogTypes = $this->getValidLogTypes();
|
||||
if (array_search($value, $nValidLogTypes) === false)
|
||||
return false;
|
||||
}
|
||||
return $this->reCacheLog->setValue('type', $value);
|
||||
}
|
||||
function getOcTeamComment()
|
||||
{
|
||||
return $this->reCacheLog->getValue('oc_team_comment');
|
||||
}
|
||||
function setOcTeamComment($value)
|
||||
{
|
||||
return $this->reCacheLog->setValue('oc_team_comment', $value);
|
||||
}
|
||||
function getDate()
|
||||
{
|
||||
return $this->reCacheLog->getValue('date');
|
||||
@@ -223,7 +235,6 @@ class cachelog
|
||||
return false;
|
||||
}
|
||||
|
||||
/* will depend on userid in future e.g. maintainance-logs etc. */
|
||||
function getValidLogTypes()
|
||||
{
|
||||
$cache = new cache($this->getCacheId());
|
||||
@@ -231,14 +242,7 @@ class cachelog
|
||||
return array();
|
||||
if ($cache->allowLog() == false)
|
||||
return array();
|
||||
|
||||
$nTypes = array();
|
||||
$rs = sql("SELECT `log_type_id` FROM `cache_logtype` WHERE `cache_type_id`='&1'", $cache->getType());
|
||||
while ($r = sql_fetch_assoc($rs))
|
||||
$nTypes[] = $r['log_type_id'];
|
||||
sql_free_result($rs);
|
||||
|
||||
return $nTypes;
|
||||
return get_cache_log_types($this->getCacheId(),$this->getType()); // depends on userid
|
||||
}
|
||||
}
|
||||
?>
|
@@ -21,6 +21,7 @@
|
||||
|
||||
//prepare the templates and include all neccessary
|
||||
require_once('./lib/common.inc.php');
|
||||
require_once('./lib/logtypes.inc.php');
|
||||
require($stylepath.'/smilies.inc.php');
|
||||
require_once($opt['rootpath'] . '../lib/htmlpurifier-4.2.0/library/HTMLPurifier.auto.php');
|
||||
|
||||
@@ -114,6 +115,7 @@
|
||||
$log_time_minute = isset($_POST['logminute']) ? trim($_POST['logminute']) : "";
|
||||
$top_option = isset($_POST['ratingoption']) ? $_POST['ratingoption']+0 : 0;
|
||||
$top_cache = isset($_POST['rating']) ? $_POST['rating']+0 : 0;
|
||||
$oc_team_comment = isset($_POST['teamcomment']) ? ($_POST['teamcomment'] != 0) : 0;
|
||||
|
||||
// check if user has exceeded his top5% limit
|
||||
$user_founds = sqlValue("SELECT IFNULL(`stat_user`.`found`, 0) FROM `user` LEFT JOIN `stat_user` ON `user`.`user_id`=`stat_user`.`user_id` WHERE `user`.`user_id`='" . sql_escape($usr['userid']) . "'", 0);
|
||||
@@ -169,6 +171,10 @@
|
||||
$log_text = nl2br(htmlspecialchars($log_text, ENT_COMPAT, 'UTF-8'));
|
||||
}
|
||||
|
||||
// ignore unauthorized team comments
|
||||
if (!teamcomment_allowed($cache_id, $log_type))
|
||||
$oc_team_comment = 0;
|
||||
|
||||
// validate data
|
||||
if (is_numeric($log_date_month) && is_numeric($log_date_day) && is_numeric($log_date_year) &&
|
||||
("$log_time_hour$log_time_minute"=="" || is_numeric($log_time_hour)) &&
|
||||
@@ -187,7 +193,7 @@
|
||||
else
|
||||
$date_ok = false;
|
||||
|
||||
$logtype_ok = sqlValue("SELECT COUNT(*) FROM cache_logtype WHERE cache_type_id='" . sql_escape($cache_type) . "' AND log_type_id='" . sql_escape($log_type) . "'", 0) > 0;
|
||||
$logtype_ok = logtype_ok($cache_id, $log_type, 0); // depends on userid
|
||||
|
||||
// not a found log? then ignore the rating
|
||||
if ($log_type != 1 && $log_type != 7)
|
||||
@@ -229,26 +235,19 @@
|
||||
|
||||
if (!$already_exists)
|
||||
{
|
||||
sql("INSERT INTO `cache_logs` (`id`, `cache_id`, `user_id`, `type`, `date`, `text`, `text_html`, `text_htmledit`, `node`)
|
||||
VALUES ('', '&1', '&2', '&3', '&4', '&5', '&6', '&7', '&8')",
|
||||
$cache_id, $usr['userid'], $log_type, $log_date, $log_text, (($descMode != 1) ? 1 : 0), (($descMode == 3) ? 1 : 0), $oc_nodeid);
|
||||
// update cache_status
|
||||
$new_cache_status = sqlValue("SELECT `cache_status` FROM `log_types` WHERE `id`='" . sql_escape($log_type) . "'", 0);
|
||||
if ($new_cache_status > 0)
|
||||
$rs = sql("UPDATE `caches` SET `status`='&1' WHERE `cache_id`='&2'", $new_cache_status, $cache_id);
|
||||
|
||||
// insert log
|
||||
sql("INSERT INTO `cache_logs` (`id`, `cache_id`, `user_id`, `type`, `oc_team_comment`, `date`, `text`, `text_html`, `text_htmledit`, `node`)
|
||||
VALUES ('', '&1', '&2', '&3', '&4', '&5', '&6', '&7', '&8', '&9')",
|
||||
$cache_id, $usr['userid'], $log_type, $oc_team_comment, $log_date, $log_text, (($descMode != 1) ? 1 : 0), (($descMode == 3) ? 1 : 0), $oc_nodeid);
|
||||
|
||||
// do not use slave server for the next time ...
|
||||
db_slave_exclude();
|
||||
|
||||
// update cache_status
|
||||
$rs = sql("SELECT `log_types`.`cache_status` FROM `log_types` WHERE `id`='&1'", $log_type);
|
||||
if ($record = sql_fetch_array($rs))
|
||||
{
|
||||
$cache_status = $record['cache_status'];
|
||||
if ($cache_status != 0)
|
||||
$rs = sql("UPDATE `caches` SET `status`='&1' WHERE `cache_id`='&2'", $cache_status, $cache_id);
|
||||
}
|
||||
else
|
||||
{
|
||||
die("OPS!");
|
||||
}
|
||||
|
||||
// update top-list
|
||||
if ($top_option)
|
||||
if ($top_cache)
|
||||
@@ -268,29 +267,19 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
//build logtypeoptions
|
||||
// build logtype options
|
||||
$logtype_names = get_logtype_names();
|
||||
$allowed_logtypes = get_cache_log_types($cache_id, 0);
|
||||
$default_log_type = isset($_REQUEST['logtype']) ? $_REQUEST['logtype']+0 : 0;
|
||||
if (!logtype_ok($cache_id, $default_log_type, 0))
|
||||
$default_log_type = $allowed_logtypes[0];
|
||||
|
||||
$logtypeoptions = '';
|
||||
if ($cache_type == 6) // event
|
||||
$logtypeorder = 'DESC';
|
||||
else
|
||||
$logtypeorder = 'ASC';
|
||||
$rsLogTypes = sql("SELECT `log_types`.`id`, IFNULL(`sys_trans_text`.`text`, `log_types`.`name`) AS `name`
|
||||
FROM `caches`
|
||||
INNER JOIN `cache_type` ON `caches`.`type`=`cache_type`.`id`
|
||||
INNER JOIN `cache_logtype` ON `cache_type`.`id`=`cache_logtype`.`cache_type_id`
|
||||
INNER JOIN `log_types` ON `cache_logtype`.`log_type_id`=`log_types`.`id`
|
||||
LEFT JOIN `sys_trans` ON `log_types`.`trans_id`=`sys_trans`.`id`
|
||||
LEFT JOIN `sys_trans_text` ON `sys_trans`.`id`=`sys_trans_text`.`trans_id` AND `sys_trans_text`.`lang`='" . sql_escape($locale) . "'
|
||||
WHERE `caches`.`cache_id`='" . ($cache_id+0) . "'
|
||||
ORDER BY `log_types`.`id` " . $logtypeorder);
|
||||
$log_type = ($record['user_id'] == $usr['userid'] ? 3 : 1);
|
||||
while ($rLogTypes = sql_fetch_assoc($rsLogTypes))
|
||||
if (!$adminlog || $rLogTypes['id'] == 3)
|
||||
{
|
||||
$sSelected = ($rLogTypes['id'] == $log_type) ? ' selected="selected"' : '';
|
||||
$logtypeoptions .= '<option value="' . $rLogTypes['id'] . '"' . $sSelected . '>' . htmlspecialchars($rLogTypes['name'], ENT_COMPAT, 'UTF-8') . '</option>' . "\n";
|
||||
}
|
||||
sql_free_result($rsLogTypes);
|
||||
foreach ($allowed_logtypes as $logtype)
|
||||
{
|
||||
$selected = ($logtype == $default_log_type ? ' selected="selected"' : '');
|
||||
$logtypeoptions .= '<option value="' . $logtype . '"' . $selected . '>' . htmlspecialchars($logtype_names[$logtype], ENT_COMPAT, 'UTF-8') . '</option>' . "\n";
|
||||
}
|
||||
|
||||
//set tpl vars
|
||||
tpl_set_var('cachename', htmlspecialchars($cachename, ENT_COMPAT, 'UTF-8'));
|
||||
@@ -305,6 +294,13 @@
|
||||
tpl_set_var('submit', $submit);
|
||||
tpl_set_var('date_message', '');
|
||||
|
||||
$oc_team_comment = isset($_REQUEST['teamcomment']) ? ($_REQUEST['teamcomment'] != 0) : 0;
|
||||
if (teamcomment_allowed($cache_id,3))
|
||||
tpl_set_var('teamcommentoption',
|
||||
mb_ereg_replace('{chk_sel}', ($oc_team_comment ? 'checked' : ''), $teamcomment_field));
|
||||
else
|
||||
tpl_set_var('teamcommentoption', '');
|
||||
|
||||
// Text / normal HTML / HTML editor
|
||||
tpl_set_var('use_tinymce', (($descMode == 3) ? 1 : 0));
|
||||
|
||||
|
@@ -44,7 +44,8 @@
|
||||
`caches`.`name` AS `cachename`,
|
||||
`caches`.`wp_oc`,
|
||||
`caches`.`country` AS `country`,
|
||||
`cache_logs`.`type`,
|
||||
`cache_logs`.`type`,
|
||||
`cache_logs`.`oc_team_comment`,
|
||||
`cacheloguser`.`user_id`,
|
||||
`cacheloguser`.`username`,
|
||||
`cache_logs`.`cache_id`,
|
||||
|
@@ -1644,6 +1644,7 @@ class Okapi
|
||||
if ($id == 10) return "Ready to search";
|
||||
if ($id == 11) return "Temporarily unavailable";
|
||||
if ($id == 12) return "OC Team comment";
|
||||
if ($id == 13 || $id == 14) return "Locked";
|
||||
|
||||
# Important: This set is not closed. Other types may be introduced
|
||||
# in the future. This has to be documented in the public method
|
||||
|
@@ -50,6 +50,7 @@
|
||||
<li>"Ready to search" - the cache can be found again.</li>
|
||||
<li>"Archived" - the cache cannot be found and probably won't be
|
||||
repaired.</li>
|
||||
<li>"Locked" - the cache has been archived and can no longer be logged.</li>
|
||||
</ul>
|
||||
|
||||
<p>Other types (used only by some Opencaching installations):</p>
|
||||
|
@@ -45,7 +45,7 @@
|
||||
else
|
||||
{
|
||||
$log_rs = sql("SELECT `cache_logs`.`node` AS `node`, `cache_logs`.`uuid` AS `uuid`, `cache_logs`.`cache_id` AS `cache_id`, `caches`.`user_id` AS `cache_owner_id`,
|
||||
`caches`.`name` AS `cache_name`, `cache_logs`.`text` AS `log_text`, `cache_logs`.`text_html`, `cache_logs`.`type` AS `log_type`,
|
||||
`caches`.`name` AS `cache_name`, `cache_logs`.`text` AS `log_text`, `cache_logs`.`text_html`, `cache_logs`.`type` AS `log_type`, `cache_logs`.`oc_team_comment` AS `oc_team_comment`,
|
||||
`cache_logs`.`user_id` AS `log_user_id`, `cache_logs`.`date` AS `log_date`,
|
||||
`log_types`.`icon_small` AS `icon_small`,
|
||||
`user`.`username` as `log_username`,
|
||||
@@ -238,7 +238,12 @@
|
||||
tpl_set_var('logid_urlencode', htmlspecialchars(urlencode($log_id), ENT_COMPAT, 'UTF-8'));
|
||||
tpl_set_var('logid', htmlspecialchars($log_id, ENT_COMPAT, 'UTF-8'));
|
||||
|
||||
tpl_set_var('logimage', icon_log_type($log_record['icon_small'], ""));
|
||||
if ($log_record['oc_team_comment'])
|
||||
$teamimg = '<img src="resource2/ocstyle/images/oclogo/oc-team-comment.png" title="' . t('OC team comment') . '" /> ';
|
||||
else
|
||||
$teamimg = "";
|
||||
tpl_set_var('logimage', $teamimg . icon_log_type($log_record['icon_small'], ""));
|
||||
|
||||
tpl_set_var('date', htmlspecialchars(strftime($dateformat, strtotime($log_record['log_date'])), ENT_COMPAT, 'UTF-8'));
|
||||
tpl_set_var('time', substr($log_record['log_date'],11)=="00:00:00" ? "" : ", " . substr($log_record['log_date'],11,5));
|
||||
tpl_set_var('userid', htmlspecialchars($log_record['log_user_id'] + 0, ENT_COMPAT, 'UTF-8'));
|
||||
|
Before Width: | Height: | Size: 639 B After Width: | Height: | Size: 639 B |
Before Width: | Height: | Size: 800 B After Width: | Height: | Size: 800 B |
Before Width: | Height: | Size: 710 B After Width: | Height: | Size: 710 B |
BIN
htdocs/resource2/ocstyle/images/log/16x16-locked-invisible.png
Normal file
After Width: | Height: | Size: 736 B |
BIN
htdocs/resource2/ocstyle/images/log/16x16-locked.png
Normal file
After Width: | Height: | Size: 466 B |
Before Width: | Height: | Size: 677 B |
Before Width: | Height: | Size: 545 B |
Before Width: | Height: | Size: 639 B |
Before Width: | Height: | Size: 736 B |
Before Width: | Height: | Size: 710 B |
Before Width: | Height: | Size: 800 B |
BIN
htdocs/resource2/ocstyle/images/oclogo/oc-team-comment.png
Normal file
After Width: | Height: | Size: 493 B |
BIN
htdocs/resource2/ocstyle/images/viewcache/16x16-maintenance.png
Normal file
After Width: | Height: | Size: 643 B |
@@ -700,9 +700,9 @@ function restore_listings($cacheids, $rdate, $roptions, $simulate)
|
||||
if (in_array('logs',$roptions))
|
||||
{
|
||||
$rs = sql("SELECT * FROM (
|
||||
SELECT `id`, -1 AS `node`, `date_modified`, `cache_id`, 0 AS `user_id`, 0 AS `type`, '0' as `date`, '' AS `text`, 0 AS `text_html`, 0 AS `text_htmledit`, `original_id` FROM `cache_logs_restored`
|
||||
SELECT `id`, -1 AS `node`, `date_modified`, `cache_id`, 0 AS `user_id`, 0 AS `type`, '0' as `oc_team_comment`, '0' as `date`, '' AS `text`, 0 AS `text_html`, 0 AS `text_htmledit`, `original_id` FROM `cache_logs_restored`
|
||||
WHERE `cache_id`='&1' AND `date_modified` >= '&2'
|
||||
UNION SELECT `id`, `node`, `deletion_date`, `cache_id`, `user_id`, `type`, `date`, `text`, `text_html`, `text_htmledit`, 0 AS `original_id` FROM `cache_logs_archived`
|
||||
UNION SELECT `id`, `node`, `deletion_date`, `cache_id`, `user_id`, `type`, `oc_team_comment`, `date`, `text`, `text_html`, `text_htmledit`, 0 AS `original_id` FROM `cache_logs_archived`
|
||||
WHERE `cache_id`='&1' AND `deletion_date` >= '&2' AND `deleted_by`='&3' AND `user_id` != '&3'
|
||||
) `logs`
|
||||
ORDER BY `date_modified` ASC",
|
||||
@@ -752,7 +752,8 @@ function restore_listings($cacheids, $rdate, $roptions, $simulate)
|
||||
$log->setNode($r['node']); // cachelog class currently does not initialize node field
|
||||
$log->setCacheId($r['cache_id']);
|
||||
$log->setUserId($r['user_id']);
|
||||
$log->setType($r['type']);
|
||||
$log->setType($r['type'],true);
|
||||
$log->setOcTeamComment($r['oc_team_comment']);
|
||||
$log->setDate($r['date']);
|
||||
$log->setText($r['text']);
|
||||
$log->setTextHtml($r['text_html']);
|
||||
|
@@ -76,20 +76,34 @@
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<p style="line-height: 1.6em;"><input type="submit" name="assign" value="{t}Assign to me{/t}" class="formbutton" onclick="submitbutton('assign')" />
|
||||
{if $ownreport}
|
||||
<input type="submit" name="contact" value="{t}Contact owner{/t}" class="formbutton" onclick="submitbutton('contact')" /> <input type="submit" name="contact_reporter" value="{t}Contact reporter{/t}" class="formbutton" onclick="submitbutton('contact_reporter')" /> <input type="submit" name="done" value="{t}Mark as finished{/t}" class="formbutton" onclick="submitbutton('done')" /></p>
|
||||
<p style="line-height: 1.6em; margin-bottom:16px">
|
||||
{if !$ownreport}
|
||||
<input type="submit" name="assign" value="{t}Assign to me{/t}" class="formbutton" onclick="submitbutton('assign')" />
|
||||
{else}
|
||||
<input type="submit" name="contact" value="{t}Contact owner{/t}" class="formbutton" onclick="submitbutton('contact')" /> <input type="submit" name="contact_reporter" value="{t}Contact reporter{/t}" class="formbutton" onclick="submitbutton('contact_reporter')" /> <input type="submit" name="done" value="{t}Mark as finished{/t}" class="formbutton" onclick="submitbutton('done')" />
|
||||
</p>
|
||||
|
||||
<div class="content2-container bg-blue02">
|
||||
<p class="content-title-noshade-size2">
|
||||
<img src="resource2/{$opt.template.style}/images/description/22x22-utility.png" style="align: left; margin-right: 10px;" width="22" height="22" alt="" />
|
||||
{t}Set state{/t}
|
||||
</p>
|
||||
</div>
|
||||
<div class="content2-container bg-blue02">
|
||||
<p class="content-title-noshade-size2">
|
||||
<img src="resource2/{$opt.template.style}/images/description/22x22-utility.png" style="align: left; margin-right: 10px;" width="22" height="22" alt="" />
|
||||
{t}Set state{/t}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<p style="line-height: 1.6em;"><input type="submit" name="statusActive" value="{t}Ready for search{/t}" class="formbutton" onclick="submitbutton('statusActive')" /> <input type="submit" name="statusTNA" value="{t}Temporary not available{/t}" class="formbutton" onclick="submitbutton('statusTNA')" /> <input type="submit" name="statusArchived" value="{t}Archived{/t}" class="formbutton" onclick="javasscript:submitbutton('statusArchived')" /> <input type="submit" name="statusLockedVisible" value="{t}Locked, visible{/t}" class="formbutton" onclick="submitbutton('statusLockedVisible')" /> <input type="submit" name="statusLockedInvisible" value="{t}Locked, invisible{/t}" class="formbutton" onclick="submitbutton('statusLockedInvisible')" /></p>
|
||||
{elseif $otheradmin}
|
||||
<br />{t}Warning: This report is already assigned to another admin. Consult him first before you assume the report!{/t}
|
||||
<p style="line-height: 1.6em;">
|
||||
<a href="log.php?cacheid={$cacheid}&logtype=10&teamcomment=1" target="_blank"><img src="resource2/{$opt.template.style}/images/log/16x16-active.png" />{t}Ready for search{/t}</a>
|
||||
|
||||
<a href="log.php?cacheid={$cacheid}&logtype=11&teamcomment=1" target="_blank"><img src="resource2/{$opt.template.style}/images/log/16x16-disabled.png" />{t}Temporary not available{/t}</a>
|
||||
|
||||
<a href="log.php?cacheid={$cacheid}&logtype=9&teamcomment=1" target="_blank"><img src="resource2/{$opt.template.style}/images/log/16x16-archived.png" />{t}Archived{/t}</a>
|
||||
|
||||
<a href="log.php?cacheid={$cacheid}&logtype=13&teamcomment=1" target="_blank"><img src="resource2/{$opt.template.style}/images/log/16x16-locked.png" />{t}Locked, visible{/t}</a>
|
||||
|
||||
<a href="log.php?cacheid={$cacheid}&logtype=14&teamcomment=1" target="_blank"><img src="resource2/{$opt.template.style}/images/log/16x16-locked-invisible.png" />{t}Locked, invisible{/t}</a>
|
||||
</p>
|
||||
{if $otheradmin}
|
||||
</p><br />{t}Warning: This report is already assigned to another admin. Consult him first before you assume the report!{/t}
|
||||
{/if}
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
|
@@ -17,7 +17,7 @@
|
||||
<p class="content-title-noshade-size3">
|
||||
<img src="resource2/{$opt.template.style}/images/description/22x22-logs.png" width="22" height="22" style="align: left; margin-right: 10px;" />
|
||||
{t 1=$found}Finds: %1{/t}
|
||||
<span class="content-title-link">[<a href="search.php?showresult=1&expert=0&output=HTML&sort=bymylastlog&finderid={$login.userid}&searchbyfinder=&f_inactive=0&logtype=1,7">{t}Geocaches found{/t}</a>] [<a href="search.php?showresult=1&expert=0&output=HTML&sort=bymylastlog&finderid={$login.userid}&searchbyfinder=&f_inactive=0&logtype=1,2,3,6,7,8">{t}Geocaches logged{/t}</a>]</span>
|
||||
<span class="content-title-link">[<a href="search.php?showresult=1&expert=0&output=HTML&sort=bymylastlog&finderid={$login.userid}&searchbyfinder=&f_inactive=0&logtype=1,7">{t}Geocaches found{/t}</a>] [<a href="search.php?showresult=1&expert=0&output=HTML&sort=bymylastlog&finderid={$login.userid}&searchbyfinder=&f_inactive=0&logtype=1,2,3,4,5,6,7,8,9,10,11,12,13,14">{t}Geocaches logged{/t}</a>]</span>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
@@ -39,9 +39,20 @@
|
||||
<img src="resource2/{$opt.template.style}/images/log/16x16-attended.png" width="16" height="16" border="0" alt="" style="margin-top:4px;" />
|
||||
{elseif $newLog.type==8}
|
||||
<img src="resource2/{$opt.template.style}/images/log/16x16-will_attend.png" width="16" height="16" border="0" alt="" style="margin-top:4px;" />
|
||||
{elseif $newLog.type==9}
|
||||
<img src="resource2/{$opt.template.style}/images/log/16x16-archived.png" width="16" height="16" border="0" alt="" style="margin-top:4px;" />
|
||||
{elseif $newLog.type==10}
|
||||
<img src="resource2/{$opt.template.style}/images/log/16x16-active.png" width="16" height="16" border="0" alt="" style="margin-top:4px;" />
|
||||
{elseif $newLog.type==11}
|
||||
<img src="resource2/{$opt.template.style}/images/log/16x16-disabled.png" width="16" height="16" border="0" alt="" style="margin-top:4px;" />
|
||||
{elseif $newLog.type==13}
|
||||
<img src="resource2/{$opt.template.style}/images/log/16x16-locked.png" width="16" height="16" border="0" alt="" style="margin-top:4px;" />
|
||||
{elseif $newLog.type==14}
|
||||
<img src="resource2/{$opt.template.style}/images/log/16x16-locked-invisible.png" width="16" height="16" border="0" alt="" style="margin-top:4px;" />
|
||||
{/if}
|
||||
</td>
|
||||
<td>
|
||||
{if $newLog.oc_team_comment}<img src="resource2/{$opt.template.style}/images/oclogo/oc-team-comment.png" alt="OC-Team" title="{t}OC team comment{/t}"/>{/if}
|
||||
{capture name=cachename}
|
||||
<a href="viewcache.php?wp={$newLog.wp_oc}">{$newLog.cachename|escape}</a>
|
||||
{/capture}
|
||||
@@ -59,6 +70,14 @@
|
||||
{t 1=$smarty.capture.cachename 2=$smarty.capture.username}%2 visited %1{/t}
|
||||
{elseif $newLog.type==8}
|
||||
{t 1=$smarty.capture.cachename 2=$smarty.capture.username}%2 want's to visit %1{/t}
|
||||
{elseif $newLog.type==9}
|
||||
{t 1=$smarty.capture.cachename 2=$smarty.capture.username}%2 has archived %1{/t}
|
||||
{elseif $newLog.type==10}
|
||||
{t 1=$smarty.capture.cachename 2=$smarty.capture.username}%2 has maintainted %1{/t}
|
||||
{elseif $newLog.type==11}
|
||||
{t 1=$smarty.capture.cachename 2=$smarty.capture.username}%2 has disabled %1{/t}
|
||||
{elseif $newLog.type==13 || $newLog.type==14}
|
||||
{t 1=$smarty.capture.cachename 2=$smarty.capture.username}%2 has locked %1{/t}
|
||||
{/if}
|
||||
|
||||
{if $newLog.pics}
|
||||
|
@@ -6,6 +6,7 @@
|
||||
<div class="content-txtbox-noshade"> {* Ocprop: <div class="content-txtbox-noshade">(.*?)<\/div> *}
|
||||
<div class="logs" id="log{$logItem.id}">
|
||||
<p class="content-title-noshade-size1" style="display:inline; margin-right:0">
|
||||
{if $logItem.oc_team_comment}<img src="resource2/{$opt.template.style}/images/oclogo/oc-team-comment.png" alt="OC-Team" title="{t}OC team comment{/t}"/>{/if}
|
||||
{include file="res_logtype.tpl" type=$logItem.type}
|
||||
{if $logItem.recommended==1} {* Ocprop: rating-star\.gif *}
|
||||
<img src="images/rating-star.gif" border="0" alt="{t}Recommended{/t}" width="17px" height="16px" />
|
||||
@@ -26,6 +27,16 @@
|
||||
{t 1=$smarty.capture.username}%1 has visited the event{/t}
|
||||
{elseif $logItem.type==8}
|
||||
{t 1=$smarty.capture.username}%1 wants to visit the event{/t}
|
||||
{elseif $logItem.type==9}
|
||||
{t 1=$smarty.capture.username}%1 has archived the cache{/t}
|
||||
{elseif $logItem.type==10}
|
||||
{t 1=$smarty.capture.username}%1 has maintained the cache{/t}
|
||||
{elseif $logItem.type==11}
|
||||
{t 1=$smarty.capture.username}%1 has disabled the cache{/t}
|
||||
{elseif $logItem.type==13}
|
||||
{t 1=$smarty.capture.username}%1 has locked the cache{/t}
|
||||
{elseif $logItem.type==14}
|
||||
{t 1=$smarty.capture.username}%1 has locked and hidden the cache{/t}
|
||||
{else}
|
||||
{t 1=$smarty.capture.username}%1{/t}
|
||||
{/if}
|
||||
|
@@ -14,6 +14,16 @@
|
||||
<img src="resource2/{$opt.template.style}/images/log/16x16-attended.png" alt="{t}Attended{/t}" />
|
||||
{elseif $type==8}
|
||||
<img src="resource2/{$opt.template.style}/images/log/16x16-will_attend.png" alt="{t}Will attend{/t}" />
|
||||
{elseif $type==9}
|
||||
<img src="resource2/{$opt.template.style}/images/log/16x16-archived.png" alt="{t}Archived{/t}" />
|
||||
{elseif $type==10}
|
||||
<img src="resource2/{$opt.template.style}/images/log/16x16-active.png" alt="{t}Ready for search{/t}" />
|
||||
{elseif $type==11}
|
||||
<img src="resource2/{$opt.template.style}/images/log/16x16-disabled.png" alt="{t}Temporary not available{/t}" />
|
||||
{elseif $type==13}
|
||||
<img src="resource2/{$opt.template.style}/images/log/16x16-locked.png" alt="{t}Locked{/t}" />
|
||||
{elseif $type==14}
|
||||
<img src="resource2/{$opt.template.style}/images/log/16x16-locked-invisible.png" alt="{t}Locked, invisible{/t}" />
|
||||
{else}
|
||||
|
||||
{/if}
|
||||
|
@@ -190,7 +190,7 @@
|
||||
<img src="resource2/{$opt.template.style}/images/viewcache/date.png" class="icon16" alt="" title="" align="middle" /> {if $cache.is_publishdate==0}{t}Listed since{/t}{else}{t}Published on{/t}{/if}: {$cache.datecreated|date_format:$opt.format.datelong}<br />
|
||||
<img src="resource2/{$opt.template.style}/images/viewcache/date.png" class="icon16" alt="" title="" align="middle" /> {t}Last update{/t}: {$cache.lastmodified|date_format:$opt.format.datelong}<br /> {* Ocprop: <br />\s*Wegpunkt: (OC[A-Z0-9]+)\s*<br /> -- Waypoint: <b>(OC[A-Z0-9]+)<\/b><br \/> *}
|
||||
<!-- Ocprop: <br /> Wegpunkt: <b>OC0000</b><br /> -->
|
||||
<img src="resource2/{$opt.template.style}/images/viewcache/arrow_in.png" class="icon16" alt="" title="" align="middle" /> {if $shortlink_domain !== false}{$shortlink_domain}/{else}{t}Waypoint{/t}: {/if}<b>{$cache.wpoc}</b><br />
|
||||
<img src="resource2/{$opt.template.style}/images/viewcache/arrow_in.png" class="icon16" alt="" title="" align="middle" /> {t}Listing{/t}: {if $shortlink_domain !== false}{$shortlink_domain}/{/if}<b>{$cache.wpoc}</b><br />
|
||||
{if $cache.wpgc!='' || $cache.wpnc!=''}<img src="resource2/{$opt.template.style}/images/viewcache/link.png" class="icon16" alt="" title="" align="middle" />
|
||||
{t}Also listed at{/t}: {* Ocprop: Auch gelistet auf: <a href=\"http://www\.geocaching\.com/seek/cache_details\.aspx\?wp=(GC[0-9A-Z]{1,5})\" target=\"_blank\">geocaching.com</a> *}
|
||||
{if $cache.wpgc!=''}
|
||||
@@ -206,10 +206,11 @@
|
||||
<p style="line-height: 1.4em;">
|
||||
<img src="resource2/{$opt.template.style}/images/{if $cache.type==6}log{else}viewcache{/if}/16x16-{if $cache.type==6}attended{else}found{/if}.png" class="icon16" alt="" /> {$cache.found} {if $cache.type==6} {t}Attended{/t}{else}{t}Found{/t}{/if}<br />
|
||||
<img src="resource2/{$opt.template.style}/images/{if $cache.type==6}log{else}viewcache{/if}/16x16-{if $cache.type==6}will_attend{else}dnf{/if}.png" class="icon16" alt="" /> {if $cache.type==6} {$cache.willattend} {t}Will attend{/t}{else} {$cache.notfound} {t}Not found{/t}{/if}<br />
|
||||
<img src="resource2/{$opt.template.style}/images/viewcache/16x16-note.png" class="icon16" alt="" /> {$cache.note} {t}Notes{/t}<br />
|
||||
<img src="resource2/{$opt.template.style}/images/viewcache/16x16-watch.png" class="icon16" alt="" /> {$cache.watcher} {t}Watched{/t}<br />
|
||||
<img src="resource2/{$opt.template.style}/images/viewcache/ignore-16.png" class="icon16" alt="" /> {$cache.ignorercount} {t}Ignored{/t}<br />
|
||||
<img src="resource2/{$opt.template.style}/images/viewcache/16x16-visitors.png" class="icon16" alt="" /> {$cache.visits} {t}Page visits{/t}<br />
|
||||
<img src="resource2/{$opt.template.style}/images/viewcache/16x16-note.png" class="icon16" alt="" /> {$cache.note} {if $cache.note==1}{t}Note{/t}{else}{t}Notes{/t}{/if}<br />
|
||||
{if $cache.maintenance}<img src="resource2/{$opt.template.style}/images/viewcache/16x16-maintenance.png" class="icon16" alt="" /> {$cache.maintenance} {if $cache.maintenance==1}{t}Maintenance log{/t}{else}{t}Maintenance logs{/t}{/if}<br />{/if}
|
||||
<img src="resource2/{$opt.template.style}/images/viewcache/16x16-watch.png" class="icon16" alt="" /> {$cache.watcher} {if $cache.watcher==1}{t}Watcher{/t}{else}{t}Watchers{/t}{/if}<br />
|
||||
<img src="resource2/{$opt.template.style}/images/viewcache/ignore-16.png" class="icon16" alt="" /> {$cache.ignorercount} {if $cache.ignorecount==1}{t}Ignorer{/t}{else}{t}Ignorers{/t}{/if}<br />
|
||||
<img src="resource2/{$opt.template.style}/images/viewcache/16x16-visitors.png" class="icon16" alt="" /> {$cache.visits} {if $cache.visits==1}{t}Page visit{/t}{else}{t}Page visits{/t}{/if}<br />
|
||||
<span style="white-space:nowrap;"><img src="resource2/{$opt.template.style}/images/viewcache/16x16-pictures.png" class="icon16" alt="" /> {$logpics} {if $logpics>0}<a class="link" href="viewcache.php?cacheid={$cache.cacheid|urlencode}&logpics=1">{/if}{if $logpics==1}{t}Log picture{/t}{else}{t}Log pictures{/t}{/if}{if $logpics>0}</a>{/if}</span><br />
|
||||
<span style="white-space:nowrap;"><img src="resource2/{$opt.template.style}/images/viewcache/gk.png" class="icon16" alt="" title="GeoKrety visited" /> <a class="links" href="http://geokrety.org/szukaj.php?lang=de_DE.UTF-8&wpt={$cache.wpoc}" target="_blank">{t}Geokrety history{/t}</a></span><br />
|
||||
{if $cache.topratings>0}
|
||||
|
@@ -128,10 +128,11 @@
|
||||
|
||||
<img src="resource2/{$opt.template.style}/images/log/16x16-found.png" width="16" height="16" border="0"> {$cache.found} {if $cache.type==6}{t}Attended{/t}{else}{t}Found{/t}{/if}<br />
|
||||
<nobr><img src="resource2/{$opt.template.style}/images/log/16x16-dnf.png" width="16" height="16" border="0">{if $cache.type==6} {$cache.willattend} {t}Will attend{/t}{else} {$cache.notfound} {t}Not found{/t}{/if}</nobr><br />
|
||||
<img src="resource2/{$opt.template.style}/images/log/16x16-note.png" width="16" height="16" border="0"> {$cache.note} {t}Notes{/t}<br />
|
||||
<img src="resource2/{$opt.template.style}/images/action/16x16-watch.png" width="16" height="16" border="0"> {$cache.watcher} {t}Watched{/t}<br />
|
||||
<img src="resource2/{$opt.template.style}/images/action/16x16-ignore.png" width="16" height="16" border="0"> {$cache.ignorercount} {t}Ignored{/t}<br />
|
||||
<img src="resource2/{$opt.template.style}/images/description/16x16-visitors.png" width="16" height="16" border="0"> {$cache.visits} {t}Page visits{/t}<br />
|
||||
<img src="resource2/{$opt.template.style}/images/viewcache/16x16-note.png" class="icon16" alt="" /> {$cache.note} {if $cache.note==1}{t}Note{/t}{else}{t}Notes{/t}{/if}<br />
|
||||
{if $cache.maintenance}<img src="resource2/{$opt.template.style}/images/viewcache/16x16-maintenance.png" class="icon16" alt="" /> {$cache.maintenance} {if $cache.maintenance==1}{t}Maintenance log{/t}{else}{t}Maintenance logs{/t}{/if}<br />{/if}
|
||||
<img src="resource2/{$opt.template.style}/images/viewcache/16x16-watch.png" class="icon16" alt="" /> {$cache.watcher} {if $cache.watcher==1}{t}Watcher{/t}{else}{t}Watchers{/t}{/if}<br />
|
||||
<img src="resource2/{$opt.template.style}/images/viewcache/ignore-16.png" class="icon16" alt="" /> {$cache.ignorercount} {if $cache.ignorecount==1}{t}Ignorer{/t}{else}{t}Ignorers{/t}{/if}<br />
|
||||
<img src="resource2/{$opt.template.style}/images/viewcache/16x16-visitors.png" class="icon16" alt="" /> {$cache.visits} {if $cache.visits==1}{t}Page visit{/t}{else}{t}Page visits{/t}{/if}<br />
|
||||
{if $cache.topratings>0}
|
||||
<img src="images/rating-star.gif" border="0"> {$cache.topratings} {t}Recommendations{/t}<br />
|
||||
{/if}
|
||||
|
@@ -138,7 +138,7 @@
|
||||
|
||||
<tr>
|
||||
<td valign="middle" class="header-small" style="padding-top:5px;padding-bottom:5px">
|
||||
<img src="resource2/ocstyle/images/logtype/16x16-found.png" />
|
||||
<img src="resource2/ocstyle/images/log/16x16-found.png" />
|
||||
<b>{t}Caches found{/t}:</b>
|
||||
</td>
|
||||
<td class="header-small">
|
||||
@@ -162,18 +162,27 @@
|
||||
|
||||
<tr>
|
||||
<td valign="middle" class="header-small" style="padding-top:5px;padding-bottom:5px">
|
||||
<img src="resource2/ocstyle/images/logtype/16x16-dnf.png" /> <b>{t}Not found{/t}:</b></td>
|
||||
<img src="resource2/ocstyle/images/log/16x16-dnf.png" /> <b>{t}Not found{/t}:</b></td>
|
||||
<td class="header-small" >{$notfound}
|
||||
{if $notfound > 0}[<a href="search.php?showresult=1&expert=0&f_inactive=0&output=HTML&sort=byname&finderid={$userid}&searchbyfinder=&logtype=2">{t}Show all{/t}</a>]{/if}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="middle" class="header-small" style="padding-bottom:5px">
|
||||
<img src="resource2/ocstyle/images/logtype/16x16-note.png" /> <b>{t}Notes{/t}:</b></td>
|
||||
<img src="resource2/ocstyle/images/log/16x16-note.png" /> <b>{t}Notes{/t}:</b></td>
|
||||
<td class="header-small" >{$note}
|
||||
{if $note>0}[<a href="search.php?showresult=1&expert=0&f_inactive=0&output=HTML&sort=byname&finderid={$userid}&searchbyfinder=&logtype=3">{t}Show all{/t}</a>]{/if}
|
||||
</td>
|
||||
</tr>
|
||||
{if $maintenance > 0}
|
||||
<tr>
|
||||
<td valign="middle" class="header-small" style="padding-bottom:5px">
|
||||
<img src="resource2/ocstyle/images/viewcache/16x16-maintenance.png" /> <b>{t}Maintenance logs{/t}:</b></td>
|
||||
<td class="header-small" >{$maintenance}
|
||||
[<a href="search.php?showresult=1&expert=0&f_inactive=0&output=HTML&sort=byname&finderid={$userid}&searchbyfinder=&logtype=9,10,11,13,14">{t}Show all{/t}</a>]
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
<tr>
|
||||
|
@@ -372,7 +372,6 @@ function export()
|
||||
$stab[] = 'languages_list_default';
|
||||
$stab[] = 'logentries_types';
|
||||
$stab[] = 'log_types';
|
||||
$stab[] = 'log_types_text';
|
||||
$stab[] = 'news_topics';
|
||||
$stab[] = 'nodes';
|
||||
$stab[] = 'object_types';
|
||||
|
@@ -202,7 +202,7 @@ function process_owner_log($user_id, $log_id)
|
||||
|
||||
// echo "process_owner_log($user_id, $log_id)\n";
|
||||
|
||||
$rsLog = sql("SELECT cache_logs.cache_id cache_id, cache_logs.text text, cache_logs.text_html text_html, cache_logs.date logdate, user.username username, caches.name cachename, caches.wp_oc wp_oc FROM `cache_logs`, `user`, `caches` WHERE (cache_logs.user_id = user.user_id) AND (cache_logs.cache_id = caches.cache_id) AND (cache_logs.id ='&1')", $log_id);
|
||||
$rsLog = sql("SELECT cache_logs.cache_id cache_id, cache_logs.type, cache_logs.text text, cache_logs.text_html text_html, cache_logs.date logdate, user.username username, caches.name cachename, caches.wp_oc wp_oc FROM `cache_logs`, `user`, `caches` WHERE (cache_logs.user_id = user.user_id) AND (cache_logs.cache_id = caches.cache_id) AND (cache_logs.id ='&1')", $log_id);
|
||||
$rLog = sql_fetch_array($rsLog);
|
||||
mysql_free_result($rsLog);
|
||||
|
||||
@@ -234,6 +234,7 @@ function process_owner_log($user_id, $log_id)
|
||||
$watchtext = mb_ereg_replace('{text}', $logtext, $watchtext);
|
||||
$watchtext = mb_ereg_replace('{user}', $rLog['username'], $watchtext);
|
||||
$watchtext = mb_ereg_replace('{cachename}', $rLog['cachename'], $watchtext);
|
||||
$watchtext = mb_ereg_replace('{action}', get_log_action($rLog['type']), $watchtext);
|
||||
|
||||
sql("INSERT IGNORE INTO watches_waiting (`user_id`, `object_id`, `object_type`, `date_created`, `watchtext`, `watchtype`) VALUES (
|
||||
'&1', '&2', 1, NOW(), '&3', 1)", $user_id, $log_id, $watchtext);
|
||||
@@ -248,7 +249,7 @@ function process_log_watch($user_id, $log_id)
|
||||
|
||||
// echo "process_log_watch($user_id, $log_id)\n";
|
||||
|
||||
$rsLog = sql("SELECT cache_logs.cache_id cache_id, cache_logs.text text, cache_logs.text_html text_html, cache_logs.date logdate, user.username username, caches.name cachename, caches.wp_oc wp_oc FROM `cache_logs`, `user`, `caches` WHERE (cache_logs.user_id = user.user_id) AND (cache_logs.cache_id = caches.cache_id) AND (cache_logs.id = '&1')", $log_id);
|
||||
$rsLog = sql("SELECT cache_logs.cache_id cache_id, cache_logs.type, cache_logs.text text, cache_logs.text_html text_html, cache_logs.date logdate, user.username username, caches.name cachename, caches.wp_oc wp_oc FROM `cache_logs`, `user`, `caches` WHERE (cache_logs.user_id = user.user_id) AND (cache_logs.cache_id = caches.cache_id) AND (cache_logs.id = '&1')", $log_id);
|
||||
$rLog = sql_fetch_array($rsLog);
|
||||
mysql_free_result($rsLog);
|
||||
|
||||
@@ -280,11 +281,32 @@ function process_log_watch($user_id, $log_id)
|
||||
$watchtext = mb_ereg_replace('{text}', $logtext, $watchtext);
|
||||
$watchtext = mb_ereg_replace('{user}', $rLog['username'], $watchtext);
|
||||
$watchtext = mb_ereg_replace('{cachename}', $rLog['cachename'], $watchtext);
|
||||
$watchtext = mb_ereg_replace('{action}', get_log_action($rLog['type']), $watchtext);
|
||||
|
||||
sql("INSERT IGNORE INTO watches_waiting (`user_id`, `object_id`, `object_type`, `date_created`, `watchtext`, `watchtype`) VALUES (
|
||||
'&1', '&2', 1, NOW(), '&3', 2)", $user_id, $log_id, $watchtext);
|
||||
}
|
||||
|
||||
|
||||
function get_log_action($logtype)
|
||||
{
|
||||
switch ($logtype)
|
||||
{
|
||||
case 1: return "gefunden";
|
||||
case 2: return "nicht gefunden";
|
||||
case 3: return "Hinweis";
|
||||
case 7: return "teilgenommen";
|
||||
case 8: return "möchte teilnehmen";
|
||||
case 9: return "archiviert";
|
||||
case 10: return "kann gesucht werden";
|
||||
case 11: return "momentan nicht verfügbar";
|
||||
case 13: return "gesperrt";
|
||||
case 14: return "gesperrt, versteckt";
|
||||
default: return "";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function is_existent_maildomain($domain)
|
||||
{
|
||||
$smtp_serverlist = array();
|
||||
@@ -302,6 +324,7 @@ function is_existent_maildomain($domain)
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
function getToMailDomain($mail)
|
||||
{
|
||||
if ($mail == '')
|
||||
|
@@ -11,8 +11,8 @@
|
||||
|
||||
$nologs = 'Keine neuen Logeinträge';
|
||||
|
||||
$logowner_text = '{date} {user} hat einen Logeintrag für deinen Cache "{cachename}" gemacht.' . "\n" . 'http://opencaching.de/{wp_oc}' . "\n\n" . '{text}' . "\n\n\n\n";
|
||||
$logwatch_text = '{date} {user} hat einen Logeintrag für den Cache "{cachename}" gemacht.' . "\n" . 'http://opencaching.de/{wp_oc}' . "\n\n" . '{text}' . "\n\n\n\n";
|
||||
$logowner_text = '{date} {user} hat einen Logeintrag für deinen Cache "{cachename}" gemacht: {action}' . "\n" . 'http://opencaching.de/{wp_oc}' . "\n\n" . '{text}' . "\n\n\n\n";
|
||||
$logwatch_text = '{date} {user} hat einen Logeintrag für den Cache "{cachename}" gemacht: {action}' . "\n" . 'http://opencaching.de/{wp_oc}' . "\n\n" . '{text}' . "\n\n\n\n";
|
||||
|
||||
$watchpid = $rootpath . 'cache/watch.pid';
|
||||
?>
|
||||
|
@@ -117,6 +117,7 @@ function getChildWaypoints($cacheid)
|
||||
IFNULL(`stat_caches`.`notfound`, 0) AS `notfound`,
|
||||
IFNULL(`stat_caches`.`note`, 0) AS `note`,
|
||||
IFNULL(`stat_caches`.`will_attend`, 0) AS `willattend`,
|
||||
IFNULL(`stat_caches`.`maintenance`, 0) AS `maintenance`,
|
||||
IFNULL(`stat_caches`.`watch`, 0) AS `watcher`,
|
||||
`caches`.`desc_languages` AS `desclanguages`,
|
||||
IFNULL(`stat_caches`.`ignore`, 0) AS `ignorercount`,
|
||||
|
@@ -44,6 +44,7 @@
|
||||
`stat_user`.`found`,
|
||||
`stat_user`.`notfound`,
|
||||
`stat_user`.`note`,
|
||||
`stat_user`.`maintenance`,
|
||||
`user`.`uuid`
|
||||
FROM `user`
|
||||
LEFT JOIN `stat_user` ON `user`.`user_id`=`stat_user`.`user_id`
|
||||
@@ -108,6 +109,7 @@
|
||||
$tpl->assign('founds', $record['found'] <= 0 ? '0' : $record['found']);
|
||||
$tpl->assign('notfound', $record['notfound'] <= 0 ? '0' : $record['notfound']);
|
||||
$tpl->assign('note', $record['note'] <= 0 ? '0' : $record['note']);
|
||||
$tpl->assign('maintenance', $record['maintenance'] <= 0 ? '0' : $record['maintenance']);
|
||||
$tpl->assign('hidden', $record['hidden'] <= 0 ? '0' : $record['hidden']);
|
||||
$tpl->assign('active', $active);
|
||||
$tpl->assign('recommended', sql_value("SELECT COUNT(*) FROM `cache_rating` WHERE `user_id`='&1'", 0, $userid));
|
||||
|
@@ -573,6 +573,7 @@ function outputXmlFile($sessionid, $filenr, $bXmlDecl, $bOcXmlTag, $bDocType, $z
|
||||
|
||||
$rs = sql('SELECT SQL_BUFFER_RESULT `cache_logs`.`id` `id`, `cache_logs`.`cache_id` `cache_id`, `cache_logs`.`user_id` `user_id`,
|
||||
`cache_logs`.`type` `type`, `cache_logs`.`date` `date`, `cache_logs`.`text` `text`, `cache_logs`.`text_html` `text_html`,
|
||||
`cache_logs`.`oc_team_comment`,
|
||||
`cache_logs`.`date_created` `date_created`, `cache_logs`.`last_modified` `last_modified`,
|
||||
`cache_logs`.`uuid` `uuid`, `user`.`username` `username`, `caches`.`uuid` `cacheuuid`,
|
||||
`user`.`uuid` `useruuid`, `cache_logs`.`node` `node`, IF(NOT ISNULL(`cache_rating`.`cache_id`) AND `cache_logs`.`type`=1, 1, 0) AS `recommended`,
|
||||
@@ -591,12 +592,20 @@ function outputXmlFile($sessionid, $filenr, $bXmlDecl, $bOcXmlTag, $bDocType, $z
|
||||
|
||||
$r['text'] = mb_ereg_replace('<br />', '', $r['text']);
|
||||
$r['text'] = html_entity_decode($r['text'], ENT_COMPAT, 'UTF-8');
|
||||
|
||||
|
||||
// locked/invisible should never be returned here - these logs are deleted before
|
||||
// reactivating the cache. Just for the case ... it is safe to return them as 'locked'.
|
||||
if ($r['type'] == 14) $r['type'] = 13;
|
||||
|
||||
if ($ocxmlversion >= 13)
|
||||
$teamcomment = ' teamcomment="' . $r['oc_team_comment'] . '"';
|
||||
else
|
||||
$teamcomment = '';
|
||||
fwrite($f, $t1 . '<cachelog>' . "\n");
|
||||
fwrite($f, $t2 . '<id id="' . $r['id'] . '" node="' . $r['node'] . '">' . $r['uuid'] . '</id>' . "\n");
|
||||
fwrite($f, $t2 . '<cacheid id="' . $r['cache_id'] . '">' . $r['cacheuuid'] . '</cacheid>' . "\n");
|
||||
fwrite($f, $t2 . '<userid id="' . $r['user_id'] . '" uuid="' . $r['useruuid'] . '">' . xmlcdata($r['username']) . '</userid>' . "\n");
|
||||
fwrite($f, $t2 . '<logtype id="' . $r['type'] . '" recommended="' . $r['recommended'] . '">' . xmlcdata($logtypes[$r['type']]) . '</logtype>' . "\n");
|
||||
fwrite($f, $t2 . '<logtype id="' . $r['type'] . '" recommended="' . $r['recommended'] . '"' . $teamcomment . '>' . xmlcdata($logtypes[$r['type']]) . '</logtype>' . "\n");
|
||||
fwrite($f, $t2 . '<date>' . date($ocxmlversion >= 13 ? $sDateformat : $sDateshort, strtotime($r['date'])) . '</date>' . "\n");
|
||||
fwrite($f, $t2 . '<text html="' . $r['text_html'] . '">' . xmlcdata(($bAllowView ? $r['text'] : '')) . '</text>' . "\n");
|
||||
fwrite($f, $t2 . '<datecreated>' . date($sDateformat, strtotime($r['date_created'])) . '</datecreated>' . "\n");
|
||||
|
@@ -118,6 +118,7 @@
|
||||
<!ATTLIST logtype
|
||||
id CDATA #REQUIRED
|
||||
recommended CDATA #IMPLIED
|
||||
teamcomment CDATA #IMPLIED
|
||||
>
|
||||
<!ELEMENT date (#PCDATA)>
|
||||
<!ELEMENT text (#PCDATA)>
|
||||
|