Edit Torrent in Database
This page allows you to edit torrents that are already in the database. If you need to change other things about
the torrent please delete it and add it again.
");
else
$db = mysql_connect($dbhost, $dbuser, $dbpass) or die(errorMessage() . "Tracker error: can't connect to database - " . mysql_error() . "");
mysql_select_db($database) or die(errorMessage() . "Error selecting database.");
//get filename from URL string
$filename = $_GET['filename'];
//if not edit database or filename set, display all torrents as links
if (!isset($_POST["editdatabase"]) && !isset($filename))
{
?>
Click on a file to edit it:
");
$data = mysql_fetch_row($rows); //should be only one entry...
?>
");
//if filename changes, rename .torrent
if ($old_filename != $temp_filename)
rename("torrents/" . $old_filename . ".torrent", "torrents/" . $temp_filename . ".torrent");
}
//run RSS generator
require_once("rss_generator.php");
echo "
The database was edited successfully!
\n";
}
?>
Return to Admin Page