Skip to content
Permalink
Browse files

improved caches list in user profile; updates 88

  • Loading branch information...
following5 committed Jun 16, 2013
1 parent ac62e0d commit 7fa0c5c25c29e3c69c6a8ae7655fcef3773cb764
@@ -1374,9 +1374,9 @@ INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('502', 'Finds: %
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('503', 'Your latest log entries:', '2010-08-28 11:48:04');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('504', 'No entries found', '2010-08-28 11:48:04');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('505', 'Geocaches hidden: %1', '2010-08-28 11:48:04');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('506', 'Your latest Geocaches hidden:', '2010-08-28 11:48:04');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('506', 'Your geocaches hidden:', '2010-08-28 11:48:04');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('507', 'No Geocaches hidden', '2010-08-28 11:48:04');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('508', 'Not published Geocaches will be available', '2010-08-28 11:48:04');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('508', 'Unpublished Geocaches', '2010-08-28 11:48:04');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('509', 'All Geocaches are published', '2010-08-28 11:48:04');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('510', 'E-Mails sent', '2010-08-28 11:48:04');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('511', 'E-Mails sent: %1', '2010-08-28 11:48:04');
@@ -2497,6 +2497,10 @@ INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2075', 'since S
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2076', 'From Owner', '2013-05-28 16:51:40');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2077', 'To Owner', '2013-05-28 16:51:40');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2078', 'Maintenance', '2013-05-28 16:51:40');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2079', 'Show details', '2013-05-28 16:51:40');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2080', 'only active caches', '2013-05-28 16:51:40');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2081', 'Finds', '2013-05-28 16:51:40');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2082', 'Locked', '2013-04-25 23:00:00');

