$print_list_icon = 'images/actions/list-remove'; } $cache_menu = array('title' => tr('cache_menu'), 'menustring' => tr('cache_menu'), 'siteid' => 'cachelisting', 'navicolor' => '#E8DDE4', 'visible' => false, 'filename' => 'viewcache.php', 'submenu' => array(array('title' => tr('new_log_entry'), 'menustring' => tr('new_log_entry'), 'visible' => true, 'filename' => 'log.php?cacheid=' . $cache_id, 'newwindow' => false, 'siteid' => 'new_log', 'icon' => 'images/actions/new-entry'), array('title' => $watch_label, 'menustring' => $watch_label, 'visible' => $show_watch, 'filename' => $is_watched, 'newwindow' => false, 'siteid' => 'observe_cache', 'icon' => 'images/actions/watch'), array('title' => tr('report_problem'), 'menustring' => tr('report_problem'), 'visible' => true, 'filename' => 'reportcache.php?cacheid=' . $cache_id, 'newwindow' => false, 'siteid' => 'report_cache', 'icon' => 'images/actions/report-problem'), array('title' => tr('print'), 'menustring' => tr('print'), 'visible' => true, 'filename' => 'printcache.php?cacheid=' . $cache_id, 'newwindow' => false, 'siteid' => 'print_cache', 'icon' => 'images/actions/print'), array('title' => $print_list_label, 'menustring' => $print_list_label, 'visible' => true, 'filename' => $print_list, 'newwindow' => false, 'siteid' => 'print_list_cache', 'icon' => $print_list_icon), array('title' => $ignore_label, 'menustring' => $ignore_label, 'visible' => $show_ignore, 'filename' => $is_ignored, 'newwindow' => false, 'siteid' => 'ignored_cache', 'icon' => $ignore_icon), array('title' => tr('edit'), 'menustring' => tr('edit'), 'visible' => $show_edit, 'filename' => 'editcache.php?cacheid=' . $cache_id, 'newwindow' => false, 'siteid' => 'edit_cache', 'icon' => 'images/actions/edit'))); $report_action = "<li><a href=\"reportcache.php?cacheid={$cache_id}\">" . tr('report_problem') . "</a></li>"; } else { $cache_menu = array('title' => tr('cache_menu'), 'menustring' => tr('cache_menu'), 'siteid' => 'cachelisting', 'navicolor' => '#E8DDE4', 'visible' => false, 'filename' => 'viewcache.php', 'submenu' => array()); } tpl_set_var('log', $log_action); tpl_set_var('watch', $watch_action); tpl_set_var('report', isset($report_action) ? $report_action : ''); tpl_set_var('ignore', $ignore_action); tpl_set_var('edit', $edit_action); tpl_set_var('print', $print_action); tpl_set_var('print_list', isset($print_list) ? $print_list : ''); // check if password is required $has_password = $geocache->hasPassword(); // cache-attributes $s = $dbc->multiVariableQuery("SELECT `cache_attrib`.`text_long`, `cache_attrib`.`icon_large`\n FROM `cache_attrib`, `caches_attributes`\n WHERE `cache_attrib`.`id`=`caches_attributes`.`attrib_id`\n AND `cache_attrib`.`language`=:1\n AND `caches_attributes`.`cache_id`=:2\n ORDER BY `cache_attrib`.`category`, `cache_attrib`.`id`", strtoupper($lang), $geocache->getCacheId()); $num_of_attributes = $dbc->rowCount($s); if ($num_of_attributes > 0 || $has_password) { $cache_attributes = ''; foreach ($dbc->dbResultFetchAll($s) as $record) { $cache_attributes .= '<img src="' . htmlspecialchars($record['icon_large'], ENT_COMPAT, 'UTF-8') . '" border="0" title="' . htmlspecialchars($record['text_long'], ENT_COMPAT, 'UTF-8') . '" alt="' . htmlspecialchars($record['text_long'], ENT_COMPAT, 'UTF-8') . '" /> '; } if ($has_password) { tpl_set_var('password_req', '<img src="' . $config['search-attr-icons']['password'][0] . '" title="' . tr('LogPassword') . '" alt="Potrzebne hasło"/>'); } else { tpl_set_var('password_req', ''); } tpl_set_var('cache_attributes', $cache_attributes); tpl_set_var('cache_attributes_start', '');