コード例 #1
0
ファイル: viewcache.php プロジェクト: kojoty/opencaching-pl
 } else {
     tpl_set_var('jQueryPopUpWindowscripts', ' ');
     tpl_set_var('GeoKretyApi_window_display', 'none');
     unset($_SESSION['GeoKretyApi']);
 }
 # end of GeoKretyApi
 if ($geocache->getRatingVotes() < 3) {
     // DO NOT show cache's score
     $score = "";
     $scorecolor = "";
     $font_size = "";
     tpl_set_var('score', tr('not_available'));
     tpl_set_var('scorecolor', "#000000");
 } else {
     // show cache's score
     $score = $geocache->getScore();
     $scorenum = score2ratingnum($score);
     $font_size = "2";
     if ($scorenum == 0) {
         $scorecolor = "#DD0000";
     } elseif ($scorenum == 1) {
         $scorecolor = "#F06464";
     } elseif ($scorenum == 2) {
         $scorecolor = "#DD7700";
     } elseif ($scorenum == 3) {
         $scorecolor = "#77CC00";
     } elseif ($scorenum == 4) {
         $scorecolor = "#00DD00";
     }
     tpl_set_var('score', score2rating($score));
     tpl_set_var('scorecolor', $scorecolor);