-- Table sys_trans_ref
SET NAMES 'utf8';
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('503', 'DE', 'Deine letzten Logeinträge:', '2010-08-28 11:48:06');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('504', 'DE', 'Keine Einträge gefunden', '2010-08-28 11:48:06');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('505', 'DE', 'Versteckte Caches: %1', '2010-08-28 11:48:06');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('506', 'DE', 'Deine letzten versteckten Caches:', '2010-08-28 11:48:06');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('507', 'DE', 'Keine versteckten Geocaches gefunden', '2010-08-28 11:48:06');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('506', 'DE', 'Deine versteckten Caches:', '2010-08-28 11:48:06');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('507', 'DE', 'Du hast noch keine Caches versteckt.', '2010-08-28 11:48:06');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('508', 'DE', 'Deine noch nicht veröffentlichten Caches:', '2012-07-23 15:54:00');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('509', 'DE', 'Keine nicht veröffentlichten Caches', '2010-08-28 11:48:06');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('510', 'DE', 'Versendete E-Mails', '2010-08-28 11:48:06');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2076', 'DE', 'Alter Besitzer', '2013-04-25 23:00:00');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2077', 'DE', 'Neuer Besitzer', '2013-04-25 23:00:00');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2078', 'DE', 'Wartung', '2013-04-25 23:00:00');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2079', 'DE', 'Details anzeigen', '2013-04-25 23:00:00');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2080', 'DE', 'nur aktive Caches', '2013-04-25 23:00:00');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2081', 'DE', 'Funde', '2013-04-25 23:00:00');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2082', 'DE', 'Gesperrt', '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');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('503', 'EN', 'Your latest log entries:', '2010-08-28 11:48:07');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('504', 'EN', 'No entries found', '2010-08-28 11:48:07');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('505', 'EN', 'Geocaches hidden: %1', '2010-08-28 11:48:07');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('506', 'EN', 'Your latest geocaches hidden:', '2010-08-28 11:48:07');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('506', 'EN', 'Your geocaches hidden:', '2010-08-28 11:48:07');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('507', 'EN', 'No geocaches hidden ', '2010-08-28 11:48:07');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('508', 'EN', 'Your pending geocaches:', '2012-07-23 15:54:00');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('509', 'EN', 'All your geocaches are published.', '2010-08-28 11:48:07');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('503', 'ES', 'Sus últimas entradas de Logs:', '2010-12-09 00:17:57');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('504', 'ES', 'No hay encuentros', '2010-12-09 00:17:57');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('505', 'ES', 'Geocaches escondidos: %1', '2010-12-09 00:17:57');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('506', 'ES', ' Tus últimos geocaches escondidos:', '2010-12-09 00:17:57');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('506', 'ES', 'Tus geocaches escondidos:', '2010-12-09 00:17:57');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('507', 'ES', 'No hay geocaches escondidos', '2010-12-09 00:17:57');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('508', 'ES', 'Tus geocaches pendientes de publicar', '2010-12-09 00:17:57');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('509', 'ES', 'Todos tus caches estan publicados', '2010-12-09 00:17:57');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('503', 'IT', 'I tuoi ultimi log:', '2010-08-31 20:06:23');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('504', 'IT', 'Nessuna trovata', '2010-10-27 18:49:19');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('505', 'IT', 'Geocaches nascoste: %1', '2010-08-31 20:06:23');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('506', 'IT', 'Le tue ultime geocaches nascoste:', '2010-09-01 23:48:28');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('506', 'IT', 'Le tue geocaches nascoste:', '2010-09-01 23:48:28');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('507', 'IT', 'Nessuna geocache nascosta', '2010-10-27 18:49:19');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('508', 'IT', 'Le tue geocache in attesa di pubblicazione', '2010-10-27 18:49:19');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('509', 'IT', 'Tutte le tue geocache sono pubblicate.', '2010-08-31 20:06:23');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('503', 'NL', 'Je laatste logjes:', '2011-02-04 19:50:07');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('504', 'NL', 'Geen items gevonden', '2011-02-04 19:50:07');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('505', 'NL', 'Geplaatste caches: %1', '2011-02-04 19:50:07');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('506', 'NL', 'Jouw laatste geplaatste caches:', '2011-02-04 19:50:07');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('506', 'NL', 'Jouw geplaatste caches:', '2011-02-04 19:50:07');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('507', 'NL', 'Geen geplaatste caches gevonden', '2011-02-04 19:50:07');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('508', 'NL', 'Jouw nog niet gepubliceerde caches:', '2012-07-23 15:54:00');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('509', 'NL', 'Geen ongepubliceerde caches.', '2011-02-04 19:50:07');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('503', 'RU', 'Ваши последние отчёты:', '2010-12-06 22:17:36');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('504', 'RU', 'Нет отчётов', '2010-12-06 22:17:36');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('505', 'RU', 'Спрятано тайников: %1', '2010-12-06 22:17:36');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('506', 'RU', 'Ваши последние тайники:', '2010-12-06 22:17:36');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('507', 'RU', 'Нет спрятанных тайников', '2010-12-06 22:17:36');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('509', 'RU', 'Все ваши тайники опубликованы', '2010-12-06 22:17:36');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('511', 'RU', 'Отправлено писем: %1', '2010-12-06 22:17:36');
@@ -32,6 +32,12 @@ function __autoload($class_name)
}
// check for broken browsers
$useragent = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : "";
$useragent_msie = preg_match('/MSIE ([1-9]+).[0-9]+/',$useragent,$ua_matches) && !strpos($useragent,"Opera");
if (count($ua_matches)>1) $useragent_msie_version = $ua_matches[1];
else $useragent_msie_version = null;
// yepp, we will use UTF-8
mb_internal_encoding('UTF-8');
mb_regex_encoding('UTF-8');
@@ -19,11 +19,6 @@
else
$login->verify();
// check for peculiar browsers
$ua = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : "";
$msie = preg_match('/MSIE [1-9]+.[0-9]+/',$ua) && !strpos($ua,"Opera");
$old_msie = $msie && preg_match('/MSIE [1-6].[0-9]+/',$ua);
$sMode = isset($_REQUEST['mode']) ? $_REQUEST['mode'] : '';
if ($sMode == 'locate')
{
@@ -217,8 +212,8 @@
$tpl->assign('min_maxrecords', $opt['map']['min_maxrecords']);
$tpl->assign('max_maxrecords', $opt['map']['max_maxrecords']);
$tpl->assign('msie',$msie);
$tpl->assign('old_msie',$old_msie);
$tpl->assign('msie',$useragent_msie);
$tpl->assign('old_msie',$useragent_msie && ($useragent_msie_version <= 6));
$tpl->assign('help_oconly', helppagelink("OConly"));
$tpl->assign('help_map', helppagelink("*map2"));
@@ -393,7 +388,7 @@ function output_namesearch($sName, $nLat, $nLon, $nResultId)
function output_searchresult($nResultId, $compact, $nLon1, $nLon2, $nLat1, $nLat2,
$cachenames, $smallmap)
{
global $login, $opt, $msie;
global $login, $opt, $useragent_msie;
// check if data is available and connect the right slave server
$nSlaveId = sql_value("SELECT `slave_id` FROM `map2_result` WHERE `result_id`='&1' AND DATE_ADD(`date_created`, INTERVAL '&2' SECOND)>NOW()", -2, $nResultId, $opt['map']['maxcacheage']);
@@ -418,7 +413,7 @@ function output_searchresult($nResultId, $compact, $nLon1, $nLon2, $nLat1, $nLat
$user_maxrecords =
sql_value("SELECT option_value FROM user_options WHERE user_id='&1' AND option_id=8",
$opt['map']['maxrecords'] + 0, $login->userid);
if ($user_maxrecords > 0 && (!$msie || $user_maxrecords < $maxrecords))
if ($user_maxrecords > 0 && (!$useragent_msie || $user_maxrecords < $maxrecords))
$maxrecords = min(max($user_maxrecords, $opt['map']['min_maxrecords']),
$opt['map']['max_maxrecords']);
}
@@ -37,14 +37,29 @@
ORDER BY `cache_logs`.`date` DESC, `cache_logs`.`date_created` DESC LIMIT 10", $login->userid));
//get last hidden caches
$tpl->assign_rs('caches', sql("SELECT `cache_id`, `name`, `date_hidden`, `status`, `wp_oc`
$tpl->assign_rs('caches', sql("SELECT `caches`.`cache_id`, `caches`.`name`, `caches`.`type`,
`caches`.`date_hidden`, `caches`.`status`, `caches`.`wp_oc`,
`found`,
COUNT(*) as `logcount`,
MAX(`cache_logs`.`date`) AS `lastlog`,
(SELECT `type` FROM `cache_logs` `cl2`
WHERE `cl2`.`cache_id`=`caches`.`cache_id`
ORDER BY `date` DESC,`id` DESC LIMIT 1) AS `lastlog_type`
FROM `caches`
WHERE `user_id`='&1'
LEFT JOIN `stat_caches` ON `stat_caches`.`cache_id`=`caches`.`cache_id`
LEFT JOIN `cache_logs` ON `cache_logs`.`cache_id`=`caches`.`cache_id`
WHERE `caches`.`user_id`='&1'
AND `caches`.`status` != 5
ORDER BY `date_hidden` DESC, `caches`.`date_created` DESC LIMIT 20", $login->userid));
GROUP BY `caches`.`cache_id`
ORDER BY `caches`.`date_hidden` DESC, `caches`.`date_created` DESC
LIMIT 50", $login->userid));
if ($useragent_msie && $useragent_msie_version < 9)
$tpl->assign('dotfill','');
else
$tpl->assign('dotfill','....................................................................................................................................................................................................................');
//get not published caches
$tpl->assign_rs('notpublished', sql("SELECT `caches`.`cache_id`, `caches`.`name`, `caches`.`date_hidden`, `caches`.`date_activate`, `caches`.`status`, `caches`.`wp_oc`
$tpl->assign_rs('notpublished', sql("SELECT `caches`.`cache_id`, `caches`.`name`, `caches`.`date_hidden`, `caches`.`date_activate`, `caches`.`status`, `caches`.`wp_oc`, `caches`.`type`
FROM `caches`
WHERE `user_id`='&1'
AND `caches`.`status` = 5
@@ -350,7 +350,7 @@ td.listicon {
.printwptable td { line-height:1.4em; font-size:12px; }

td.listcolor1 { background:#fff; line-height:1.7em; }
td.listcolor2 { background:#eee; line-height:1.7em; }
td.listcolor2 { background:#f0f0f0; line-height:1.7em; }

/* Images */
.img-left-noborder-notopmargin {float: left; margin: 0px 10px 0px 0px;}
Oops, something went wrong.

0 comments on commit 7fa0c5c

Please sign in to comment.
You can’t perform that action at this time.