'base class -- dont do this' This is what I get when accessing the page. Can anyone lend me a hand as where did I go wrong.
THE CODE I SUSPECT IS THE CULPRIT
// =============================================================================
// start
$torrent = getRequestVar('torrent');
//*************************** code modified here - quota ***************
// checking quota
if (!$superseeder && $cfg['quota'] && !checkQuota($torrent))
{
?>
<html>
<head>
<title><?php echo $cfg["pagetitle"] ?></title>
<link rel="icon" href="images/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon" />
<LINK REL="StyleSheet" HREF="themes/<?php echo $cfg["theme"] ?>/style.css" TYPE="text/css">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache; charset=<?php echo _CHARSET ?>">
<div id="overDiv" style="position:absolute;visibility:hidden;z-index:1000;"></div>
</head>
<body topmargin="8" bgcolor="<?php echo $cfg["main_bgcolor"] ?>">
<div align="center">
<?php
if ($messages != "")
{
?>
<table border="1" cellpadding="10" bgcolor="#ff9b9b">
<tr>
<td><div align="center"><?php echo $messages ?></div></td>
</tr>
</table><br><br>
<input type="button" value="Close" onClick="window.close()">
</div>
</body>
</html>
<?php
exit();
}
} else
//**********************************************************************
if(! empty($torrent)) {
$interactiveStart = getRequestVar('interactive');
if ((isset($interactiveStart)) && ($interactiveStart)) /* interactive */
indexStartTorrent($torrent,1);
else /* silent */
indexStartTorrent($torrent,0);
}
// =============================================================================
THE FULL CODE
<?php
include_once("config.php");
include_once("functions.php");
//*************************** code modified here - quota **************
include_once("quota.php");
//*********************************************************************
// global fields
$messages = "";
// =============================================================================
// set refresh option into the session cookie
if(array_key_exists("pagerefresh", $_GET)) {
if($_GET["pagerefresh"] == "false") {
$_SESSION['prefresh'] = false;
header("location: index.php");
exit();
}
if($_GET["pagerefresh"] == "true") {
$_SESSION["prefresh"] = true;
header("location: index.php");
exit();
}
}
// =============================================================================
// queue-check
$queueActive = false;
if ($cfg["AllowQueing"]) {
include_once("QueueManager.php");
$queueManager = QueueManager::getQueueManagerInstance($cfg);
if (! $queueManager->isQueueManagerRunning()) {
if (($queueManager->prepareQueueManager()) && ($queueManager->startQueueManager())) {
$queueActive = true;
} else {
AuditAction($cfg["constants"]["error"], "Error starting Queue Manager");
if (IsAdmin())
header("location: admin.php?op=queueSettings");
else
header("location: index.php");
exit();
}
} else {
$queueActive = true;
}
}
// =============================================================================
// start
$torrent = getRequestVar('torrent');
//*************************** code modified here - quota ***************
// checking quota
if (!$superseeder && $cfg['quota'] && !checkQuota($torrent))
{
?>
<html>
<head>
<title><?php echo $cfg["pagetitle"] ?></title>
<link rel="icon" href="images/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon" />
<LINK REL="StyleSheet" HREF="themes/<?php echo $cfg["theme"] ?>/style.css" TYPE="text/css">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache; charset=<?php echo _CHARSET ?>">
<div id="overDiv" style="position:absolute;visibility:hidden;z-index:1000;"></div>
</head>
<body topmargin="8" bgcolor="<?php echo $cfg["main_bgcolor"] ?>">
<div align="center">
<?php
if ($messages != "")
{
?>
<table border="1" cellpadding="10" bgcolor="#ff9b9b">
<tr>
<td><div align="center"><?php echo $messages ?></div></td>
</tr>
</table><br><br>
<input type="button" value="Close" onClick="window.close()">
</div>
</body>
</html>
<?php
exit();
}
} else
//**********************************************************************
if(! empty($torrent)) {
$interactiveStart = getRequestVar('interactive');
if ((isset($interactiveStart)) && ($interactiveStart)) /* interactive */
indexStartTorrent($torrent,1);
else /* silent */
indexStartTorrent($torrent,0);
}
// =============================================================================
// wget
$url_wget = getRequestVar('url_wget');
if(! $url_wget == '') {
// is enabled ?
if ($cfg["enable_wget"] != 1) {
AuditAction($cfg["constants"]["error"], "ILLEGAL ACCESS: ".$cfg["user"]." tried to use wget");
showErrorPage("wget is disabled.");
}
exec("nohup ".$cfg['bin_php']." -f wget.php ".escapeshellarg($url_wget)." ".$cfg['user']." > /dev/null &");
sleep(2); //sleep so that hopefully the other script has time to write out the stat files.
header("location: index.php");
exit();
}
// =============================================================================
// Do they want us to get a torrent via a URL?
$url_upload = getRequestVar('url_upload');
if(! $url_upload == '') {
// is enabled ?
if ($cfg["enable_torrent_download"] != 1) {
AuditAction($cfg["constants"]["error"], "ILLEGAL ACCESS: ".$cfg["user"]." tried to use torrent download");
showErrorPage("torrent download is disabled.");
}
// download
indexProcessDownload($url_upload);
}
// =============================================================================
// Handle the file upload if there is one
if(!empty($_FILES['upload_file']['name']))
indexProcessUpload();
// =============================================================================
// if a file was set to be deleted then delete it
$delfile = getRequestVar('delfile');
if(! $delfile == '') {
deleteTorrent($delfile, getRequestVar('alias_file'));
header("location: index.php");
exit();
}
// =============================================================================
// Did the user select the option to kill a running torrent?
$killTorrent = getRequestVar('kill_torrent');
if(! $killTorrent == '') {
killTorrent($killTorrent);
}
// =============================================================================
// Did the user select the option to remove a torrent from the Queue?
if(isset($_REQUEST["dQueue"])) {
$QEntry = getRequestVar('QEntry');
include_once("QueueManager.php");
$queueManager = QueueManager::getQueueManagerInstance($cfg);
$queueManager->dequeueTorrent($QEntry);
header("location: index.php");
exit();
}
// =============================================================================
// init some vars
// =============================================================================
// drivespace
$drivespace = getDriveSpace($cfg["path"]);
// connections
$netstatConnectionsSum = "n/a";
if ($cfg["index_page_connections"] != 0)
$netstatConnectionsSum = @netstatConnectionsSum();
// loadavg
$loadavgString = "n/a";
if ($cfg["show_server_load"] != 0)
$loadavgString = @getLoadAverageString();
// =============================================================================
// output
// =============================================================================
include('inc.index.head.'.$cfg["index_page"].'.php');
include('inc.index.main.php');
exit();
?>