Login
Username: Password:
Remember me

[Sign Up] / [Recover Password]

Theme / Language

Popular
New Torrents
new name
Size: 18.40 MB
Most active
new name
S: 74 L: 3
New Posters
User Posts

Go to Profile

Strange torrents problem — 2021-11-02 19:42:18 in v3 Support
Thanks @Botanicar bro that helped ;)
Strange torrents problem — 2021-10-31 19:24:31 in v3 Support
Thanks MM and M-jay i will try everything
Strange torrents problem — 2021-10-31 13:16:33 in v3 Support
When I delete die; under header("Location: torrents-details.php?id=$id");
torrent details open normally, but the link remains the same and should be without &hit=1
like tihis
...torrents-details.php?id=55603
At least I think so, but I may be wrong  :unsure
Strange torrents problem — 2021-10-30 20:46:58 in v3 Support
Thanks MM bro i will try this code
Strange torrents problem — 2021-10-30 20:20:11 in v3 Support
When i delete if ($CURUSER) {
and click on torrent details page not working HTTP ERROR 500
Strange torrents problem — 2021-10-30 19:58:44 in v3 Support
<?php
require_once("backend/functions.php");
require_once("backend/BDecode.php");
require_once("backend/parse.php");
require_once"backend/udptscraper.php";
dbconn();
security();

$torrent_dir = $site_config["torrent_dir"];
$nfo_dir = $site_config["nfo_dir"];

//check permissions
if ($site_config["MEMBERSONLY"]){
loggedinonly();

if($CURUSER["view_torrents"]=="no")
show_error_msg(T_("ERROR"), T_("NO_TORRENT_VIEW"), 1);
}

//************ DO SOME "GET" STUFF BEFORE PAGE LAYOUT ***************

$id = (int) $_GET["id"];
$scrape = (int)$_GET["scrape"];
if (!is_valid_id($id))
show_error_msg("ERROR", T_("THATS_NOT_A_VALID_ID"), 1);

//GET ALL MYSQL VALUES FOR THIS TORRENT
if ($CURUSER["language"] == 2) {
$res = SQL_Query_exec("SELECT torrents.imdb, torrents.anon, torrents.thanks, torrents.video, torrents.seeders, torrents.banned, torrents.leechers, torrents.info_hash, torrents.filename, torrents.nfo, torrents.last_action, torrents.numratings, torrents.name, torrents.genre, torrents.rosub, torrents.ensub, torrents.roeng, torrents.owner, torrents.save_as, torrents.descr, torrents.visible, torrents.size, torrents.added, torrents.views, torrents.hits, torrents.times_completed, torrents.id, torrents.type, torrents.external, torrents.image1, torrents.image2, torrents.poster, torrents.announce, torrents.numfiles, torrents.freeleech, IF(torrents.numratings < 1, NULL, ROUND(torrents.ratingsum / torrents.numratings, 1)) AS rating, torrents.numratings, categories_ro.name AS cat_name, torrentlang_ro.name AS lang_name, torrentlang_ro.image AS lang_image, categories_ro.parent_cat as cat_parent, users.username, users.privacy FROM torrents LEFT JOIN categories_ro ON torrents.category = categories_ro.id LEFT JOIN torrentlang_ro ON torrents.torrentlang = torrentlang_ro.id LEFT JOIN users ON torrents.owner = users.id WHERE torrents.id = $id");
} else {
$res = SQL_Query_exec("SELECT torrents.imdb, torrents.anon, torrents.thanks, torrents.video, torrents.seeders, torrents.banned, torrents.leechers, torrents.info_hash, torrents.filename, torrents.nfo, torrents.last_action, torrents.numratings, torrents.name, torrents.genre, torrents.rosub, torrents.ensub, torrents.roeng, torrents.owner, torrents.save_as, torrents.descr, torrents.visible, torrents.size, torrents.added, torrents.views, torrents.hits, torrents.times_completed, torrents.id, torrents.type, torrents.external, torrents.image1, torrents.image2, torrents.poster, torrents.announce, torrents.numfiles, torrents.freeleech, IF(torrents.numratings < 1, NULL, ROUND(torrents.ratingsum / torrents.numratings, 1)) AS rating, torrents.numratings, categories.name AS cat_name, torrentlang.name AS lang_name, torrentlang.image AS lang_image, categories.parent_cat as cat_parent, users.username, users.privacy FROM torrents LEFT JOIN categories ON torrents.category = categories.id LEFT JOIN torrentlang ON torrents.torrentlang = torrentlang.id LEFT JOIN users ON torrents.owner = users.id WHERE torrents.id = $id");
}
$row = mysql_fetch_assoc($res);

stdhead(T_("DETAILS_FOR_TORRENT")." : " . $row["name"] . "");

//===== Start Banners Mod ====================================================================== BigMax =====//
if ($site_config['TORRENTS_BANNERS']){
begin_frame(T_("ADVERTISING"));
/*/--| Fixed Banners
?>
<table class="table_table" align="center" border="0" cellspacing="0" cellpadding="5"><?
print("<td align=center>");
$query = "SELECT * FROM banners_t WHERE 1=1";
$sql = SQL_Query_exec($query);
while ($row = mysql_fetch_array($sql)) {
$link = $row['link'];
$banner = $row['banner'];
print("<div style='margin-top:5px; margin-bottom:5px' align='center'><a href='$link' target='_blank'><img alt='' border='0' src='$banner'></a></div>");
}
print("</tr></table>"); //*/

//--| Dinamic Banners
?>
<style type="text/css">
#marqueecontainer{
position: relative;
height: 120px; /* marquee height */
background-color: transparent;
overflow: hidden;
padding: 4px;
}
</style>
<script type="text/javascript">
var delayb4scroll=1000 //--| Specify initial delay before marquee starts to scroll on page (1000 = 1 sec.)
var marqueespeed=1 //--| Specify marquee scroll speed (larger is faster 1-10)
var pauseit=1 //--| Pause marquee onMousever (0 = no | 1 = yes)
var copyspeed=marqueespeed
var pausespeed=(pauseit==0)? copyspeed: 0
var actualheight=''
function scrollmarquee(){
if (parseInt(cross_marquee.style.top)>(actualheight*(-1)+8))
cross_marquee.style.top=parseInt(cross_marquee.style.top)-copyspeed+"px"
else
cross_marquee.style.top=parseInt(marqueeheight)+8+"px"
}
function initializemarquee(){
cross_marquee=document.getElementById("vmarquee")
cross_marquee.style.top=0
marqueeheight=document.getElementById("marqueecontainer").offsetHeight
actualheight=cross_marquee.offsetHeight
if (window.opera || navigator.userAgent.indexOf("Netscape/7")!=-1){
cross_marquee.style.height=marqueeheight+"px"
cross_marquee.style.overflow="scroll"
return
}
setTimeout('lefttime=setInterval("scrollmarquee()",30)', delayb4scroll)
}
if (window.addEventListener)
window.addEventListener("load", initializemarquee, false)
else if (window.attachEvent)
window.attachEvent("onload", initializemarquee)
else if (document.getElementById)
window.onload=initializemarquee
</script>
<div id="marqueecontainer" onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=marqueespeed">
<div id="vmarquee" style="position: absolute; width: 100%;">
<?
print("<table align=center cellpadding=0 cellspacing=0 width=100% border=0>");
$query = "SELECT * FROM banners_t WHERE 1=1";
$sql = SQL_Query_exec($query);
while ($row2 = mysql_fetch_array($sql)) {
$link = $row2['link'];
$banner = $row2['banner'];
print("<div style='margin-top:5px; margin-bottom:5px' align='center'><a href='$link' target='_blank'><img alt='' border='0' src='$banner'></a></div>");
}
print("</table>");
?>
</div>
</div>
<?php
end_frame();
}
//===== End Banners Mod ======================================================================== BigMax =====//

begin_frame("".T_("BONUS_POINTS_FOR_SEEDING")."");
?>
<div style="margin-top:10px; margin-bottom:10px" align="center">
<font size="2" color="FF2400">
<?php echo T_("FOR_EACH_TORRENT_YOU_RECEIVE"); ?> <b><?php echo $site_config['bonuspertime']; ?></b>
<?php echo T_("POINTS_AT_EVERY"); ?> <b><?php echo floor($site_config['autoclean_interval'] / 60); ?></b>
<?php echo T_("MINUTES"); ?>.
</font>
</div>
<?php
end_frame();

//DECIDE IF TORRENT EXISTS
if (!$row || ($row["banned"] == "yes" && $CURUSER["edit_torrents"] == "no"))
show_error_msg(T_("ERROR"), T_("TORRENT_NOT_FOUND"), 1);

