Hallo,
teste mal bitte ob das Problem noch vorhanden ist wenn du in der contents/ladder.php Zeile 507 bis Zeile 557 durch diesen Code zu ersetzt:
if ($menu->get(2) == 'conf') {
$matchid = $menu->get(3);
$matchabf = db_query("SELECT player1,player2,erg,ergid,ergconfirmed FROM prefix_ladder_matches WHERE id = ".$matchid);
while ($matchrow = db_fetch_assoc($matchabf)) {
$p1 = $matchrow['player1'];
$p2 = $matchrow['player2'];
$erg = $matchrow['erg'];
$ergid = $matchrow['ergid'];
$conf = $matchrow['ergconfirmed'];
}
$uid1 = getuid($p1);
$uid2 = getuid($p2);
if ($authid == $uid1) {
$pmid = $uid2;
} else {
$pmid = $uid1;
}
if (($pid == $p1 OR $pid == $p2) AND $conf == 0) {
if ($ergid == 0) {
echo '<br><br>Es muss erst ein Ergebnis eingetragen werden!';
} elseif ($ergid == $authid) {
echo '<br><br>Du hast das Ergebnis eingetragen, also muss dein Gegner das Match bestätigen!';
} else {
$elo = getelo($matchid);
$p1new = $elo[0];
$p2new = $elo[1];
$p1add = $elo[2];
$p2add = $elo[3];
list($erg1,$erg2) = explode(":", $erg);
if ($erg1 == $erg2) {
db_query("UPDATE prefix_ladder_players SET draw = draw + 1 WHERE id = ".$p1);
db_query("UPDATE prefix_ladder_players SET draw = draw + 1 WHERE id = ".$p2);
db_query("UPDATE prefix_ladder_matches SET snu = 3 WHERE id = ".$matchid);
} elseif ($erg1 < $erg2) {
db_query("UPDATE prefix_ladder_players SET win = win + 1 WHERE id = ".$p2);
db_query("UPDATE prefix_ladder_players SET loss = loss + 1 WHERE id = ".$p1);
db_query("UPDATE prefix_ladder_matches SET snu = 2 WHERE id = ".$matchid);
} elseif ($erg1 > $erg2) {
db_query("UPDATE prefix_ladder_players SET win = win + 1 WHERE id = ".$p1);
db_query("UPDATE prefix_ladder_players SET loss = loss + 1 WHERE id = ".$p2);
db_query("UPDATE prefix_ladder_matches SET snu = 1 WHERE id = ".$matchid);
}
db_query("UPDATE prefix_ladder_matches SET ergconfirmed = 1, p1add = ".$p1add.", p2add = ".$p2add." WHERE id = ".$matchid);
db_query("UPDATE prefix_ladder_players SET points = ".$p1new." WHERE id = ".$p1);
db_query("UPDATE prefix_ladder_players SET points = ".$p2new." WHERE id = ".$p2);
sendpm($authid,$pmid,'Ladder: Ergebnis bestätigt','Dein Gegner hat ein Ergebnis bestätigt, die ELO Punkte werden nun neu berechnet.',-1);
echo '<br><br>Das Ergebnis wurde erfolgreich bestätigt!';
}
} else {
echo 'Du hast nicht die nötigen Rechte für diese Aktion!';
}