From e281cfadc18a52a83161014f7825c1a2d2880cbb Mon Sep 17 00:00:00 2001 From: following Date: Sat, 23 Mar 2013 21:31:44 +0100 Subject: [PATCH] log time --- htdocs/doc/sql/db-changes.txt | 2 +- htdocs/doc/sql/static-data/data.sql | 4 +++ htdocs/doc/sql/tables/cache_logs.sql | 2 +- htdocs/doc/sql/tables/cache_logs_archived.sql | 2 +- htdocs/editlog.php | 36 +++++++++++++------ htdocs/lang/de/ocstyle/editlog.inc.php | 2 +- htdocs/lang/de/ocstyle/editlog.tpl.php | 7 ++-- htdocs/lang/de/ocstyle/log_cache.inc.php | 2 +- htdocs/lang/de/ocstyle/log_cache.tpl.php | 9 +++-- .../de/ocstyle/removelog_cacheowner.tpl.php | 2 +- .../de/ocstyle/removelog_logowner.tpl.php | 2 +- htdocs/lib/clicompatbase.inc.php | 12 ------- htdocs/lib/search.txt.inc.php | 6 +++- htdocs/lib/search.xml.inc.php | 2 -- htdocs/lib2/logic/cache.class.php | 1 + htdocs/log.php | 33 ++++++++++++----- htdocs/removelog.php | 1 + htdocs/resource2/ocstyle/css/style_print.css | 2 ++ htdocs/resource2/ocstyle/css/style_screen.css | 2 ++ .../ocstyle/res_logentry_logitem.tpl | 9 ++--- 20 files changed, 89 insertions(+), 49 deletions(-) diff --git a/htdocs/doc/sql/db-changes.txt b/htdocs/doc/sql/db-changes.txt index 6798202e..ed96cf8c 100644 --- a/htdocs/doc/sql/db-changes.txt +++ b/htdocs/doc/sql/db-changes.txt @@ -60,4 +60,4 @@ date commit ID change 2013-03-24 9644465b added table 'pw_dict' 2013-03-25 21d92feb added field cache_reports.date_created + trigger 2013-03-27 467aae47 added fields cache_attrib.gc_id, .gc_inc and .gc_name -2013-03-28 made cache_attrib.gc_id unsigned +2013-04-06 changed cach_logs.date and cach_logs_archived.date type to datetime diff --git a/htdocs/doc/sql/static-data/data.sql b/htdocs/doc/sql/static-data/data.sql index 5321c139..f99e7237 100644 --- a/htdocs/doc/sql/static-data/data.sql +++ b/htdocs/doc/sql/static-data/data.sql @@ -2430,6 +2430,8 @@ INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('1966', 'as of', INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('1967', 'all log entries \© their authors', '2013-02-23 19:00:04'); INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('1968', 'more', '2013-02-23 19:00:04'); INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('1969', 'Only the green entries are visible to other users.', '2013-02-23 19:00:04'); +INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('1970', 'Date / time:', '2013-02-23 19:00:04'); +INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('1971', 'date or time is invalid', '2013-02-23 19:00:04'); INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('1973', 'Generally, spoiler pictures should not be logged. In the case that en exception from this rule makes sense, e.g. to document your finding or problems with the stash, please mark the picture als spoiler so that it won\'t appear in galleries.', '2013-02-23 19:00:04'); INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('1974', 'If you do not see any E-Mail, please check the spam folder of your mailbox.', '2013-02-23 19:00:04'); INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('1975', 'Do not use easy-to-guess number and letter sequences like \'123456\' or \'qwerty\'', '2013-02-23 19:00:04'); @@ -6141,6 +6143,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 ('1967', 'DE', 'alle Logeinträge \© jeweiliger Autor', '2013-02-19 05:48:07'); INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1968', 'DE', 'mehr', '2013-02-19 05:48:07'); INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1969', 'DE', 'Nur die grünen Einträge sind für andere Benutzer sichtbar.', '2013-02-19 05:48:07'); +INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1970', 'DE', 'Datum / Uhrzeit:', '2013-02-19 05:48:07'); +INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1971', 'DE', 'Datum oder Uhrzeit ist ungültig', '2013-02-19 05:48:07'); INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1973', 'DE', 'Es sollten möglichst keine Spoilerbilder geloggt werden. In Ausnahmefällen, wo es sinnvoll erscheint \– z.B. um den Fund nachzuweisen oder Probleme mit dem Versteck zu dokumentieren \– kennzeichne sie bitte als Spoiler, damit sie nicht in Bildgalerien erscheinen.', '2013-02-19 05:48:07'); INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1974', 'DE', 'Falls du keine E-Mail sehen solltest, prüfe bitte ob sie im Spam-Ordner deines Postfachs einsortiert wurde.', '2013-02-19 05:48:07'); INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1975', 'DE', 'Verwende keine einfach erratbaren Ziffern- oder Buchstabenkombinationen wie \„123456\“ oder \„qwertz\“.', '2013-02-19 05:48:07'); diff --git a/htdocs/doc/sql/tables/cache_logs.sql b/htdocs/doc/sql/tables/cache_logs.sql index 5d0586bd..071d265f 100644 --- a/htdocs/doc/sql/tables/cache_logs.sql +++ b/htdocs/doc/sql/tables/cache_logs.sql @@ -9,7 +9,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, - `date` date NOT NULL, + `date` datetime NOT NULL, `text` mediumtext NOT NULL, `text_html` tinyint(1) NOT NULL default '0', `text_htmledit` tinyint(1) NOT NULL default '0', diff --git a/htdocs/doc/sql/tables/cache_logs_archived.sql b/htdocs/doc/sql/tables/cache_logs_archived.sql index ec57d7c7..bff0b4ca 100644 --- a/htdocs/doc/sql/tables/cache_logs_archived.sql +++ b/htdocs/doc/sql/tables/cache_logs_archived.sql @@ -9,7 +9,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, - `date` date NOT NULL, + `date` datetime NOT NULL, `text` mediumtext NOT NULL, `text_html` tinyint(1) NOT NULL, `text_htmledit` tinyint(1) NOT NULL, diff --git a/htdocs/editlog.php b/htdocs/editlog.php index a00fb9a4..4ab6f5ec 100644 --- a/htdocs/editlog.php +++ b/htdocs/editlog.php @@ -92,9 +92,11 @@ $cache_user_id = $log_record['cache_user_id']; $log_type = isset($_POST['logtype']) ? $_POST['logtype'] : $log_record['logtype']; - $log_date_day = isset($_POST['logday']) ? $_POST['logday'] : date('d', strtotime($log_record['date'])); - $log_date_month = isset($_POST['logmonth']) ? $_POST['logmonth'] : date('m', strtotime($log_record['date'])); - $log_date_year = isset($_POST['logyear']) ? $_POST['logyear'] : date('Y', strtotime($log_record['date'])); + $log_date_day = isset($_POST['logday']) ? trim($_POST['logday']) : date('d', strtotime($log_record['date'])); + $log_date_month = isset($_POST['logmonth']) ? trim($_POST['logmonth']) : date('m', strtotime($log_record['date'])); + $log_date_year = isset($_POST['logyear']) ? trim($_POST['logyear']) : date('Y', strtotime($log_record['date'])); + $log_time_hour = isset($_POST['loghour']) ? trim($_POST['loghour']) : (substr($log_record['date'],11) == "00:00:00" ? "" : date('H', strtotime($log_record['date']))); + $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; @@ -183,15 +185,19 @@ //validate date $date_ok = false; - if (is_numeric($log_date_day) && is_numeric($log_date_month) && is_numeric($log_date_year)) + 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)) && + ($log_time_minute=="" || is_numeric($log_time_minute))) { - if (checkdate($log_date_month, $log_date_day, $log_date_year) && - $log_date_year >= 2000) - $date_ok = true; + $date_ok = checkdate($log_date_month, $log_date_day, $log_date_year) + && ($log_date_year >= 2000) + && ($log_time_hour>=0) && ($log_time_hour<=23) + && ($log_time_minute>=0) && ($log_time_minute<=59); if ($date_ok) if (isset($_POST['submitform'])) - if (mktime(0, 0, 0, $log_date_month, $log_date_day, $log_date_year) >= mktime()) - $date_ok = false; + if (mktime($log_time_hour+0, $log_time_minute+0, 0, + $log_date_month, $log_date_day, $log_date_year) >= mktime()) + $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; @@ -212,7 +218,15 @@ //store? if (isset($_POST['submitform']) && $date_ok && $logtype_ok && $pw_ok) { - $log_date = date('Y-m-d', mktime(0, 0, 0, $log_date_month, $log_date_day, $log_date_year)); + // 00:00:01 = "00:00 was logged" + // 00:00:00 = "no time was logged" + if ("$log_time_hour$log_time_minute" != "" && + $log_time_hour == 0 && $log_time_minute == 0) + $log_time_second = 1; + else + $log_time_second = 0; + + $log_date = date('Y-m-d H:i:s', mktime($log_time_hour+0, $log_time_minute+0, $log_time_second, $log_date_month, $log_date_day, $log_date_year)); //store changed data sql("UPDATE `cache_logs` SET `type`='&1', @@ -278,6 +292,8 @@ tpl_set_var('logday', htmlspecialchars($log_date_day, ENT_COMPAT, 'UTF-8')); tpl_set_var('logmonth', htmlspecialchars($log_date_month, ENT_COMPAT, 'UTF-8')); tpl_set_var('logyear', htmlspecialchars($log_date_year, ENT_COMPAT, 'UTF-8')); + tpl_set_var('loghour', htmlspecialchars($log_time_hour, ENT_COMPAT, 'UTF-8')); + tpl_set_var('logminute', htmlspecialchars($log_time_minute, ENT_COMPAT, 'UTF-8')); tpl_set_var('cachename', htmlspecialchars($cache_name, ENT_COMPAT, 'UTF-8')); tpl_set_var('cacheid', $log_record['cache_id']); tpl_set_var('reset', $reset); diff --git a/htdocs/lang/de/ocstyle/editlog.inc.php b/htdocs/lang/de/ocstyle/editlog.inc.php index 04a28def..7a5c2901 100644 --- a/htdocs/lang/de/ocstyle/editlog.inc.php +++ b/htdocs/lang/de/ocstyle/editlog.inc.php @@ -19,7 +19,7 @@ $error_wrong_node = t('This log entry has been created on another Opencaching website. The cache can only be edited there.'); - $date_message = '' . t('date is invalid') . ''; + $date_message = '' . t('date or time is invalid') . ''; $smiley_link = '{smiley_image}'; $log_pw_field = '' . t('passwort to log:') . ' ' . t('(only for found logs)') . ' diff --git a/htdocs/lang/de/ocstyle/editlog.tpl.php b/htdocs/lang/de/ocstyle/editlog.tpl.php index b4cf1f00..e18fb701 100644 --- a/htdocs/lang/de/ocstyle/editlog.tpl.php +++ b/htdocs/lang/de/ocstyle/editlog.tpl.php @@ -94,12 +94,15 @@ function _chkFound () { - {t}Date:{/t} + {t}Date / time:{/t} . . - {date_message} +     + : + +   {date_message} diff --git a/htdocs/lang/de/ocstyle/log_cache.inc.php b/htdocs/lang/de/ocstyle/log_cache.inc.php index cf043e4c..fea19184 100644 --- a/htdocs/lang/de/ocstyle/log_cache.inc.php +++ b/htdocs/lang/de/ocstyle/log_cache.inc.php @@ -18,7 +18,7 @@ ****************************************************************************/ $submit = t('Log this cache'); - $date_message = '' . t('date is invalid') . ''; + $date_message = '' . t('date or time is invalid') . ''; // Ocprop: \s*Kennwort zum Loggen:\s* ' . t('(only for found-logs)') . ''; diff --git a/htdocs/lang/de/ocstyle/log_cache.tpl.php b/htdocs/lang/de/ocstyle/log_cache.tpl.php index 21aafb59..541030d5 100644 --- a/htdocs/lang/de/ocstyle/log_cache.tpl.php +++ b/htdocs/lang/de/ocstyle/log_cache.tpl.php @@ -77,7 +77,7 @@ function _chkFound () { - + - + diff --git a/htdocs/lang/de/ocstyle/removelog_cacheowner.tpl.php b/htdocs/lang/de/ocstyle/removelog_cacheowner.tpl.php index ccb86225..e50789e0 100644 --- a/htdocs/lang/de/ocstyle/removelog_cacheowner.tpl.php +++ b/htdocs/lang/de/ocstyle/removelog_cacheowner.tpl.php @@ -28,7 +28,7 @@ diff --git a/htdocs/lang/de/ocstyle/removelog_logowner.tpl.php b/htdocs/lang/de/ocstyle/removelog_logowner.tpl.php index 6a429853..374baaa0 100644 --- a/htdocs/lang/de/ocstyle/removelog_logowner.tpl.php +++ b/htdocs/lang/de/ocstyle/removelog_logowner.tpl.php @@ -32,7 +32,7 @@ diff --git a/htdocs/lib/clicompatbase.inc.php b/htdocs/lib/clicompatbase.inc.php index 1c85b968..3e790d73 100644 --- a/htdocs/lib/clicompatbase.inc.php +++ b/htdocs/lib/clicompatbase.inc.php @@ -73,18 +73,6 @@ $module, $eventid, $userid, $objectid1, $objectid2, $logtext, serialize($details)); } - function setLastFound($cacheid) - { - $rs = sql("SELECT MAX(`date`) `date` FROM `cache_logs` WHERE `cache_id`=&1 AND `type`=1", $cacheid); - $r = sql_fetch_array($rs); - mysql_free_result($rs); - - if ($r['date'] == null) - sql("UPDATE `caches` SET `last_found`=null WHERE `cache_id`=&1", $cacheid); - else - sql("UPDATE `caches` SET `last_found`='&1' WHERE `cache_id`=&2", $r['date'], $cacheid); - } - // read a file and return it as a string // WARNING: no huge files! function read_file($file='') diff --git a/htdocs/lib/search.txt.inc.php b/htdocs/lib/search.txt.inc.php index 07d28e98..0f23b4bd 100644 --- a/htdocs/lib/search.txt.inc.php +++ b/htdocs/lib/search.txt.inc.php @@ -254,7 +254,11 @@ Logeinträge: $thislog = $txtLogs; $thislog = mb_ereg_replace('{id}', $rLog['id'], $thislog); - $thislog = mb_ereg_replace('{date}', date('d.m.Y', strtotime($rLog['date'])), $thislog); + if (substr($rLog['date'],11) == "00:00:00") + $dateformat = "d.m.Y"; + else + $dateformat = "d.m.Y H:i"; + $thislog = mb_ereg_replace('{date}', date($dateformat, strtotime($rLog['date'])), $thislog); $thislog = mb_ereg_replace('{username}', $rLog['username'], $thislog); $logtype = $rLog['type']; diff --git a/htdocs/lib/search.xml.inc.php b/htdocs/lib/search.xml.inc.php index 6352cc90..b7319721 100644 --- a/htdocs/lib/search.xml.inc.php +++ b/htdocs/lib/search.xml.inc.php @@ -42,8 +42,6 @@ "; - $txtLogs = ""; - //prepare the output $caches_per_page = 20; diff --git a/htdocs/lib2/logic/cache.class.php b/htdocs/lib2/logic/cache.class.php index 27bcf2bd..64f1e7ee 100644 --- a/htdocs/lib2/logic/cache.class.php +++ b/htdocs/lib2/logic/cache.class.php @@ -295,6 +295,7 @@ class cache `cache_logs`.`id` AS `id`, `cache_logs`.`uuid` AS `uuid`, `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`.`text` AS `text`, `cache_logs`.`text_html` AS `texthtml`, diff --git a/htdocs/log.php b/htdocs/log.php index 4263fda1..e97ea3fd 100644 --- a/htdocs/log.php +++ b/htdocs/log.php @@ -96,9 +96,11 @@ $all_ok = false; $log_text = isset($_POST['logtext']) ? ($_POST['logtext']) : ''; $log_type = isset($_POST['logtype']) ? ($_POST['logtype']+0) : 1; - $log_date_day = isset($_POST['logday']) ? ($_POST['logday']+0) : date('d'); - $log_date_month = isset($_POST['logmonth']) ? ($_POST['logmonth']+0) : date('m'); - $log_date_year = isset($_POST['logyear']) ? ($_POST['logyear']+0) : date('Y'); + $log_date_day = isset($_POST['logday']) ? trim($_POST['logday']) : date('d'); + $log_date_month = isset($_POST['logmonth']) ? trim($_POST['logmonth']) : date('m'); + $log_date_year = isset($_POST['logyear']) ? trim($_POST['logyear']) : date('Y'); + $log_time_hour = isset($_POST['loghour']) ? trim($_POST['loghour']) : ""; + $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; @@ -156,14 +158,19 @@ $log_text = nl2br(htmlspecialchars($log_text, ENT_COMPAT, 'UTF-8')); } - //validate data - if (is_numeric($log_date_month) && is_numeric($log_date_day) && is_numeric($log_date_year)) + // 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)) && + ($log_time_minute=="" || is_numeric($log_time_minute))) { $date_ok = checkdate($log_date_month, $log_date_day, $log_date_year) - && ($log_date_year >= 2000); + && ($log_date_year >= 2000) + && ($log_time_hour>=0) && ($log_time_hour<=23) + && ($log_time_minute>=0) && ($log_time_minute<=59); if ($date_ok) if (isset($_POST['submitform'])) - if (mktime(0, 0, 0, $log_date_month, $log_date_day, $log_date_year) >= mktime()) + if (mktime($log_time_hour+0, $log_time_minute+0, 0, + $log_date_month, $log_date_day, $log_date_year) >= mktime()) $date_ok = false; } else @@ -191,7 +198,15 @@ if (isset($_POST['submitform']) && ($all_ok == true)) { - $log_date = date('Y-m-d', mktime(0, 0, 0, $log_date_month, $log_date_day, $log_date_year)); + // 00:00:01 = "00:00 was logged" + // 00:00:00 = "no time was logged" + if ("$log_time_hour$log_time_minute" != "" && + $log_time_hour == 0 && $log_time_minute == 0) + $log_time_second = 1; + else + $log_time_second = 0; + + $log_date = date('Y-m-d H:i:s', mktime($log_time_hour+0, $log_time_minute+0, $log_time_second, $log_date_month, $log_date_day, $log_date_year)); // add logentry to db if not already exists (e.g. by multiple sending the form // or by ocprop errors) @@ -270,6 +285,8 @@ tpl_set_var('logday', htmlspecialchars($log_date_day, ENT_COMPAT, 'UTF-8')); tpl_set_var('logmonth', htmlspecialchars($log_date_month, ENT_COMPAT, 'UTF-8')); tpl_set_var('logyear', htmlspecialchars($log_date_year, ENT_COMPAT, 'UTF-8')); + tpl_set_var('loghour', htmlspecialchars($log_time_hour, ENT_COMPAT, 'UTF-8')); + tpl_set_var('logminute', htmlspecialchars($log_time_minute, ENT_COMPAT, 'UTF-8')); tpl_set_var('logtypeoptions', $logtypeoptions); tpl_set_var('reset', $reset); tpl_set_var('submit', $submit); diff --git a/htdocs/removelog.php b/htdocs/removelog.php index 38db9b70..09c281a5 100644 --- a/htdocs/removelog.php +++ b/htdocs/removelog.php @@ -219,6 +219,7 @@ tpl_set_var('logimage', 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')); tpl_set_var('username', htmlspecialchars($log_record['log_username'], ENT_COMPAT, 'UTF-8')); tpl_set_var('typetext', htmlspecialchars($sLogTypeText, ENT_COMPAT, 'UTF-8')); diff --git a/htdocs/resource2/ocstyle/css/style_print.css b/htdocs/resource2/ocstyle/css/style_print.css index 23d88a1b..feb7c70f 100644 --- a/htdocs/resource2/ocstyle/css/style_print.css +++ b/htdocs/resource2/ocstyle/css/style_print.css @@ -674,3 +674,5 @@ div.gsc-resultsRoot, div.gsc-branding-text, img.gsc-branding-img { .garmintext { font-size: 1.1em; } + +p.editlog { display:none; } \ No newline at end of file diff --git a/htdocs/resource2/ocstyle/css/style_screen.css b/htdocs/resource2/ocstyle/css/style_screen.css index f048cf0c..de4fabb9 100644 --- a/htdocs/resource2/ocstyle/css/style_screen.css +++ b/htdocs/resource2/ocstyle/css/style_screen.css @@ -1422,3 +1422,5 @@ div#havefound { #forum div.rsstext {margin: 0px 30px 0.5em 0px; padding: 0px; line-height: 1.3em; font-family: arial, sans serif; font-size: 12px; } .quoteheader, .topslice_quote, .bbc_standard_quote { display:none; } #forum div.rsstext img {max-width:200px; max-height:120px;} + +p.editlog { font-weight: 400; display:inline; } diff --git a/htdocs/templates2/ocstyle/res_logentry_logitem.tpl b/htdocs/templates2/ocstyle/res_logentry_logitem.tpl index 05b7e062..245229d8 100644 --- a/htdocs/templates2/ocstyle/res_logentry_logitem.tpl +++ b/htdocs/templates2/ocstyle/res_logentry_logitem.tpl @@ -5,12 +5,12 @@ ***************************************************************************}
{* Ocprop:
(.*?)<\/div> *}
-

+

{include file="res_logtype.tpl" type=$logItem.type} - {if $logItem.recommended==1} + {if $logItem.recommended==1} {* Ocprop: rating-star\.gif *} {t}Recommended{/t} {/if} - {$logItem.date|date_format:$opt.format.datelong} + {$logItem.date|date_format:$opt.format.datelong}{if $logItem.time!="00:00:00"}, {$logItem.time|substr:0:5}{/if} {capture name=username} {$logItem.username|escape} @@ -31,8 +31,9 @@ {/if}

+ {* Ocprop: /\?logid=([0-9a-f\-]+)" *} {if $cache.userid==$login.userid || $logItem.userid==$login.userid} -

+

{if $logItem.userid==$login.userid && ($cache.userid==$login.userid || $cache.status!=6)} [{t}Edit{/t}]

 
{t}Type of log-entry:{/t} @@ -88,12 +88,15 @@ function _chkFound () {
{t}Date:{/t}{t}Date / time:{/t} . . - {date_message} +     + : + +   {date_message}
    - {logimage} {date} {typetext} + {logimage} {date}{time}   {typetext}
    - {logimage} {date} {typetext} + {logimage} {date}{time}   {typetext}