Skip to content
Permalink
Browse files

added statistics by log type to owner's log list; updates #354

  • Loading branch information...
following5 committed Jan 21, 2016
1 parent 0651258 commit 2d559ac239800b88f6a08a7836ac9c217e570fe6
Showing with 58 additions and 0 deletions.
  1. +18 −0 htdocs/doc/sql/static-data/data.sql
  2. +21 −0 htdocs/ownerlogs.php
  3. +19 −0 htdocs/templates2/ocstyle/newlogs.tpl
@@ -2808,6 +2808,10 @@ INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2522', 'OConly'
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2523', 'Official OC logos (up-to-date):', '2015-11-24 23:30:00');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2524', 'Stored query', '2015-01-20 20:37:00');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2525', 'Alternavite logos (partly outdated):', '2015-11-24 22:36:00');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2526', 'found', '2013-11-03 10:09:14');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2527', 'not\ found', '2013-11-03 10:09:14');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2528', 'attended', '2013-11-03 10:09:14');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2529', 'recommended', '2013-11-03 10:09:14');

-- Table sys_trans_ref
SET NAMES 'utf8';
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2523', 'DE', 'Offizielle OC logos (up-to-date):', '2015-11-24 23:30:00');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2524', 'DE', 'Gespeicherte Suche', '2015-01-20 20:37:00');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2525', 'DE', 'Alternative Logos (teilweise veraltet):', '2015-11-24 22:36:00');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2526', 'DE', 'gefunden', '2016-01-21 10:09:14');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2527', 'DE', 'nicht\ gefunden', '2016-01-21 10:09:14');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2528', 'DE', 'teilgenommen', '2016-01-21 10:09:14');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2529', 'DE', 'empfohlen', '2016-01-21 10:09:14');

INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1', 'EN', 'Reorder IDs', '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 ('2523', 'EN', 'Official OC logos (up-to-date):', '2015-11-24 23:30:00');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2524', 'EN', 'Stored query', '2015-01-20 20:37:00');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2525', 'EN', 'Alternavite logos (partly outdated):', '2015-11-24 22:36:00');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2526', 'EN', 'found', '2016-01-21 10:09:14');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2527', 'EN', 'not\ found', '2016-01-21 10:09:14');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2528', 'EN', 'attended', '2016-01-21 10:09:14');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2529', 'EN', 'recommended', '2016-01-21 10:09:14');

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');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('4', 'ES', 'Usuario', '2010-12-09 00:17:55');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2518', 'FR', 'recommandations total', '2013-11-03 10:09:14');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2519', 'FR', 'Gauß-Krüger', '2013-11-03 10:09:14');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2522', 'FR', 'OConly', '2013-11-03 10:09:14');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2526', 'FR', 'trouvé', '2010-10-04 00:17:39');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2527', 'FR', 'non\ trouvé', '2010-10-04 00:17:39');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2528', 'FR', 'participation', '2010-10-04 00:17:39');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2529', 'FR', 'recommandé', '2010-10-04 00:17:39');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1', 'IT', 'Riordina gli ID', '2010-10-27 18:49:18');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2', 'IT', 'Impossibile riconnettersi al database', '2010-08-28 20:28:01');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('3', 'IT', 'Test - per favore non connettersi', '2010-08-28 20:36:53');
@@ -31,6 +31,27 @@
$tpl->assign('show_own_logs', $show_own_logs);
$tpl->assign('ownlogs', $ownerid == $login->userid);
$tpl->assign('total_found',
sql_value("SELECT COUNT(*) FROM `cache_logs`
LEFT JOIN `caches` ON `caches`.`cache_id`=`cache_logs`.`cache_id`
WHERE `cache_logs`.`type`=1 AND `caches`.`user_id`='&1'",
0, $login->userid));
$tpl->assign('total_attended',
sql_value("SELECT COUNT(*) FROM `cache_logs`
LEFT JOIN `caches` ON `caches`.`cache_id`=`cache_logs`.`cache_id`
WHERE `cache_logs`.`type`=7 AND `caches`.`user_id`='&1'",
0, $login->userid));
$tpl->assign('total_dnf',
sql_value("SELECT COUNT(*) FROM `cache_logs`
LEFT JOIN `caches` ON `caches`.`cache_id`=`cache_logs`.`cache_id`
WHERE `cache_logs`.`type`=2 AND `caches`.`user_id`='&1'",
0, $login->userid));
$tpl->assign('total_recommended',
sql_value("SELECT COUNT(*) FROM `cache_rating`
LEFT JOIN `caches` ON `caches`.`cache_id`=`cache_rating`.`cache_id`
WHERE `caches`.`user_id`='&1'",
0, $login->userid));
require 'newlogs.php';
?>
@@ -37,6 +37,25 @@
{if !$rest && $countryCode}
<div style="height:4px"></div>
{/if}
{if $total_found + $total_attended + $total_dnf + $total_recommended}
<div style="float:right">
<p style="line-height:2em">
{t}total{/t}&nbsp;
{if $total_recommended}
{$total_recommended} <img src="images/rating-star.gif" width="17" height="16" title="{t}recommended{/t}" />&nbsp;
{/if}
{if $total_found}
{$total_found} <img src="resource2/{$opt.template.style}/images/log/16x16-found.png" alt="{t}found{/t}" title="{t}found{/t}" />&nbsp;
{/if}
{if $total_dnf}
{$total_dnf} <img src="resource2/{$opt.template.style}/images/log/16x16-dnf.png" alt="{t}not&nbsp;found{/t}" title="{t}not&nbsp;found{/t}" />&nbsp;
{/if}
{if $total_attended}
{$total_attended} <img src="resource2/{$opt.template.style}/images/log/16x16-attended.png" alt="{t}attended{/t}" title="{t}attended{/t}" />&nbsp;
{/if}
</p>
</div>
{/if}
<p style="line-height:2em">
{if $paging}
{include file="res_pager.tpl"}

0 comments on commit 2d559ac

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