"; $ip = $_SERVER['REMOTE_ADDR']; $ip = ""; $query = " SELECT COUNT(*) AS aantal FROM soortbeoordelingen "; $query .= " WHERE begindatum <= '" . $vandaag . "' "; $query .= " AND (einddatum >= '" . $vandaag . "' || einddatum = '0000-00-00') "; //$rij = get_single($query); //$max = $rij['aantal'] * 5; $max = 25; $query = " SELECT COUNT(*) AS aantal, SUM(score)/COUNT(*) AS score FROM beoordelingen "; $query .= " WHERE score != 0 "; $query .= " AND wnummer = " . $wnummer; $rij = get_single($query); $totaal = $rij['aantal']; $score = $rij['score']; $query = " SELECT COUNT(*) AS aantal FROM beoordelingen "; $query .= " WHERE wnummer =" . $wnummer; $query .= " AND lidnummer = '" . $_SESSION['lidnummer'] . "' "; $rij = get_single($query); $aantal = $rij['aantal']; if($_GET['giverating'] != 1) // && $totaal != 0) { $query = " SELECT nummer, naam "; $query .= " FROM wandelingen "; $query .= " WHERE nummer = " . $wnummer; $rij = get_single($query); // echo ""; // echo ""; // echo "
"; echo "

"; echo utf8_encode($rij['naam']); echo "

"; //echo ""; //echo "Meer te vertellen over deze wandeling?"; //echo "
"; echo ""; //echo "
"; echo "Geef reactie"; //echo "
"; echo "
"; echo "
"; if($aantal == 0) { echo ""; echo "
"; echo "Geef beoordeling"; echo "
"; echo "
"; } else { echo ""; echo "
"; echo "Wijzig beoordeling"; echo "
"; echo "
"; } //echo "
"; //echo "
"; //echo "
"; //echo ""; //echo "Totaalscore"; //echo ""; //echo "
"; //echo "
"; echo "
"; echo "
"; $query = " SELECT COUNT(*) AS stemmen FROM beoordelingen "; $query .= " WHERE score != 0 "; $query .= " AND wnummer = " . $wnummer; $query .= " GROUP BY ip "; $stem = num_rows($query); $query = " SELECT COUNT(*) AS aantal, SUM(score)/COUNT(*) AS score FROM beoordelingen "; $query .= " WHERE score != 0 "; $query .= " AND wnummer = " . $wnummer; $rij = get_single($query); $aantal = $rij['aantal']; $score = $rij['score']; echo '
'; for($i=0; $i<5; $i++) { if($score > $i && $score < $i+1) { echo ''; echo ''; } else if($score > $i && $score >= $i+1) { echo ''; echo ''; } else { echo ''; } } echo '
'; //echo '
'; //echo '
'; //echo '
'; //echo '
'; //echo "
"; //echo '
'; //echo '
'; //echo '
'; //echo '
'; //echo ''; echo "
"; echo "score: " . number_format($score, 2) . " (" . floor($stem) . " stem"; if(floor($stem) != 1) echo "men"; echo ")"; echo "
"; $query = " SELECT soort, SUM(score)/COUNT(*) AS score, COUNT(*) AS aantal FROM beoordelingen "; $query .= " WHERE wnummer = " . $wnummer; $query .= " AND score != 0 "; $query .= " GROUP BY soort "; $rijen = get_array($query); if(count($rijen)) { foreach($rijen as $rij) { $stemmen[$rij['soort']] = $rij['aantal']; $score[$rij['soort']] = number_format($rij['score'], 2); } } $query = " SELECT * FROM soortbeoordelingen "; $query .= " WHERE begindatum <= '" . $vandaag . "' "; $query .= " AND (einddatum >= '" . $vandaag . "' || einddatum = '0000-00-00') "; $rijen = get_array($query); if($rijen) { foreach($rijen as $rij) { echo "
"; //echo "
"; echo "
"; echo ""; echo $rij['naam']; echo ""; showinfo(2, "beoordeling"); //echo ""; //echo "toon info"; //echo ""; echo "
"; //echo "
"; //echo "
"; echo "
"; echo '
'; $scorex = $score[$rij['nummer']]; for($i=0; $i< 5; $i++) { if($scorex > $i && $scorex < $i+1) { echo ''; echo ''; } else if($scorex >= $i && $scorex >= $i+1) { echo ''; echo ''; } else { echo ''; } } echo '
'; echo "
"; echo "
"; //echo "
"; echo "score: " . number_format($score[$rij['nummer']], 2) . " (" . floor($stemmen[$rij['nummer']]) . " stem"; if(floor($stemmen[$rij['nummer']]) != 1) echo "men"; echo ")"; echo "
"; //echo "
"; } } } else { $query = " SELECT nummer, naam "; $query .= " FROM wandelingen "; $query .= " WHERE nummer = " . $wnummer; $rij = get_single($query); echo "
"; echo ""; echo ""; echo ""; echo ""; if($totaal == 0) { echo ""; echo ""; echo ""; } $query = " SELECT soort, SUM(score)/COUNT(*) AS score, COUNT(*) AS aantal FROM beoordelingen "; $query .= " WHERE wnummer = " . $wnummer; $query .= " AND score != 0 "; $query .= " AND lidnummer = '" . $_SESSION['lidnummer'] . "' "; $query .= " GROUP BY soort "; $rijen = get_array($query); for($i = 1; $i <= 5; $i++) $score[$i] = 0; if(count($rijen)) { foreach($rijen as $rij) { $stemmen[$rij['soort']] = $rij['aantal']; $score[$rij['soort']] = number_format($rij['score'], 2); } } $query = " SELECT * FROM soortbeoordelingen "; $query .= " WHERE begindatum <= '" . $vandaag . "' "; $query .= " AND (einddatum >= '" . $vandaag . "' || einddatum = '0000-00-00') "; $rijen = get_array($query); if($rijen) { foreach($rijen as $rij) { echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; } echo "
"; echo "

"; echo utf8_encode($rij['naam']); echo "

"; echo "Meer te vertellen over deze wandeling?"; echo "
"; echo ""; echo "Geef reactie"; //echo "Geef reactie"; echo ""; echo "
"; echo "
"; echo "
"; echo "Geef als eerste een beoordeling"; echo "
"; echo $rij['naam']; echo " "; showinfo(2, "beoordeling"); //echo ""; //echo "toon info"; //echo ""; echo "
"; echo '
'; for($i=0; $i<5; $i++) { $scorex = $score[$rij['nummer']]; if($scorex > $i && $scorex < $i+1) { echo ''; echo ''; } else if($scorex >= $i && $scorex >= $i+1) { echo ''; echo ''; } else { echo ''; } } echo '
'; //for ($i = 1; $i <= $score[$rij['nummer']]; $i++) //{ //echo ''; //} //for ($i = $score[$rij['nummer']]+1; $i <= count($rijen); $i++) // echo ''; echo ""; echo "
"; echo "
"; } } } echo "
"; echo ""; echo ""; if($_SERVER['REMOTE_ADDR'] == $mijnip || $logbezoekers) { if($_GET['giverating'] == 1) $soort = "geefbeoordeling"; else $soort = "bekijkbeoordeling"; $savebez = "../lib/savebezoekers.php"; //$soort = "beoordeling"; $actie = $wnummer; //require_once($savebez); } } ?>