forked from ernestbuffington/platinum.86it.us
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
137 lines (137 loc) · 6.5 KB
/
Copy pathindex.php
File metadata and controls
137 lines (137 loc) · 6.5 KB
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
<?php
/************************************************************************/
/* Platinum Nuke Pro: 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.nukeplanet.com */
/* Loki / Teknerd - Scott Partee (loki@nukeplanet.com) */
/* */
/* Copyright (c) 2007 - 2017 by http://www.platinumnukepro.com */
/* */
/* Refer to platinumnukepro.com for detailed information on this CMS */
/*******************************************************************************/
/* This file is part of the PlatinumNukePro CMS - http://platinumnukepro.com */
/* */
/* This program is free software; you can redistribute it and/or */
/* modify it under the terms of the GNU General Public License */
/* as published by the Free Software Foundation; either version 2 */
/* of the License, or any later version. */
/* */
/* This program is distributed in the hope that it will be useful, */
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
/* GNU General Public License for more details. */
/* */
/* You should have received a copy of the GNU General Public License */
/* along with this program; if not, write to the Free Software */
/* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/*******************************************************************************/
if (@file_exists("install"))
{
header("Location: install/index.php");
}
@require_once("mainfile.php");
global $prefix, $db, $admin_file;
if (isset($op) AND ($op == 'ad_click') AND isset($bid)) {
$bid = intval($bid);
$sql = 'SELECT clickurl FROM '.$prefix.'_banner WHERE bid=\''.$bid.'\'';
$result = $db->sql_query($sql);
list($clickurl) = $db->sql_fetchrow($result);
$db->sql_query('UPDATE '.$prefix.'_banner SET clicks=clicks+1 WHERE bid=\''.$bid.'\'');
update_points(21);
Header('Location: '.htmlentities($clickurl));
die();
}
define('MODULE_FILE', true);
/*****************************************************/
/* Forum - Arcade v.3.0.2 START */
/*****************************************************/
//Arcade MOD - IBProSupport
$arcade = $_GET['act'] ?? '';
$newscore = $_GET['do'] ?? '';
if($arcade == 'Arcade' && $newscore='newscore')
{
$gamename = str_replace("\'","''",$_POST['gname']);
$gamename = preg_replace(array('#&(?!(\#[0-9]+;))#', '#<#', '#>#'), array('&', '<', '>'),$gamename);
$gamescore = intval($_POST['gscore']);
//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']);
$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;
}
/*****************************************************/
/* Forum - Arcade v.3.0.2 END */
/*****************************************************/
$modpath = '';
$_SERVER['PHP_SELF'] = 'modules.php';
$_SERVER['SCRIPT_NAME'] = 'modules.php';
$row = $db->sql_fetchrow($db->sql_query('SELECT main_module from '.$prefix.'_main'));
$name = $row['main_module'];
$home = 1;
define('HOME_FILE', true);
if (isset($url) AND is_admin($admin)) {
Header('Location: '.$url);
die();
}
if ($httpref == 1) {
$referer = '';
if (isset($_SERVER['HTTP_REFERER'])) {
$referer = $_SERVER['HTTP_REFERER'];
$referer = check_html($referer, 'nohtml');
}
if (!empty($referer) && !stripos_clone($referer, 'unknown') && !stripos_clone($referer, 'bookmark') && !stripos_clone($referer, $_SERVER['HTTP_HOST'])) {
$result = $db->sql_query('INSERT INTO '.$prefix.'_referer VALUES (NULL, \''.$referer.'\')');
}
$numrows = $db->sql_numrows($db->sql_query('SELECT * FROM '.$prefix.'_referer'));
if($numrows>=$httprefmax) {
$result2 = $db->sql_query('DELETE FROM '.$prefix.'_referer');
}
}
if (!isset($mop)) { $mop = 'modload'; }
if (!isset($mod_file)) { $mod_file = 'index'; }
$name = trim($name);
if (isset($file)) { $file = trim($file); }
$mod_file = trim($mod_file);
$mop = trim($mop);
if (stripos_clone($name, '..') || (isset($file) && stripos_clone($file, '..')) || stripos_clone($mod_file, '..') || stripos_clone($mop, '..')) {
die('You are so cool...');
} else {
$ThemeSel = get_theme();
if (file_exists('themes/'.$ThemeSel.'/module.php')) {
$default_module = '';
include_once('themes/'.$ThemeSel.'/module.php');
if (is_active($default_module) AND file_exists('modules/'.$default_module.'/'.$mod_file.'.php')) {
$name = $default_module;
}
}
if (file_exists('themes/'.$ThemeSel.'/modules/'.$name.'/'.$mod_file.'.php')) {
$modpath = 'themes/'.$ThemeSel.'/';
}
$modpath .= 'modules/'.$name.'/'.$mod_file.'.php';
if (file_exists($modpath)) {
include_once($modpath);
} else {
define('INDEX_FILE', true);
include_once('header.php');
OpenTable();
if (is_admin($admin)) {
echo '<center><strong>'._HOMEPROBLEM.'</strong><br /><br />[ <a href="'.$admin_file.'.php?op=modules">'._ADDAHOME.'</a> ]</center>';
} else {
echo '<center>'._HOMEPROBLEMUSER.'</center>';
}
CloseTable();
include_once('footer.php');
}
}
?>