Re: 2nd download module error Posted:
Thu Feb 14, 2008 5:17 pm |
|
|
|
|
|
| sueco wrote:
|
My index.php in admin folder only contains HallOfShame lines.
| Code:
|
<?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 */
/************************************************************************/
require_once("mainfile.php");
global $prefix, $db, $admin_file;
define('MODULE_FILE', true);
/*****************************************************/
/* Forum - Arcade v.3.0.2 START */
/*****************************************************/
//Arcade MOD - IBProSupport
$arcade = $HTTP_GET_VARS['act'];
$newscore = $HTTP_GET_VARS['do'];
if($arcade == 'Arcade' && $newscore='newscore')
{
$gamename = str_replace("\'","''",$HTTP_POST_VARS['gname']);
$gamename = preg_replace(array('#&(?!(\#[0-9]+;))#', '#<#', '#>#'), array('&', '<', '>'),$gamename);
$gamescore = intval($HTTP_POST_VARS['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) {
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")) {
include("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($modpath);
} else {
define('INDEX_FILE', true);
include("header.php");
OpenTable();
if (is_admin($admin)) {
echo "<center><font class=\"\"><b>"._HOMEPROBLEM."</b></font><br><br>[ <a href=\"".$admin_file.".php?op=modules\">"._ADDAHOME."</a> ]</center>";
} else {
echo "<center>"._HOMEPROBLEMUSER."</center>";
}
CloseTable();
include("footer.php");
}
}
?>
|
|
In the bottom of the file, this:
| Code:
|
switch ($op) {
case "downloads2":
downloads2();
break;
case "DownloadsDelNew2":
DownloadsDelNew2($lid);
break;
case "DownloadsAddCat2":
DownloadsAddCat2($title, $cdescription);
break;
case "DownloadsAddSubCat2":
DownloadsAddSubCat2($cid, $title, $cdescription);
break;
case "DownloadsAddDownload2":
DownloadsAddDownload2($new, $lid, $title, $url, $cat, $description, $name, $email, $submitter, $filesize, $version, $homepage, $hits);
break;
case "DownloadsAddEditorial2":
DownloadsAddEditorial2($downloadid, $editorialtitle, $editorialtext);
break;
case "DownloadsModEditorial2":
DownloadsModEditorial2($downloadid, $editorialtitle, $editorialtext);
break;
case "DownloadsDownloadCheck2":
DownloadsDownloadCheck2();
break;
case "DownloadsValidate2":
DownloadsValidate2($cid, $sid, $ttitle);
break;
case "DownloadsDelEditorial2":
DownloadsDelEditorial2($downloadid);
break;
case "DownloadsCleanVotes2":
DownloadsCleanVotes2();
break;
case "DownloadsListBrokenDownloads2":
DownloadsListBrokenDownloads2();
break;
case "DownloadsDelBrokenDownloads2":
DownloadsDelBrokenDownloads2($lid);
break;
case "DownloadsIgnoreBrokenDownloads2":
DownloadsIgnoreBrokenDownloads2($lid);
break;
case "DownloadsListModRequests2":
DownloadsListModRequests2();
break;
case "DownloadsChangeModRequests2":
DownloadsChangeModRequests2($requestid);
break;
case "DownloadsChangeIgnoreRequests2":
DownloadsChangeIgnoreRequests2($requestid);
break;
case "DownloadsDelCat2":
DownloadsDelCat2($cid, $sid, $sub, $ok);
break;
case "DownloadsModCat2":
DownloadsModCat2($cat);
break;
case "DownloadsModCatS2":
DownloadsModCatS2($cid, $sid, $sub, $title, $cdescription);
break;
case "DownloadsModDownload2":
DownloadsModDownload2($lid);
break;
case "DownloadsModDownloadS2":
DownloadsModDownloadS2($lid, $title, $url, $description, $name, $email, $hits, $cat, $filesize, $version, $homepage);
break;
case "DownloadsDelDownload2":
DownloadsDelDownload2($lid);
break;
case "DownloadsDelVote2":
DownloadsDelVote2($lid, $rid);
break;
case "DownloadsDelComment2":
DownloadsDelComment2($lid, $rid);
break;
case "DownloadsTransfer2":
DownloadsTransfer2($cidfrom,$cidto);
break;
}
} else {
echo "Access Denied";
}
?>
|
|
|
|
|