Hi!
ich hab hier eine Anticheatfunktion geproggt, die eigentlich überprüfen sollte, ob diese sql abfrage daten überschreibt, oder eben nicht.
Code: Alles auswählen
//Das ist die Abfrage, die NICHT überschreiben sollte.
$sql = "UPDATE phpbb_posts
SET `post_dice_item_id` = ".$weapon_id.",
`post_dice_effect` = ".$effect."
WHERE post_id = ".$post_id.";";
CODE:
Code: Alles auswählen
//Und das ist die überprüfung
global $db;
$sql = 'SELECT `post_dice_effect` , `post_dice_item_id` FROM `phpbb_posts`';
$result = mysql_query($sql) OR die(mysql_error());
while($row = mysql_fetch_assoc($result))
{
$sql_effect = $row['post_dice_effect'];
$sql_item_id = $row['post_item_id'];
if(!empty($sql_effect) OR !empty($sql_item_id))
{
echo '<blink><font color=#ff0000><b>Verdammter CHEATER!!!!<br> Dein Schuss wird nicht gezählt!!!<br></blink>';
echo '</font></b><meta http-equiv=refresh content="5; URL=javascript:window.close()">';
echo '<img src=http://asmodiel.ebytehost.com/phpBB/images/smiles/icon_motz.gif><img src=http://asmodiel.ebytehost.com/phpBB/images/smiles/icon_motz.gif><img src=http://asmodiel.ebytehost.com/phpBB/images/smiles/icon_motz.gif><img src=http://asmodiel.ebytehost.com/phpBB/images/smiles/icon_motz.gif><img src=http://asmodiel.ebytehost.com/phpBB/images/smiles/icon_motz.gif><img src=http://asmodiel.ebytehost.com/phpBB/images/smiles/icon_motz.gif>';
echo '<br><img src=http://asmodiel.ebytehost.com/phpBB/images/smiles/icon_fluch.gif><img src=http://asmodiel.ebytehost.com/phpBB/images/smiles/icon_fluch.gif><img src=http://asmodiel.ebytehost.com/phpBB/images/smiles/icon_fluch.gif><img src=http://asmodiel.ebytehost.com/phpBB/images/smiles/icon_fluch.gif><img src=http://asmodiel.ebytehost.com/phpBB/images/smiles/icon_fluch.gif><img src=http://asmodiel.ebytehost.com/phpBB/images/smiles/icon_fluch.gif>';
die();
}
}
nur das der mir immer sagt, dass ich cheate, auch wenns nicht stimmt...
kann mir jemand sagen, was ich besser/anders machen kann?