Example #1
0
     tpl_set_var('hidelistingsites_end', '-->');
 } else {
     tpl_set_var('hidelistingsites_start', '');
     tpl_set_var('hidelistingsites_end', '');
 }
 //cache available
 if ($cache_record['status'] != 1) {
     tpl_set_var('status', $error_prefix . htmlspecialchars(cache_status_from_id($cache_record['status'], $lang), ENT_COMPAT, 'UTF-8') . $error_suffix);
 } else {
     tpl_set_var('status', '<span style="color:green;font-weight:bold;">' . htmlspecialchars(cache_status_from_id($cache_record['status'], $lang), ENT_COMPAT, 'UTF-8') . '</span>');
 }
 $date_created = strtotime($cache_record['date_created']);
 tpl_set_var('date_created', fixPlMonth(htmlspecialchars(strftime("%d %B %Y", $date_created), ENT_COMPAT, 'UTF-8')));
 tpl_set_var('difficulty_icon_diff', icon_difficulty("diff", $cache_record['difficulty']));
 tpl_set_var('difficulty_text_diff', htmlspecialchars(sprintf($difficulty_text_diff, $cache_record['difficulty'] / 2), ENT_COMPAT, 'UTF-8'));
 tpl_set_var('difficulty_icon_terr', icon_difficulty("terr", $cache_record['terrain']));
 tpl_set_var('difficulty_text_terr', htmlspecialchars(sprintf($difficulty_text_terr, $cache_record['terrain'] / 2), ENT_COMPAT, 'UTF-8'));
 tpl_set_var('founds', htmlspecialchars($cache_record['founds'], ENT_COMPAT, 'UTF-8'));
 tpl_set_var('notfounds', htmlspecialchars($cache_record['notfounds'], ENT_COMPAT, 'UTF-8'));
 tpl_set_var('notes', htmlspecialchars($cache_record['notes'], ENT_COMPAT, 'UTF-8'));
 tpl_set_var('total_number_of_logs', htmlspecialchars($cache_record['notes'] + $cache_record['notfounds'] + $cache_record['founds'], ENT_COMPAT, 'UTF-8'));
 // Personal cache notes
 //user logged in?
 if ($usr == true) {
     $notes_rs = sql("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);
     tpl_set_var('note_content', "");
     tpl_set_var('CacheNoteE', '-->');
     tpl_set_var('CacheNoteS', '<!--');
     tpl_set_var('EditCacheNoteE', '');
     tpl_set_var('EditCacheNoteS', '');
     if (isset($_POST['edit'])) {
Example #2
0
    list($iconname, $inactive) = getCacheIcon($usr['userid'], $caches_record['cache_id'], $caches_record['status'], $caches_record['user_id'], $caches_record['icon_large']);
    $tmpline = mb_ereg_replace('{icon_large}', $iconname, $tmpline);
    $tmpline = mb_ereg_replace('{cachetype}', htmlspecialchars(t($caches_record['cacheTypeName']), ENT_COMPAT, 'UTF-8'), $tmpline);
    // short_desc ermitteln TODO: nicht die erste sondern die richtige wählen
    $rsdesc = sql_slave("SELECT `short_desc` FROM `cache_desc` WHERE `cache_id`='&1' LIMIT 1", $caches_record['cache_id']);
    $desc_record = sql_fetch_array($rsdesc);
    mysql_free_result($rsdesc);
    $tmpline = mb_ereg_replace('{short_desc}', htmlspecialchars($desc_record['short_desc'], ENT_COMPAT, 'UTF-8'), $tmpline);
    $dDiff = abs(dateDiff('d', $caches_record['date_created'], date('Y-m-d')));
    if ($dDiff < $caches_olddays) {
        $tmpline = mb_ereg_replace('{new}', $caches_newstring, $tmpline);
    } else {
        $tmpline = mb_ereg_replace('{new}', '', $tmpline);
    }
    $tmpline = mb_ereg_replace('{diffpic}', icon_difficulty("diff", $caches_record['difficulty']), $tmpline);
    $tmpline = mb_ereg_replace('{terrpic}', icon_difficulty("terr", $caches_record['terrain']), $tmpline);
    $tmpline = mb_ereg_replace('{ratpic}', icon_rating($caches_record['founds'], $caches_record['topratings']), $tmpline);
    // default
    $tmp_caches_oconlystring = $caches_oconlystring;
    // clear if not oconly
    if ($caches_record['oconly'] != 1) {
        $tmp_caches_oconlystring = '';
    }
    // clear if oconly attribute is hidden
    if ($oconlyhidden == 1) {
        $tmp_caches_oconlystring = '';
    }
    $tmpline = mb_ereg_replace('{oconly}', $tmp_caches_oconlystring, $tmpline);
    // das letzte found suchen
    $sql = 'SELECT `cache_logs`.`id` `id`, `cache_logs`.`type` `type`, `cache_logs`.`date` `date`, `log_types`.`icon_small` `icon_small`
				FROM `cache_logs`, `log_types`
Example #3
0
     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);
     }
     tpl_set_var('note_content', "");
     tpl_set_var('CacheNoteE', '-->');