-
Notifications
You must be signed in to change notification settings - Fork 0
/
newscore.php
58 lines (46 loc) · 2.31 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
<?php
/* =======================================================================
PHP-Nuke Titanium | Nuke-Evolution Xtreme : PHP-Nuke Web Portal System
======================================================================= */
/* * *************************************************************************
* newscore.php
* -------------------
* THIS FILE SHOULD BE AT THE SITE ROOT
* PHPNuke Ported Arcade - http://www.nukearcade.com
* Original Arcade Mod phpBB by giefca - http://www.gf-phpbb.com
*
* ************************************************************************* */
define('IN_PHPBB', true);
include(dirname(__FILE__) . '/mainfile.php');
if (isset($HTTP_POST_VARS['game_name'])) {
$gamename = str_replace("\'", "''", $HTTP_POST_VARS['game_name']);
$gamename = preg_replace(array('#&(?!(\#[0-9]+;))#', '#<#', '#>#'), array('&', '<', '>'), $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($HTTP_POST_VARS['arcade_hash'])) {
$gamehash = str_replace("\'", "''", $HTTP_POST_VARS['arcade_hash']);
$gamehash = preg_replace(array('#&(?!(\#[0-9]+;))#', '#<#', '#>#'), array('&', '<', '>'), $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($HTTP_POST_VARS['score'])) {
$gamescore = intval($HTTP_POST_VARS['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>";
echo "window.onload = function(){document.forms[\"ibpro_score\"].submit()}";
echo "</script>";
exit;