load("ARCADEG"); require_once ('./arcade_gold/ag_var/ag_config.php'); require_once ('./arcade_gold/ag_var/ag_ini.php'); require_once ('./arcade_gold/ag_funktion.php'); if ($_REQUEST['play']) $play = $_REQUEST['play']; //******** Cheater Schutz Ein/Aus Schalten ************ $cheat_on = 0; //1= Ein 0= Aus //************************************************ if (!$wbbuserdata['userid'] OR !$wbbuserdata['can_arcadeg_play']) { $gruppe = 0; $massag = "{$lang->items['LANG_ARCADEG_ARGKEINEBERECHTIGUNG']}"; access_error(); } else { $gruppe = 1; $useroptions = $db->query_first("SELECT * FROM `bb" . $n . "_ag_user` WHERE `userid`='" . $wbbuser . "'"); $loech_dat = time () + 86400; if (time () >= $useroptions['playtime']) { $db->query("UPDATE `bb" . $n . "_ag_user` SET `last_dat`='" . $useroptions['playtime'] . "', `loech_dat`='" . $loech_dat . "', `playbutton`='' WHERE `userid`='" . $wbbuser . "'"); $useroptions = $db->query_first("SELECT * FROM `bb" . $n . "_ag_user` WHERE `userid`='" . $wbbuser . "'"); } if ($wbbuserdata['username'] != $useroptions['username']) { $db->query("UPDATE `bb" . $n . "_ag_user` SET `username`='" . addslashes ($wbbuserdata['username']) . "' WHERE `userid`='" . $wbbuser . "'"); $useroptions = $db->query_first("SELECT * FROM `bb" . $n . "_ag_user` WHERE `userid`='" . $wbbuser . "'"); } if ($useroptions['ov18']) { unset ($ov18); } else { $ov18 = "AND `ov18`='0'"; } require_once ('./arcade_gold/ag_var/ag_games.php'); require_once ('./arcade_gold/ag_var/ag_scores.php'); require_once ('./arcade_gold/ag_var/ag_session_rekord.php'); require_once ('./arcade_gold/ag_user.php'); } checkgroup (); if ($wbbuserdata['userposts']) { if (check_post ()) { $useroptions = $db->query_first("SELECT * FROM `bb" . $n . "_ag_user` WHERE `userid`='" . $wbbuser . "'"); } } if ($_POST['bewerten'] != 'bewerten') { if ($useroptions['massage']) { $gruppe = 0; $massag = $useroptions['massage']; $db->query("UPDATE `bb" . $n . "_ag_user` SET `massage`='' WHERE `userid`='" . $wbbuser . "'"); if (!$heade) unset ($header); eval ("\$allgames =(\"" . $tpl->get ("ag_massage") . "\");"); eval ("\$tpl->output (\"" . $tpl->get ("arcade_gold") . "\");"); exit (); } } if (empty ($useroptions['userid'])) { $action = 'all'; $db-> query("INSERT INTO `bb" . $n . "_ag_user` (`userid`,`username`,`start`,`can_play`,`guthaben`,`loech_dat`) VALUES ('" . $wbbuser . "','" . addslashes ($username) . "','all','0','" . $start_gut . "','" . time () . "')"); if ($gut_janein == 0) $db->query("INSERT INTO `bb" . $n . "_ag_kontoauszug` (`kid`,`userid`,`datum`,`info`,`betrag`,`art`) VALUES ('','" . $wbbuser . "','" . time () . "','" . $lang->items['LANG_ARCADEG_ARGWILLKOMMENBEI'] . "','" . $start_gut . "','plus')"); } if ($action == '') $action = $useroptions['start']; if ($action == 'thread_chall') { $check_user = $db->query_first("SELECT * FROM `bb" . $n . "_ag_user` WHERE `userid`='" . $t_userid . "'"); if (empty ($check_user['userid'])) { $db->query("INSERT INTO `bb" . $n . "_ag_user` (`userid`,`username`,`start`,`guthaben`,`loech_dat`) VALUES ('" . $t_userid . "','" . $t_username . "','all','" . $start_gut . "','" . time () . "')"); if ($gut_janein == 0) $db->query("INSERT INTO `bb" . $n . "_ag_kontoauszug` (`kid`,`userid`,`datum`,`info`,`betrag`,`art`) VALUES ('','" . $t_userid . "','" . time () . "','" . $lang->items['LANG_ARCADEG_ARGWILLKOMMENBEI'] . "','" . $start_gut . "','plus')"); } if ($check_user['gesperrt']) { if (!$heade) unset ($header); $massag = $check_user['username'] . " " . $lang->items['LANG_ARCADEG_ARGKEINEBERECHTIGUNG2']; eval ("\$allgames =(\"" . $tpl->get ("ag_no") . "\");"); eval ("\$tpl->output (\"" . $tpl->get ("arcade_gold") . "\");"); exit (); } header ("Location: ag_challenges.php?sid=" . $session['hash'] . "&action=makeuser&send=send&challenges=1&susername=" . $t_username, true); exit (); } if ($action == 'abbruch') { $db->query("UPDATE `bb" . $n . "_ag_user` SET `can_play`='0' WHERE `userid`='" . $wbbuser . "'"); $action = "all"; } if (!$listblind) { if (count ($data) > 0) { foreach ($data as $key => $gam) { if (!$gam[2]) break; if (check_group ($gam[18])) { $data1[$gam[0]] = array ($gam[0], $gam[1], $gam[2], $gam[3], $gam[4], $gam[5], $gam[6], $gam[7], $gam[8], $gam[9], $gam[10], $gam[11], $gam[12], $gam[13], $gam[14], $gam[15], $gam[16], $gam[17], $gam[18]); $blindcount++; } } } $data = $data1; } $max_a_score = array (); $mymax_a_score = array (); for ($x = 0; $x < $scorecount; $x++) { $sco = explode (",", $scor_data[$x]); $max_a_score[$sco[0]] .= $sco[1] . "," . $sco[2] . "," . $sco[3] . "," . $sco[4] . "," . $sco[5] . "--"; if ($sco[3] == $wbbuser) $mymax_a_score[$sco[0]] .= $sco[1] . "," . $sco[2] . "," . $sco[3] . "," . $sco[4] . "," . $sco[5] . "--"; } require_once ("./arcade_gold/ag_score.php"); require_once ("./arcade_gold/ag_news.php"); if ($action == 'all' OR $action == 'preview' OR $action == 'favoriten' OR $action == 'my' OR $action == 'notplay') { //------- Avatar if ($wbbuserdata['userid']) $avatar = avatar1 ($wbbuser); if ($sett == 'no_challeng') { $db->query("UPDATE `bb" . $n . "_ag_challenges` SET `score`='1', `scoretype`='no', `play_time`='" . $jetztzeit . "' WHERE `challeng_id`='" . $challeng_id . "' AND `userid`='" . $wbbuser . "'"); } $id = 0; $chal = $db->query_first("SELECT * FROM `bb" . $n . "_ag_challenges` WHERE `userid`='" . $wbbuser . "' AND `starter_id`!='" . $wbbuser . "' AND `scoretype`='go' ORDER BY `challeng_id` ASC"); if ($chal['scoretype'] == 'go') { $user_chal = $db->query_first("SELECT * FROM `bb" . $n . "_ag_user` WHERE `userid`='" . $chal['starter_id'] . "'"); $winthumb = $db->query_first("SELECT * FROM `bb" . $n . "_arcadegames` WHERE `gameid`='" . $chal['gameid'] . "'"); $gam1="Annehmen"; $gam2="Ablehnen"; eval ("\$challenge = \"" . $tpl->get ("ag_challeng_anzeige")."\";"); } } //------ Shortcut leiste $go_weit = 0; if ($action == 'select') { $db->query("UPDATE `bb" . $n . "_ag_user` SET `shortcut`='" . $typ . "' WHERE `userid`='" . $wbbuser . "'"); $useroptions = $db->query_first("SELECT * FROM `bb" . $n . "_ag_user` WHERE `userid`='" . $wbbuser . "'"); $go_weit = 1; } if ($go_weit == 1) $action = "favorit"; if ($action == 'kommentar' OR $action == 'favorit') { if ($useroptions['shortcut'] == 1 OR $typ==1) { $playbot = explode ("," ,$useroptions['favoriten']); $type = 0; $shortcut_sel = $lang->items['LANG_ARCADEG_AGGFAVORITE'] . " --> " . $lang->items['LANG_ARCADEG_AGGHEUTE'] . ""; } else { $playbot = explode ("," ,$useroptions['playbutton']); $type = 1; $shortcut_sel = "" . $lang->items['LANG_ARCADEG_AGGFAVORITE'] . " <-- " . $lang->items['LANG_ARCADEG_AGGHEUTE']; } for ($a = 0; $a < 25; $a++) { if (empty ($playbot[$a])) break; $playbo = $db->query_first("SELECT * FROM `bb" . $n . "_arcadegames` WHERE `active`='0' AND `gameid`='" . $playbot[$a] . "'"); if ($playbo['thumbnailname']) $shortcut_bit .= "" . $playbo["; } eval ("\$shortcut = \"" . $tpl->get ("ag_shortcut") . "\";"); } // ----- Kategorien ------------ // ##################------- User Games listen ------- // ------- Hot Games listen ------- if ($action == 'all' OR $action == 'my' OR $action == 'notplay' OR $action == 'favoriten') { unset ($newgame_bit); unset ($close); if ($hot_janein == 1) { if ($_REQUEST['ausblenden'] == 1) { $clos = intval ($_REQUEST['clos']); $db->query("UPDATE `bb" . $n . "_ag_user` SET `hotclose`='" . $clos . "' WHERE `userid`='" . $wbbuser . "'"); $useroptions['hotclose'] = $clos; } $hot_game = explode (",", $hotgames); $i = 0; $si = 0; if (count ($data) > 0) { foreach ($data as $key => $game) { $hoot = 0; for ($a = 0; $a < $hot_anz; $a++) { if ($game[0] == $hot_game[$a]) { $hoot = 1; break; } if (empty ($hot_game[$a])) break; } if ($hoot == 1) { $scoor = explode ("--", $max_a_score[$game[0]]); $scoore = explode (",", $scoor[0]); if ($scoore[0]) { $top = $lang->items['LANG_ARCADEG_HIGHSCOR'] . " " . $scoore[1] . " " . $lang->items['LANG_ARCADEG_MIT'] . " " . $scoore[0] . " " . $lang->items['LANG_ARCADEG_PUNKTEN']; } else { $top = $lang->items['LANG_ARCADEG_ARGKEINSPIEL']; } $si++; unset ($umbr); if ($si == $hot_umb) { $umbr = ""; $si = 0; } if (check_group ($game[18])) { eval ("\$hotgame_bit .= \"" . $tpl->get ("ag_hotgame_bit") . "\";"); } else { eval ("\$hotgame_bit .= \"" . $tpl->get ("ag_hotgame_bit_blind") . "\";"); } $i++; if ($i == $hot_anz) break; } } } else { $hotgame_bit = "" . $lang->items['LANG_ARCADEG_TEXT50'] . ''; } if (!$i) $hotgame_bit = "" . $lang->items['LANG_ARCADEG_TEXT50'] . ''; $head = "Hot Game's"; if ($hot_gut) $massage .= "" . $hot_gut . " " . $lang->items['LANG_ARCADEG_ARGGEWINNBEI'] . "  "; if ($hot_bezahl) $massage .= "" . $lang->items['LANG_ARCADEG_ARGKOSTENSPIEL'] . " " . $hot_bezahl . " " . $waehrung . "."; $close = "" . $lang->items["; $ai = 1; if ($useroptions['hotclose'] == 1 && $i > 0) { $ai = 0; $hotopen = "   " . $lang->items[
"; } if ($ai > 0) eval ("\$hotgame = \"" . $tpl->get ("ag_hotgames") . "\";"); unset ($massage); } eval ("\$arcade_header =(\"" . $tpl->get ("ag_header") . "\");"); } // ------- Games listen ------- if ($action == 'all' OR $action == 'my' OR $action == 'notplay' OR $action == 'favoriten') { if ($action != 'all') $katname = $action; $act = 'all'; unset ($head); unset ($toop); $go_back = 1; $ltr = $_REQUEST['ltr']; if ($ltr == '') { $ltr = 'A'; $go_back = 0; } if ($gamecount <= $allgames_anz && ($katname != 'my' && $katname != 'favoriten')) $ltr = $lang->items['LANG_ARCADEG_ALLE']; unset ($katis); if ($katselekt) $katis = "&&$gam[15]==$kat_id"; $letter = "#"; $linkletter = urlencode("#"); if ($ltr == $letter) { eval ("\$letterbits = \"" . $tpl->get ("ag_letterselected") . "\";"); } else { eval ("\$letterbits = \"" . $tpl->get ("ag_letter") . "\";"); } for ($i = 65; $i < 91; $i++) { $letter = chr ($i); $linkletter = $letter; if ($ltr == $letter) { eval ("\$letterbits .= \"" . $tpl->get ("ag_letterselected") . "\";"); } else { eval ("\$letterbits .= \"" . $tpl->get ("ag_letter") . "\";"); } } $letter = $lang->items['LANG_ARCADEG_ALLE']; $linkletter = urlencode ($lang->items['LANG_ARCADEG_ALLE']); if ($ltr == $letter) { eval ("\$letterbits .= \"" . $tpl->get ("ag_letterselected") . "\";"); } else { eval ("\$letterbits .= \"" . $tpl->get ("ag_letter") . "\";"); } $arcadecount = 1; $akatid = array (); $kat_count = 0; if ($ltr != '') { if ($ltr == "#") { if ($katname =="favoriten") { $favor_game = explode (",", $useroptions['favoriten']); $zaehle = count ($favor_game); if (count ($data) > 0) { foreach ($data as $key => $gam) { if (!$gam[2]) break; $akatid[$kat_count] = $gam[15]; $kat_count++; $gam[2] = "-" . $gam[2]; if (strpos (strtolower ($gam[2]), "a", 1) == 1) break; $gam[2] = substr_replace ($gam[2], "", 0, 1); foreach ($favor_game as $key => $playga) { if ($gam[0] == $playga) { $gam[1] = substr_replace ($gam[1], "", 0, 1); $games .= "--$gam[0],$gam[1],$gam[2],$gam[3],$gam[4],$gam[5],$gam[6],$gam[7],$gam[8],$gam[9],$gam[10],$gam[11],$gam[12],$gam[13],$gam[14],$gam[15],$gam[16],$gam[17],$gam[18]"; $arcadecount++; break; } } } } $head = $lang->items['LANG_ARCADEG_AGGMEINEFAVORITE']; } elseif ($katname =="my") { $playgam = explode (",", $useroptions['playgames']); $zaehle = count ($playgam); if (count ($data) > 0) { foreach ($data as $key => $gam) { if (!$gam[2]) break; $akatid[$kat_count] = $gam[15]; $kat_count++; $gam[2] = "-" . $gam[2]; if (strpos (strtolower ($gam[2]), "a", 1) == 1) break; $gam[2] = substr_replace ($gam[2], "", 0, 1); foreach ($playgam as $key => $playga) { if ($gam[0] == $playga) { $gam[1] = substr_replace ($gam[1], "", 0, 1); $games .= "--$gam[0],$gam[1],$gam[2],$gam[3],$gam[4],$gam[5],$gam[6],$gam[7],$gam[8],$gam[9],$gam[10],$gam[11],$gam[12],$gam[13],$gam[14],$gam[15],$gam[16],$gam[17],$gam[18]"; $arcadecount++; break; } } } } $head = $lang->items['LANG_ARCADEG_AGGZULETZTGESPIELT']; } elseif ($katname =="notplay") { $playgam = explode (",", $useroptions['playgames']); $zaehle = count ($playgam); if (count ($data) > 0) { foreach ($data as $key => $gam) { if (!$gam[2]) break; $akatid[$kat_count] = $gam[15]; $kat_count++; $gam[2] = "-" . $gam[2]; if (strpos (strtolower ($gam[2]), "a", 1) == 1) break; $gam[2] = substr_replace ($gam[2], "", 0, 1); unset ($stop); foreach ($playgam as $key => $playga) { if ($gam[0]==$playga) { $stop = 1; break; } } if ( $stop == 0) { $games .= "--$gam[0],$gam[1],$gam[2],$gam[3],$gam[4],$gam[5],$gam[6],$gam[7],$gam[8],$gam[9],$gam[10],$gam[11],$gam[12],$gam[13],$gam[14],$gam[15],$gam[16],$gam[17],$gam[18]"; $arcadecount++; } } } $head = $lang->items['LANG_ARCADEG_AGGZULETZTGESPIELT']; } else { if (count ($data) > 0) { foreach ($data as $key => $gam) { if (!$gam[2]) break; $akatid[$kat_count] = $gam[15]; $kat_count++; $gam[2] = "-" . $gam[2]; if (strpos (strtolower ($gam[2]), "a", 1) == 1) break; $arcadecount++; $gam[2] = substr_replace ($gam[2], "", 0, 1); $games .= "--$gam[0],$gam[1],$gam[2],$gam[3],$gam[4],$gam[5],$gam[6],$gam[7],$gam[8],$gam[9],$gam[10],$gam[11],$gam[12],$gam[13],$gam[14],$gam[15],$gam[16],$gam[17],$gam[18]"; } } $head = $lang->items['LANG_ARCADEG_USERCPALLESPIELE']; } } elseif ($ltr == $lang->items['LANG_ARCADEG_ALLE']) { if (count ($data) > 0) { if (count ($data) > 0) { foreach ($data as $key => $gam) { if (!$gam[2]) break; $akatid[$kat_count] = $gam[15]; $kat_count++; if ($katselekt) { if ($kat_id==$gam[15]) { $arcadecount++; $games .= "--$gam[0],$gam[1],$gam[2],$gam[3],$gam[4],$gam[5],$gam[6],$gam[7],$gam[8],$gam[9],$gam[10],$gam[11],$gam[12],$gam[13],$gam[14],$gam[15],$gam[16],$gam[17],$gam[18]"; } } else { if ($katname =="favoriten") { $favor_game = explode (",", $useroptions['favoriten']); $zaehle = count ($favor_game); if (count ($favor_game) > 0) { foreach ($favor_game as $key => $playga) { if ($gam[0] == $playga) { $gam[1] = substr_replace ($gam[1], "", 0, 1); $games .= "--$gam[0],$gam[1],$gam[2],$gam[3],$gam[4],$gam[5],$gam[6],$gam[7],$gam[8],$gam[9],$gam[10],$gam[11],$gam[12],$gam[13],$gam[14],$gam[15],$gam[16],$gam[17],$gam[18]"; $arcadecount++; break; } } } $head = $lang->items['LANG_ARCADEG_AGGMEINEFAVORITE']; } elseif ($katname =="my") { $playgam = explode (",", $useroptions['playgames']); $zaehle = count ($playgam); if (count ($playgam) > 0) { foreach ($playgam as $key => $playga) { if ($gam[0] == $playga) { $gam[1] = substr_replace ($gam[1], "", 0, 1); $games .= "--$gam[0],$gam[1],$gam[2],$gam[3],$gam[4],$gam[5],$gam[6],$gam[7],$gam[8],$gam[9],$gam[10],$gam[11],$gam[12],$gam[13],$gam[14],$gam[15],$gam[16],$gam[17],$gam[18]"; $arcadecount++; break; } } } $head = $lang->items['LANG_ARCADEG_AGGZULETZTGESPIELT']; } elseif ($katname == 'notplay') { $playgam = explode (",", $useroptions['playgames']); if (count ($data) > 0) { if (!$gam[2]) break; unset ($stop); foreach ($playgam as $key => $playga) { if ($gam[0]==$playga) { $stop = 1; break; } } if ( $stop == 0) { $games .= "--$gam[0],$gam[1],$gam[2],$gam[3],$gam[4],$gam[5],$gam[6],$gam[7],$gam[8],$gam[9],$gam[10],$gam[11],$gam[12],$gam[13],$gam[14],$gam[15],$gam[16],$gam[17],$gam[18]"; $arcadecount++; } } $katname = 'notplay'; $head = $lang->items['LANG_ARCADEG_AGGNICHTGESPIELT']; } else { $arcadecount++; $games .= "--$gam[0],$gam[1],$gam[2],$gam[3],$gam[4],$gam[5],$gam[6],$gam[7],$gam[8],$gam[9],$gam[10],$gam[11],$gam[12],$gam[13],$gam[14],$gam[15],$gam[16],$gam[17],$gam[18]"; } } } } } } elseif ($ltr == $lang->items['LANG_ARCADEG_FSK']) { if (count ($data) > 0) { foreach ($data as $key => $gam) { if (!$gam[2]) break; $akatid[$kat_count] = $gam[15]; $kat_count++; if ($gam[14]) { $arcadecount++; $games .= "--$gam[0],$gam[1],$gam[2],$gam[3],$gam[4],$gam[5],$gam[6],$gam[7],$gam[8],$gam[9],$gam[10],$gam[11],$gam[12],$gam[13],$gam[14],$gam[15],$gam[16],$gam[17],$gam[18]"; } } } unset ($letterbits); $head = $lang->items['LANG_ARCADEG_FSK18']; } elseif ($ltr == 'groupgame') { if (count ($data) > 0) { foreach ($data as $key => $gam) { if (!$gam[2]) break; $akatid[$kat_count] = $gam[15]; $kat_count++; if ($gam[18] == $useroptions['u_group']) { $arcadecount++; $games .= "--$gam[0],$gam[1],$gam[2],$gam[3],$gam[4],$gam[5],$gam[6],$gam[7],$gam[8],$gam[9],$gam[10],$gam[11],$gam[12],$gam[13],$gam[14],$gam[15],$gam[16],$gam[17],$gam[18]"; } } } unset ($letterbits); $userg = $useroptions['u_group']; $u_group = explode (",", $ugroup[$useroptions['u_group']]); // $head = $vbphrase['scoreboardrang'] . ": " . $u_group[1]; $head = $lang->items['LANG_ARCADEG_SCOREBOARDRANG'] . ": " . $u_group[1]; } elseif ($ltr == $lang->items['LANG_ARCADEG_TOP']) { $fakt = "17"; function cmp ($a, $b) { global $fakt; if ($a[$fakt] == $b[$fakt]) return 0; return ($a[$fakt] < $b[$fakt]) ? 1 : -1; //? 1 : -1;abwerts || ? -1 : 1;aufwerts } usort ($data, "cmp"); if (count ($data) > 0) { foreach ($data as $key => $gam) { if (!$gam[2]) break; $akatid[$kat_count] = $gam[15]; $kat_count++; if ($gam[17]) { $arcadecount++; $games .= "--$gam[0],$gam[1],$gam[2],$gam[3],$gam[4],$gam[5],$gam[6],$gam[7],$gam[8],$gam[9],$gam[10],$gam[11],$gam[12],$gam[13],$gam[14],$gam[15],$gam[16],$gam[17],$gam[18]"; } } } unset ($letterbits); $head = $lang->items['LANG_ARCADEG_TOP']; } elseif ($ltr == 'suchen') { $condition = "title LIKE(\"%" . addslashes ($xsuche) . "%\") OR `description` LIKE(\"%" . addslashes ($xsuche) . "%\")"; $game = $db->query("SELECT `gameid`,`name`,`title`,`description`,`thumbnailname`,`active`,`championid`,`hit`,`hit_session`,`datum`,`gut_fest`,`gut_dyn`,`bezahl_fest`,`bezahl_dyn`,`ov18`,`kat`,`bewertcount`,`bewertung` FROM `bb" . $n . "_arcadegames` WHERE `active`='0' " . $ov18 . " AND " . $condition . " ORDER BY `title` ASC LIMIT " . $gameperpage); while ($gam = $db->fetch_array ($game)) { $arcadecount++; $games .= "--$gam[0],$gam[1],$gam[2],$gam[3],$gam[4],$gam[5],$gam[6],$gam[7],$gam[8],$gam[9],$gam[10],$gam[11],$gam[12],$gam[13],$gam[14],$gam[15],$gam[16],$gam[17],$gam[18]"; } unset ($letterbits); } elseif ($katname == 'favoriten') { $favor_game = explode (",", $useroptions['favoriten']); $zaehle = count ($favor_game); if (count ($data) > 0) { foreach ($data as $key => $gam) { if (!$gam[2]) break; $akatid[$kat_count] = $gam[15]; $kat_count++; if ($zaehle <= $allgames_anz) { if (count ($favor_game) > 0) { foreach ($favor_game as $key => $playga) { if ($gam[0] == $playga) { $gam[1] = substr_replace ($gam[1], "", 0, 1); $games .= "--$gam[0],$gam[1],$gam[2],$gam[3],$gam[4],$gam[5],$gam[6],$gam[7],$gam[8],$gam[9],$gam[10],$gam[11],$gam[12],$gam[13],$gam[14],$gam[15],$gam[16],$gam[17],$gam[18]"; $arcadecount++; unset ($letterbits); break; } } } } else { $gam[2] = "-" . $gam[2]; if (strpos (strtolower ($gam[2]), strtolower ($ltr), 1) == 1) { if (count ($favor_game) > 0) { foreach ($favor_game as $key => $playga) { if ($gam[0] == $playga) { $gam[2] = substr_replace ($gam[2], "", 0, 1); $games.= "--$gam[0],$gam[1],$gam[2],$gam[3],$gam[4],$gam[5],$gam[6],$gam[7],$gam[8],$gam[9],$gam[10],$gam[11],$gam[12],$gam[13],$gam[14],$gam[15],$gam[16],$gam[17],$gam[18]"; $arcadecount++; break; } } } } } } } $head = $lang->items['LANG_ARCADEG_AGGMEINEFAVORITE']; } elseif ($katname == 'my') { $ltr = chr (intval (ord ($ltr))); $ltr = strtolower (addslashes ($ltr)); $playgam = explode (",", $useroptions['playgames']); $zaehle = count ($playgam); if (count ($data) > 0) { foreach ($data as $key => $gam) { if (!$gam[2]) break; $akatid[$kat_count] = $gam[15]; $kat_count++; if ($zaehle <= $allgames_anz) { if (count ($playgam) > 0) { foreach ($playgam as $key => $playga) { if ($gam[0] == $playga) { $gam[1] = substr_replace ($gam[1], "", 0, 1); $games .= "--$gam[0],$gam[1],$gam[2],$gam[3],$gam[4],$gam[5],$gam[6],$gam[7],$gam[8],$gam[9],$gam[10],$gam[11],$gam[12],$gam[13],$gam[14],$gam[15],$gam[16],$gam[17],$gam[18]"; $arcadecount++; unset ($letterbits); break; } } } } else { $gam[2] = "-" . $gam[2]; if (strpos (strtolower ($gam[2]), strtolower ($ltr), 1) == 1) { if (count ($playgam) > 0) { foreach ($playgam as $key => $playga) { if ($gam[0] == $playga) { $gam[2] = substr_replace ($gam[2], "", 0, 1); $games .= "--$gam[0],$gam[1],$gam[2],$gam[3],$gam[4],$gam[5],$gam[6],$gam[7],$gam[8],$gam[9],$gam[10],$gam[11],$gam[12],$gam[13],$gam[14],$gam[15],$gam[16],$gam[17],$gam[18]"; $arcadecount++; break; } } } } } } } $head = $lang->items['LANG_ARCADEG_AGGZULETZTGESPIELT']; } elseif ($katname == 'notplay') { $ltr = chr (intval (ord ($ltr))); $ltr = strtolower (addslashes ($ltr)); $playgam = explode (",", $useroptions['playgames']); if (count ($data) > 0) { foreach ($data as $key => $gam) { if (!$gam[2]) break; $akatid[$kat_count] = $gam[15]; $kat_count++; unset ($stop); foreach ($playgam as $key => $playga) { if ($gam[0]==$playga) { $stop = 1; break; } } $gam[2] = "2" . $gam[2]; if (strpos (strtolower ($gam[2]), strtolower ($ltr), 1) == 1 && $stop == '') { $gam[2] = substr_replace ($gam[2], "", 0, 1); $games .= "--$gam[0],$gam[1],$gam[2],$gam[3],$gam[4],$gam[5],$gam[6],$gam[7],$gam[8],$gam[9],$gam[10],$gam[11],$gam[12],$gam[13],$gam[14],$gam[15],$gam[16],$gam[17],$gam[18]"; $arcadecount++; } } } $katname = 'notplay'; $head = $lang->items['LANG_ARCADEG_AGGNICHTGESPIELT']; } else { $ltr = chr (intval (ord ($ltr))); $ltr = strtolower (addslashes ($ltr)); //-------- ABC Select ------- if (count ($data) > 0) { foreach ($data as $key => $gam) { if (!$gam[2]) break; $akatid[$kat_count] = $gam[15]; $kat_count++; $gam[2] = "-" . $gam[2]; if (strpos (strtolower ($gam[2]), strtolower ($ltr), 1) == 1) { $arcadecount++; $gam[2] = substr_replace ($gam[2], "", 0, 1); $games .= "--$gam[0],$gam[1],$gam[2],$gam[3],$gam[4],$gam[5],$gam[6],$gam[7],$gam[8],$gam[9],$gam[10],$gam[11],$gam[12],$gam[13],$gam[14],$gam[15],$gam[16],$gam[17],$gam[18]"; } } } $head = $lang->items['LANG_ARCADEG_USERCPALLESPIELE']; } // ----- Portal Boxen/Kategorien ------------ require_once ("./arcade_gold/ag_portal.php"); if (isset ($_GET['page'])) { $page = intval ($_GET['page']); if ($page == 0) $page = 1; } else { $page = 1; } if ($edpos) $page = $edpos; if ($arcadecount) $pages = ceil ($arcadecount / $gameperpage); $anker = "#sa"; if ($pages > 1) $pagelink = makeaglink ("arcade_gold.php?sid=" . $session['hash'] . "&action=all&katselekt=" . $katselekt . "&kat_id=" . $kat_id . "&katname=" . $katname . "&ltr=" . $ltr . "", $page, $pages, $showpagelinks - 1, $anker); $pagelink = "
" . $pagelink . "
"; $pagenumber = $page; $position = ($pagenumber - 1) * $gameperpage; $position = $position + 1; } $ban_game = explode ("," ,$useroptions['ban']); $gamm = explode ("--", $games); $sp = 0; $i = 0; $si = 1; $ma = 0; $sb = 0; for ($xx = $position; $xx < $arcadecount; $xx++) { $game = explode (",", $gamm[$xx]); if ($sp == $gameperpage) break; $sp++; unset ($bezahlen); if ($bezahl_janein == 1) { if ($bezahl_dyn == 1) { if ($bezahl_dyn_var == 1 && $game[13] == 0) { if ($game[12] > 0) { $bezahldyn = $game[12]; } else { $bezahldyn = $bezahl; } $bezahlen = " " . $lang->items['LANG_ARCADEG_ARGKOSTEN'] . " " . $bezahldyn . " " . $waehrung . "
"; } else { $bezahlen = " " . $lang->items['LANG_ARCADEG_ARGKOSTEN'] . " " . $game[13] . " " .$waehrung . "
"; } if ($bezahl_dyn == 0) { if ($game[12] == 0) { $bezahlen = " " . $lang->items['LANG_ARCADEG_ARGKOSTEN'] . " " . $bezahl. " " . $waehrung . "
"; } else { $bezahlen = " " . $lang->items['LANG_ARCADEG_ARGKOSTEN'] . " " . $game[12] . " " . $waehrung . "
"; } } } else { if ($game[12] == 0) { $bezahlen = " " . $lang->items['LANG_ARCADEG_ARGKOSTEN'] . " " . $bezahl . " " .$waehrung . "
"; } else { $bezahlen = " " . $lang->items['LANG_ARCADEG_ARGKOSTEN'] . " " . $game[12] . " " . $waehrung . "
"; } } $hoot = 0; for ($a = 0;$a < 500;$a++) { if ($game[0] == $hot_game[$a]) { $hoot = 1; break; } if (empty ($hot_game[$a])) break; } if ($hot_bezahl > 0 && $hoot == 1) $bezahlen = " " . $lang->items['LANG_ARCADEG_ARGKOSTEN'] . " " . $hot_bezahl . " " . $waehrung . "
"; } unset ($guthaben); if ($gewin_dyn == 1) { $guthaben = " " . $lang->items['LANG_ARCADEG_ARGGEWINN'] . " " . $game[11] . " " . $waehrung; } else { if ($game[10] == 0) { $guthaben = " " . $lang->items['LANG_ARCADEG_ARGGEWINN'] . " " . $gewinn . " " . $waehrung; } else { $guthaben = " " . $lang->items['LANG_ARCADEG_ARGGEWINN'] . " " . $game[10] . " " . $waehrung; } } unset ($scorlist); $scoor = explode ("--", $max_a_score[$game[0]]); $scoore = explode (",", $scoor[0]); $u_group = explode (",", $ugroup[$scoore[4]]); $rang_img = "$u_group[1]"; if ($scoore[0]) $scorlist = "" . $scoore[1] . " " . $rang_img . "
" . $scoore[0] . " Punkte " . $scoore[5]; if ($scorlist) { $top = $scorlist; } else { $top = $lang->items['LANG_ARCADEG_ARGKEINSPIEL']; } $bewertpig = " "; if ($game[16]) $bewertpig = makebewert ($game[17], $game[16]); $stop = 0; for ($a = 0; $a < 500; $a++) { if ($game[0] == $ban_game[$a]) { $stop = 1; $sb++; break; } if (empty ($ban_game[$a])) break; } if ($katselekt) $head = "$katname"; if ($xsuche) $head = $lang->items['LANG_ARCADEG_SUCHEN'] . ": $xsuche"; if ($_REQUEST['goban'] == 1) { $stoop = 1; $sb = 0; $head = $lang->items['LANG_ARCADEG_ARGGEBANNTESPIELE']; $pagelink=".... " . $lang->items['LANG_ARCADEG_ZURUCK'] . ""; } else { $stoop = 0; } if ($stop == $stoop) { $backcolor = backcolor ($counte++); $ma++; $goo = 1; if (!$useroptions['ov18'] && $game[14]) $goo = 0; if ($goo) { $gotop++; if ($gotop == $gotoop) { eval ("\$oldstyle_bit .= \"" . $tpl->get ("ag_oldstyle_topgo") . "\";"); $gotop = 0; } if (check_group ($game[18])) { eval ("\$oldstyle_bit .= \"" . $tpl->get ("ag_oldstyle_bit") . "\";"); } else { if ($scorlist) { $top = $scoore[1] . " " . $rang_img . "
" . $scoore[0] . " " . $lang->items['LANG_ARCADEG_TEXT22'] . "-" . $scoore[5]; } else { $top = $lang->items['LANG_ARCADEG_ARGKEINSPIEL']; } eval ("\$oldstyle_bit .= \"" . $tpl->get ("ag_oldstyle_bit_blind") . "\";"); } } eval ("\$letterin= \"" . $tpl->get ("ag_letterin") . "\";"); } } if ($sb == 1) $ban_massage = "" . $sb . " " . $lang->items['LANG_ARCADEG_ARGGEBANNTEGELISTET3'] . "  " . $lang->items['LANG_ARCADEG_ARGGEBANNTEGELISTET2'] . "

