Пример #1
0
         //$show_del_link is defined in viecache.inc.php - for both viewlogs and viewcashe .php
     }
 }
 tpl_set_var('showhidedel_link', mb_ereg_replace('{cacheid}', htmlspecialchars(urlencode($cache_id), ENT_COMPAT, 'UTF-8'), $showhidedel_link));
 isset($_SESSION['showdel']) && $_SESSION['showdel'] == 'y' ? $HideDeleted = false : ($HideDeleted = true);
 $includeDeletedLogs = true;
 if ($HideDeleted && $logid && !$usr['admin']) {
     //hide deletions if (hide_deletions opotions is on and this is single_log call=not and user is not COG)
     $includeDeletedLogs = false;
 }
 $logs = '';
 $thisdateformat = $dateformat;
 $logEnteryController = new \lib\Controllers\LogEnteryController();
 if ($logid) {
     /* load and display one log only */
     $logEneries = $logEnteryController->loadLogsFromDb($cache_id, $includeDeletedLogs, 0, 1, $logid);
 } else {
     $logEneries = $logEnteryController->loadLogsFromDb($cache_id, $includeDeletedLogs, 0, 9999);
 }
 foreach ($logEneries as $record) {
     $record['text_listing'] = ucfirst(tr('logType' . $record['type']));
     //add new attrib 'text_listing based on translation (instead of query as before)'
     $show_deleted = "";
     $processed_text = "";
     if (isset($record['deleted']) && $record['deleted']) {
         if ($usr['admin']) {
             $show_deleted = "show_deleted";
             $processed_text = $record['text'];
         } else {
             // Boguś z Polska, 2014-11-15
             // for 'Needs maintenance', 'Ready to search' and 'Temporarly unavailable' log types
Пример #2
0
} else {
    $limit = 5;
}
if ($usr == false && $hide_coords) {
    $disable_spoiler_view = true;
    //hide any kind of spoiler if usr not logged in
} else {
    $disable_spoiler_view = false;
}
if (isset($_REQUEST['includeDeletedLogs']) && $_REQUEST['includeDeletedLogs'] == 1) {
    $includeDeletedLogs = true;
} else {
    $includeDeletedLogs = false;
}
$logEnteryController = new \lib\Controllers\LogEnteryController();
$logEneries = $logEnteryController->loadLogsFromDb($geocacheId, $includeDeletedLogs, $offset, $limit);
$result = '';
foreach ($logEneries as $record) {
    $record['text_listing'] = ucfirst(tr('logType' . $record['type']));
    //add new attrib 'text_listing based on translation (instead of query as before)'
    $show_deleted = "";
    $processed_text = "";
    if (isset($record['deleted']) && $record['deleted']) {
        if ($usr['admin']) {
            $show_deleted = "show_deleted";
            $processed_text = $record['text'];
        } else {
            // Boguś z Polska, 2014-11-15
            // for 'Needs maintenance', 'Ready to search' and 'Temporarly unavailable' log types
            if ($record['type'] == 5 || $record['type'] == 10 || $record['type'] == 11) {
                // hide if user is not logged in