Пример #1
0
 if (sizeof($listed_on) == 0) {
     tpl_set_var('hidelistingsites_start', '<!--');
     tpl_set_var('hidelistingsites_end', '-->');
 } else {
     tpl_set_var('hidelistingsites_start', '');
     tpl_set_var('hidelistingsites_end', '');
 }
 //cache available
 $st = $geocache->dictionary->getCacheStatuses();
 if ($geocache->getStatus() != 1) {
     tpl_set_var('status', $error_prefix . htmlspecialchars(tr($st[$geocache->getStatus()]['translation']), ENT_COMPAT, 'UTF-8') . $error_suffix);
 } else {
     tpl_set_var('status', '<span style="color:green;font-weight:bold;">' . htmlspecialchars(tr($st[$geocache->getStatus()]['translation']), ENT_COMPAT, 'UTF-8') . '</span>');
 }
 tpl_set_var('date_created', $geocache->getDateCreated()->format($applicationContainer->getOcConfig()->getDateFormat()));
 tpl_set_var('difficulty_icon_diff', icon_difficulty("diff", $geocache->getDifficulty()));
 tpl_set_var('difficulty_text_diff', htmlspecialchars(sprintf($difficulty_text_diff, $geocache->getDifficulty() / 2), ENT_COMPAT, 'UTF-8'));
 tpl_set_var('difficulty_icon_terr', icon_difficulty("terr", $geocache->getTerrain()));
 tpl_set_var('difficulty_text_terr', htmlspecialchars(sprintf($difficulty_text_terr, $geocache->getTerrain() / 2), ENT_COMPAT, 'UTF-8'));
 tpl_set_var('founds', htmlspecialchars($geocache->getFounds(), ENT_COMPAT, 'UTF-8'));
 tpl_set_var('notfounds', htmlspecialchars($geocache->getNotFounds(), ENT_COMPAT, 'UTF-8'));
 tpl_set_var('notes', htmlspecialchars($geocache->getNotesCount(), ENT_COMPAT, 'UTF-8'));
 tpl_set_var('total_number_of_logs', htmlspecialchars($geocache->getFounds() + $geocache->getNotFounds() + $geocache->getNotesCount(), ENT_COMPAT, 'UTF-8'));
 // Personal cache notes
 //user logged in?
 if ($usr == true) {
     $s = $dbc->multiVariableQuery("SELECT `cache_notes`.`note_id` `note_id`,`cache_notes`.`date` `date`, `cache_notes`.`desc` `desc`, `cache_notes`.`desc_html` `desc_html` FROM `cache_notes` WHERE `cache_notes` .`user_id`=:1 AND `cache_notes`.`cache_id`=:2", $usr['userid'], $cache_id);
     $cacheNotesRowCount = $dbc->rowCount($s);
     if ($cacheNotesRowCount > 0) {
         $notes_record = $dbc->dbResultFetchOneRowOnly($s);
     }