0 ) { $dcols[ "userid" ] = $userid; $dcols[ "umfrageid" ] = $umfrageid; $dcols[ "antwort" ] = $_REQUEST["umfrage"]; insertDBRow( "umfragen_ergebnisse", "id", $dcols ); } if( $userid > 0 ) { $query = "SELECT * from umfragen_ergebnisse where userid = " . $userid . " and umfrageid = " . $umfrageid; $eres = queryDB( $query ); $erow = fetchDBRow($eres); if( numDBRows( $eres ) > 0 ) { echo ""; $query = "SELECT * from umfragen where active=1 and id = " . $umfrageid; $ures = queryDB( $query ); $urow = fetchDBRow($ures); if( numDBRows( $ures ) > 0 ) { echo ""; echo ""; echo ""; echo ""; echo ""; } echo "

"; echo $urow[ "titel" ]; echo "

"; echo $urow[ "frage" ]; echo "
"; echo "
du hast abgestimmt:

"; echo ""; $query = "SELECT * from umfragen_antworten where active=1 and umfrageid = " . $umfrageid; $ares = queryDB( $query ); while( $arow = fetchDBRow($ares)) { echo ""; } echo "
  • "; if( $erow[ "antwort" ] == $arow[ "id" ] ) echo "" . $arow[ "text" ] . ""; else echo $arow[ "text" ]; echo "
  • "; echo "

    "; echo "

    "; echo "
    "; echo "

    "; echo $urow[ "bemerkung" ]; echo "

    "; echo "
    "; echo "

    "; echo ""; $query = "SELECT * from umfragen where active=1 and id = " . $umfrageid; $ures = queryDB( $query ); $urow = fetchDBRow($ures); if( numDBRows( $ures ) > 0 ) { echo ""; } echo "
    "; echo "und so haben die anderen Teilnehmer abgestimmt:

    "; echo ""; $query = "SELECT * from umfragen_antworten where active=1 and umfrageid = " . $umfrageid; $ares = queryDB( $query ); while( $arow = fetchDBRow($ares)) { echo ""; } echo "
  • "; echo $arow[ "text" ]; $query = "SELECT * from umfragen_ergebnisse where umfrageid = " . $umfrageid . " and antwort = " . $arow[ "id" ]; $eres = queryDB( $query ); echo "
  • " . numDBRows( $eres ); echo "
    "; echo "

    "; } else { echo "

    "; echo ""; $query = "SELECT * from umfragen where active=1 and id = " . $umfrageid; $ures = queryDB( $query ); $urow = fetchDBRow($ures); if( numDBRows( $ures ) > 0 ) { echo ""; echo ""; echo "

    "; echo $urow[ "titel" ]; echo "

    "; echo $urow[ "frage" ]; echo "

    "; $query = "SELECT * from umfragen_antworten where active=1 and umfrageid = " . $umfrageid; $ares = queryDB( $query ); while( $arow = fetchDBRow($ares)) { echo ""; } echo "
    "; echo " " . $arow[ "text" ]; echo "
    "; echo ""; echo ""; echo "

    "; echo ""; echo ""; echo "

    "; echo $urow[ "bemerkung" ]; echo "

    "; } echo ""; echo "

    "; echo "\n"; echo "

    "; echo "

    "; } } else { $query = "SELECT * from umfragen where active=1 and id = " . $umfrageid; $ures = queryDB( $query ); $urow = fetchDBRow($ures); if( numDBRows( $ures ) > 0 ) { echo "

    "; echo $urow[ "titel" ]; echo "

    "; echo "

    "; echo $urow[ "frage" ]; echo "

    "; echo ""; echo "Es können nur User die im " . $gtitel . " angemeldet sind teilnehmen

    "; echo ""; $query = "SELECT * from umfragen_antworten where active=1 and umfrageid = " . $umfrageid; $ares = queryDB( $query ); while( $arow = fetchDBRow($ares)) { echo ""; } echo "
  • "; echo $arow[ "text" ]; echo "
  • "; echo ""; echo ""; echo "

    "; echo ""; echo ""; echo "

    "; echo $urow[ "bemerkung" ]; echo "

    "; } echo ""; } ?>

    Fenster schliessen