//torrent is availiable so do some stuff
if($CURUSER){
if ($_GET["hit"]) {
SQL_Query_exec("UPDATE torrents SET views = views + 1 WHERE id = $id");

header("Location: torrents-details.php?id=$id");
die;
}
/////////////////// //=== BigMax ===//
$query = (mysql_fetch_row(SQL_Query_exec("SELECT COUNT(*) FROM `trackerviews` WHERE `viewer` = " . $CURUSER["id"] . " AND `subject` = '$id' AND `type` = 'torrent'")));
if ($query[0] == 0){
SQL_Query_exec("INSERT INTO `trackerviews` (`subject`, `viewer`, `count`, `type`)
VALUES (" . $id . ", " . $CURUSER["id"] . ", '1', 'torrent')");
}else{
SQL_Query_exec("UPDATE `trackerviews` SET `count` = `count` + '1' WHERE `subject` = '$id' AND `viewer` = " . $CURUSER["id"] . " AND `type` = 'torrent'");
}
///////////////////
}

if ($CURUSER["id"] == $row["owner"] || $CURUSER["edit_torrents"] == "yes")
$owned = 1;
else
$owned = 0;

//take rating
if ($_GET["takerating"] == 'yes'){
$rating = (int)$_POST['rating'];

if ($rating <= 0 || $rating > 5)
show_error_msg(T_("RATING_ERROR"), T_("INVAILD_RATING"), 1);

//member of the month
if ($site_config['MOTM'])
{
$motm_value = 2;
motmadd($CURUSER["id"],$motm_value,$CURUSER['class'],$site_config['maxmotm']);
}

$res = SQL_Query_exec("INSERT INTO ratings (torrent, user, rating, added) VALUES ($id, " . $CURUSER["id"] . ", $rating, '".get_date_time()."')");

if (!$res) {
if (mysql_errno() == 1062)
show_error_msg(T_("RATING_ERROR"), T_("YOU_ALREADY_RATED_TORRENT"), 1);
else
show_error_msg(T_("RATING_ERROR"), T_("A_UNKNOWN_ERROR_CONTACT_STAFF"), 1);
}

SQL_Query_exec("UPDATE torrents SET numratings = numratings + 1, ratingsum = ratingsum + $rating WHERE id = $id");
#show_error_msg(T_("RATING_SUCCES"), T_("RATING_THANK")."<br /><br /><a href='torrents-details.php?id=$id'>" .T_("BACK_TO_TORRENT"). "</a>");
autolink("torrents-details.php?id=$id", "".T_("RATING_THANK")."");
}

//take comment add
if ($_GET["takecomment"] == 'yes'){
loggedinonly();
$body = $_POST['body'];

if (!$body)
show_error_msg(T_("RATING_ERROR"), T_("YOU_DID_NOT_ENTER_ANYTHING"), 1);

//=== Antiflood ===//=== BigMax ===//
if ( strlen($body) > $site_config['floodsize'] )
show_error_msg("Error", "Your comment was too long.", 1);

$res = SQL_Query_exec("SELECT COUNT(*) FROM `comments` WHERE user = $CURUSER[id] AND added > '" . get_date_time(gmtime() - ($site_config['floodtime'] * 60)) . "'");
$row = mysql_fetch_row($res);

if ($row[0] > $site_config['floodlimit'])
show_error_msg("Error", "You are only prohibited $site_config[floodlimit] comments in $site_config[floodtime] minutes.", 1);
//=== End Antiflood ===//

SQL_Query_exec("UPDATE torrents SET comments = comments + 1 WHERE id = $id");

//member of the month
if ($site_config['MOTM'])
{
$motm_value = 3;
motmadd($CURUSER["id"],$motm_value,$CURUSER['class'],$site_config['maxmotm']);
}

SQL_Query_exec("INSERT INTO comments (user, torrent, added, text) VALUES (".$CURUSER["id"].", ".$id.", '" .get_date_time(). "', " . sqlesc($body).")");

if (mysql_affected_rows() == 1) { autolink("torrents-details.php?id=$id", T_("COMMENT_ADDED"), 0); }
else { show_error_msg("Error","Unable to add comment",0); }
} //end insert comment

//===| START OF PAGE LAYOUT HERE

$char1 = 90; //cut length
$shortname = CutName(htmlspecialchars($row["name"]), $char1);
begin_frame(T_("TORRENT_DETAILS_FOR"). ": " . $shortname . "");

//===| Stop downloading because of Hit and Run
$userid = $CURUSER['id'];
$hnrd = SQL_Query_exec("SELECT COUNT(hnr) FROM snatched WHERE uid = '$userid' AND hnr = 'yes'");
$resd = mysql_fetch_row($hnrd);
$hnrn = $resd[0];
$hours = number_format($site_config["hnr_seedtime"] / 3600, 0);
if ($hnrn >= $site_config["hnr_stop_dl"])
{
print ("<div style='margin-top:20px; margin-bottom:20px'><table id='downloadbox' align='center'><tr><td>");
print ("<table cellpadding='5' align='center'><tr><td><div style='font:bold 13px Tahoma'>
".T_("CAN_NOT_DOWNLOAD_BECAUSE")." <font color='#FF2000'><b>".$resd[0]." Hit and Run</b></font>
</div></td></tr></table>");
print ("<table cellpadding='5' align='center'><tr><td><div style='margin-top:5px; font:normal 12px Verdana' align='center'>".T_("TO_SOLVE_PROBLEM_KEEP_SEEDING")."<div style='margin-top:5px; margin-bottom:5px'>");
if (!$site_config["ratiofree_enable"]) { print ("".T_("UNTIL_HAS_REACHED").""); } else { print ("".T_("UNTIL_HAS_REACHED_T").""); }
print ("&nbsp;<b>".$hours." ".T_("HOURS")."</b> ".T_("OF_SEEDING")."");
if ($site_config["ratiofree_enable"]) { print ("&nbsp;".T_("FOR_EACH_TORRENT").""); }
print ("</div>".T_("ALSO_YOU_CAN")." <a href=required.php><input type='submit' value='&nbsp;".T_("DELETE")."&nbsp;'></a> ".T_("THESE_HNR")."</div></td></tr></table>");
print ("</td></tr></table></div>");
}
else
{
echo "<div style='margin-top:5px' align='right'>&nbsp;<a href='report.php?torrent=$id'><input type='submit' value='".T_("REPORT_TORRENT")."'></a>&nbsp;";
if ($owned) { echo "<a href='torrents-edit.php?id=$row[id]&returnto=" . urlencode($_SERVER["REQUEST_URI"]) . "'><input type='submit' value='".T_("EDIT_TORRENT")."'></a>&nbsp;"; }
$res2 = "SELECT *, s.tid FROM users u left join snatched s on s.uid = u.id  WHERE uload > '0' AND tid = '$id'";
$row2 = SQL_Query_exec($res2);
if( mysql_num_rows($row2) != 0 && $owned) { echo "<a href=snatched.php?tid=$row[id]><input type='submit' value='".T_("REGISTERED_MEMBERS")."'></a>&nbsp;"; }
echo "</div>";

if ($row["rosub"] == "yes") { $rosub = "<img src='images/rosub.png' border='0' title='".T_("ROSUBBED")."'>"; }
if ($row["ensub"] == "yes") { $ensub = "<img src='images/flag.eng.png' border='0' title='".T_("ENSUBBED")."'>"; }
if ($row["roeng"] == "yes") { $roeng = "<img src='images/ro-eng-flag.png' border='0' title='".T_("ROENGSUBBED")."'>"; }

if (!empty($row["imdb"])) { $imdb = "<a href=".$row["imdb"]." target='blank'><img src='images/imdb.png' border='0' title='".T_("T_IMDB")."'></a>"; }
if (!empty($row["genre"])) { $shortdesc = "<b>".T_("GENRE")."</b>: <b>".$row["genre"]."</b>"; }

echo "<div style='margin-top:10px; margin-bottom:10px' align='center'>";
echo "<div><font size='2'><b>".$shortname."</b></font> &nbsp;".$rosub." ".$ensub." ".$roeng."</div>";
echo "<div style='margin-top:5px'>".$imdb." &nbsp;".$shortdesc."</div>";
echo "</div>";


// Calculate local torrent speed test
if ($row["leechers"] >= 1 && $row["seeders"] >= 1 && $row["external"]!='yes')
{
$speedQ = SQL_Query_exec("SELECT (SUM(p.downloaded)) / (UNIX_TIMESTAMP('".get_date_time()."') - UNIX_TIMESTAMP(added)) AS totalspeed FROM torrents AS t LEFT JOIN peers AS p ON t.id = p.torrent WHERE p.seeder = 'no' AND p.torrent = '$id' GROUP BY t.id ORDER BY added ASC LIMIT 15");
$a = mysql_fetch_assoc($speedQ);
$totalspeed = mksize($a["totalspeed"])."/s";
}
else { $totalspeed = "<font color='#FF2200'>".T_("NO_ACTIVITY")."</font>"; }


// download box
echo "<table id='downloadbox' border='0' width='99%' align='center'><tr><td>";
if ($row["banned"] == "yes")
{
print ("<center><b>" .T_("DOWNLOAD"). ": </b>".T_("BANNED")."!</center>");
}
else
{
print ("<table border='0' cellpadding='0' width='99%'>");
print ("<tr>");
print ("<td align='left' valign='middle' width='70'>");
print ("<a class=\"downtor\" href=\"download.php?id=$id&name=" . rawurlencode($row["filename"]) . "\"><img src=\"images/blank.gif\" border=\"0\" height=\"54\" width=\"54\" title='".T_("T_DOWNLOAD_TORRENT")."' /></a>");
print ("</td>");
print ("<td valign='top'>");
print ("<div style='margin-bottom:7px'>");
print ("<a href=\"download.php?id=$id&name=" . rawurlencode($row["filename"]) . "\"><input type='submit' value='".T_("DOWNLOAD_TORRENT")."'></a>&nbsp;");

$res3 = SQL_Query_exec("SELECT users.id FROM users LEFT JOIN completed ON users.id = completed.userid WHERE users.enabled = 'yes' AND completed.torrentid = '$id'");
if (mysql_num_rows($res3) > 0 && $owned) { echo("&nbsp;<a href='torrents-completed.php?id=$id'><input type='submit' value='".T_("WHOS_COMPLETED")."'></a>"); }
if ($row["seeders"] <= 1) { echo("&nbsp;<a href='torrents-reseed.php?id=$id'><input type='submit' value='".T_("REQUEST_A_RE_SEED")."'></a>"); }
print ("</div>");
//print ("<div style='margin-top:3px; margin-bottom:3px'><b>".T_("HEALTH").": </b><img src='".$site_config["SITEURL"]."/images/health/health_".health($row["leechers"], $row["seeders"]).".gif' alt='' /></div>");//
print ("<div style='margin-top:3px; margin-bottom:3px'><b>".T_("SEEDERS").": <font color='#24AA24'>" . number_format($row["seeders"]) . "</font></b></div>");
print ("<div style='margin-top:3px; margin-bottom:3px'><b>".T_("LEECHERS").": <font color='#FF0000'>" .  number_format($row["leechers"]) . "</font></b></div>");
print ("<div style='margin-top:3px; margin-bottom:3px'><b>".T_("COMPLETED").": <font color='#0090FF'>".number_format($row["times_completed"])."</font></b></div>");

if ($row["external"]!='yes') {
print ("<div style='margin-top:3px; margin-bottom:3px'><b>".T_("SPEED").":</b> ".$totalspeed."</div>");
}

print ("<div style='margin-top:3px; margin-bottom:3px'><b>".T_("LAST_CHECKED").":</b> ".date("d M. Y <\\s\\m\\a\\l\\l>H:i</\\s\\m\\a\\l\\l>", utc_to_tz_time($row["last_action"]))."</div>");

if ($row["freeleech"]=='1' && $row["external"] != "yes") {
print ("<div style='margin-top:3px; margin-bottom:3px'><b>".T_("FREE_LEECH_TORRENT")."</b>&nbsp; <img src='images/free.png' border='0' title='".T_("FREE_LEECH")."'>&nbsp; ".T_("FREE_LEECH_MSG")."!</div>");
}

//===| Start Bookmarks
$bookt = SQL_Query_exec("SELECT torrentid FROM bookmarks WHERE torrentid = $row[id] AND userid = $CURUSER[id]");
if (mysql_num_rows($bookt) > 0)
print("<div style='margin-top:7px'><b>".T_("THIS_TORRENT_IS_IN")."</b> \"<b>".T_("YOUR_BOOKMARKS")."</b>\"&nbsp; <a href='takedelbookmark.php?bookmarkid=".$row[id]."'><input type='submit' value='".T_("DELETE_FROM_LIST")."'></a></div>");
else
print("<div style='margin-top:7px'><a href='bookmarks.php?torrent=$row[id]'><input type='submit' value='".T_("ADD_THIS_TORRENT")."'></a> &nbsp;<b>".T_("_TO_")."</b> \"<b>".T_("YOUR_BOOKMARKS")."</b>\"</div>");
//===| End Bookmarks
print("</td>");

//if ($CURUSER["id"] == $row["owner"] || $CURUSER["edit_torrents"] == "yes")
if($CURUSER["can_download"] == "yes")
{
//===| Scrape External Torrents
if ($row["external"]=='yes')
{
print ("<td width='160' align='right' valign='top'><table><tr>");
if ($scrape =='1')
{
print("<td class='f-border p-title' width='150' valign='middle'>
<div style='margin-top:5px; margin-bottom:10px; font:bold 16px Times' align='center'><font color='#FF2000'>".T_("EXTERNAL_TORRENT")."</font></div>");

//===| Scrape HTTP
$seeders1 = $leechers1 = $downloaded1 = null;
$tres = SQL_Query_exec("SELECT url FROM announce WHERE torrent=$id");
while ($trow = mysql_fetch_assoc($tres))
{
$ann = $trow["url"];
$tracker = explode("/", $ann);
$path = array_pop($tracker);
$oldpath = $path;
$path = preg_replace("/^announce/", "scrape", $path);
$tracker = implode("/", $tracker)."/".$path;

if ($oldpath == $path) { continue; }
if (preg_match("/thepiratebay.org/i", $tracker) || preg_match("/prq.to/", $tracker)) { $tracker = "http://tracker.openbittorrent.com/scrape"; }

$stats = torrent_scrape_url($tracker, $row["info_hash"]);
if ($stats['seeds'] != -1)
{
$seeders1 += $stats['seeds'];
$leechers1 += $stats['peers'];
$downloaded1 += $stats['downloaded'];
}
}
//===| End Scrape HTTP

//===| Scrape UDP
$resu = mysql_query("SELECT id, info_hash FROM torrents WHERE external = 'yes' AND id = $id");
while ($rowu = mysql_fetch_array($resu))
{
$TorrentInfo = ParseTorrent("$site_config[torrent_dir]/$rowu[id].torrent");
$ann = $TorrentInfo[0];
$annlist = array();

if ($TorrentInfo[6])
{
foreach ($TorrentInfo[6] as $ann)
{
$annlist[] = $ann[0];
}
}
else
$annlist = array($ann);

$seeders = $leechers = $downloaded = null;
foreach ($annlist as $ann)
{
$tracker = explode("/", $ann);
$path = array_pop($tracker);
$oldpath = $path;
$path = str_replace("announce", "scrape", $path);
$tracker = implode("/", $tracker)."/".$path;

if ($oldpath == $path)
{
continue;
}
if ($openbittorrent_done)
continue;

if (preg_match("/thepiratebay.org/i", $tracker) || preg_match("/prq.to/", $tracker))
{
$tracker = "http://tracker.openbittorrent.com/scrape";
$openbittorrent_done = 1;
}
if(preg_match('%udp://([^:/]*)(?::([0-9]*))?(?:/)?%si', $tracker))
{
$udp=true;
try
{
$timeout = 5;
$udp= new udptscraper($timeout);
$stats=$udp->scrape($tracker,$rowu["info_hash"]);
foreach ($stats as $idu=>$scrape)
{
$seeders += $scrape['seeders'];
$leechers += $scrape['leechers'];
$downloaded += $scrape['completed'];
}
}
catch(ScraperException $e)
{
$e->isConnectionError();
}
}
else
{
$stats = torrent_scrape_url($tracker, $rowu["info_hash"]);
}

if ($stats['seeds'] != -1)
{
$seeders += $stats['seeds'];
$leechers += $stats['peers'];
$downloaded += $stats['downloaded'];

$totseed = $seeders1 + $seeders;
$totleech = $leechers1 + $leechers;
$totcomp = $downloaded1 + $downloaded;

mysql_query("UPDATE `announce` SET `online` = 'yes', `seeders` = $totseed, `leechers` = $totleech, `times_completed` = $totcomp WHERE `url` = ".sqlesc($ann)." AND `torrent` = $rowu[id]");
}
else
{
mysql_query("UPDATE `announce` SET `online` = 'no' WHERE `url` = ".sqlesc($ann)." AND `torrent` = $rowu[id]");
}
}

if ($seeders !== null)
{
mysql_query("UPDATE torrents SET leechers = '".$totleech."', seeders = '".$totseed."', times_completed = '".$totcomp."', last_action = '".get_date_time()."', visible = 'yes' WHERE id = '".$rowu['id']."'");
}
else
{
mysql_query("UPDATE torrents SET leechers = '0', seeders = '0', last_action = '".get_date_time()."' WHERE id='".$rowu['id']."'");
}
}
//===| End Scrape UDP

if ($seeders !== null) {
print ("<div style='margin-bottom:5px; margin-left:20px'><b>".T_("LIVE_STATS")."</b>: </div>");
print ("<div style='margin-left:20px'>".T_("SEEDERS").": <font color='#24AA24'>".$totseed."</font></div>");
print ("<div style='margin-left:20px'>".T_("LEECHERS").": <font color='#D70000'>".$totleech."</font></div>");
print ("<div style='margin-left:20px'>".T_("COMPLETED").": <font color='#0080FF'>".$totcomp."</font></div>");
} else {
print ("<div style='margin-top:10px; margin-bottom:5px' align='center'><b>".T_("LIVE_STATS")."</b>: </div>");
print ("<div style='font:italic 14px Times' align='center'><font color='#D70000'>".T_("TRACKERS_OFFLINE")."!</font></div>");
}
print ("<div style='margin-top:10px; margin-bottom:10px' align='center'>
<a href=\"torrents-details.php?id=".$id."\"><input type=\"submit\" name=\"submit\" value=\"".T_("SUBMIT")."\"></a>
</div>");
print ("</td>");
}
else
{
print ("<td class='f-border p-title' width='150' valign='middle' align='center'>
<div style='margin-top:5px; margin-bottom:10px; font:bold 16px Times' align='center'><font color='#D70000'>".T_("EXTERNAL_TORRENT")."</font></div>
<div style='margin-bottom:5px; font:normal 12px Times' align='center'>".T_("UPDATE_STATS")."</div></div>
<div style='margin-top:5px; margin-bottom:10px' align='center'>
<img src='images/load.gif' border='0' width='32' height='32'><br />
<form action='torrents-details.php?id=$id&scrape=1' method='post'><input type=\"submit\" name=\"submit\" value=\"".T_("UPDATE")."\" /></form>
</div>
</td>");
}
print ("</tr></table></td>");
}
//===| End Scrape External Torrents
}
print ("<td width='15'>&nbsp;</td>");

//===| Donate
print ("<td width='160' align='right' valign='top'><table><tr>");
print ("<td class='f-border f-title' width='150' valign='middle' align='center'>");

$totalneeded = $site_config['TOTAL_NEED'];
$month = sqlesc(gmdate("m"));
$year = sqlesc(gmdate("Y"));
$donated = SQL_Query_exec("SELECT sum(cash) as total_funds FROM `funds` WHERE month = $month && year = $year");
$arr_funds = mysql_fetch_array($donated);
$funds_so_far = $arr_funds["total_funds"];
$Progress = $funds_so_far / $totalneeded * 100;
$donpercent = number_format($funds_so_far / $totalneeded * 100, 1);

if($Progress >= 10 && $Progress < 20) { $load = "images/donate/cash_1.gif"; }
elseif($Progress >= 20 && $Progress < 30) { $load = "images/donate/cash_2.gif"; }
elseif($Progress >= 30 && $Progress < 40) { $load = "images/donate/cash_3.gif"; }
elseif($Progress >= 40 && $Progress < 50) { $load = "images/donate/cash_4.gif"; }
elseif($Progress >= 50 && $Progress < 60) { $load = "images/donate/cash_5.gif"; }
elseif($Progress >= 60 && $Progress < 70) { $load = "images/donate/cash_6.gif"; }
elseif($Progress >= 70 && $Progress < 80) { $load = "images/donate/cash_7.gif"; }
elseif($Progress >= 80 && $Progress < 90) { $load = "images/donate/cash_8.gif"; }
elseif($Progress >= 90 && $Progress < 100) { $load = "images/donate/cash_9.gif"; }
elseif($Progress >= 100) { $load = "images/donate/cash_10.gif"; }
else { $load = "images/donate/cash_0.gif"; }

print("<div style='margin-top:5px; margin-bottom:12px; font:bold 14px Times; color:#D70000' align='center'>".T_("PROMOTE_TO_VIP")."</div>");
print("<div style='margin-bottom:4px; font:normal 12px Times' align='center'>".T_("PROGRESS").": <img src=$load> ".$donpercent."%</div>");

if ($CURUSER["language"] == 2) {
print("<div style='margin-bottom:3px' align='center'><a class='donate_ro' href='donate_2.php'><img src='images/blank.gif' border='0' height='34' width='100'></a></div>");
} else {
print("<div style='margin-bottom:3px' align='center'><a class='donate' href='donate_2.php'><img src='images/blank.gif' border='0' height='34' width='100'></a></div>");
}
print ("</td>");
print ("</tr></table></td>");
//===| End Donate

echo "</tr></table>";
echo "</td></tr></table>";
}
//end download box

//===| Start IMDb
$TTIMDB = new TTIMDB;

if ((($_data = $TTCache->Get("imdb/$id", 900)) === false) && ($_data = $TTIMDB->Get($row['imdb'])))
{
$_data->Poster = $TTIMDB->getImage($_data->Poster, $id);
if ( ! isset( $_data->imdbTime ) )
{
$_data->imdbTime = time();
$_data->imdbVideo = null;
}
$TTCache->Set("imdb/$id", $_data, 900);
}

if ( is_object($_data) ): ?>
<fieldset class="download">
<legend><b><?php echo T_("IMDB_SHORT"); ?></b> &bull; <?php echo $_data->Title; ?></legend>                                                        
<table border="0" cellpadding="5" cellspacing="0" width="100%">
<tr>
<td width="220"><img src="<?php echo $_data->Poster; ?>" alt="<?php echo $_data->Title; ?>" title="<?php echo $_data->Title; ?>" width="220px" /></td>
<td valign="top">
<?php if (($rating = $TTIMDB->getRating($_data->imdbRating)) !== null) { ?>
<table border="0" cellpadding="0" cellspacing="0"><tr><td>
<div class="f-border" style="padding:7px; margin-bottom:10px">
<table border="0" cellpadding="3" cellspacing="0">
<tr><td colspan="2"><?php echo $rating; ?></td></tr>
<tr><td width="1%"><b><?php echo T_("IMDB_RATED"); ?></b>:</td><td>&nbsp;<?php echo $TTIMDB->getRated( $_data->Rated ); ?></td></tr>
<tr><td width="1%"><b><?php echo T_("IMDB_VOTES"); ?></b>:</td><td>&nbsp;<?php echo $_data->imdbVotes; ?> </td></tr>
</table>
</div>
</td></tr></table>
<?php } else { ?>
<table border="0" cellpadding="0" cellspacing="0"><tr><td>
<div class="f-border" style="padding:7px; margin-bottom:10px">
<table border="0" cellpadding="3" cellspacing="0">
<tr><td><img src="images/imdb/00.png" border="0"></td></tr>
<tr><td><?php echo T_("NOT_YET_RATED"); ?>...</td></tr>
</table>
</div>
</td></tr></table>
<?php } ?>
<table border="0" cellpadding="4" cellspacing="0" width="100%">
<tr><td><b><?php echo T_("IMDB_LINK"); ?></b>:</td><td><a href="<?php echo $row['imdb']; ?>" target="_blank"><?php echo htmlspecialchars($row['imdb']); ?></a></td></tr>
<tr><td><b><?php echo T_("IMDB_RELEASED"); ?></b>:</td><td><?php echo $TTIMDB->getReleased($_data->Released); ?></td></tr>
<tr><td><b><?php echo T_("IMDB_YEAR"); ?></b>:</td><td><?php echo $_data->Year; ?></td></tr>
<tr><td><b><?php echo T_("IMDB_RUNTIME"); ?></b>:</td><td><?php echo $_data->Runtime; ?></td></tr>
<tr><td><b><?php echo T_("IMDB_GENRE"); ?></b>:</td><td><?php echo $_data->Genre; ?></td></tr>
<tr><td><b><?php echo T_("IMDB_DIRECTOR"); ?></b>:</td><td><?php echo $_data->Director; ?></td></tr>
<tr><td><b><?php echo T_("IMDB_WRITER"); ?></b>:</td><td><?php echo $_data->Writer; ?></td></tr>
<tr><td><b><?php echo T_("IMDB_ACTORS"); ?></b>:</td><td><?php echo $_data->Actors; ?></td></tr>
<tr><td></td></tr>
<tr class="table_head"><td><b><?php echo T_("IMDB_PLOT"); ?></b>:</td><td><?php echo $_data->Plot; ?></td></tr>
</table>
</td>
</tr>
<!--<tr>
<td align="right" colspan="3">
<b><?php echo T_("IMDB_LASTUPDATED"); ?></b> <i><?php echo $TTIMDB->getUpdated($_data->imdbTime); ?></i>
</td>
</tr>-->
</table>
</fieldset>
<br />
<?php if ( strlen( $_data->imdbVideo ) > 3 ): ?>
<center><iframe src="http://www.imdb.com/video/imdb/<?php echo $_data->imdbVideo; ?>/player?stop=1" frameborder="0" marginheight="0" marginwidth="0" scrolling="no" height="480" width="643"></iframe></center><br />
<?php endif; endif;
//===| End IMDb

?><table><tr><td height=5></td></tr></table><?php

//===| Start Reputation Points |===//
$rep = SQL_Query_exec("SELECT id,reputation FROM users WHERE id=" . $row["owner"]);
$user = mysql_fetch_array($rep);
$simpaty_count = get_row_count("simpaty", 'WHERE touserid=' . $row["owner"] . ' AND type = "Torrent" AND fromtid = ' . $id . ' AND fromuserid = ' . $CURUSER['id']);

if ($user["id"] != $CURUSER['id'] && $row["anon"] != "yes" && $simpaty_count<1) {
//---| Config
$width = "16";
$height = "16";
$textsize = "2";
$picthumbsgood = "images/reputation/good.png";
if ($user[reputation] == "0") {
$color = "#2B2525";
} elseif ($user[reputation] > "0") {
$color = "#209200";
} elseif ($user[reputation] < "0") {
$color = "#B50000";
}
?>
<table class="table_table" cellpadding="4" align="center">
<tr><td height="5"></td></tr><!--| 5px space here! |-->
<tr>
<td><?php echo T_("UPLOADER_REPUTATION"); ?>:&nbsp;</td>
<td bgcolor="<?= $color; ?>" height="16" align="center"><font size="<?php echo $textsize;?>" color="#FEFEFE"><b>&nbsp; <?php echo $user[reputation];?> &nbsp;</b></font></td>
<td>&nbsp; <?php echo T_("SAY_THANKS_WITH_REPUTATION"); ?>:</td>
<td width="20" align="center"><a href="simpaty.php?action=add&good&targetid=<?php echo $user["id"];?>&fromtid=<?php echo $id;?>&type=torrent"><img src="<?php echo $picthumbsgood;?>" width="<?php echo $width;?>" height="<?php echo $height;?>" border="0" title="<?php echo T_("GIVE_ONE_POINT"); ?>"></a></td>
</tr>
<tr><td height="3"></td></tr><!--| 3px space here! |-->
</table>
<?php
}
//===| End Reputation Points |===//
}
?>

<fieldset class='download'><legend>&nbsp;<b><font size='2' color='#FF2000'><?php echo T_("DETAILS"); ?></font></b>&nbsp;</legend>
<table cellpadding='3' border='0' width='100%'>
<?php
//===| Image1 and Image2 under image resizer code
if (!$_data->Poster)
{
if ($row["image1"] != "" OR $row["image2"] != "" OR $row["poster"] != "") {
if ($row["poster"] != "") $poster = "<img src='".$row["poster"]."' border='0' alt=\"\" onload=\"NcodeImageResizer.createOn(this);\" />";
if ($row["image1"] != "") $img1 = "<img src='".$site_config["SITEURL"]."/uploads/images/$row[image1]' border='0' alt=\"\" onload=\"NcodeImageResizer.createOn(this);\" />";
if ($row["image2"] != "") $img2 = "<img src='".$site_config["SITEURL"]."/uploads/images/$row[image2]' border='0' alt=\"\" onload=\"NcodeImageResizer.createOn(this);\" />";
print("<tr><td style='padding-top:8px; padding-left:8px' colspan='2'>
<div style='margin-top:5px; margin-bottom:5px'>".$poster."</div>
<div style='margin-top:5px; margin-bottom:5px'>".$img1."</div>
".$img2."<br /><br />
</td></tr>\n");
}
}

print("<tr><td style='padding-left:8px' align='left' colspan='2'>\n");
print("<br /><br /><div style='font-family: Lucida Console, monospace; word-wrap: break-word;'>" .  format_comment($row['descr']) . "</div>\n"); //===| BigMax |===//
print("</td></tr>\n");

if (!empty($row["video"])) {
//print("<tr><td style='padding-left:8px; padding-top:15px' align='left' colspan='2'><font size='2' color='#0080FF'><b>Video Trailer</b> &raquo;</font>\n");
print("<tr><td style='padding-left:8px; padding-top:10px' colspan='2'>\n");
print("<br />".format_comment("[video=".$row['video']."]")."</td></tr>\n"); }
?>

<tr><td>&nbsp;</td></tr>

<tr>
<td>
<table class='f-border comment' cellpadding='3' width='100%'>

<?php
print("<tr><td></td></tr>\n");

print("<tr><td align='left' style='padding-left:7px'><b>" .T_("SIZE"). ":</b></td><td><b>".mksize($row["size"])."</b></td></tr>\n");

if ($row["anon"] == "yes" && !$owned)
print("<tr><td align='left' style='padding-left:7px'><b>" .T_("UPLOADED_BY"). ":</b></td><td>".T_("ANONYMOUS")."</td></tr>");
elseif ($row["username"])
print("<tr><td align='left' style='padding-left:7px'><b>" .T_("UPLOADED_BY"). ":</b></td><td><a href='account-details.php?id=" . $row["owner"] . "'><b>" . class_user($row["username"]) . "</b></a></td></tr>");
else
print("<tr><td align='left' style='padding-left:7px'><b>" .T_("UPLOADED_BY"). ":</b></td><td>Unknown</td></tr>");

print("<tr><td align='left' width='14%' style='padding-left:7px; padding-top:7px'><b>" .T_("CATEGORY"). ":</b></td><td><font color='#FF2200'><b>".$row["cat_parent"]."</b></font>: <b>".$row["cat_name"]."</b></td></tr>\n");

print("<tr><td align='left' style='padding-left:7px'><b>" .T_("DATE"). ":</b></td><td>" . date("<\\b>d M. Y</\\b> <\\s\\m\\a\\l\\l>H:i</\\s\\m\\a\\l\\l>", utc_to_tz_time($row["added"])) . "</td></tr>\n");

/*/---| language
if (empty($row["lang_name"])) $row["lang_name"] = "Unknown/NA";
print("<tr><td align='left' style='padding-left:7px'><b>" .T_("TLANG"). ":</b></td><td>" . $row["lang_name"] . "\n");
if (isset($row["lang_image"]) && $row["lang_image"] != "")
print("&nbsp;<img border=\"0\" src=\"" . $site_config['SITEURL'] . "/images/languages/" . $row["lang_image"] . "\" alt=\"" . $row["lang_name"] . "\" />");
print("</td></tr>");//*/

/*/---| Info hash
print("<tr><td align='left' style='padding-left:7px'><b>" .T_("PASSKEY"). ":</b></td><td>" . $row["info_hash"] . "</td></tr>\n"); //*/

print("<tr><td align='left' style='padding-left:7px'><b>".T_("HITS").":</b></td><td>" . number_format($row["hits"]) . "</td></tr>\n");

print("<tr><td align='left' style='padding-left:7px'><b>" .T_("VIEWS"). ":</b></td><td>" . number_format($row["views"]) . "</td></tr>\n");

//===| Torrent Views
$query = SQL_Query_exec("SELECT DISTINCT(viewer), username, count FROM trackerviews LEFT JOIN users ON trackerviews.viewer = users.id WHERE trackerviews.type = 'torrent' AND trackerviews.subject = '$id' AND users.privacy != 'strong' AND users.status = 'confirmed' AND users.enabled = 'yes'");
if ($CURUSER['class'] > 4)
{
if (mysql_num_rows($query) > 0)
{
print("<tr><td align='left' style='padding-left:7px'><b>".T_("VIEWED")." ".T_("BY").":</b></td><td>");
$user = "";
while ($rows = mysql_fetch_array($query))
{
$user .= "<a href='account-details.php?id=" . $rows["viewer"] . "'><b>" . class_user($rows["username"]) . "</b></a> (" . number_format($rows["count"]) . "), ";
}
$users  = substr($user, 0, (strlen($user) - 2));
print( $users . "</td></tr>");
}
else
{
print("<tr><td align='left' style='padding-left:7px'><b>".T_("VIEWED")." ".T_("BY").":</b></td><td><strong>".T_("TORRENT_NO_VIEWS").".</strong></td></tr>\n");
}
}
//===| End Torrent Views

//===| Thanks
$thanksl = explode(",", $row['thanks']);
if ($CURUSER['username'] == $row['username'] || !$CURUSER) $leftthanks = true;
foreach ($thanksl as $u) {
$thanks .= ($i > 0)?", ".class_user($u)."" : class_user($u);
if ($u == $CURUSER['username']) $leftthanks = true;
$i++;
}
if (!$u) $thanks = "".T_("NO_ONE_YET")."...";
print("<tr><td align=left style='padding-left:7px; padding-bottom:5px'><b>".T_("THANKS_BY").":</b></td><td style='padding-bottom:5px'><b>$thanks</b></td></tr>\n");
if (!$leftthanks) print("<tr><td colspan='2'><form action=thanks.php method=POST><input type=hidden name=torrent value=$id><input type=submit value='".T_("THANKS")."!'></form></td></tr>\n");
//===| End Thanks
?>

</table>
</td>
</tr>
</table>
</fieldset>
<br />
<?php

//===| See Votes
$rres = SQL_Query_exec("SELECT rating FROM ratings WHERE torrent = $id");
$rrow = mysql_fetch_assoc($rres);
if (($rrow) && (get_user_class() >= 6 ))
{
print("<div style='margin-bottom:5px'>
<a href=\"javascript:void(0);\" onclick=\"window.open('/ratings.php?id=$id', 'mywindow4', 'width=400, height=500, menubar=no, toolbar=no, scrollbars=yes');\"><input type=submit value='".T_("SEE_VOTES")."'></a>
</div>");
}
//===| End See Votes

//===| RATINGS
print("<div style='margin-top:10px; margin-bottom:10px'>");
$srating = "";
$srating .= "<table class='f-border' cellpadding='12'><tr><td class='f-title' width='65' style='padding:7px'><b>".T_("RATINGS")."</b>:</td><td class='f-title' valign='middle' style='padding:7px'>";
if (!isset($row["rating"])) {
$srating .= "".T_("NOT_YET_RATED")."";
} else {
$rpic = ratingpic($row["rating"]);
if (!isset($rpic))
$srating .= "".T_("INVALID")."?";
else
if($row["numratings"] > 1) { $whorated = T_("_MEMBERS"); } else { $whorated = T_("_MEMBER"); }
$srating .= "$rpic &nbsp; &bull; &nbsp; <b>".$row["rating"]."</b> ".T_("OUT_OF")." <b>5</b> &nbsp; &bull; &nbsp; ".T_("RATED_BY")." <b>".$row["numratings"]."</b> ".$whorated;
}
$srating .= "\n";
if (!isset($CURUSER))
$srating .= "(<a href=\"account-login.php?returnto=" . urlencode($_SERVER["REQUEST_URI"]) . "&nowarn=1\">Log in</a> to rate it)";
else {
$ratings = array(
5 => T_("COOL"),
4 => T_("PRETTY_GOOD"),
3 => T_("DECENT"),
2 => T_("PRETTY_BAD"),
1 => T_("SUCKS")
);
$xres = SQL_Query_exec("SELECT rating, added FROM ratings WHERE torrent = $id AND user = " . $CURUSER["id"]);
$xrow = mysql_fetch_assoc($xres);
if ($xrow)
$srating .= "<div style='margin-top:5px; font:bold 14px Times'><font color='#0080FF'>".T_("YOU_RATED").": ".$xrow["rating"]." - ".$ratings[$xrow["rating"]]."</font></div>";
else {
$srating .= "<form style=\"display:inline;\" method=\"post\" action=\"torrents-details.php?id=$id&takerating=yes\"><input type=\"hidden\" name=\"id\" value=\"$id\" />\n";
$srating .= "<select name=\"rating\">\n";
$srating .= "<option value=\"0\">".T_("ADD_RATING")."</option>\n";
foreach ($ratings as $k => $v) {
$srating .= "<option value=\"$k\">$k - $v</option>\n";
}
$srating .= "</select>\n";
$srating .= "&nbsp; <input type=\"submit\" value=\"".T_("VOTE")."\" />";
$srating .= "</form>\n";
}
}
$srating .= "</td></tr></table>";
print("".$srating."");
print("</div>");
//===| END RATINGS

//===| External trackers
if ($row["external"] == "yes" && $CURUSER["id"] == $row["owner"] || $row["external"] == "yes" && $CURUSER["edit_torrents"] == "yes")
{
echo "<div style='margin-top:5px; margin-bottom:5px'><b>".T_("View_TRACKERS_LIST")."</b>:&nbsp;<img src='images/plus.gif' id='pic1' onclick='klappe_torrent(1)' alt='' /></div><div id='k1' style='display: none;'>";
print ("<table class='f-border f-title' cellpadding='5'><tr><td>");
print ("<div style='margin-bottom:5px'>
<b>Tracker</b>: <font color=#0080FF>".htmlspecialchars($row['announce'])."</font>&nbsp;
&nbsp;|&nbsp; <img src=images/arrow_up.png border=0 title=".T_("SEEDERS")."> <b><font color='#24AA24'>" . number_format($row["seeders"]) . "</font></b>
&nbsp;|&nbsp; <img src=images/arrow_down.png border=0 title=".T_("LEECHERS")."> <b><font color='#FF0000'>" .  number_format($row["leechers"]) . "</font></b>
&nbsp;|&nbsp; <img src=images/check.png border=0 title=".T_("COMPLETED")."> <b><font color='#0080FF'> " . number_format($row["times_completed"]) . "</font></b>&nbsp;
</div>");

$tres = SQL_Query_exec("SELECT * FROM `announce` WHERE `torrent` = $id");
if (mysql_num_rows($tres) > 1)
{
echo "<div style='margin-bottom:5px'>".T_("THIS_TORRENT_HAS_BACKUP_TRACKERS").":</div>";
echo '<table cellpadding="5" cellspacing="0" class="table_table">
<tr>';
echo '<td class="ttable_head">Tracker URL</td>
<td class="ttable_head" align="center"><img src=images/arrow_up.png border=0 title="'.T_("SEEDERS").'"></td>
<td class="ttable_head" align="center"><img src=images/arrow_down.png border=0 title="'.T_("LEECHERS").'"></td>
<td class="ttable_head" align="center"><img src=images/check.png border=0 title="'.T_("COMPLETED").'"></td>
</tr>';
$x = 1;
while ($trow = mysql_fetch_assoc($tres)) {
$colour = $trow["online"] == "yes" ? "#0080FF" : "#FF2000";
echo "<tr>
<td class=\"table_col1\"><font color=\"$colour\">".htmlspecialchars($trow['url'])."</font></td>
<td class=\"table_col2\" align=\"center\"><font color=#24AA24>".number_format($trow["seeders"])."</font></td>
<td class=\"table_col1\" align=\"center\"><font color=#FF2000>".number_format($trow["leechers"])."</font></td>
<td class=\"table_col2\" align=\"center\"><font color=#0080FF>".number_format($trow["times_completed"])."</font></td>
</tr>";
$x = $x == 1 ? 2 : 1;
}
echo '</table>';
}
print ("</td></tr></table></div>");
}
//===| End External trackers

//===| Peers list
if ($CURUSER["id"] == $row["owner"] || $CURUSER["edit_torrents"] == "yes")
{
echo "<div style='margin-top:5px; margin-bottom:5px'><b>".T_("VIEW_PEERS_LIST")."</b>:&nbsp;<img src='images/plus.gif' id='pic3' onclick='klappe_torrent(3)' alt='' /></div><div id='k3' style='display: none;'>";
//echo "<div style='margin-top:15px; margin-bottom:3px'><b>".T_("PEERS_LIST").":</b></div>";
$query = SQL_Query_exec("SELECT * FROM peers WHERE torrent = $id ORDER BY seeder DESC");

$result = mysql_num_rows($query);
if($result == 0)
{
echo "<font color='#FF2000'><b>".T_("NO_ACTIVE_PEERS")."</b></font>\n";
}
else
{
?>
<table border="0" cellpadding="5" cellspacing="0" class="table_table">
<tr>
<td class="ttable_head" align="left"><?php echo T_("NAME"); ?></td>
<td class="ttable_head" align="left"><?php echo T_("BITTORRENT_CLIENT"); ?> / Peer ID</td>
<td class="ttable_head" align="left"><?php echo T_("PORT"); ?></th>
<td class="ttable_head" align="left"><?php echo T_("UPLOADED"); ?></td>
<td class="ttable_head" align="left"><?php echo T_("DOWNLOADED"); ?></td>
<td class="ttable_head" align="left"><?php echo T_("RATIO"); ?></td>
<td class="ttable_head" align="left"><?php echo T_("LEFT"); ?></td>
<td class="ttable_head" align="left"><?php echo T_("FINISHED"); ?></td>
<td class="ttable_head" align="center"><img src="images/arrow_up.png" border="0" title="<?php echo T_("SEEDING"); ?>"></td>
<td class="ttable_head" align="center"><img src="images/connectable.png" border="0" title="<?php echo T_("CONNECTABLE"); ?>"></td>
</tr>

<?php
while($row1 = mysql_fetch_array($query))
{
if ($site_config["MEMBERSONLY"]) {
$res = SQL_Query_exec("SELECT id, username, privacy FROM users WHERE id=".$row1["userid"]."");
$arr = mysql_fetch_array($res);
$peer = "<a href='account-details.php?id=$arr[id]'><b>".class_user($arr[username])."</b></a>";
}

if ($row1["seeder"] == "yes") { $seed = "<font color='#24AA24'>".T_("YES")."</font>"; } else { $seed = "<font color='red'>".T_("NO")."</font>"; }
if ($row1["connectable"] == "yes") { $conn = "<font color='#0080FF'>".T_("YES")."</font>"; } else { $conn = "<font color='grey'>".T_("NO")."</font>"; }

if (!$arr["username"]) { $peer = "<font color='#FF2000'>".T_("UNKNOWN_USER")."</font>"; }

$snatch = SQL_Query_exec("SELECT dload, uload, done FROM snatched WHERE uid = ".$row1["userid"]." AND tid = $id");
$arr2 = mysql_fetch_array($snatch);
$dl = mksize($arr2["dload"]);
$upl = mksize($arr2["uload"]);

if ($dl > 0) {
$ratio = $arr2["uload"] / $arr2["dload"];
$ratio = number_format($ratio, 2);
} else {
$ratio = "---";
}
$ratio = "<font color=".get_ratio_color($ratio).">$ratio</font>";

$percentcomp = sprintf("%.2f", 100 * (1 - ($row1["to_go"] / $row["size"])));

if ($arr["privacy"] != "strong" || ($CURUSER["control_panel"] == "yes"))
{
print("<tr>
<td class='table_col1'>$peer</td>
<td class='ttable_col2'>".htmlspecialchars($row1["client"])."<div style='margin-top:2px'>".$row1["peer_id"]."</div></td>
<td class='ttable_col1'>".$row1["port"]."</td>
<td class='ttable_col2'><font color=#24AA24>$upl</font></td>
<td class='ttable_col1'><font color=#FF2000>$dl</font></td>
<td class='ttable_col2'>".$ratio."</td>
<td class='ttable_col1'>".mksize($row1["to_go"])."</td>
<td class='ttable_col2'>".$percentcomp."%</td>
<td class='ttable_col1' align='center'>$seed</td>
<td class='ttable_col2' align='center'>$conn</td>
</tr>");
}
else
{
print("<tr>
<td class='ttable_col1'><font color=#FF2000><b>Confidential</b></font></td>
<td class='ttable_col2'>".htmlspecialchars($row1["client"])."<div style='margin-top:2px'>".$row1["peer_id"]."</div></td>
<td class='ttable_col1'>".$row1["port"]."</td>
<td class='ttable_col2'><font color=#24AA24>$upl</font></td>
<td class='ttable_col1'><font color=#FF2000>$dl</font></td>
<td class='ttable_col2'>".$ratio."</td>
<td class='ttable_col1'>".mksize($row1["to_go"])."</td>
<td class='ttable_col2'>".$percentcomp."%</td>
<td class='ttable_col1' align='center'>$seed</td>
<td class='ttable_col2' align='center'>$conn</td>
</tr>");
}
}
echo "</table>";
}
echo "</div>";
}
//===| End Peers list

//===| Files list
echo "<div style='margin-top:5px; margin-bottom:5px'><b>".T_("VIEW_FILE_LIST")."</b>:&nbsp;<img src='images/plus.gif' id='pic2' onclick='klappe_torrent(2)' alt='' /></div><div id='k2' style='display: none;'>
<table cellpadding='4' cellspacing='0' class='table_table' border='1'>
<tr>
<td class='table_head' align='left'>".T_("FILE")."</td>
<td class='table_head'>".T_("SIZE")."</td>
</tr>";
$fres = SQL_Query_exec("SELECT * FROM `files` WHERE `torrent` = $id ORDER BY `path` ASC");
if (mysql_num_rows($fres))
{
while ($frow = mysql_fetch_assoc($fres))
{
echo "<tr>
<td class='table_col1'>".htmlspecialchars($frow['path'])."</td>
<td class='table_col2'>".mksize($frow['filesize'])."</td>
</tr>";
}
}
else
{
echo "<tr>
<td class='table_col1'>".htmlspecialchars($row["name"])."</td>
<td class='table_col2'>".mksize($row["size"])."</td>
</tr>";
}
echo "</table></div>";
//===| End Files list

//===| View NFO
if($row["nfo"]== "yes")
{
echo "<div style='margin-top:5px; margin-bottom:10px'><b>".T_("VIEW_NFO")."</b>:&nbsp;<img src='images/plus.gif' id='pic4' onclick='klappe_torrent(4)' alt='' /></div><div id='k4' style='display: none;'>";
function my_nfo_translate($nfo)
{
$trans = array
(
"\x80" => "&#199;", "\x81" => "&#252;", "\x82" => "&#233;", "\x83" => "&#226;", "\x84" => "&#228;", "\x85" => "&#224;", "\x86" => "&#229;", "\x87" => "&#231;", "\x88" => "&#234;", "\x89" => "&#235;", "\x8a" => "&#232;", "\x8b" => "&#239;", "\x8c" => "&#238;", "\x8d" => "&#236;", "\x8e" => "&#196;", "\x8f" => "&#197;", "\x90" => "&#201;",
"\x91" => "&#230;", "\x92" => "&#198;", "\x93" => "&#244;", "\x94" => "&#246;", "\x95" => "&#242;", "\x96" => "&#251;", "\x97" => "&#249;", "\x98" => "&#255;", "\x99" => "&#214;", "\x9a" => "&#220;", "\x9b" => "&#162;", "\x9c" => "&#163;", "\x9d" => "&#165;", "\x9e" => "&#8359;", "\x9f" => "&#402;", "\xa0" => "&#225;", "\xa1" => "&#237;",
"\xa2" => "&#243;", "\xa3" => "&#250;", "\xa4" => "&#241;", "\xa5" => "&#209;", "\xa6" => "&#170;", "\xa7" => "&#186;", "\xa8" => "&#191;", "\xa9" => "&#8976;", "\xaa" => "&#172;", "\xab" => "&#189;", "\xac" => "&#188;", "\xad" => "&#161;", "\xae" => "&#171;", "\xaf" => "&#187;", "\xb0" => "&#9617;", "\xb1" => "&#9618;", "\xb2" => "&#9619;",
"\xb3" => "&#9474;", "\xb4" => "&#9508;", "\xb5" => "&#9569;", "\xb6" => "&#9570;", "\xb7" => "&#9558;", "\xb8" => "&#9557;", "\xb9" => "&#9571;", "\xba" => "&#9553;", "\xbb" => "&#9559;", "\xbc" => "&#9565;", "\xbd" => "&#9564;", "\xbe" => "&#9563;", "\xbf" => "&#9488;", "\xc0" => "&#9492;", "\xc1" => "&#9524;", "\xc2" => "&#9516;", "\xc3" => "&#9500;",
"\xc4" => "&#9472;", "\xc5" => "&#9532;", "\xc6" => "&#9566;", "\xc7" => "&#9567;", "\xc8" => "&#9562;", "\xc9" => "&#9556;", "\xca" => "&#9577;", "\xcb" => "&#9574;", "\xcc" => "&#9568;", "\xcd" => "&#9552;", "\xce" => "&#9580;", "\xcf" => "&#9575;", "\xd0" => "&#9576;", "\xd1" => "&#9572;", "\xd2" => "&#9573;", "\xd3" => "&#9561;", "\xd4" => "&#9560;",
"\xd5" => "&#9554;", "\xd6" => "&#9555;", "\xd7" => "&#9579;", "\xd8" => "&#9578;", "\xd9" => "&#9496;", "\xda" => "&#9484;", "\xdb" => "&#9608;", "\xdc" => "&#9604;", "\xdd" => "&#9612;", "\xde" => "&#9616;", "\xdf" => "&#9600;", "\xe0" => "&#945;", "\xe1" => "&#223;", "\xe2" => "&#915;", "\xe3" => "&#960;", "\xe4" => "&#931;", "\xe5" => "&#963;",
"\xe6" => "&#181;", "\xe7" => "&#964;", "\xe8" => "&#934;", "\xe9" => "&#920;", "\xea" => "&#937;", "\xeb" => "&#948;", "\xec" => "&#8734;", "\xed" => "&#966;", "\xee" => "&#949;", "\xef" => "&#8745;", "\xf0" => "&#8801;", "\xf1" => "&#177;", "\xf2" => "&#8805;", "\xf3" => "&#8804;", "\xf4" => "&#8992;", "\xf5" => "&#8993;", "\xf6" => "&#247;",
"\xf7" => "&#8776;", "\xf8" => "&#176;", "\xf9" => "&#8729;", "\xfa" => "&#183;", "\xfb" => "&#8730;", "\xfc" => "&#8319;", "\xfd" => "&#178;", "\xfe" => "&#9632;", "\xff" => "&#160;",
);
$trans2 = array("\xe4" => "&auml;",        "\xF6" => "&ouml;",        "\xFC" => "&uuml;",        "\xC4" => "&Auml;",        "\xD6" => "&Ouml;",        "\xDC" => "&Uuml;",        "\xDF" => "&szlig;");
$all_chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
$last_was_ascii = False;
$tmp = "";
$nfo = $nfo . "\00";
for ($i = 0; $i < (strlen($nfo) - 1); $i++)
{
$char = $nfo[$i];
if (isset($trans2[$char]) and ($last_was_ascii or strpos($all_chars, ($nfo[$i + 1]))))
{
$tmp = $tmp . $trans2[$char];
$last_was_ascii = True;
}
else
{
if (isset($trans[$char]))
{
$tmp = $tmp . $trans[$char];
}
else
{
$tmp = $tmp . $char;
}
$last_was_ascii = strpos($all_chars, $char);
}
}
return $tmp;
}

//---| DISPLAY NFO BLOCK
begin_frame("NFO");
if ($row["nfo"] == "yes")
{
echo('<img src="nfoview.php?id=' . $id . '">');
}
else
{
if ($nfo)
{
$nfo = my_nfo_translate($nfo);
echo "<br /><br /><b>NFO:</b><br />";
print("<textarea class='nfo' style='width:98%;height:100%;' rows='20' cols='20' readonly='readonly'>" . stripslashes($nfo) . "</textarea>");
}
else
{
$nfo = utf8_encode(str_replace("\x0d\x0d\x0a", "\x0d\x0a", @file_get_contents($nfofilelocation)));
if ($nfo)
{
$nfo = my_nfo_translate($nfo);
echo "<br /><br /><b>NFO:</b><br />";
print("<textarea class='nfo' style='width:98%;height:100%;' rows='20' cols='20' readonly='readonly'>" . stripslashes($nfo) . "</textarea>");
}
else
{
print(T_("NFO_NOT_FOUND"));
}
}
}
end_frame();
echo "</div>";
}
//===| End View NFO

end_frame();

//===| Start Similar Torrents |===//
begin_frame(T_("SIMILAR_TORRENTS"));

$searchname = substr($row['name'], 0, 10);
$query1 = str_replace(" ", ".", sqlesc("%" . $searchname . "%"));
$query2 = str_replace(".", " ", sqlesc("%" . $searchname . "%"));

$rc = SQL_Query_exec("SELECT id FROM torrents WHERE name LIKE {$query1} AND seeders > '0' AND id <> '$id' OR name LIKE {$query2} AND seeders > '0' AND id <> '$id'");
$count = mysql_num_rows($rc);
$perpages = 10;
list($pagertop, $pagerbottom, $limit) = pager($perpages, $count, "torrents-details.php?id=$id&");

$r = SQL_Query_exec("SELECT
id,
name,
size,
added,
imdb,
genre,
rosub,
ensub,
roeng,
seeders,
leechers,
category,
external,
filename,
freeleech
FROM torrents
WHERE name LIKE {$query1} AND seeders > '0' AND id <> '$id'
OR name LIKE {$query2} AND seeders > '0' AND id <> '$id'
ORDER BY id DESC $limit");
   
if (mysql_num_rows($r) > 0) {
if ($count > $perpages) { echo $pagertop; }
echo "<table width=100% class=table_table border=0 cellspacing=0 cellpadding=4>\n" . "
<tr>
<td class='table_head' width='1%' align='center'><b>".T_("TYPE")."</b></td>
<td class='table_head'><b>".T_("TORRENT_NAME")."</b></td>
<td class='ttable_head' align='center'><img src='images/down.png' border='0' title='".T_("T_DOWNLOAD")."'></td>
<td class='table_head' align='center'><img src='images/t-size.png' border='0' title='".T_("SIZE")."'></td>
<td class='table_head' align='center'><img src='images/t-date.png' border='0' title='".T_("ADDED")."'></td>
<td class='table_head' align='center'><img src='images/arrow_up.png' border='0' title='".T_("SEEDERS")."'></td>
<td class='table_head' align='center'><img src='images/arrow_down.png' border='0' title='".T_("LEECHERS")."'></td>";
if ($site_config["ALLOWEXTERNAL"]) {
echo "<td class='table_head' align='center'><img src='images/t_le.png' border='0' title='".T_("T_L_OR_E")."'></td>";
}
echo "</tr>\n";
   
while ($a = mysql_fetch_assoc($r))
{
//==| Category
           $r2 = SQL_Query_exec("SELECT name, image, parent_cat FROM categories WHERE id=$a[category]");
           $a2 = mysql_fetch_assoc($r2);
           $cat = "<img src='images/categories/".$a2['image']."' alt='".$a2['name']."' title='".$a2['parent_cat']." - ".$a2['name']."'>";

//==| Bookmark Torrents
$bookt = SQL_Query_exec("SELECT torrentid FROM bookmarks WHERE torrentid = $id AND userid = $CURUSER[id]");
if (mysql_num_rows($bookt) > 0) { $bookmark = "<a href='takedelbookmark.php?bookmarkid=".$row[id]."'><img src='images/bookmark_delete.png' border='0' title='".T_("T_DELETE_BOOKMARK")."'></a>"; }
else { $bookmark = "<a href='bookmarks.php?torrent=$id'><img src='images/bookmark.png' border='0' title='".T_("T_ADD_BOOKMARK")."'></a>"; }

//==| Free Leech Torrents
if ($a["freeleech"] == 1 && $a["external"] != "yes") { $freeleech = "<img src='images/free.png' border='0' title='".T_("T_FREE_LEECH")."'>"; } else { $freeleech = ""; }

//==| Subtitles
if ($a["rosub"] == "yes") { $rosub = "<img src='images/rosub.png' border='0' title='".T_("ROSUBBED")."'>"; } else { $rosub = ""; }
if ($a["ensub"] == "yes") { $ensub = "<img src='images/flag.eng.png' border='0' title='".T_("ENSUBBED")."'>"; } else { $ensub = ""; }
if ($a["roeng"] == "yes") { $roeng = "<img src='images/ro-eng-flag.png' border='0' title='".T_("ROENGSUBBED")."'>"; } else { $roeng = ""; }

//==| IMDB Link
if (!empty($a["imdb"])) { $imdb = "<a href=".$a["imdb"]." target='blank'><img src='images/imdb.png' border='0' title='".T_("T_IMDB")."'></a>"; } else { $imdb = ""; }

//==| Torrents Genre
if (!empty($a["genre"])) { $genre = "&nbsp;".T_("GENRE").": ".$a["genre"].""; } else { $genre = ""; }

//==| Local/External Torrent
if ($site_config["ALLOWEXTERNAL"]) {
if ($a["external"]=='yes') { $external = "<img src='images/t_extern.png' border='0' title='".T_("T_EXTERNAL_TORRENT")."'>"; }
else { $external = "<img src='images/t_local.png' border='0' title='".T_("T_LOCAL_TORRENT")."'>"; }
}

$char1 = 50; // cut name length
$smallname = htmlspecialchars(CutName($a["name"], $char1));
$dispname = "<b>".$smallname."</b>";

echo"<tr>";
echo"<td class='table_col2' align='center'>$cat</td>";
echo"<td class='table_col2'>$bookmark <a href=\"javascript: klappe_torrent('t".$a['id']."')\"></a><a title=\"".$a["name"]."\" href=\"torrents-details.php?id=$a[id]&hit=1\">$dispname</a> $freeleech $rosub $ensub $roeng<div style=margin-top:3px>$imdb $genre</div></td>";
echo"<td class='ttable_col2' align='center'><a href=\"download.php?id=".$a['id']."&name=".rawurlencode($a["filename"])."\"><img src='images/icon_down.png' border='0' title=\"".T_("T_DOWNLOAD_TORRENT")."\" /></a></td>";
echo"<td class='table_col1' align='center'>".mksize($a[size])."</td>";
echo"<td class='table_col2' align='center'>".date("<\\b>d.M.Y<\\/\\b><\\b\\r>H:i", utc_to_tz_time($a[added]))."</td>";
echo"<td class='table_col1' align='center'><font color='#00BA00'><b>".$a['seeders']."</b></font></td>";
echo"<td class='table_col2' align=center><font color='#FF0000'><b>".$a['leechers']."</b></font></td>";
if ($site_config["ALLOWEXTERNAL"]) {
echo "<td class='table_col1' align='center'>".$external."</td>";
}
echo"</tr>\n";
}
echo "</table>";
     
   }
else {
print(T_("NOTHING_FOUND"));
}
end_frame();
//===| End Similar Torrents |===//


//===| Start Comments |===//
if($CURUSER["commentbanned"]=="yes")
show_error_msg("Access Denied","You was banned to use comments!",0);
else
{
begin_frame(T_("COMMENTS"));

$subres = SQL_Query_exec("SELECT COUNT(*) FROM comments WHERE torrent = $id");
$subrow = mysql_fetch_array($subres);
$commcount = $subrow[0];

if ($commcount) {
$perpage = 25;
list($pagertop, $pagerbottom, $limit) = pager($perpage, $commcount, "torrents-details.php?id=$id&");
$commquery = "SELECT comments.id, text, user, comments.added, avatar, signature, username, title, class, uploaded, downloaded, privacy, donated FROM comments LEFT JOIN users ON comments.user = users.id WHERE torrent = $id ORDER BY comments.added DESC $limit";
$commres = SQL_Query_exec($commquery);
} else {
unset($commres);
}

if ($commcount) {
if ($commcount > $perpage) { print($pagertop); }
elseif ($commcount > 1) { print("<div style='margin-top:10px; margin-bottom:15px; font:bold 14px Times; color:#0080FF' align='center'>".T_("HERE_ARE")." ".$commcount." ".T_("COMMENTS")."</div>\n"); }
commenttable($commres, 'torrent');
if ($commcount > $perpage) { print($pagerbottom); }
} else {
print("<div style='margin-top:10px; margin-bottom:20px; font:bold 14px Georgia; color:#FF2000' align='center'>" .T_("NOCOMMENTS"). "<font style='margin-left:2px'>!</font></div>\n");
}

require_once("backend/bbcode.php");

//===| Start Shout Condition |===//
$days = $site_config['WAIT_TO_SHOUT'];
$ages = get_date_time(gmtime() - $days);
//===| End Shout Condition |===//

if ($CURUSER && $ages > $CURUSER["added"])
{
echo "<center>";
echo "<form name=\"comment\" method=\"post\" action=\"torrents-details.php?id=$row[id]&takecomment=yes\">";
echo textbbcode("comment","body")."";
echo "<div style='margin-top:10px; margin-bottom:20px'><input type=\"submit\" value=\"".T_("ADDCOMMENT")."\" /></div>";
echo "</form>";
echo "</center>";
}
end_frame();
}
//===| End Comments |===//

stdfoot();
?>
Strange torrents problem — 2021-10-30 19:57:03 in v3 Support
This is
Strange torrents problem — 2021-10-30 18:30:47 in v3 Support
Hi guys, I have a strange problem and I can't figure out where my mistake is.
If I'm on the index page (also the same in the torrents.php) and I click on the torrent it doesn't open the link it looks like this https://ftzone.xyz/torrents-details.php?id=55602&hit=1
and when i delete &hit=1 torrents details opens normally.
In the chat, however, when I click on the link to the uploaded torrent, it also opens normally
Thanks and Regards
:unsure
SQL Error — 2021-09-07 21:43:22 in v3 Support
DigiBolly:
how to disable strict mode in my sql server I am use cPanel hosting


Open up /etc/my.cnf with your favorite text editor
Look for sql_mode, if there is no sql_mode, add it at the end of the file
sql_mode = "NO_ENGINE_SUBSTITUTION"
Restart MySQL service

That is
Mine look like this:
SQL_Query_exec("UPDATE `announce` SET `online` = 'yes', `seeders` = '".$stats['seeds']."', `leechers` = '".$stats['peers']."', `times_completed` = '".$stats['downloaded']."' WHERE `url` = ".sqlesc($ann)." AND `torrent` = $rowu[id]");
}
else
{
SQL_Query_exec("UPDATE `announce` SET `online` = 'no' WHERE `url` = ".sqlesc($ann)." AND `torrent` = $rowu[id]");
}
xxx filter — 2021-08-01 13:02:04 in v2.08 Mods Completed
@Extremlym66 view this topic,
maybe that's what you're looking for

https://torrenttrader.uk/topic?topicid=9837
:smile
For me, the working option is that of MM and works great
Mine is:
spl_autoload_register(function ($f) {
   require_once('backend/' . $f . '.php');
});
Test site with php 8 — 2021-07-30 18:50:16 in v3 Support
It's very difficult for me guys but I try and thank you very much
Test site with php 8 — 2021-07-29 10:09:53 in v3 Support
Thanks for the answers guys, I will try everything
Test site with php 8 — 2021-07-28 10:21:42 in v3 Support
Quote:
M-jay wrote:
For offset need to see line really


Line 738 in torrents-details.php is:
$shortname = CutName(htmlspecialchars($a["name"]), $char1);

And also this line how must be changed I do not understand.
This is (Undefined array key "action")
$action = $_REQUEST["action"];

Thanks M-jay

Edit: Maybe this line:
$action = $_REQUEST["action"];

Replace like this:
if (array_key_exists($_REQUEST,['action'])) {
   $action = ?????
}

:unsure
Test site with php 8 — 2021-07-27 06:01:17 in v3 Support
Hello again guys .
I'm trying PHP 8 on TTV3MySQLi but I have a few errors and I don't know what they are. I will be very happy if you help  :smile

Warning: Undefined array key "id" in /home/xxxx/public_html/backend/functions.php on line 1390
Warning: Undefined array key "search" in /home/xxxx/public_html/backend/functions.php on line 1392
Warning: Undefined array key "name" in /home/xxxx/public_html/backend/functions.php on line 1397
Warning: Undefined array key "search" in /home/xxxx/public_html/backend/functions.php on line 1402
Warning: Undefined array key "id" in /home/xxxx/public_html/backend/functions.php on line 1390
Warning: Undefined array key "search" in /home/xxxx/public_html/backend/functions.php on line 1392
Warning: Undefined array key "name" in /home/xxxx/public_html/backend/functions.php on line 1397
Warning: Undefined array key "search" in /home/xxxx/public_html/backend/functions.php on line 1402
Warning: Undefined array key "action" in /home/xxxx/public_html/admincp.php on line 12
Warning: Undefined array key "do" in /home/xxxx/public_html/admincp.php on line 13


And
Warning: Undefined variable $wait in /home/xxxx/public_html/backend/functions.php on line 1019
Warning: Undefined variable $new in /home/xxxx/public_html/backend/functions.php on line 1100
Warning: Undefined variable $wait in /home/xxxx/public_html/backend/functions.php on line 1194
Warning: Undefined variable $new in /home/xxxx/public_html/backend/functions.php on line 1100
Warning: Undefined variable $wait in /home/xxxx/public_html/backend/functions.php on line 1194
Warning: Undefined variable $new in /home/xxxx/public_html/backend/functions.php on line 1100


And
Warning: Trying to access array offset on value of type null in /home/xxxx/public_html/torrents-details.php on line 738


Thanks in advance
Bug Tracker — 2021-07-23 08:32:26 in M-BiTsy Support
Hm I have some problems

Uncaught Exception: 2021-07-23 06:42:03 - call_user_func_array(): Argument #1 ($function) must be a valid callback, class Admincontactstaff does not have a method "index" in file /home/xxxxx/public_html/app/libraries/Core.php on line 51

Call Stack


And when edit torrent

[0] File: /home/xxxxx/public_html/public_html/index.php Line: 4
Function: Core->__construct
Uncaught Exception: 2021-07-23 08:02:59 - call_user_func_array(): Argument #1 ($function) must be a valid callback, class Adminsearch does not have a method "index" in file /home/xxxxx/public_html/app/libraries/Core.php on line 51

Call Stack

[0] File: /home/xxxxx/public_html/public_html/index.php Line: 4
Function: Core->__construct
Uncaught Exception: 2021-07-23 08:12:25 - Call to a member function rowCount() on null in file /home/xxxxx/public_html/app/views/torrent/trackerlist.php on line 9

Call Stack

[0] File: /home/xxxxx/public_html/app/libraries/View.php Line: 19
Function: require_once

[1] File: /home/xxxxx/public_html/app/controllers/Torrent.php Line: 362
Function: View::render

[2] File: /home/xxxxx/public_html/app/libraries/Core.php Line: 51
Function: Torrent->torrenttrackerlist

[3] File: /home/xxxxx/public_html/public_html/index.php Line: 4
Function: Core->__construct
Uncaught Exception: 2021-07-23 08:15:01 - SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'action-packed spy thriller "Black Widow," Natasha Romanoff aka Black Widow co...' at line 1 in file /home/xxxxx/public_html/app/libraries/DB.php on line 35

Call Stack

[0] File: /home/xxxxx/public_html/app/libraries/DB.php Line: 35
Function: PDO->query

[1] File: /home/xxxxx/public_html/app/controllers/Torrent.php Line: 254
Function: DB::run

[2] File: /home/xxxxx/public_html/app/libraries/Core.php Line: 51
Function: Torrent->submit

[3] File: /home/xxxxx/public_html/public_html/index.php Line: 4
Function: Core->__construct



Or maybe I got the site wrong path  :unsure

I put the folders like this:
home/xxxxx/public_html and in directory public_html i put
app
data
public_html
htaccess

maybe I was wrong  :unsure

Edit: Oh maybe that is the answer
Quote:
Only the contents of public_html go in the public folder.
Torrent and Profile Views mod
Credit to original author djhowarth. Big Thanks for this great mod

Run SQL

CREATE TABLE IF NOT EXISTS `trackerviews` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`subject` int(10) unsigned NOT NULL DEFAULT '0',
`viewer` int(10) unsigned NOT NULL DEFAULT '0',
`count` int(10) NOT NULL DEFAULT '0',
`type` enum('torrent','profile') DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;


Open torrents-details.php and find:

if ($_GET["hit"]) {
 SQL_Query_exec("UPDATE torrents SET views = views + 1 WHERE id = $id");
 header("Location: torrents-details.php?id=$id");
 die;
 }


Replace with:

if ($_GET["hit"])
{
    $query = (mysqli_fetch_row(SQL_Query_exec("SELECT COUNT(*) FROM `trackerviews` WHERE `viewer` = " . $CURUSER["id"] . " AND `subject` = '$id' AND `type` = 'torrent'")));
    if ($query[0] == 0)
    {
        SQL_Query_exec("INSERT INTO `trackerviews` (`subject`, `viewer`, `count`, `type`)
        VALUES (" . $id . ", " . $CURUSER["id"] . ", '1', 'torrent')");
    }
    else
    {
        SQL_Query_exec("UPDATE `trackerviews` SET `count` = `count` + '1' WHERE `subject` = '$id' AND `viewer` = " . $CURUSER["id"] . " AND `type` = 'torrent'");
    }
   
    header("Location: torrents-details.php?id=$id");
    die;
}


Also find:

print("<tr><td align='left'><b>".T_("HITS").":</b></td><td>" . number_format($row["hits"]) . "</td></tr>\n");


Replace with:

/* Torrent Views... */

 $query = SQL_Query_exec("SELECT DISTINCT(viewer), username, count FROM trackerviews LEFT JOIN users ON trackerviews.viewer = users.id WHERE trackerviews.type = 'torrent' AND trackerviews.subject = '$id' AND users.privacy != 'strong' AND users.status = 'confirmed' AND users.enabled = 'yes' LIMIT 10");
 
 if (mysqli_num_rows($query) > 0)
 {
     print("<tr><td align='left'><b>".T_("VIEWED_BY").":</b></td><td>");
     
          $user = "";
       
     while ($rows = mysqli_fetch_array($query))
     {
          $user .= "<a href='account-details.php?id=" . $rows["viewer"] . "'>" . class_user($rows["username"]) . "</a> (" . number_format($rows["count"]) . "), ";
     }
     
     $users  = substr($user, 0, (strlen($user) - 2));
     
     print( $users . "</td></tr>");
 }
 else
 {
     print("<tr><td align='left'><b>".T_("VIEWED_BY").":</b></td><td><strong>".T_("TORRENT_NOT_VIEWED")."</strong></td></tr>\n");
 }
 
/* End */


Features...

- show users visited the torrent aslong as there privacy is not strong
- seperator , of last comma removed...
- (count) of views / times they visted the torrent...
- This replaces the standard hits/views code

-------------------------------------------------------------

For Profile Views Continue Open account-details.php and find:

if (($user["enabled"] == "no" || ($user["status"] == "pending")) && $CURUSER["edit_users"] == "no")
   show_error_msg(T_("ERROR"), T_("NO_ACCESS_ACCOUNT_DISABLED"), 1);


Underneath Add:

if ($CURUSER["id"] != $id)
{
   $query = (mysqli_fetch_row(SQL_Query_exec("SELECT COUNT(*) FROM `trackerviews` WHERE `viewer` = " . $CURUSER["id"] . " AND `subject` = '$id' AND `type` = 'profile'")));
   if ($query[0] == 0)
   {
        SQL_Query_exec("INSERT INTO `trackerviews` (`subject`, `viewer`, `count`, `type`) VALUES (" . $id . ", " . $CURUSER["id"] . ", '1', 'profile')");
   }
   else
   {
        SQL_Query_exec("UPDATE `trackerviews` SET `count` = `count` + '1' WHERE `subject` = '$id' AND `viewer` = " . $CURUSER["id"] . " AND `type` = 'profile'");
   }
}


Also find:

}else{
echo sprintf(T_("REPORT_MEMBER_MSG"), $user["id"]);
}

end_frame();


Underneath Add:

if ($user["privacy"] != "strong" || ($CURUSER["control_panel"] == "yes"))
{
   begin_frame(T_("PROFILE_VIEWS"));
   
   $query = SQL_Query_exec("SELECT DISTINCT(viewer), username, count FROM trackerviews LEFT JOIN users ON trackerviews.viewer = users.id WHERE trackerviews.type = 'profile' AND trackerviews.subject = '$id' AND users.privacy != 'strong' AND users.status = 'confirmed' AND users.enabled = 'yes' LIMIT 10");
   
   if (mysqli_num_rows($query) > 0)
   {      
              $view = "";  
         
              while ($rows = mysqli_fetch_array($query))
       {
           $view .= "<a href='account-details.php?id=" . $rows["viewer"] . "'>" . class_user($rows["username"]) . "</a> (" . number_format($rows["count"]) . "), ";      
       }
       
        $users  = substr($view, 0, (strlen($view) - 2));
       
        echo($users);
   }
   else
   {
       echo("<center><strong>".T_("NO_PROFILE_VIEWS")."</strong></center>");
   }
                       
   end_frame();
}


In the file english.php add:

$LANG["VIEWED_BY"] = "Viewed by";
$LANG["TORRENT_NOT_VIEWED"] = "This torrent has not had any views yet";
$LANG["PROFILE_VIEWS"] = "Profile views";
$LANG["NO_PROFILE_VIEWS"] = "This member has had no profile views";

Profile:


Torrent:
Greetings to all.
I want to ask this will work on ajaxshoutbox and how must be changed

Regards

Online Radio — 2021-07-04 18:42:00 in v2.08 Mods Completed
Hi guys,
how to change this line in online-radio.php:
<embed type='application/x-mplayer2' id='music2' pluginspage='http://www.microsoft.com/Windows/MediaPlayer/' src='"+document.getElementById('cancion').value+"' name='MediaPlayer1' width='400' height='64' controltype='1' showcontrols='1' showstatusbar='1' AutoStart='true'></embed>

to play radio online.
When I click on radio block a new window opens and radio did not work


Thanks you all
Users online

No users online

Search



Statistics

    Torrents

  • Tracking: 3
  • Todays torrents: 0
  • Seeders: 0
  • Leechers: 0
  • Peers: 0
  • Downloaded: 89.96 GB
  • Uploaded: 9.86 GB

  • Members

  • We have: 838
  • New today: 0
  • Guest today: 9

  • Online

  • Total online: 1
  • Members: 0
  • Guests online: 1
  • Comments: 3
  • Messages: 1,728