Ejemplo n.º 1
0
    // wenn das Spiel ueberhaupt schon war dann Kommentare zeigen
    echo '<h1>' . _('Kommentar des Reporters');
    if ($live_scoring_meldung != '') {
        echo ' (' . $live_scoring_min_gespielt . '. Minute)';
    }
    echo '</h1>';
    echo $kommentar_liste;
} elseif ($live_scoring_spieltyp_laeuft == '') {
    echo '<h1>' . _('Mögliche RKP-Veränderungen') . '</h1>';
    $ergebnisStrings = array('0:0', '1:0', '2:0', '3:0', '0:3', '0:2', '0:1');
    echo '<table><thead><tr class="odd"><th scope="col">' . _('Ergebnis') . '</th><th scope="col">' . $sql3['team1'] . ' (' . round($eloTeam1) . ')</th><th scope="col">' . $sql3['team2'] . ' (' . round($eloTeam2) . ')</th></tr></thead><tbody>';
    foreach ($ergebnisStrings as $ergebnisStr) {
        $eloChange1 = round(eloChange($ergebnisStr, $eloTeam1, $eloTeam2, $sql3['typ']));
        if ($eloChange1 > 0) {
            $eloChange1 = '+' . $eloChange1;
        }
        $eloChange2 = round(-eloChange($ergebnisStr, $eloTeam1, $eloTeam2, $sql3['typ']));
        if ($eloChange2 > 0) {
            $eloChange2 = '+' . $eloChange2;
        }
        echo '<tr><td>' . $ergebnisStr . '</td><td>' . $eloChange1 . '</td><td>' . $eloChange2 . '</td>';
    }
    echo '</tbody></table>';
}
echo '<p></p>';
if (isset($selectedStadionPhoto)) {
    if (isset($selectedStadionPhoto[2])) {
        echo '<p style="font-size:80%; color:#999;">' . __('Foto des Stadions: %s', $selectedStadionPhoto[2]) . '</p>';
    }
}
include 'zz3.php';
         $spielbericht_kommentare[] = array(0, $spielbericht_line_str);
     }
 }
 $comm1_values = "";
 foreach ($spielbericht_kommentare as $spielbericht_kommentare_entry) {
     $comm1_values .= "(" . $sql3['id'] . ", " . $spielbericht_kommentare_entry[0] . ", '" . mysql_real_escape_string(trim($spielbericht_kommentare_entry[1])) . "'),";
 }
 if (strlen($comm1_values) > 5) {
     $comm1_values = substr($comm1_values, 0, -1);
     $comm1 = "INSERT INTO " . $prefix . "spiele_kommentare (spiel, minute, kommentar) VALUES " . $comm1_values;
     $comm2 = mysql_query($comm1) or reportError(mysql_error(), $comm1);
 }
 // KOMMENTARE EINZELN IN DB FUER LIVE-SPIELBERICHTE ENDE
 // ELO-AENDERUNG BERECHNEN ANFANG
 $eloGewinn1 = eloChange($resultat, $daten_team1['elo'], $daten_team2['elo'], $to_simulate);
 $eloGewinn2 = -eloChange($resultat, $daten_team1['elo'], $daten_team2['elo'], $to_simulate);
 $eloBuff1 = "INSERT INTO " . $prefix . "eloBuffer (teamID, pointsGained, ausfuehren) VALUES ";
 $eloBuff1 .= "('" . $team1_id . "', " . $eloGewinn1 . ", " . getTimestamp('+2 hours') . "),";
 $eloBuff1 .= "('" . $team2_id . "', " . $eloGewinn2 . ", " . getTimestamp('+2 hours') . ")";
 $eloBuff2 = mysql_query($eloBuff1) or reportError(mysql_error(), $eloBuff1);
 // ELO-AENDERUNG BERECHNEN ENDE
 if ($sql3['typ'] == 'Liga') {
     $in3 = "UPDATE " . $prefix . "teams SET " . $sunAdd1 . "tore = tore+" . $tore[$sql3['team1']] . ", gegentore = gegentore+" . $tore[$sql3['team2']] . ", punkte = punkte+" . $punkte1 . " WHERE ids = '" . $team1_id . "'";
     $in4 = mysql_query($in3) or reportError(mysql_error(), $in3);
 } elseif ($sql3['typ'] == 'Test') {
     $in3 = "UPDATE " . $prefix . "teams SET " . $test1sql . " WHERE ids = '" . $team1_id . "'";
     $in4 = mysql_query($in3) or reportError(mysql_error(), $in3);
 }
 $buch1 = "INSERT INTO " . $prefix . "buchungenBuffer (teamID, verwendungszweck, betrag, ausfuehren) VALUES ('" . $team1_id . "', 'Ticketverkauf', " . $watcher_einkommen_h . ", " . getTimestamp('+2 hours') . "),('" . $team1_id . "', 'Sponsoring', " . $sponsor_einkommen1 . ", " . getTimestamp('+2 hours') . ")";
 $buch2 = mysql_query($buch1) or reportError(mysql_error(), $buch1);
 if ($sql3['typ'] == 'Liga') {