hello, can you see to add the re seed request function in the torrent_detail.php page
thank you in advance for your help :thumb :grin
thank you in advance for your help :thumb :grin
if ($row["external"] != "yes" && $row["times_completed"] > 0) {
echo("[<a href='torrents-completed.php?id=$id'>" .T_("WHOS_COMPLETED"). "</a>] ");
if ($row["seeders"] <= 1) {
echo("[<a href='torrents-reseed.php?id=$id'>" .T_("REQUEST_A_RE_SEED"). "</a>]");
}
}
if ($row["external"] !== "no" && intval($row["times_completed"]) > 0) {
printf('<a href="torrents-completed.php?id=%i">%s</a>', intval($id), T_("WHOS_COMPLETED"));
if ($row["seeders"] <= 1) {
printf('[<a href="torrents-reseed.php?id=%i">%s</a>]', intval($id), T_("REQUEST_A_RE_SEED"));
}
}
if ($row["external"] != "yes" && $row["times_completed"] > 0) {
echo("[<a href='torrents-completed.php?id=$id'>" .T_("WHOS_COMPLETED"). "</a>] ");
if ($row["seeders"] <= 1) {
echo("[<a href='torrents-reseed.php?id=$id'>" .T_("REQUEST_A_RE_SEED"). "</a>]");
}
}
?>
<?php
//
// TorrentTrader v2.x
// $LastChangedDate: 2011-11-01 00:57:44 +0000 (Tue, 01 Nov 2011) $
// $LastChangedBy: dj-howarth1 $
//
// http://www.torrenttrader.org
//
//
require_once("backend/functions.php");
dbconn();
loggedinonly();
if ($CURUSER["view_torrents"] == "no")
show_error_msg(T_("ERROR"), T_("NO_TORRENT_VIEW"), 1);
$id = (int) $_GET["id"];
if (isset($_COOKIE["reseed$id"]))
show_error_msg(T_("ERROR"), "Vous avez recemment fait une demande pour cette semence, veuillez attendre plus longtemps pour une autre demande..", 1);
$res = SQL_Query_exec("SELECT `owner`, `banned`, `external` FROM `torrents` WHERE `id` = $id");
$row = mysqli_fetch_assoc($res);
if (!$row || $row["banned"] == "yes" || $row["external"] == "yes")
show_error_msg(T_("ERROR"), T_("TORRENT_NOT_FOUND"), 1);
$res2 = SQL_Query_exec("SELECT users.id FROM completed LEFT JOIN users ON completed.userid = users.id WHERE users.enabled = 'yes' AND users.status = 'confirmed' AND completed.torrentid = $id");
$message = $CURUSER['username'] . " Pouvez vous remettre en seed le torrent ci-dessous pour le partager svp,... car il n'y a actuellement pas ou peu de Seeder, merci d'avance pour votre partage pour ce torrent::\n\n" . $site_config["SITEURL"] . "/torrents-details.php?id=$id \n Thank You!";
while ( $row2 = mysqli_fetch_assoc($res2) )
{
SQL_Query_exec("INSERT INTO `messages` (`subject`, `sender`, `receiver`, `added`, `msg`) VALUES ('Torrent Reseed Request', '".$CURUSER['id']."', '".$row2['id']."', '".get_date_time()."', ".sqlesc($message).")");
}
if ($row["owner"] && $row["owner"] != $CURUSER["id"])
SQL_Query_exec("INSERT INTO `messages` (`subject`, `sender`, `receiver`, `added`, `msg`) VALUES ('Torrent Reseed Request', '".$CURUSER['id']."', '".$row['owner']."', '".get_date_time()."', ".sqlesc($message).")");
setcookie("reseed$id", $id, time() + 86400, '/');
show_error_msg("Complete", "Votre demande de reseed est envoyée.", 1);
?><?php
//
// TorrentTrader v2.x
// $LastChangedDate: 2011-11-01 00:57:44 +0000 (Tue, 01 Nov 2011) $
// $LastChangedBy: dj-howarth1 $
//
// http://www.torrenttrader.org
//
//
require_once("backend/functions.php");
dbconn();
loggedinonly();
if ($CURUSER["view_torrents"] == "no")
show_error_msg(T_("ERROR"), T_("NO_TORRENT_VIEW"), 1);
$id = (int) $_GET["id"];
if (isset($_COOKIE["reseed$id"]))
show_error_msg(T_("ERROR"), "You have recently made a request for this seed, please wait longer for another request..", 1);
$res = SQL_Query_exec("SELECT `owner`, `banned`, `external` FROM `torrents` WHERE `id` = $id");
$row = mysqli_fetch_assoc($res);
if (!$row || $row["banned"] == "yes" || $row["external"] == "yes")
show_error_msg(T_("ERROR"), T_("TORRENT_NOT_FOUND"), 1);
$res2 = SQL_Query_exec("SELECT users.id FROM completed LEFT JOIN users ON completed.userid = users.id WHERE users.enabled = 'yes' AND users.status = 'confirmed' AND completed.torrentid = $id");
$message = $CURUSER['username'] . " Can you seed the torrent below to share it please,... because there is currently no or few Seeder, thank you in advance for your sharing for this torrent::\n\n" . $site_config["SITEURL"] . "/torrents-details.php?id=$id \n Thank You!";
while ( $row2 = mysqli_fetch_assoc($res2) )
{
SQL_Query_exec("INSERT INTO `messages` (`subject`, `sender`, `receiver`, `added`, `msg`) VALUES ('Torrent Reseed Request', '".$CURUSER['id']."', '".$row2['id']."', '".get_date_time()."', ".sqlesc($message).")");
}
if ($row["owner"] && $row["owner"] != $CURUSER["id"])
SQL_Query_exec("INSERT INTO `messages` (`subject`, `sender`, `receiver`, `added`, `msg`) VALUES ('Torrent Reseed Request', '".$CURUSER['id']."', '".$row['owner']."', '".get_date_time()."', ".sqlesc($message).")");
setcookie("reseed$id", $id, time() + 86400, '/');
show_error_msg("Complete", "Your reseed request is sent.", 1);
?>begin_frame(T_("TORRENT_DETAILS_FOR"). " \"" . $shortname . "\"");
echo "<div align='right'>[<a href='report.php?torrent=$id'><b>" .T_("REPORT_TORRENT"). "</b></a>] ";
if ($owned)
echo "[<a href='torrents-edit.php?id=$row[id]&returnto=" . urlencode($_SERVER["REQUEST_URI"]) . "'><b>".T_("EDIT_TORRENT")."</b></a>]<br>";echo "<div align='right'>[<a href='torrents-reseed.php?id=$id'><b><font color='#FC5F52'>Seed discount request for this torrent</font></b></a>]<br> ";No users online
Torrents
Members
Online