-
Notifications
You must be signed in to change notification settings - Fork 0
/
newscore.php
61 lines (52 loc) · 2.7 KB
/
newscore.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<?php
/************************************************************************/
/* PHP-Nuke Platinum: Expect to be impressed COPYRIGHT */
/* */
/* Copyright (c) 2004 - 2006 by http://www.techgfx.com */
/* Techgfx - Graeme Allan (goose@techgfx.com) */
/* */
/* Copyright (c) 2004 - 2006 by http://www.conrads-berlin.de */
/* MrFluffy - Axel Conrads (axel@conrads-berlin.de) */
/* */
/* Copyright (c) 2004 - 2006 by http://www.nukeplanet.com */
/* Loki / Teknerd - Scott Partee (loki@nukeplanet.com) */
/* */
/* Refer to Nukeplanet.com for detailed information on PHP-Nuke Platinum*/
/* */
/* TechGFX: Your dreams, our imagination */
/************************************************************************/
define('IN_PHPBB', true);
require_once("mainfile.php");
if (isset($_POST['game_name']) ){
$gamename = str_replace("\'","''",(string) $_POST['game_name']);
$gamename = preg_replace(['#&(?!(\#[0-9]+;))#', '#<#', '#>#'], ['&', '<', '>'],$gamename);
//Get Game ID
$row = $db->sql_fetchrow($db->sql_query("SELECT game_id from ".$prefix."_bbgames WHERE game_scorevar='$gamename'"));
$gid = intval($row['game_id']);
}
elseif (isset($_POST['arcade_hash']) ) {
$gamehash = str_replace("\'","''",(string) $_POST['arcade_hash']);
$gamehash= preg_replace(['#&(?!(\#[0-9]+;))#', '#<#', '#>#'], ['&', '<', '>'],$gamehash);
$result=$db->sql_query("SELECT game_id from ".$prefix."_bbgamehash WHERE gamehash_id='$gamehash' LIMIT 1");
if (!$result) {
die($prefix."_bbgamehash : pas de result: $gamehash");
}
$row=$db->sql_fetchrow($result);
$gid=$row["game_id"];
}else {
header($header_location . "modules.php?name=Forums&file=arcade");
exit;
}
if (isset($_POST['score'])){
$gamescore = intval($_POST['score']);
}
$ThemeSel = get_theme();
echo "<LINK REL=\"StyleSheet\" HREF=\"themes/$ThemeSel/style/style.css\" TYPE=\"text/css\">\n\n\n";
echo "<form method='post' name='ibpro_score' action='modules.php?name=Forums&file=proarcade&valid=X&gpaver=GFARV2'>";
echo "<input type=hidden name='vscore' value='$gamescore'>";
echo "<input type=hidden name='gid' value='$gid'>";
echo "</form>";
echo "<script type=\"text/javascript\">";
echo "window.onload = function(){document.forms[\"ibpro_score\"].submit()}";
echo "</script>";
exit;