";} include("templates/header2.tpl"); if(isset($_REQUEST['action'])) $action = $_REQUEST['action']; else $action=""; if(isset($_REQUEST['act'])) $act = $_REQUEST['act']; else $act=""; if(isset($_REQUEST['do'])) $do = $_REQUEST['do']; else $do=""; if($act == "Arcade" && $do == "newscore") { $allgamescore = mysql_query("SELECT game,MAX(score) s FROM gs_arcade_topscorer GROUP BY game ORDER BY s DESC"); while ($row = mysql_fetch_array($allgamescore)) { $topscore[$row['game']]=$row; } $sel[$bewertung]='selected=\"selected\"'; $toppunkte=$topscore[$game]['s']; if (!$toppunkte) $toppunkte="0"; if ($toppunkte > $score) { $fehlen = ($toppunkte - $score) + 1; $iponline=getenv("REMOTE_ADDR"); $rueckgabe = mysql_result(mysql_query("SELECT COUNT(*) FROM gs_arcade_votes WHERE gameid='$game' AND ip='$iponline'"),0); $toppunkte = number_format($toppunkte, 0, ',', ' '); $fehlen = number_format($fehlen, 0, ',', ' '); if($rueckgabe == '0') { $bewe = " Spiel bewerten "; } else { $bewe = ""; } echo "
$bewe
Highscore von $toppunkte Punkten nicht überboten!
Dir fehlten $fehlen Punkte.
Name:
Kommentar:
"; } else { $ueberboten = $score - $toppunkte; $iponline=getenv("REMOTE_ADDR"); $rueckgabe = mysql_result(mysql_query("SELECT COUNT(*) FROM gs_arcade_votes WHERE gameid='$game' AND ip='$iponline'"),0); $toppunkte = number_format($toppunkte, 0, ',', ' '); $ueberboten = number_format($ueberboten, 0, ',', ' '); if($rueckgabe == '0') { $bewe = " Spiel bewerten "; } else { $bewe = ""; } echo "
$bewe
Highscore von $toppunkte Punkten überboten.
Du hast $ueberboten Punkte mehr.
Name:
Kommentar:
Möchtest Du eine eMail falls Dich jemand überbietet?
eMail:
"; } } ##### In Highscoreliste Eintragen if($action == "savescore") { if(!isset($_POST['submit']) || $_POST['submit']!="In Highscoreliste eintragen") { echo ""; exit(); } if($_POST['gsname'] == "") { $game = $_POST['game']; if($_POST['score'] == ""){ $score = $_POST['y10']; }else{ $score = $_POST['score']; } $allgamescore = mysql_query("SELECT game,MAX(score) s FROM gs_arcade_topscorer GROUP BY game ORDER BY s DESC"); while ($row = mysql_fetch_array($allgamescore)) { $topscore[$row['game']]=$row; } $toppunkte=$topscore[$game]['s']; if (!$toppunkte) $toppunkte="0"; if ($toppunkte > $score) { $fehlen = ($toppunkte - $score) + 1; $iponline=getenv("REMOTE_ADDR"); $rueckgabe = mysql_result(mysql_query("SELECT COUNT(*) FROM gs_arcade_votes WHERE gameid='$game' AND ip='$iponline'"),0); $toppunkte = number_format($toppunkte, 0, ',', ' '); $fehlen = number_format($fehlen, 0, ',', ' '); if($rueckgabe == '0') { $bewe = " Spiel bewerten "; } else { $bewe = ""; } echo "
$bewe
Highscore von $toppunkte Punkten nicht überboten!
Dir fehlten $fehlen Punkte.
Bitte einen Namen angeben.
Name:
Kommentar:
"; } else { $ueberboten = $score - $toppunkte; $iponline=getenv("REMOTE_ADDR"); $rueckgabe = mysql_result(mysql_query("SELECT COUNT(*) FROM gs_arcade_votes WHERE gameid='$game' AND ip='$iponline'"),0); $toppunkte = number_format($toppunkte, 0, ',', ' '); $ueberboten = number_format($ueberboten, 0, ',', ' '); if($rueckgabe == '0') { $bewe = " Spiel bewerten "; } else { $bewe = ""; } echo "
$bewe
Highscore von $toppunkte Punkten überboten.
Du hast $ueberboten Punkte mehr.
Bitte einen Namen angeben.
Name:
Kommentar:
Möchtest Du eine eMail falls Dich jemand überbietet?
eMail:
"; } } else { $bewertungs = $_POST['bewertung']; $iponline=getenv("REMOTE_ADDR"); $delete_time = time()+($votesperre*3600); $game1 = $_POST['game']; $game2 = $_POST['score']; $emails = $_POST['email']; $allgamescore = mysql_query("SELECT game,MAX(score) s FROM gs_arcade_topscorer GROUP BY game ORDER BY s DESC"); while ($row = mysql_fetch_array($allgamescore)) { $topscore[$row['game']]=$row; } $toppunktes=$topscore[$game1]['s']; $mehr = $game2 - $toppunktes; $name = mysql_query("SELECT email FROM gs_arcade_topscorer WHERE game='$game1' ORDER BY score ASC"); while ($row = mysql_fetch_array($name)) { $bildname=$row; } if($bildname['email'] != "" && $game2 > $toppunktes) { $emails = $_POST['email']; $names = mysql_query("SELECT title FROM gs_arcadegames WHERE name='$game1'"); while ($rows = mysql_fetch_array($names)) { $bildnames=$rows; } $toppunktes = number_format($toppunktes, 0, ',', ' '); $mehr = number_format($mehr, 0, ',', ' '); $message_best = "Deine Highscore von ".$toppunktes." Punkten im Spiel ".$bildnames['title']." wurde von ".$_POST['gsname']." mit ".$mehr." Punkten überboten.\nBitte klicke auf den folgenden Link um zu spielen:\n\n".$pfad.""; mail($bildname['email'], "Highscore überboten", $message_best, "From: ".$emailadresse.""); } $datum = time(); if ($bewertungs == '0' || $bewertungs == '') { mysql_query("UPDATE gs_arcadegames SET count=count+1 WHERE name='".$game1."'"); } else { mysql_query("UPDATE gs_arcadegames SET count=count+1, votes=votes+".$bewertungs.", votesmembers=votesmembers+1 WHERE name='".$game1."'"); mysql_query("INSERT INTO gs_arcade_votes SET gameid='".addslashes($game1)."', ip='".$iponline."', time='".$delete_time."'"); } mysql_query("INSERT INTO gs_arcade_topscorer SET game='".addslashes($game1)."', score='".$game2."', comment='".addslashes($_POST['kommentar'])."', name='".addslashes($_POST['gsname'])."', datum='".$datum."', email='".$emails."'"); echo ""; } } include("templates/footer2.tpl"); ?>