0){ while($data = mysql_fetch_assoc($sel)){ $total = $total + $data['rating_num']; $rows++; } $perc = ($total/$rows) * 20; //$newPerc = round($perc/5)*5; //return $newPerc.'%'; $newPerc = round($perc,2); return $newPerc.'%'; } else { return '0%'; } } function outOfFive($id){ $total = 0; $rows = 0; $sel = mysql_query("SELECT rating_num FROM ratings WHERE rating_id = '$id'"); if(mysql_num_rows($sel) > 0){ while($data = mysql_fetch_assoc($sel)){ $total = $total + $data['rating_num']; $rows++; } $perc = ($total/$rows); return round($perc,2); //return round(($perc*2), 0)/2; // 3.5 } else { return '0'; } } function getVotes($id){ $sel = mysql_query("SELECT rating_num FROM ratings WHERE rating_id = '$id'"); $rows = mysql_num_rows($sel); if($rows == 0){ $votes = '0 Votes'; } else if($rows == 1){ $votes = '1 Vote'; } else { $votes = $rows.' Votes'; } return $votes; } function pullRating($id,$show5 = false, $showPerc = false, $showVotes = false, $static = NULL){ // Check if they have already voted... $sel = mysql_query("SELECT id FROM ratings WHERE IP = '".$_SERVER['REMOTE_ADDR']."' AND rating_id = '$id'"); if(mysql_num_rows($sel) > 0 || $static == 'novote' || $_COOKIE['has_voted_'.$id]){ $text = ''; if($show5 || $showPerc || $showVotes){ $text .= '
'; } if($show5){ $text .= 'Rated '.outOfFive($id).'/5'; } if($showPerc){ $text .= ' ('.getRating($id).')'; } if($showVotes){ $text .= ' ('.getVotes($id).')'; } if($show5 || $showPerc || $showVotes){ $text .= '
'; } return $text.'
'; } else { if($show5 || $showPerc || $showVotes){ $text .= '
'; } if($show5){ $show5bool = 'true'; $text .= 'Rated '.outOfFive($id).'/5'; } else { $show5bool = 'false'; } if($showPerc){ $showPercbool = 'true'; $text .= ' ('.getRating($id).')'; } else { $showPercbool = 'false'; } if($showVotes){ $showVotesbool = 'true'; $text .= ' ('.getVotes($id).')'; } else { $showVotesbool = 'false'; } if($show5 || $showPerc || $showVotes){ $text .= '
'; } return $text.'
'; } } // Added in version 1.5 function getTopRated($limit, $table, $idfield, $namefield){ $result = ''; $sql = "SELECT ratings.rating_id,".$table.".".$namefield." as thenamefield,ROUND(AVG(ratings.rating_num),2) as rating FROM ratings,".$table." WHERE ".$table.".".$idfield." = ratings.rating_id GROUP BY rating_id ORDER BY rating DESC LIMIT ".$limit.""; $sel = mysql_query($sql); $result .= ''."\n"; return $result; } ?> World of O Maps: Search for orienteering maps all over the world
   

OL Karte

19/11/2013: Due to changes with Google Maps currently no outline is shown for maps! Please let me know on jan@kocbach.net if this is an important functionality for you.

Rate this map! 1) { echo "Note! $nrows maps match your search string! Showing only first match, ".$row["name"]."."; } ?> 2";} if (ereg('url',$thename)) { $urls=explode("|",$theval); $theval=""; $cc=0; $ccstr=""; foreach ($urls as $ll) { $cc++; if ($cc>1) {$ccstr=" $cc";} $theval.="Link$ccstr "; } } if ($thename == "email") { if ($theval) { $theval=munge_email($theval); } // $theval=ereg_replace('@',' ( at ) ',$theval); } echo ""; // Always after link if ($thename=="linkurl" && !$post) {echo("$mapstr2\n");} } // echo("$imgsstr"); } if ($row["sourceurl"]) { $ss=$row["sourceurl"];$fullsource="".$row["source"]."";} else { $fullsource=$row["source"];} $sourcestr="Source"; $addchange="Add/change info"; $addoutline="Add outline"; $imagesclick="Images (click for larger)"; $clickhere="Click here"; if ($lang=="D") { $sourcestr="Quelle"; $addchange="Ergänzen/Ändern Info"; $addoutline="Umrisslinie hinzufägen"; $imagesclick="Kartenbeispiel"; $clickhere="Hier klicken"; } ?>
$theexplain$theval$theafter

(Source ID: )

Show map outline "; } mysql_close($dbcon); // print "Show nearby competitions "; print "Show all competitions found in this area in new window\n"; ?>
No map foundThere is no map with this ID. Either the map has been deleted, or you have an error in your URL."; } ?>