"; if ($sb > 1) $ban_massage = "" . $sb . " " . $lang->items['LANG_ARCADEG_ARGGEBANNTEGELISTET1'] . "  " . $lang->items['LANG_ARCADEG_ARGGEBANNTEGELISTET2'] . "

"; if ($ma == 0) { $massage = "
" . $lang->items['LANG_ARCADEG_ARGKEINSPIEL'] . " " . $lang->items['LANG_ARCADEG_MIT'] . " - " . $ltr . " - " . $lang->items['LANG_ARCADEG_ARGGEBANNTEGELISTET2'] . "

"; if ($katselekt) $head = "$katname"; if ($xsuche) $head = $lang->items['LANG_ARCADEG_SUCHEN'] . ": " . $xsuche; eval ("\$letterin= \"" . $tpl->get ("ag_letterin") . "\";"); } if ($katselekt) { $head = "$katname"; if ($ma == 0) $massage="
" . $lang->items['LANG_ARCADEG_ARGKEINSPIEL'] . " " . $lang->items['LANG_ARCADEG_KATIND'] . " " . $katname . " - " . $lang->items['LANG_ARCADEG_ARGKEINSPGEFUNDEN2'] . "

"; } if ($xsuche) { $head = $lang->items['LANG_ARCADEG_SUCHEN'] . ": " . $xsuche; if ($ma == 0) $massage="
" . $lang->items['LANG_ARCADEG_ARGKEINSPIEL'] . " " . $lang->items['LANG_ARCADEG_MIT'] . " - " . $xsuche . " - " . $lang->items['LANG_ARCADEG_ARGKEINSPGEFUNDEN2'] . "

"; } eval ("\$letterbit_top= \"" . $tpl->get ("ag_oldstyle_letterbits") . "\";"); if ($ma >= $gotoop) { if ($letterbit_down) { eval ("\$letterbit_bottom= \"" . $tpl->get ("ag_oldstyle_letterbits") . "\";"); } else { eval ("\$oldstyle_bit .= \"" . $tpl->get ("ag_oldstyle_topgo") . "\";"); unset ($letterbit_bottom); } } eval ("\$allgame = \"" . $tpl->get ("ag_oldstyle") . "\";"); eval ("\$allgames = \"" . $tpl->get ("ag_portal")."\";"); } //------------- Game Preview ------------- require_once ("./arcade_gold/ag_preview.php"); if ($action == 'cheater') { $wonguthaben = $gewinn * $xtras; if ($gut_janein == 0) $gut_janein = 2; if ($gut_janein == 1) { $massag = $lang->items['LANG_ARCADEG_ARGWARNIX1'] . " " . $wonguthaben . " " . $waehrung . " " . $lang->items['LANG_ARCADEG_ARGWARNIX2']; $db->query("INSERT INTO `" . $dbt . "` (`kid`,`userid`,`datum`,`uhrzeit`,`info`,`betrag`,`art`) VALUES ('','" . $wbbuser . "','" . date ("d.m.y") . "','" . date ("H:i") . "','" . $lang->items['LANG_ARCADEG_ARGWEGENCHEATEN'] . " " . $gametitle . "','" . $wonguthaben . "','minus')"); $db->query("UPDATE `" . $dbtu . "` SET `guthaben`=`guthaben`-'" . $wonguthaben . "' WHERE `userid`='" . $wbbuser . "'"); } elseif ($gut_janein == 2) { $massag = $lang->items['LANG_ARCADEG_ARGWARNIX1'] . " " . $wonguthaben . " " . $waehrung . " " . $lang->items['LANG_ARCADEG_ARGWARNIX2']; $db->query("INSERT INTO `" . $dbt . "` (`kid`,`userid`,`datum`,`info`,`betrag`,`art`) VALUES ('','" . $wbbuser . "','" . time () . "','" . $lang->items['LANG_ARCADEG_ARGWEGENCHEATEN'] . " " . $gametitle . "','" . $wonguthaben . "','minus')"); $db->query("UPDATE `" . $dbtu . "` SET `guthaben`=`guthaben`-'" . $wonguthaben . "' WHERE `userid`='" . $wbbuser . "'"); } $db->query("INSERT INTO `bb" . $n . "_arcade` (`gameid`,`game`,`date`,`userid`,`username`,`score`,`comment`) VALUES ('" . $gameid . "','" . $gametitle . "','" . $jetztzeit . "','" . $wbbuser . "','" . $username . "','1','" . $username . " " . $lang->items['LANG_ARCADEG_ISTCHEATER'] . "')"); $db->query("INSERT INTO `bb" . $n . "_ag_news` (`newstext`,`newstype`,`newstime`) VALUES ('" . $lang->items['LANG_ARCADEG_BEI'] . " " . $gametitle . " " . $lang->items['LANG_ARCADEG_CHEATVER'] . " " . $lang->items['LANG_ARCADEG_CHEATEN'] . " :-)','cheat','" . time () . "')"); if (!$heade) unset ($header); eval ("\$allgames =(\"" . $tpl->get ("ag_no") . "\");"); eval ("\$tpl->output (\"" . $tpl->get ("arcade_gold") . "\");"); exit (); } //#############------------------ Kommentar -------------------- if ($action == 'kommentar') { /* reverse Score */ $revsort = "DESC"; $rev = $db->query_first("SELECT `rev_score` FROM `bb" . $n . "_arcadegames` WHERE `gameid`='" . $gameid . "'"); if ($rev['rev_score']) $revsort = "ASC"; $scneu = $db->query_first("SELECT `score`,`username`,`userid` FROM `bb" . $n . "_arcade` WHERE `gameid`='" . $gameid . "' ORDER BY `score` " . $revsort . " LIMIT 1,1"); /* reverse Score */ $wette = $db->query_first("SELECT * FROM `bb" . $n . "_ag_user` WHERE `userid`='" . $wbbuser . "'"); great_check (); if ($subaction == 'addcomment') { if ($comment == '') { $db->query("UPDATE `bb" . $n . "_ag_user` SET `can_play`='0' WHERE `userid`='" . $wbbuser . "'"); if ($kom_pflicht == 1 AND $position <= $kom_rang) { $db->query("DELETE FROM `bb" . $n . "_arcade` WHERE `scoreid`='" . $newscoreid . "' AND `userid`='" . $wbbuser . "'"); $db->query("OPTIMIZE TABLE `bb" . $n . "_arcade`"); $comment = 0; if ($wette['einsatz'] > 0) { if ($gut_janein == 0) $gut_janein = 2; if ($gut_janein == 1) { $db->query("UPDATE `" . $dbtu . "` set `guthaben`=`guthaben`-'" . $wette['einsatz'] . "' where `userid`='" . $wbbuser . "'"); $db->query("INSERT INTO `" . $dbt . "` (`kid`,`userid`,`datum`,`uhrzeit`,`info`,`betrag`,`art`) VALUES ('','" . $wbbuser . "','" . date ("d.m.y") . "','" . date ("H:i") . "','" . $lang->items['LANG_ARCADEG_ARGKEINKOMMETAR1'] . " " . $gametitle . "','" . $wette['einsatz'] . "','minus')"); $db->query("UPDATE `bb" . $n . "_ag_user` SET `einsatz`='0' WHERE `userid`='" . $wbbuser . "'"); } elseif ($gut_janein == 2) { $db->query("UPDATE `" . $dbtu . "` set `guthaben`=`guthaben`-'" . $wette['einsatz'] . "' where `userid`='" . $wbbuser . "'"); $db->query("INSERT INTO `" . $dbt . "` (`kid`,`userid`,`datum`,`info`,`betrag`,`art`) VALUES ('','" . $wbbuser . "','" . time () . "','" . $lang->items['LANG_ARCADEG_ARGKEINKOMMETAR1'] . " " . $gametitle . "','" . $wette['einsatz'] . "','minus')"); $db->query("UPDATE `bb" . $n . "_ag_user` SET `einsatz`='0' WHERE `userid`='" . $wbbuser . "'"); } } } else { $comment = $lang->items['LANG_ARCADEG_TEXT40']; } } else { $comment = addslashes ($comment); $comment = htmlspecialchars ($comment); } if ($comment != '0') { if ($position != 1) { // changed for reversed $max1 = $db->query_first("SELECT `score`,`username`,`userid` FROM `bb" . $n . "_arcade` WHERE `gameid`='" . $gameid . "' ORDER BY `score` " . $revsort); $div = $max1['score'] - intval($_POST['score']); if ($rev['rev_score']) $div = $div * -1; // changed for reversed if ($max1['userid'] == $wbbuser) { $gewin = $lang->items['LANG_ARCADEG_ARGHERZLICHGLUECK4'] . " " . $div . " " . $lang->items['LANG_ARCADEG_ARGHERZLICHGLUECK5'] . " " . $max1['score'] . " " . $lang->items['LANG_ARCADEG_PUNKTEN'] . "
"; // changed for reversed if ($rev['rev_score']) $gewin = $lang->items['LANG_ARCADEG_TEXT62'] . " " . $div . " " . $lang->items['LANG_ARCADEG_TEXT63'] . " " . $max1['score'] . " " . $lang->items['LANG_ARCADEG_PUNKTEN'] . "
"; // changed for reversed } else { $gewin = $lang->items['LANG_ARCADEG_ARGHERZLICHGLUECK4'] . " " . $div . " " . $lang->items['LANG_ARCADEG_ARGHERZLICHGLUECK6'] . " " . $max1['score'] . " " . $lang->items['LANG_ARCADEG_VON'] . " " . $max1['username'] . "
"; // changed for reversed if ($rev['rev_score']) $gewin = $lang->items['LANG_ARCADEG_TEXT62'] . " " . $div . " " . $lang->items['LANG_ARCADEG_TEXT64'] . " " . $max1['username'] . "
"; // changed for reversed } } $einsatz = $wette['einsatz'] * 2; if ($position <= $gewinn_pos) { $gewinn_dyn = betrag_dyn ($gameid); $db->query("UPDATE `bb" . $n . "_arcadegames` SET `championid`='" . $wbbuser . "', `gut_dyn`='" . $gewinn_dyn . "' WHERE `gameid`='" . $gameid . "'"); if ($gewin_dyn == 1) { $wonguthaben = $gewinn_dyn; } else { $guth = $db->query_first("SELECT * FROM `bb" . $n . "_arcadegames` WHERE `gameid`='" . $gameid . "'"); if ($guth['gut_fest'] == 0) { $wonguthaben = $gewinn; } else { $wonguthaben = $guth['gut_fest']; } } # Start: Guthaben-Hack $hot_game = explode (",", $hotgames); $hot = 0; for ($a = 0;$a < 100;$a++) { if ($gameid == $hot_game[$a]) { $hoot = $wonguthaben * $hot_gut; $hoot = $hoot - $wonguthaben; break; } if (empty ($hot_game[$a])) break; } if ($position != 1) { $einsatz = 0; if ($wette['einsatz'] > 0) { $gewi = "
" . $lang->items['LANG_ARCADEG_ARGHIGHSCORENICHT1'] . " " . $wette['einsatz'] . " " . $waehrung . " " . $lang->items['LANG_ARCADEG_ARGHIGHSCORENICHT2']; } } // neue Anzeige bei Rekord oder Highscore if ($position == 1) { $mog = 0; $rekord_data = explode (",", $session_rekord_data[$gameid]); if ($scneu['score']) { $mog = $mog + 1; } if ($rekord_data[5]) { $mog = $mog + 2; } if ($mog == 0) { $rekord_money = $rekordmoney; $rekord_point = $pointforrekord; $rekordscor = $score; $gewin .= $lang->items['LANG_ARCADEG_TEXT67'] . " " . $lang->items['LANG_ARCADEG_ARGDEINSCOREE'] . " " . $rekordscor . "
"; } if ($mog == 1) { $rekord_money = $rekordmoney; $rekord_point = $pointforrekord; if ($rev['rev_score']) { $rekordscor = $scneu['score'] - $score; $gewin .= $lang->items['LANG_ARCADEG_TEXT41'] . " " . $scneu['username'] . " " . $lang->items['LANG_ARCADEG_TEXT28'] . " " . $rekordscor . " " . $lang->items['LANG_ARCADEG_PUNKTEN'] . " " . $lang->items['LANG_ARCADEG_TEXT65'] . "
"; } else { $rekordscor = $score - $scneu['score']; $gewin .= $lang->items['LANG_ARCADEG_TEXT41'] . " " . $scneu['username'] . " " . $lang->items['LANG_ARCADEG_TEXT28'] . " " . $rekordscor . " " . $lang->items['LANG_ARCADEG_PUNKTEN'] . " " . $lang->items['LANG_ARCADEG_TEXT66'] . "
"; } } if ($mog == 2) { if ($rev['rev_score']) { if ($score < $rekord_data[5]) { $rekord_money = $rekordmoney; $rekord_point = $pointforrekord; $rekordscor = $rekord_data[5] - $score; $gewin .= $lang->items['LANG_ARCADEG_TEXT41'] . " " . $rekord_data[4] . " " . $lang->items['LANG_ARCADEG_TEXT28'] . " " . $rekordscor . " " . $lang->items['LANG_ARCADEG_PUNKTEN'] . " " . $lang->items['LANG_ARCADEG_TEXT65'] . "
"; } else { $rekordscor = $score - $rekord_data[5]; $gewin .= $lang->items['LANG_ARCADEG_ARGPUNKTEHIGHSCOR1'] . " " . $score . " " . $lang->items['LANG_ARCADEG_ARGPUNKTEHIGHSCOR2'] . " " . $lang->items['LANG_ARCADEG_ARGHERZLICHGLUECK4'] . " " . $rekordscor . " " . $lang->items['LANG_ARCADEG_PUNKTE'] . " " . $lang->items['LANG_ARCADEG_TEXT68'] . " " . $rekord_data[4] . "
"; } } else { if ($score > $rekord_data[5]) { $rekord_money = $rekordmoney; $rekord_point = $pointforrekord; $rekordscor = $score - $rekord_data[5]; $gewin .= $lang->items['LANG_ARCADEG_TEXT41'] . " " . $rekord_data[4] . " " . $lang->items['LANG_ARCADEG_TEXT28'] . " " . $rekordscor . " " . $lang->items['LANG_ARCADEG_PUNKTEN'] . " " . $lang->items['LANG_ARCADEG_TEXT66'] . "
"; } else { $rekordscor = $rekord_data[5] - $score; $gewin .= $lang->items['LANG_ARCADEG_ARGPUNKTEHIGHSCOR1'] . " " . $score . " " . $lang->items['LANG_ARCADEG_ARGPUNKTEHIGHSCOR2'] . " " . $lang->items['LANG_ARCADEG_ARGHERZLICHGLUECK4'] . " " . $rekordscor . " " . $lang->items['LANG_ARCADEG_PUNKTE'] . " " . $lang->items['LANG_ARCADEG_TEXT68'] . " " . $rekord_data[4] . "
"; } } } if ($mog == 3) { if ($rev['rev_score']) { if ($scneu['score'] < $rekord_data[5]) { $rekord_money = $rekordmoney; $rekord_point = $pointforrekord; $rekordscor = $scneu['score'] - $score; $gewin .= $lang->items['LANG_ARCADEG_TEXT41'] . " " . $scneu['username'] . " " . $lang->items['LANG_ARCADEG_TEXT28'] . " " . $rekordscor . " " . $lang->items['LANG_ARCADEG_PUNKTEN'] . " " . $lang->items['LANG_ARCADEG_TEXT65'] . "
"; } else { if ($score < $rekord_data[5]) { $rekord_money = $rekordmoney; $rekord_point = $pointforrekord; $rekordscor = $rekord_data[5] - $score; $gewin .= $lang->items['LANG_ARCADEG_TEXT41'] . " " . $rekord_data[4] . " " . $lang->items['LANG_ARCADEG_TEXT28'] . " " . $rekordscor . " " . $lang->items['LANG_ARCADEG_PUNKTEN'] . " " . $lang->items['LANG_ARCADEG_TEXT65'] . "
"; } else { $rekordscor = $score - $rekord_data[5]; $gewin .= $lang->items['LANG_ARCADEG_ARGPUNKTEHIGHSCOR1'] . " " . $score . " " . $lang->items['LANG_ARCADEG_ARGPUNKTEHIGHSCOR2'] . " " . $lang->items['LANG_ARCADEG_ARGHERZLICHGLUECK4'] . " " . $rekordscor . " " . $lang->items['LANG_ARCADEG_PUNKTE'] . " " . $lang->items['LANG_ARCADEG_TEXT68'] . " " . $rekord_data[4] . "
"; } } } else { if ($scneu['score'] > $rekord_data[5]) { $rekord_money = $rekordmoney; $rekord_point = $pointforrekord; $rekordscor = $score - $scneu['score']; $gewin .= $lang->items['LANG_ARCADEG_TEXT41'] . " " . $scneu['username'] . " " . $lang->items['LANG_ARCADEG_TEXT28'] . " " . $rekordscor . " " . $lang->items['LANG_ARCADEG_PUNKTEN'] . " " . $lang->items['LANG_ARCADEG_TEXT66'] . "
"; } else { if ($score > $rekord_data[5]) { $rekord_money = $rekordmoney; $rekord_point = $pointforrekord; $rekordscor = $score - $rekord_data[5]; $gewin .= $lang->items['LANG_ARCADEG_TEXT41'] . " " . $rekord_data[4] . " " . $lang->items['LANG_ARCADEG_TEXT28'] . " " . $rekordscor . " " . $lang->items['LANG_ARCADEG_PUNKTEN'] . " " . $lang->items['LANG_ARCADEG_TEXT66'] . "
"; } else { $rekordscor = $rekord_data[5] - $score; $gewin .= $lang->items['LANG_ARCADEG_ARGPUNKTEHIGHSCOR1'] . " " . $score . " " . $lang->items['LANG_ARCADEG_ARGPUNKTEHIGHSCOR2'] . " " . $lang->items['LANG_ARCADEG_ARGHERZLICHGLUECK4'] . " " . $rekordscor . " " . $lang->items['LANG_ARCADEG_PUNKTE'] . " " . $lang->items['LANG_ARCADEG_TEXT68'] . " " . $rekord_data[4] . "
"; } } } } } // neue Anzeige bei Rekord oder Highscore ENDE $userdat = $db->query_first("SELECT `guthaben` FROM `" . $dbtu . "` WHERE `userid`='" . $wbbuser . "'"); $wonguth = $wonguthaben + $hoot + $einsatz + $rekord_money; $wonguthaben = $wonguth / $position; $wonguthaben = round ($wonguthaben); $sum = $userdat['guthaben'] + $wonguthaben; $gewin .= $lang->items['LANG_ARCADEG_ARGHERZLICHGLUECK1'] . " " . $wonguthaben . " " . $waehrung . " " . $lang->items['LANG_ARCADEG_ARGHERZLICHGLUECK2'] . "
" . $lang->items['LANG_ARCADEG_ARGHERZLICHGLUECK3'] . " " . $sum . " " . $waehrung; if ($gut_janein == 0)$gut_janein = 2; if ($gut_janein == 1) { if ($useroptions['can_play'] != 2) { $gewin = $lang->items['LANG_ARCADEG_ARGWARNIX1'] . " " . $wonguthaben . " " . $waehrung . " " . $lang->items['LANG_ARCADEG_ARGWARNIX2']; $db->query("INSERT INTO `" . $dbt . "` (`kid`,`userid`,`datum`,`uhrzeit`,`info`,`betrag`,`art`) VALUES ('','" . $wbbuser . "','" . date ("d.m.y") . "','" . date ("H:i") . "','" . $lang->items['LANG_ARCADEG_ARGWEGENCHEATEN'] . " " . $gametitle . "','" . $wonguthaben . "','minus')"); $db->query("UPDATE `" . $dbtu . "` SET `guthaben`=`guthaben`-'" . $wonguthaben . "' WHERE `userid`='" . $wbbuser . "'"); } else { $db->query("UPDATE `" . $dbtu . "` set `guthaben`=`guthaben`+'" . $wonguthaben . "' WHERE `userid`='" . $wbbuser . "'"); $db->query("INSERT INTO `" . $dbt . "` (`kid`,`userid`,`datum`,`uhrzeit`,`info`,`betrag`,`art`) VALUES ('','" . $wbbuser . "','" . date ("d.m.y") . "','" . date ("H:i") . "','" . $lang->items['LANG_ARCADEG_ARGPLATZIM1'] . " " . $position . " " . $lang->items['LANG_ARCADEG_ARGPLATZIM2'] . " " . $gametitle . "','" . $wonguthaben . "','plus')"); $db->query("UPDATE `bb" . $n . "_ag_user` SET `einsatz`='0', `can_play`='0' WHERE `userid`='" . $wbbuser . "'"); } } elseif ($gut_janein = 2) { if ($useroptions['can_play'] != 2) { $gewin = $lang->items['LANG_ARCADEG_ARGWARNIX1'] . " " . $wonguthaben . " " . $waehrung . " " . $lang->items['LANG_ARCADEG_ARGWARNIX2']; $db->query("INSERT INTO `" . $dbt . "` (`kid`,`userid`,`datum`,`info`,`betrag`,`art`) VALUES ('','" . $wbbuser . "','" . time () . "','" . $lang->items['LANG_ARCADEG_ARGWEGENCHEATEN'] . " " . $gametitle . "','" . $wonguthaben . "','minus')"); $db->query("UPDATE `" . $dbtu . "` SET `guthaben`=`guthaben`-'" . $wonguthaben . "' WHERE `userid`='" . $wbbuser . "'"); } else { $db->query("UPDATE `" . $dbtu . "` set `guthaben`=`guthaben`+'" . $wonguthaben . "' WHERE `userid`='" . $wbbuser . "'"); $db->query("INSERT INTO `" . $dbt . "` (`kid`,`userid`,`datum`,`info`,`betrag`,`art`) VALUES ('','" . $wbbuser . "','" . time () . "','" . $lang->items['LANG_ARCADEG_ARGPLATZIM1'] . " " . $position . " " . $lang->items['LANG_ARCADEG_ARGPLATZIM2'] . " " . $gametitle . "','" . $wonguthaben . "','plus')"); $db->query("UPDATE `bb" . $n . "_ag_user` SET `einsatz`='0', `can_play`='0' WHERE `userid`='" . $wbbuser . "'"); } } $wonpoints = $gewinn_points / $position; $wonpoints = $wonpoints + $rekord_point; $wonpoints = round ($wonpoints); $gametit = $gametitle; if (strlen ($gametit) > 11) $gametit = substr ($gametit, 0, 11) . "."; $point_massage = $lang->items['LANG_ARCADEG_ARGPLATZIM1'] . " " . $position . " " . $gametit . " " . $wonpoints . " " . $lang->items['LANG_ARCADEG_SCOREBOARDPUNKTE']; $user_id = $wbbuser; if ($wonpoints) check_rang ($user_id, $wonpoints, $point_massage); $acp = 0; score_write ($acp); if ($position == 1) { $fsk = $db->query_first("SELECT * FROM `bb" . $n . "_arcadegames` WHERE `gameid`='" . $gameid . "'"); if ($fsk['ov18']) { $link = $gametitle; } else { $link = "" . $gametitle . ""; } $db->query("INSERT INTO `bb" . $n . "_ag_news` (`newstext`,`newstype`,`newstime`) VALUES ('" . $username . " " . $lang->items['LANG_ARCADEG_NEWS'] . " " . $link . " " . $lang->items['LANG_ARCADEG_NEWSCHAMP'] . "','newchamp','" . time () . "')"); $db->query("UPDATE `bb" . $n . "_ag_session_aktiv` SET `userid`='" . $wbbuser . "', `user`='" . addslashes ($username) . "', `score`='" . $score . "' WHERE `gameid`='" . $gameid . "'"); $session_count = $db->query_first("SELECT count(userid) as win FROM `bb" . $n . "_ag_session_aktiv` WHERE `userid`='" . $wbbuser . "'"); $db->query("UPDATE `bb" . $n . "_ag_session_aktiv` SET `count`='" . $session_count['win'] . "' WHERE `userid`='" . $wbbuser . "'"); /* ##############Highscore Thread erstellen ACP gesteuert############## */ $gtime=time(); require ('./arcade_gold/ag_var/ag_config_beitrag.php'); if($rekordneu == 1){ $glink="[URL=$url2board/arcade_gold.php?action=playgame&game=$gametitle&gameid=$gameid#sa]Zum Game[/URL] \n \n"; /* Prüfen ob in einen bereits bestehenden Thread angehangen werden soll oder nicht */ if ($rekordneuerthread == 0){ /* wir hängen an einen bereits bestehenden Thread an */ $db->unbuffered_query("INSERT INTO bb".$n."_posts SET threadid='$rekordthreadid',posttopic='Neuer HighScore von ".addslashes($username)." bei $gametitle',message='Neuer Highscore im Spiel $gametitle von ". addslashes($username) .". \n \n Kommentar von ".addslashes($username)." : \n $comment \n\nPunkte : $score \n\n Link zum Game : $glink \nMfg.\n$rekordusername',userid='$rekorduserid',username='$rekordusername',posttime='$gtime',visible='1'"); $db->unbuffered_query("UPDATE bb".$n."_boards SET threadcount=threadcount+1,postcount=postcount+1,threadcount=threadcount+1,lastposttime='$gtime',lastposterid='$rekorduserid',lastposter='$rekordusername',lastthreadid='$rekordthreadid' WHERE boardid='$rekordboardid'"); $db->unbuffered_query("update bb".$n."_threads SET boardid='$rekordboardid', prefix='', topic='Neuer Highscore von $username bei $gametitle', iconid='$rekordiconid', starterid='$rekorduserid', starter='$rekordusername', lastposttime='$gtime', lastposterid='$rekorduserid', lastposter='$rekordusername', replycount=replycount+1, views=views+1, closed='0', voted='0',votepoints='0', attachments='0', pollid='0', important='0', visible='1' where threadid='$rekordthreadid'"); $db->unbuffered_query("UPDATE bb".$n."_users SET userposts=userposts+1 WHERE userid = '$rekorduserid'"); } else { /* Wir erstellen einen neuen für jeden Highscore */ /*thread erstellen */ $db->unbuffered_query("INSERT INTO bb".$n."_threads SET boardid='$rekordboardid',topic='Neuer HighScore bei $gametitle', iconid='$rekordiconid', starterid='$rekorduserid', important='0', starter='$rekordusername', starttime='$gtime', lastposttime='$gtime', lastposterid='$rekorduserid', lastposter='$rekordusername', visible='1'"); list($wthread)=$db->query_first("SELECT threadid FROM bb".$n."_threads ORDER BY threadid DESC LIMIT 1"); $db->unbuffered_query("INSERT INTO bb".$n."_posts SET threadid='$wthread',posttopic='Neuer HighScore von $username bei $gametitle', message='Neuer Highscore im Spiel $gametitle von ". addslashes($username).". \n \n Kommentar von ".addslashes($username)." : \n $comment \n\nPunkte : $score \n\n Link zum Game : $glink \nMfg.\n$rekordusername',userid='$rekorduserid',username='$rekordusername',posttime='$gtime',visible='1'"); $db->unbuffered_query("UPDATE bb".$n."_boards SET threadcount=threadcount+1,postcount=postcount+1,lastposttime='$gtime',lastposterid='$rekorduserid',lastposter='$rekordusername',lastthreadid='$wthread' WHERE boardid='$rekordboardid'"); $db->unbuffered_query("UPDATE bb".$n."_users SET userposts=userposts+1 WHERE userid = '$rekorduserid'"); } } /* ##############Highscore Thread erstellen ACP gesteuert############## */ if ($highscore_userid) { $session_count = $db->query_first("SELECT count(userid) as win FROM `bb" . $n . "_ag_session_aktiv` WHERE `userid`='" . $highscore_userid . "'"); $db->query("UPDATE `bb" . $n . "_ag_session_aktiv` SET `count`='" . $session_count['win'] . "' WHERE `userid`='" . $highscore_userid . "'"); } if ($wbbuser != $highscore_userid) { $useropt = $db->query_first("SELECT * FROM `bb" . $n . "_ag_user` WHERE `userid`='" . $highscore_userid . "'"); if ($useropt['mail_highscore'] == 1) { $mailer = $db->query_first("SELECT * FROM `bb" . $n . "_users` WHERE `userid`='" . $highscore_userid . "'"); $mail_text = "{$lang->items['LANG_ARCADEG_MAIL1']} $mailer[username], \n \n $username {$lang->items['LANG_ARCADEG_MAIL2']} $gametitle {$lang->items['LANG_ARCADEG_MAIL3']} \n\n {$lang->items['LANG_ARCADEG_MAIL31']} $highscore_score - {$lang->items['LANG_ARCADEG_MAIL32']} $score \n\n {$lang->items['LANG_ARCADEG_MAIL4']} $username: $comment \n \n {$lang->items['LANG_ARCADEG_MAIL5']} $url2board" . "/arcade_gold.php?action=playgame&gameid=$gameid \n \n {$lang->items['LANG_ARCADEG_MAIL6']} \n \n {$lang->items['LANG_ARCADEG_MAIL7']} $master_board_name {$lang->items['LANG_ARCADEG_MAIL8']}"; $mail_subject = "{$lang->items['LANG_ARCADEG_MAILUEBER']} $gametitle"; mailer ($mailer['email'], $mail_subject, $mail_text); } if ($useropt['pn_highscore'] == 1) { $pntext = "{$lang->items['LANG_ARCADEG_MAIL1']} $useropt[username], \n \n $username {$lang->items['LANG_ARCADEG_MAIL2']} [B]$gametitle [/B]{$lang->items['LANG_ARCADEG_MAIL3']} \n\n {$lang->items['LANG_ARCADEG_MAIL31']} [B]$highscore_score [/B] - {$lang->items['LANG_ARCADEG_MAIL32']} [B]$score [/B]\n\n {$lang->items['LANG_ARCADEG_MAIL4']} $username: $comment \n \n {$lang->items['LANG_ARCADEG_MAIL5']} [URL=$url2board" . "/arcade_gold.php?action=playgame&gameid=$gameid]Go[/URL] \n \n"; //$db->query("INSERT INTO `bb" . $n . "_privatemessage` (senderid,recipientid,subject,message,sendtime) VALUES ('$wbbuser','$useropt[userid]','{$lang->items['LANG_ARCADEG_TEXT45']} $gametitle','$pntext','$jetztzeit')"); $subject = "{$lang->items['LANG_ARCADEG_TEXT45']} $gametitle"; send_pn ($wbbuser, $useropt['userid'], $subject, $pntext); } } } } $db->query("UPDATE `bb" . $n . "_arcade` SET `comment`='" . $comment . "' WHERE `scoreid`='" . $newscoreid . "' AND `userid`='" . $wbbuser . "'"); } } $favor = $db->query_first("SELECT * FROM `bb" . $n . "_ag_user` WHERE `userid`='" . $wbbuser . "'"); $favor_game = explode ("," ,$favor['favoriten']); for ($i = 0; $i < 500; $i++) { if ($gameid == $favor_game[$i]) { $favorit = 1; break; } if (empty ($favor_game[$i])) break; } if ($favorit == 1) { $favori = "" . $gametitle . " " . $lang->items['LANG_ARCADEG_ARGAUSFAVORITENENT'] . "
"; } else { $favori = "" . $gametitle . " " . $lang->items['LANG_ARCADEG_ARGZUFAVORITENHINZ'] . "
"; } $bewert_game = explode (",", $favor['bewert']); for ($i = 0; $i < 2000; $i++) { if ($gameid == $bewert_game[$i]) { $bewertno = 1; break; } if (empty ($bewert_game[$i])) break; } if (!$bewertno) eval ("\$bewertbit =(\"" . $tpl->get ("ag_bewertung") . "\");"); eval ("\$allgames =(\"" . $tpl->get ("ag_weiter") . "\");"); } //------------ Favoriten ------------------- if ($action == 'favorit') { if ($hinzu == 'hinzu' OR $entfern = 'entfern') { favorit_game ($hinzu, $entfern, $gameid); $useroptions = $db->query_first("SELECT * FROM `bb" . $n . "_ag_user` WHERE `userid`='" . $wbbuser . "'"); } //------------ Bewerten ------------------- if ($_POST['bewerten'] == 'bewerten') { if (isset ($_POST['send'])) { $db->query("UPDATE `bb" . $n . "_arcadegames` SET `bewertcount`=`bewertcount`+'1', `bewertung`=`bewertung`+'" . intval($_POST['bewert']) . "' WHERE `gameid`='" . intval($_POST['gameid']) . "'"); game_write2 (); } } $gg = $db->query_first("SELECT * FROM `bb" . $n . "_arcadegames` WHERE `gameid`='" . intval($_POST['gameid']) . "'"); $gametitle = $gg['title']; if (empty ($useroptions['bewert'])) { $useroptions['bewert'] .= "$gameid,"; } else { $useroptions['bewert'] .= ",$gameid,"; } $stc = strlen ($useroptions['bewert']); $stc = $stc - 1; $useroptions['bewert'] = substr ($useroptions['bewert'], 0, $stc); $db->query("UPDATE `bb" . $n . "_ag_user` SET `bewert`='" . $useroptions['bewert'] . "' WHERE `userid`='" . $wbbuser . "'"); $bewertno = 1; $favor_game = explode (",", $useroptions['favoriten']); for ($i = 0;$i < 100; $i++) { if ($gameid == $favor_game[$i]) { $favorit = 1; } } if ($favorit == 1) { $favori = "" . $gametitle . " " . $lang->items['LANG_ARCADEG_ARGAUSFAVORITENENT'] . "
"; } else { $favori = "" . $gametitle . " " . $lang->items['LANG_ARCADEG_ARGZUFAVORITENHINZ'] . ""; } if (!$bewertno) eval ("\$bewertbit =(\"" . $tpl->get ("ag_bewertung") . "\");"); eval ("\$allgames =(\"" . $tpl->get ("ag_weiter") . "\");"); } if ($action == 'play') { $db->query("UPDATE `bb" . $n . "_ag_config` SET `gameurl`='?'"); } if ($action == 'playgame') { great_check (); if ($wbbuser == 0) { $massag = $game . " " . $lang->items['LANG_ARCADEG_NICHTV']; if (!$heade) unset ($header); eval ("\$allgames =(\"" . $tpl->get ("ag_no") . "\");"); eval ("\$tpl->output (\"" . $tpl->get ("arcade_gold") . "\");"); exit (); } else { if ($useroptions['gameid'] != $gameid) $db->query("UPDATE `bb" . $n . "_ag_user` SET `fastplay`='0',`fastcount`='0' WHERE `userid`='" . $wbbuser . "'"); $db->query("UPDATE `bb" . $n . "_ag_user` SET `challeng`='" . $id . "' WHERE `userid`='" . $wbbuser . "'"); $hot_game = explode (",", $hotgames); $hot = $hot_bezahlen = 0; for ($a = 0; $a < 100; $a++) { if ($gameid == $hot_game[$a]) { if ($hot_bezahl > 0) $hot_bezahlen = 1; $hotmassage = "" . $lang->items['LANG_ARCADEG_HOTGAM'] . "
" . $lang->items['LANG_ARCADEG_ARGGEWINN'] . " " . $hot_gut . " " . $lang->items['LANG_ARCADEG_FACH'] . "
"; $cp5 = $lang->items['LANG_ARCADEG_HOTGAM'] . "
" . $lang->items['LANG_ARCADEG_ARGGEWINN'] . " " . $hot_gut . " " . $lang->items['LANG_ARCADEG_FACH']; break; $hotm = 1; } if (empty ($hot_game[$a])) { $hotmassage = "" . $lang->items['LANG_ARCADEG_KEIN'] . "
" . $lang->items['LANG_ARCADEG_HOTGAM'] . "
"; $cp5 = $lang->items['LANG_ARCADEG_ARGACHTUNGKEINHOTGAME']; $hotm = 0; break; } } $guth = $db->query_first("SELECT * FROM `bb" . $n . "_arcadegames` WHERE `gameid`='" . $gameid . "'"); // changed for reversed $revsort = "DESC"; if ($guth['rev_score']) $revsort = "ASC"; // changed for reversed if ($bezahl_janein > 0) { if ($bezahl_dyn == 1) { $bezahlen = bezahl_dyn ($gameid); $db->query("UPDATE `bb" . $n . "_arcadegames` SET `bezahl_dyn`='" . $bezahlen . "' WHERE `gameid`='" . $gameid . "'"); } else { if ($guth['bezahl_fest'] == 0) { $bezahlen = $bezahl; } else { $bezahlen = $guth['bezahl_fest']; } } if ($hot_bezahlen == 1) $bezahlen = $hot_bezahl; } if ($gut_janein == 0) { $guthab = $useroptions['guthaben']; } else { $guthab = $wbbuserdata['guthaben']; } if ($guthab < $bezahlen) { $massag = $lang->items['LANG_ARCADEG_ARGKEINGELDSPIEL']; if (!$heade) unset($header); eval ("\$allgames =(\"" . $tpl->get ("ag_no") . "\");"); eval ("\$tpl->output (\"" . $tpl->get ("arcade_gold") . "\");"); exit (); } if ($guth['active'] OR !$guth['gameid']) { $massag = $game . " " . $lang->items['LANG_ARCADEG_NICHTV']; if (!$heade) unset ($header); eval ("\$allgames =(\"" . $tpl->get ("ag_no") . "\");"); eval ("\$tpl->output (\"" . $tpl->get ("arcade_gold") . "\");"); exit (); } if ($useroptions['einsatz']) $db->query("UPDATE `bb" . $n . "_ag_user` SET `einsatz`='0' WHERE `userid`='" . $wbbuser . "'"); // changed for reversed $highscore = $db->query_first("SELECT * FROM `bb" . $n . "_arcade` WHERE `gameid`='" . $gameid . "' ORDER BY `score` " . $revsort . " LIMIT 1"); // changed for reversed $gamedat = $db-> query_first("SELECT * FROM `bb" . $n . "_arcadegames` WHERE `gameid`='" . $gameid . "'"); $mtitle = strtolower ($gamedat['title']); if (!check_group ($gamedat['u_group'])) { $u_group = explode (",", $ugroup[$gamedat['u_group']]); $massag = "" . $mtitle . " " . $lang->items['LANG_ARCADEG_ABRANG'] . " " . $u_group[1] . " " . $lang->items['LANG_ARCADEG_GESPIELTWERDEN']; if (!$heade) unset ($header); eval ("\$allgames =(\"" . $tpl->get ("ag_no") . "\");"); eval ("\$tpl->output (\"" . $tpl->get("arcade_gold") . "\");"); exit (); } if (substr_count ($mtitle, "yeti")) $backgroundsound = ""; if ($go == 1) $useroptions['highscore_set'] = 0; if ($useroptions['highscore_set'] == 1) { $go = 0; $wettscore = check_wettscore ($gameid); if ($wetten_janein == 0) $wettscore = 0; if ($highscore['userid'] == $wbbuser AND !$wett_self) $wettscore = 0; if ($id) $wettscore = 20; if ($fastp) $wettscore = 0; if ($wettscore > 10) { if ($highscore['score'] >= $wettscore OR $id > 0) { // changed for reversed $myscore = $db->query_first("SELECT * FROM `bb" . $n . "_arcade` WHERE `gameid`='" . $gameid . "' AND `userid`='" . $wbbuser . "' ORDER BY `score` " . $revsort . " LIMIT 1"); // changed for reversed if ($id) $cp5 = $lang->items['LANG_ARCADEG_CHALLENGES']; if ($gut_janein == 0) { $guthab = $useroptions['guthaben']; } else { $guthab = $wbbuserdata['guthaben']; } $wetteinsatz = explode (",", $wetteinsatz); for ($a = 0; $a < 30; $a++) { if (empty ($wetteinsatz[$a])) break; if ($guthab >= $wetteinsatz[$a]) $wett_bit .= ""; } if (!$myscore['score']) $myscore['score'] = 0; $cp1 = $lang->items['LANG_ARCADEG_HIGHSCOR'] . " " . $highscore['score']; $cp2 = $lang->items['LANG_ARCADEG_ARGDURCHSCHNIT'] . " " . $wettscore; $cp3 = $lang->items['LANG_ARCADEG_ARGDEINSCOREE'] . " " . $myscore['score']; $cp4 = $lang->items['LANG_ARCADEG_ARGGUTHABEN'] . " " . $guthab; $cp6 = $lang->items['LANG_ARCADEG_ARGKOSTENSPIEL'] . " " . $bezahlen ; if ($id) { $dum = $db->query_first("SELECT * FROM `bb" . $n . "_ag_challenges` WHERE `id`='" . $id . "'"); $dumm = $db->query_first("SELECT sum(einsatz) AS topf FROM `bb" . $n . "_ag_challenges` WHERE `challeng_id`='" . $dum['challeng_id'] . "'"); $wincount = $db->query_first("SELECT COUNT(gameid) as menge FROM `bb" . $n . "_ag_challenges` WHERE `challeng_id`='" . $dum['challeng_id'] . "'"); $wonguthaben = $gewinn_chall * $wincount['menge']; $text = "" . $gamedat['title'] . " " . $lang->items['LANG_ARCADEG_CHALLENGES'] . "" . $lang->items['LANG_ARCADEG_WETTCHALL'] . " " . $wonguthaben . " " . $waehrung . $lang->items['LANG_ARCADEG_WETTCHALL1'] . " " . $dumm['topf'] . " " . $waehrung . ""; $heades = "" . $gamedat['title'] . " " . $lang->items['LANG_ARCADEG_CHALLENGES'] . ""; } else { $heades = "" . $gamedat['title'] . " " . $lang->items['LANG_ARCADEG_WETTENHIGSCORESETZEN'] . ""; $text = "" . $lang->items['LANG_ARCADEG_WETTENTEXT'] . ""; } $weiter = "" . $lang->items['LANG_ARCADEG_ARGDIREKTZUMSPIEL'] . ""; if (!$heade) unset ($header); eval ("\$allgames =(\"" . $tpl->get ("ag_wetten") . "\");"); } else { $go = 1; } } else { $go = 1; } } else { $go = 1; } if ($_POST['send'] AND $_POST['einsatz']) { if ($id) { $db->query("UPDATE `bb" . $n . "_ag_challenges` SET `einsatz`='" . $einsatz . "' WHERE `id`='" . $id . "'"); $einsatztext = $lang->items['LANG_ARCADEG_CHALLTOPF']; } else { $db->query("UPDATE `bb" . $n . "_ag_user` SET `einsatz`='" . $einsatz . "' WHERE `userid`='" . $wbbuser . "'"); $einsatztext = $lang->items['LANG_ARCADEG_GBEWTTENINSATZ1']; } if ($gut_janein == 0) $gut_janein = 2; if ($gut_janein == 1) { $db->query("UPDATE `" . $dbtu . "` set `guthaben`=`guthaben`-'" . $einsatz . "' where `userid`='" . $wbbuser . "'"); $db->query("INSERT INTO `" . $dbt . "` (`kid`,`userid`,`datum`,`uhrzeit`,`info`,`betrag`,`art`) VALUES ('','" . $wbbuser . "','" . date ("d.m.y") . "','" . date ("H:i") . "','" . $gamedat['title'] . $einsatztext . "','" . $einsatz . "','minus')"); } elseif ($gut_janein == 2) { $db->query("UPDATE `" . $dbtu . "` set `guthaben`=`guthaben`-'" . $einsatz . "' where `userid`='" . $wbbuser . "'"); $db->query("INSERT INTO `" . $dbt . "` (`kid`,`userid`,`datum`,`info`,`betrag`,`art`) VALUES ('','" . $wbbuser . "','" . time () . "','" . $gamedat['title'] . $einsatztext . "','" . $einsatz . "','minus')"); } $go = 1; } if ($go == 1) { if ($bezahl_janein > 0) { if ($gut_janein == 0) $gut_janein = 2; if ($gut_janein == 1) { $db->query("UPDATE `" . $dbtu . "` set `guthaben`=`guthaben`-'" . $bezahlen . "' where `userid`='" . $wbbuser . "'"); $db->query("INSERT INTO `" . $dbt . "` (`kid`,`userid`,`datum`,`uhrzeit`,`info`,`betrag`,`art`) VALUES ('','" . $wbbuser . "','" . date ("d.m.y") . "','" . date ("H:i") . "','" . $lang->items['LANG_ARCADEG_ARGARCADEGAME1'] . " " . $gamedat['title'] . " " . $lang->items['LANG_ARCADEG_ARGARCADEGAME2'] . "','" . $bezahlen . "','minus')"); } elseif ($gut_janein == 2) { $db->query("UPDATE `" . $dbtu . "` set `guthaben`=`guthaben`-'" . $bezahlen . "' WHERE `userid`='" . $wbbuser . "'"); $db->query("INSERT INTO `" . $dbt . "` (`kid`,`userid`,`datum`,`info`,`betrag`,`art`) VALUES ('','" . $wbbuser . "','" . time () . "','" . $lang->items['LANG_ARCADEG_ARGARCADEGAME1'] . " " . $gamedat['title'] . " " . $lang->items['LANG_ARCADEG_ARGARCADEGAME2'] . "','" . $bezahlen . "','minus')"); } } if ($boardurl == '') { $boardurl = $url2board; } else { $boardurl = $url2board; } $location = "location=" . $boardurl . "&gameid=" . $gameid . "&userid=" . $wbbuserdata['userid'] . "&username=" . $wbbuserdata['username'] . "&sid=" . $session['hash'] . "&PHPSESSID=5"; if (empty ($useroptions['playbutton'])) { $playbutton = $gameid; } else { $playbot = explode (",", $useroptions['playbutton']); for ($a = 0; $a < 100; $a++) { if ($playbot[$a] == $gameid) { $playbutton = $useroptions['playbutton']; break; } if (empty($playbot[$a])) { $playbutton .= "$gameid,$useroptions[playbutton]"; break; } } } if (empty ($useroptions['playgames'])) { $playgames = $gameid; } else { $playgam = explode (",", $useroptions['playgames']); for ($a = 0; $a < $gamecount; $a++) { if ($playgam[$a] == $gameid) { $playgames = $useroptions['playgames']; break; } if (empty ($playgam[$a])) { $playgames .= "$gameid,$useroptions[playgames]"; break; } } } if ($id) { $blokcheck = $db->query_first("SELECT * FROM `bb" . $n . "_ag_challenges` WHERE `id`='" . $id . "'"); if ($blokcheck['xblok'] == 'run') { $db->query("UPDATE `bb" . $n . "_ag_challenges` SET `score`='0',`scoretype`='end',`play_time`='" . $jetztzeit . "' WHERE `id`='" . $id . "'"); if ($blokcheck['starter_id'] == $wbbuser) { header ("Location: ag_challenges.php?sid=" . $session['hash'] . "&action=challeng_status&challeng_id=" . $blokcheck[challeng_id], true); } else { header ("Location: ag_challenges.php?sid=" . $session['hash'] . "&action=heraus&id=" . $blokcheck[id], true); } } else { $db->query("UPDATE `bb" . $n . "_ag_challenges` SET `xblok`='run' WHERE `id`='" . $id . "'"); } } if ($cheat_on) { if ($useroptions['can_play'] AND $gameid != $useroptions['gameid']) { $gamenam = $db->query_first("SELECT * FROM `bb" . $n . "_arcadegames` WHERE `gameid`='" . $useroptions['gameid'] . "'"); $massag = $lang->items['LANG_ARCADEG_TEXT43'] . " " . $gamenam['title'] . " " . $lang->items['LANG_ARCADEG_TEXT44']; if (!$heade) unset($header); eval ("\$allgames =(\"" . $tpl->get ("ag_no") . "\");"); eval ("\$tpl->output (\"" . $tpl->get ("arcade_gold") . "\");"); exit (); } } $agtime = time (); $bburl = $url2board; $vpa_bburl = $url2board; $db->query("UPDATE `bb" . $n . "_ag_user` SET `can_play`='1',`gameid`='" . $gameid . "', `playgames`='" . $playgames . "', `playbutton`='" . $playbutton . "', `playtime`='" . $agtime . "' WHERE `userid`='" . $wbbuser . "'"); $game = $gameid; //---- proarcade anpassung ---- $gamename = $gameurl . $gamedat['filename']; $gameparams = $gamedat['objectparam']; $aguid = $wbbuserdata['userid']; $aguname = $wbbuserdata['username']; unset ($gameparams2); if ($gamedat['ibprovalue'] == 0) // this is "normal" or "MisterArcade" { $gameparams .= ""; } elseif ($gamedat['ibprovalue'] == 1) // this is "ibProArcade" with the TXT { $location = 'location=' . $boardurl . '/' . $gamedat['name'] . '.swf'; } elseif ($gamedat['ibprovalue'] == 2) // this is "ibProArcade" or "V3 Arcade" { $gameparams2 = ""; } $eparams = addslashes ($gamedat['embedparam']); $guthaben = 0; if ($gewin_dyn == 1) { $guthaben = $gamedat['gut_dyn']; } else { if ($gamedat['gut_fest'] == 0) { $guthaben = $gewinn; } else { $guthaben = $gamedat['gut_fest']; } } if (!$highscore['userid']) { $h_score = "" . $lang->items['LANG_ARCADEG_KEINCHAMP'] . ""; $points = "" . $lang->items['LANG_ARCADEG_HIGHSCOR'] . "
0
"; } else { $h_score = "" . $lang->items['LANG_ARCADEG_CHAMP'] . "
" . $highscore['username'] . "
"; $points = "" . $lang->items['LANG_ARCADEG_HIGHSCOR'] . "
" . $highscore['score'] . "
"; } // changed for reversed $myscore = $db-> query_first("SELECT * FROM `bb" . $n . "_arcade` WHERE `gameid`='" . $gameid . "' AND `userid`='" . $wbbuser . "' ORDER BY `score` " . $revsort . " LIMIT 1"); // changed for reversed $guth = $db->query_first("SELECT a.*, h.`helptext` FROM `bb" . $n . "_arcadegames` a LEFT JOIN `bb" . $n . "_ag_help` h ON h.`title`=a.`title` WHERE `gameid`='" . $gameid . "'"); if (!$myscore['score']) $myscore['score'] = "0"; if ($guth['helptext']) $helpp = "  [?]"; if ($guth['ov18']) $sv18img = "" . $lang->items["; $rekord_data = explode (",", $session_rekord_data[$gameid]); if ($rekord_data[5]) { $revneu = 0; $rev1 = $db->query_first("SELECT `rev_score` FROM `bb" . $n . "_arcadegames` WHERE `gameid`='" . $gameid . "'"); if ($rev1['rev_score']) $revneu = 1; if ($revneu) { $rekord = $lang->items['LANG_ARCADEG_TEXT33'] . ": " . $rekord_data[4] . " " . $lang->items['LANG_ARCADEG_TEXT28'] . " " . $rekord_data[5] . " " . $lang->items['LANG_ARCADEG_TEXT29'] . " " . $rekord_data[0] . " " . $lang->items['LANG_ARCADEG_TEXT30'] . " " . $rekord_data[6]; if ($highscore['score'] < $rekord_data[5] and $highscore['score'] > 0) { $rekord = $lang->items['LANG_ARCADEG_TEXT32'] . ": " . $highscore['username'] . " " . $lang->items['LANG_ARCADEG_TEXT28'] . " " . $highscore['score'] . " " . $lang->items['LANG_ARCADEG_TEXT22'] . ".  " . $lang->items['LANG_ARCADEG_TEXT31'] . ": " . $rekord_data[4] . " " . $lang->items['LANG_ARCADEG_TEXT28'] . " " . $rekord_data[5] . " " . $lang->items['LANG_ARCADEG_TEXT29'] . " " . $rekord_data[0] . " " . $lang->items['LANG_ARCADEG_TEXT30'] . " " . $rekord_data[6]; } } else if ($highscore['score'] > $rekord_data[5]) { $rekord = $lang->items['LANG_ARCADEG_TEXT32'] . ": " . $highscore['username'] . " " . $lang->items['LANG_ARCADEG_TEXT28'] . " " . $highscore['score'] . " " . $lang->items['LANG_ARCADEG_TEXT22'] . ".  " . $lang->items['LANG_ARCADEG_TEXT31'] . ": " . $rekord_data[4] . " " . $lang->items['LANG_ARCADEG_TEXT28'] . " " . $rekord_data[5] . " " . $lang->items['LANG_ARCADEG_TEXT29'] . " " . $rekord_data[0] . " " . $lang->items['LANG_ARCADEG_TEXT30'] . " " . $rekord_data[6]; } else { $rekord = $lang->items['LANG_ARCADEG_TEXT33'] . ": " . $rekord_data[4] . " " . $lang->items['LANG_ARCADEG_TEXT28'] . " " . $rekord_data[5] . " " . $lang->items['LANG_ARCADEG_TEXT29'] . " " . $rekord_data[0] . " " . $lang->items['LANG_ARCADEG_TEXT30'] . " " . $rekord_data[6]; } eval ("\$rekordbit =(\"" . $tpl->get ("ag_playgame_rekord") . "\");"); } else { unset ($rekordbit); } if ($id > '0') { $dum = $db->query_first("SELECT * FROM `bb" . $n . "_ag_challenges` WHERE `id`='" . $id . "'"); $dumm = $db->query("SELECT * FROM `bb" . $n . "_ag_challenges` WHERE `challeng_id`='" . $dum['challeng_id'] . "'"); unset ($gegner); while ($row = $db->fetch_array ($dumm)) { if ($username != $row['username']) $gegner .= "$row[username] - "; } eval ("\$play_head =(\"" . $tpl->get ("ag_playgame_challeng") . "\");"); } else { eval ("\$play_head =(\"" . $tpl->get ("ag_playgame_head") . "\");"); } eval ("\$allgames =(\"" . $tpl->get ("ag_playgame") . "\");"); } } } if ($action == 'gameover') { unset ($styles); $dum = $db->query_first("SELECT * FROM `bb" . $n . "_ag_user` WHERE `userid`='" . $wbbuser . "'"); if (empty ($gameid)) { $gamedat = $db->query_first("SELECT * FROM `bb" . $n . "_arcadegames` WHERE `name`='" . $game . "'"); $gameid = $gamedat['gameid']; } else { $gamedat = $db->query_first("SELECT * FROM `bb" . $n . "_arcadegames` WHERE `gameid`='" . $gameid . "'"); } $gametitle = $gamedat['title']; $scorvar = str_replace ("$", "", $gamedat['scorevar']); unset ($no_cheat); while (list ($key, $val) = each ($_POST)) { if ($val && $key) $no_cheat = "1"; } while (list ($key, $val) = each ($_REQUEST)) { if ($key == $scorvar) $thescore = $val; } if ($_GET['uzin']) { $gameid = $_GET['gameid']; // $scorevar = $_GET['uvar']; $thescore = $_GET['scorevar']; $no_cheat = 1; } if ($play == 'play') { $db->query("UPDATE `bb" . $n . "_ag_config` SET `value`='?' WHERE `var`='gameurl'"); $acp = 0; config_write ($acp); } if (!$no_cheat) { header("Location: arcade_gold.php?sid=" . $session['hash'] . "&action=cheater&gametitle=" . $gametitle, true); exit (); } if ($thescore > 0) { gameover ($thescore, $gameid, $gametitle, $aagtime); } else { $gratulier = $lang->items['LANG_ARCADEG_PRC2GRATULIERE1'] . " " . $username . ", " . $lang->items['LANG_ARCADEG_PRC2GRATULIERE2'] . " " . $score . " " . $lang->items['LANG_ARCADEG_PRC2GRATULIERE3'] . "

" . $gametitle . " " . $lang->items['LANG_ARCADEG_PRCNOCHSPIELEN'] . ""; $db->query("UPDATE `bb" . $n . "_ag_user` SET `can_play`='2' WHERE `userid`='" . $wbbuser . "'"); eval ("\$menue =(\"" . $tpl->get ("ag_menue") . "\");"); eval ("\$allgames =(\"" . $tpl->get ("ag_spielende") . "\");"); } } if ($wbbuser == 0) { unset ($hotgames); unset ($newgames); eval ("\$allgames =(\"" . $tpl->get ("ag_no") . "\");"); } if ($action == 'gamehelp') { $gamehelp = $db->query_first("SELECT * FROM `bb" . $n . "_ag_help` WHERE `title`='" . $helptitle . "'"); eval ("\$tpl->output (\"" . $tpl->get ("ag_help") . "\");"); exit (); } eval ("\$menue =(\"" . $tpl->get ("ag_menue") . "\");"); if ($gameurl == '?') $menue = $run; if (!$heade) unset ($header); eval ("\$footer1 =(\"" . $tpl->get ("ag_footer") . "\");"); eval ("\$tpl->output (\"" . $tpl->get ("arcade_gold") . "\");"); exit (); ?>