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

Upload an avatar — 2026-01-10 08:46:00 in v3 Mods Completed
Bonjour
Impeccable  đź‘Ť
Make torrents private — 2023-08-12 18:35:21 in v3 Mods Completed
my code in torrents-imports.php

<?php
//
//  TorrentTrader v2.x
require_once("backend/functions.php");
dbconn();
loggedinonly();
$dir = "import";


function typelist1() {
   $ret = array();
   $res = SQL_Query_exec("SELECT name FROM genre WHERE type='Film' ORDER BY name ASC");
   while ($row = mysql_fetch_assoc($res))
       $ret[] = $row;
   return $ret;
}



//ini_set("upload_max_filesize",$max_torrent_size);

$files = array();
$dh = opendir("$dir/");
while (false !== ($file=readdir($dh))) {
  if (preg_match("/\.torrent$/i", $file))
     $files[] = $file;
}
closedir($dh);


// check access and rights
if ($CURUSER["edit_torrents"] != "yes")
  show_error_msg(T_("ERROR"), T_("ACCESS_DENIED"), 1);

$announce_urls = explode(",", strtolower($site_config["announce_list"]));  //generate announce_urls[] from config.php

if ($_POST["takeupload"] == "yes") {
  set_time_limit(0);
  require_once("backend/parse.php");
  stdhead(T_("UPLOAD_COMPLETE"));
  begin_frame(T_("UPLOAD_COMPLETE"));
  echo "<center>";

  //check form data
  $catid = (int)$_POST["type"];

  if (!is_valid_id($catid))
     $message = T_("UPLOAD_NO_CAT");
 
  if (empty($message)) {
     $r = SQL_Query_exec("SELECT name, parent_cat FROM categories WHERE id=$catid");
     $r = mysql_fetch_row($r);

     echo "<b>Category:</b> ".htmlspecialchars($r[1])." -> ".htmlspecialchars($r[0])."<br />";
     for ($i=0;$i<count($files);$i++) {
        $fname = $files[$i];

       
 
        preg_match('/^(.+)\.torrent$/si', $fname, $matches);
        $shortfname = $torrent = $matches[1];

        //parse torrent file
        $torrent_dir = $site_config["torrent_dir"];  

        $TorrentInfo = array();
        $TorrentInfo = ParseTorrent("$dir/$fname");


        $announce = strtolower($TorrentInfo[0]);
        $infohash = $TorrentInfo[1];
        $creationdate = $TorrentInfo[2];
        $internalname = $TorrentInfo[3];
        $torrentsize = $TorrentInfo[4];
        $filecount = $TorrentInfo[5];
        $annlist = $TorrentInfo[6];
        $comment = $TorrentInfo[7];
       
        $message = "<br /><br /><hr /><br /><b>$internalname</b><br /><br />fname: ".htmlspecialchars($fname)."<br />message: ";

        //check announce url is local or external
        if (!in_array($announce, $announce_urls, 1))
           $external='yes';
        else
           $external='no';

        if (!$site_config["ALLOWEXTERNAL"] && $external == 'yes') {
           $message .= T_("UPLOAD_NO_TRACKER_ANNOUNCE");
           echo $message;
           continue;
        }
  $name = $internalname;
  $name = str_replace(".torrent","",$name);
  $name = str_replace(".avi", "", $name);
  $name = str_replace(".mkv", "", $name);
  $name = str_replace(".mp4", "", $name);
  $name = str_replace(".mp3", "", $name);
  $name = str_replace(".flac", "", $name);
  $name = str_replace("_", " ", $name);
  $name = str_replace(".", " ", $name);
  $name = str_replace("'", " ", $name);


  if ($_POST["nomc"]=="")
  $nomc = $name;
  else $nomc= $_POST["nomc"];
  $nomc = str_replace(".torrent","",$nomc);
  $nomc = str_replace(".avi", "", $nomc);
  $nomc = str_replace(".mkv", "", $nomc);
  $nomc = str_replace(".mp4", "", $nomc);
  $nomc = str_replace(".mp3", "", $nomc);
  $nomc = str_replace(".flac", "", $nomc);
  $nomc = str_replace("_", " ", $nomc);
  $nomc = str_replace(".", " ", $nomc);
 
// nfo
      $nfo = 'no';
       
 if ($_FILES['nfo']['size'] != 0) {
   $nfofile = $_FILES['nfo'];

   if ($nfofile['name'] == '')
     $message = T_("NO_NFO_UPLOADED");
     
   if (!preg_match('/^(.+)\.nfo$/si', $nfofile['name'], $fmatches))
     $message = T_("UPLOAD_NOT_NFO");

   if ($nfofile['size'] == 0)
     $message = T_("NO_NFO_SIZE");

   if ($nfofile['size'] > 65535)
     $message = T_("NFO_UPLOAD_SIZE");

   $nfofilename = $nfofile['tmp_name'];

       if (($num = $_FILES['nfo']['error']))
            $message = T_("UPLOAD_ERR[$num]");
       
   $nfo = 'yes';
 }
        //anonymous upload
        $anonyupload = $_POST["anonycheck"];
        if ($anonyupload == "yes")
           $anon = "yes";
        else
           $anon = "no";
  $genre = $_POST["genre"];
  $serietv = $_POST["serietv"];
  $exclu = $_POST["exclu"];
  $freeleech = $_POST["freeleech"];
  $emission = $_POST["emission"];
  $soustitre = $_POST["soustitre"];
  $saisontv = $_POST["saisontv"];
  $annee = $_POST["annee"];
  $langid = $_POST["lang"];
  $highspeed = $_POST["highspeed"];


$fin = $_POST["fin"];

$avant1 = $_POST["avant"];
if ($_POST["avant"]!="")
$avant = "$avant1 ";
else $avant="";
$name1= "$avant$name $fin";

if ($_POST["qui"]=="")
$qui = $CURUSER['id'];
else
$qui = $_POST["qui"];

// images
  $allowed_types = &$site_config["allowed_image_types"];
  $inames = array();
  for ($x=0; $x < 2; $x++) {
     if (!($_FILES[image.$x]['name'] == "")) {
        $y = $x + 1;
        //if (!preg_match('/^(.+)\.(jpg|gif|png)$/si', $_FILES[image.$x]['name']))
        // show_error_msg(T_("INVAILD_IMAGE"), T_("THIS_FILETYPE_NOT_IMAGE"), 1);
        if ($_FILES['image$x']['size'] > $site_config['image_max_filesize'])
           show_error_msg(T_("ERROR"), T_("INVAILD_FILE_SIZE_IMAGE"), 1);
        $uploaddir = $site_config["torrent_dir"]."/images/";
        $ifile = $_FILES[image.$x]['tmp_name'];
        $im = getimagesize($ifile);
        if (!$im[2])
           show_error_msg(T_("ERROR"), sprintf(T_("INVALID_IMAGE"), $y), 1);
        if (!array_key_exists($im['mime'], $allowed_types))
           show_error_msg(T_("ERROR"), T_("INVALID_FILETYPE_IMAGE"), 1);
        $ret = SQL_Query_exec("SHOW TABLE STATUS LIKE 'torrents'");
        $row = mysql_fetch_array($ret);
        $next_id = $row['Auto_increment'];
        $ifilename = $next_id . $x . $allowed_types[$im['mime']];
        $copy = copy($ifile, $uploaddir.$ifilename);
        if (!$copy)
           show_error_msg(T_("ERROR"), sprintf(T_("IMAGE_UPLOAD_FAILED"), $y), 1);
        $inames[] = $ifilename;
     }}
 

        $ret = SQL_Query_exec("INSERT INTO torrents (valide, highspeed, nfo, soustitre, image1, image2, annee, saisontv, genre, serietv, nomc, emission, freeleech, exclu, filename, owner, name, category, added, info_hash, size, numfiles, save_as, announce, external, torrentlang, anon, last_action)
         VALUES ('yes', '$highspeed', ".sqlesc($nfo).", ".sqlesc($soustitre).", '".$inames[0]."', '".$inames[1]."', ".sqlesc($annee).", ".sqlesc($saisontv).", ".sqlesc($genre).", '$serietv', ".sqlesc($nomc).", '$emission', '$freeleech', '$exclu',".sqlesc($fname).", ".$qui.", ".sqlesc($name1).", '".$catid."', '" . get_date_time() . "', '".$infohash."', '".$torrentsize."', '".$filecount."', ".sqlesc($fname).", '".$announce."', '".$external."', '".$langid."','$anon', '".get_date_time()."')");

        $id = mysql_insert_id();
 
        if (mysql_errno() == 1062) {
           $message .= T_("UPLOAD_ALREADY_UPLOADED");
           echo $message;
           continue;
        }

        if($id == 0){
           $message .= T_("UPLOAD_NO_ID");
           echo $message;
           continue;
        }
   
        copy("$dir/$files[$i]", "uploads/$id.torrent");

        //EXTERNAL SCRAPE
        if ($external=='yes' && $site_config['UPLOADSCRAPE']) {  
           $tracker        = str_replace("/announce","/scrape",$announce);  
           $stats          = torrent_scrape_url($tracker, $infohash);
           $seeders       = strip_tags($stats['seeds']);
           $leechers       = strip_tags($stats['peers']);
           $downloaded    = strip_tags($stats['downloaded']);

           SQL_Query_exec("UPDATE torrents SET leechers='".$leechers."', seeders='".$seeders."',times_completed='".$downloaded."',last_action= '".get_date_time()."',visible='yes' WHERE id='".$id."'");
        }
        //END SCRAPE

        write_log("Torrent $id ($name) was Uploaded by $CURUSER[username]");

        $message .= "<br /><b>".T_("UPLOAD_OK")."</b><br /><a href='torrents-details.php?id=".$id."'>".T_("UPLOAD_VIEW_DL")."</a><br /><br />";
        echo $message;
        @unlink("$dir/$fname");
     }
  echo "</center>";
  end_frame();
  stdfoot();
  die;
  }else
     show_error_msg(T_("UPLOAD_FAILED"), $message, 1);

}//takeupload

///////////////////// FORMAT PAGE ////////////////////////

stdhead(T_("UPLOAD"));

begin_frame(T_("UPLOAD"));
?>
<form name="upload" enctype="multipart/form-data" action="torrents-import.php" method="post">
<input type="hidden" name="takeupload" value="yes" />
<table border="0" cellspacing="0" cellpadding="6" align="center">
<tr><td align="right" valign="top"><b>File List:</b></td><td align="left"><?php
if (!count($files))
  echo T_("NOTHING_TO_SHOW_FILES")." $dir/.";
else{
  foreach ($files as $f)
     echo htmlspecialchars($f)."<br />";
  echo "<br />Total files: ".count($files);
}?></td></tr>
<?php
$category = "<select name=\"type\">\n<option value=\"0\">" .T_("CHOOSE_ONE"). "</option>\n";

$cats = genrelist();
foreach ($cats as $row)
  $category .= "<option value=\"" . $row["id"] . "\">" . htmlspecialchars($row["parent_cat"]) . ": " . htmlspecialchars($row["name"]) . "</option>\n";

$category .= "</select>\n";
print ("<tr><td align='right'>" .T_("CATEGORY"). ": </td><td align='left'>".$category."</td></tr>");
print ("<tr><td align='right'>Nom court du torrent: </td><td align='left'><input type='text' name='nomc' size='60' value='" . $_POST['nomc'] . "' /> <font size=3 color=red>*</font><br /><font color=red>Merci de mettre le nom sans tiret, point, tag, annnée et sans apostrophe</font> \n</td></tr>");


$language = "<select name=\"lang\">\n<option value=\"0\">Inconnu/NA</option>\n";
$langs = langlist();
foreach ($langs as $row)
$language .= "<option value=\"".$row["id"] ."\">" . htmlspecialchars($row["name"]) . "</option>\n";
$language .= "</select>\n";

print ("<tr><td align='right'> Mettre a l'avant du nom: </td><td align='left'> <input type='text' name='avant' size='50' value='" . $_POST['avant'] ."'> </td></tr>");
print ("<tr><td align='right'> Mettre a la fin du nom: </td><td align='left'> <input type='text' name='fin' size='50' value='" . $_POST['fin'] ."'> </td></tr>");

print ("<tr><td align='right'>Language: </td><td align='left'>".$language."</td></tr>");
print ("<tr><td align='right'> Année Production: </td><td align='left'> <input type='text' name='annee' size='10' value='" . $_POST['annee'] ."'> <font size=3 color=red>*</font></td></tr>");
print ("<tr><td align='right'>".T_("IMAGE")." :&nbsp;</td><td><input type='file' name='image0' size='50' /><br /><font color=red>".T_("MAX_FILE_SIZE").": ".mksize($site_config['image_max_filesize'])."  ".T_("ACCEPTED_FORMATS").": ".implode(", ", array_unique($site_config["allowed_image_types"]))."</font></td></tr>");
print ("<tr><td align='right'>" .T_("NFO"). ": </td><td align='left'> <input type='file' name='nfo' size='50' value='" . $_FILES['nfo']['name'] . "' /> [<a href='nfogen.php' target='_blank'>" . T_("GENERATE_NFO") . "</a>]<br />\n</td></tr>");

print ("<tr><td align='right'> Qui upload: </td><td align='left'> <input type='text' name='qui' size='10' value='" . $_POST['qui'] ."'> TheFondateur = 1 si vide c'est ton nom</td></tr>");


$genre = "<select name=\"genre\">\n<option value=\"\">Selectionné un Genre</option>\n";
$gen = typelist1();
foreach ($gen as $row)
$genre .= "<option value=\"" . htmlspecialchars($row["name"]). "\">" . htmlspecialchars($row["name"]) . "</option>\n";
$genre .= "</select>\n";
print ("<tr><td align='right'>Genre: </td><td align='left'>".$genre."</td></tr>");
//print ("<tr><td align='right'>SeedBox: </td><td><input type=\"checkbox\" name=\"highspeed\"" .$highspeed. " value=\"1\" /> " .T_("HIGH_SPEED"). " </td></tr>");
print("<tr><td class='table_col2'align='right'>".T_("SEEDBOX").": </td><td class='table_col1' align='left'><input type=\"checkbox\" name=\"highspeed\"" .$highspeed. " value=\"1\" /> " .T_("SEEDBOX_MSG"). " </td></tr>");

print ("<tr><td align='right'>".T_("FREE_LEECH").": </td><td><input type=\"checkbox\" name=\"freeleech\"" .$freeleech. " value=\"1\" /> " .T_("FREE_LEECH_MSG"). " </td></tr>");

function typelists() {
   $ret = array();
   $res = SQL_Query_exec("SELECT id, nom, annee FROM serietv ORDER BY nom ASC");
   while ($row = mysql_fetch_assoc($res))
       $ret[] = $row;
   return $ret;
}
     $serietv = "<select name=\"serietv\">\n<option value=\"\">SĂ©lectionner une sĂ©rie</option>\n";
$serietvs = typelists();
foreach ($serietvs as $row)
$serietv .= "<option value=\"" . $row["id"]. "\">".htmlspecialchars($row["nom"])." (".$row["annee"].")</option>\n";
$serietv .= "</select>\n";
print ("<tr><td align='right'>Serie: </td><td> ".$serietv." <font size=3 color=red>*</font> </td></tr> ");

function typelistss() {
   $ret = array();
   $res = SQL_Query_exec("SELECT saison FROM saisontv ORDER BY id ASC");
   while ($row = mysql_fetch_assoc($res))
       $ret[] = $row;
   return $ret;
}
$saisontv = "<select name=\"saisontv\">\n<option value=\"\">Sélectionner une Saison</option>\n";
$saisontvs = typelistss();
foreach ($saisontvs as $row)
$saisontv .= "<option value=\"" . htmlspecialchars($row["saison"]). "\">" . htmlspecialchars($row["saison"]) . "</option>\n";
$saisontv .= "</select>\n";
print ("<tr><td align=right>Saison: </td><td align='left'>".$saisontv." <font size=3 color=red>*</font> ");


  function emission1() {
   $ret = array();
   $res = SQL_Query_exec("SELECT id, nom FROM emission ORDER BY nom ASC");
   while ($row = mysql_fetch_assoc($res))
       $ret[] = $row;
   return $ret;
}
$emission = "<select name=\"emission\">\n<option value=\"\">Sélectionner une Emission</option>\n";
$emissions = emission1();
foreach ($emissions as $row)
$emission .= "<option value=\"" . $row["id"]. "\">" . htmlspecialchars($row["nom"]) . "</option>\n";
$emission .= "</select>\n";
print ("<tr><td align='right'>Emission: </td><td align='left'>".$emission."</td></tr>");

if ($site_config['ANONYMOUSUPLOAD']){ ?>
  <tr><td align="right"><?php echo T_("UPLOAD_ANONY");?>: </td><td><?php printf("<input name='anonycheck' value='yes' type='radio' " . ($anonycheck ? " checked='checked'" : "") . " />Yes <input name='anonycheck' value='no' type='radio' " . (!$anonycheck ? " checked='checked'" : "") . " />No"); ?> &nbsp;<?php echo T_("UPLOAD_ANONY_MSG");?>
  </td></tr>
   <tr><td align="right">ExclusivitĂ©: </td><td><?php printf("<input name='exclu' value='yes' type='radio' " . ($exclu ? " checked='checked'" : "") . " />".T_("YES")." <input name='exclu' value='no' type='radio' " . (!$exclu ? " checked='checked'" : "") . " />".T_("NO").""); ?> &nbsp;<i><font color=green>N'utiliser que si c'est le seul site oĂą l'on trouvera cet Upload</font></i></td></tr>
   <tr><td align="right">Sous-Titre FR: </td><td><?php printf("<input name='soustitre' value='yes' type='radio' " . ($soustitre ? " checked='checked'" : "") . " />".T_("YES")." <input name='soustitre' value='no' type='radio' " . (!$soustitre ? " checked='checked'" : "") . " />".T_("NO").""); ?> &nbsp;<i><font color=green>N'utiliser que si sous-titre français au complet</font></i></td></tr>

<?php } ?>
<tr><td align="center" colspan="2"><input type="submit" value="<?php echo T_("UPLOAD")?>" /><br />
<i><?php echo T_("CLICK_ONCE_IMAGE");?></i></td></tr></table></form>
<?php
end_frame();
stdfoot();
?>




my code in torrents-details.php


// File List
//begin_frame(T_("FILE_LIST"));

echo "<fieldset width='65%' class='download'><b>".T_("FILE_LIST").":</b>&nbsp;<img src='images/plus.gif' id='pic1' onclick='klappe_torrent(1)' alt='' /><div id='k1' style='display: none;'><table align='center' cellpadding='0' cellspacing='0' class='table_table' border='0' width='100%'><tr><th width='1%' class='table_head'>&nbsp;".T_("FILE_LIST_EXTENSION")."</th><th class='table_head' align='left'>&nbsp;".T_("FILE")."</th><th class='table_head'>&nbsp;".T_("SIZE")."</th></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)) {
 $ext = pathinfo($frow['path'], PATHINFO_EXTENSION);
if ($ext !== false && $ext == 'mp3') {
$filetype_icon = "<img height=50  src=/themes/".$THEME."/images/torrents/mp3.png>";
}else if ($ext !== false && $ext == 'flac') {
$filetype_icon = "<img height=50  src=/themes/".$THEME."/images/torrents/flac.png>";
}else if ($ext !== false && $ext == 'URL') {
$filetype_icon = "<img height=50  src=/themes/".$THEME."/images/torrents/url.png>";
}else if ($ext !== false && $ext == 'pdf') {
$filetype_icon = "<img height=50  src=/themes/".$THEME."/images/torrents/pdf.png>";
}else if ($ext !== false && $ext == 'epub') {
$filetype_icon = "<img height=50  src=/themes/".$THEME."/images/torrents/epub.png>";
}else if ($ext !== false && $ext == 'm3u') {
$filetype_icon = "<img height=50  src=/themes/".$THEME."/images/torrents/m3u.png>";
}else if ($ext !== false && $ext == 'mp4') {
$filetype_icon = "<img height=50  src=/themes/".$THEME."/images/torrents/mp4.png>";
}else if ($ext !== false && $ext == 'png') {
$filetype_icon = "<img height=50  src=/themes/".$THEME."/images/torrents/png.png>";
}else if ($ext !== false && $ext == 'mkv') {
$filetype_icon = "<img height=50  src=/themes/".$THEME."/images/torrents/mkv.png>";
}else if ($ext !== false && $ext == 'iso') {
$filetype_icon = "<img height=50  src=/themes/".$THEME."/images/torrents/iso.png>";
}else if ($ext !== false && $ext == 'avi') {
$filetype_icon = "<img height=50  src=/themes/".$THEME."/images/torrents/avi.png>";
}else if ($ext !== false && $ext == 'nfo') {
$filetype_icon = "<img height=50  src=/themes/".$THEME."/images/torrents/nfo.png>";
}else if ($ext !== false && $ext == 'ape') {
$filetype_icon = "<img height=50  src=/themes/".$THEME."/images/torrents/ape.png>";
}else if ($ext !== false && $ext == 'cbr') {
$filetype_icon = "<img height=50  src=/themes/".$THEME."/images/torrents/cbr.png>";
}else if ($ext !== false && $ext == 'cbt') {
$filetype_icon = "<img height=50  src=/themes/".$THEME."/images/torrents/cbt.png>";
}else if ($ext !== false && $ext == 'divx') {
$filetype_icon = "<img height=50  src=/themes/".$THEME."/images/torrents/divx.png>";
}else if ($ext !== false && $ext == 'flv') {
$filetype_icon = "<img height=50  src=/themes/".$THEME."/images/torrents/flv.png>";
}else if ($ext !== false && $ext == 'mobi') {
$filetype_icon = "<img height=50  src=/themes/".$THEME."/images/torrents/mobi.png>";
}else if ($ext !== false && $ext == 'mov') {
$filetype_icon = "<img height=50  src=/themes/".$THEME."/images/torrents/mov.png>";
}else if ($ext !== false && $ext == 'mp2') {
$filetype_icon = "<img height=50  src=/themes/".$THEME."/images/torrents/mp2.png>";
}else if ($ext !== false && $ext == 'mpc') {
$filetype_icon = "<img height=50  src=/themes/".$THEME."/images/torrents/mpc.png>";
}else if ($ext !== false && $ext == 'mpg') {
$filetype_icon = "<img height=50  src=/themes/".$THEME."/images/torrents/mpg.png>";
}else if ($ext !== false && $ext == 'ogg') {
$filetype_icon = "<img height=50  src=/themes/".$THEME."/images/torrents/ogg.png>";
}else if ($ext !== false && $ext == 'rar') {
$filetype_icon = "<img height=50  src=/themes/".$THEME."/images/torrents/rar.png>";
}else if ($ext !== false && $ext == 'wav') {
$filetype_icon = "<img height=50  src=/themes/".$THEME."/images/torrents/wav.png>";
}else if ($ext !== false && $ext == 'wma') {
$filetype_icon = "<img height=50  src=/themes/".$THEME."/images/torrents/wma.png>";
}else if ($ext !== false && $ext == 'wmv') {
$filetype_icon = "<img height=50  src=/themes/".$THEME."/images/torrents/wmv.png>";
}else if ($ext !== false && $ext == 'zip') {
$filetype_icon = "<img height=50  src=/themes/".$THEME."/images/torrents/zip.png>";
}else if ($ext !== false && $ext == 'jpg') {
$filetype_icon = "<img height=50  src=/themes/".$THEME."/images/torrents/png.png>";
}      
echo "<tr><td class='table_col2' width='1%' align='center'>".$filetype_icon."</td><td class='table_col1' width='70%'>".htmlspecialchars($frow['path'])."</td><td class='table_col2' width='8%' align='center'>".mksize($frow['filesize'])."</td></tr>";
  }
}else{
  echo "<tr><td class='table_col1'>".htmlspecialchars($row["name"])."</td><td width='10%' class='table_col2'>".mksize($row["size"])."</td></tr>";
}
echo "</table></div>";
Make torrents private — 2023-08-12 17:43:54 in v3 Mods Completed
Good morning,
I would need some advice.
My problem is related to this Mod: https://torrenttrader.uk/post/10286
Let me explain:
when I import mkv, ie a folder with 20 torrents in it.
No problem.
https://imgur.com/a/GSRCymt
But when I import several folders with 1 mkv+1 nfo,
https://imgur.com/lcXpJ2h
The Mod https://torrenttrader.uk/post/10286 bug
Make torrents private — 2023-08-08 12:11:41 in v3 Mods Completed
Good morning
can we put your code in the "torrents-import.php"
french — 2023-08-02 17:42:43 in v3 Support
voila
presentation too long — 2023-07-14 09:23:28 in v2.08 Support
I solved the problem in several center tags.
And without changing the sql "longtext"

Really weird!
presentation too long — 2023-07-14 09:06:26 in v2.08 Support
Hi Botanicar, I just did as you said on both servers
it's the tag
and or
that causes the crash.
presentation too long — 2023-07-14 07:57:05 in v2.08 Support
Hi Botanicar,
I tested with v3

Mysql Version: 10.5.21-MariaDB
PHP-Version: 7.4.33

and v2.08

MySQL version: 5.5.62-0+deb8u1
PHP version: 5.6.40-0+deb8u12
Apache Version: Apache/2.4.10 (Debian)
presentation too long — 2023-07-14 06:17:50 in v2.08 Support
Good morning
Thank you both for responding.
But I changed to longtext and nothing changes .

presentation too long — 2023-07-09 14:55:27 in v2.08 Support
up
presentation too long — 2023-07-02 08:07:36 in v2.08 Support
Hello
there is a bug on tt 2.08 and 3.0
I am attaching a prez which poses a problem can you test please.
in preview mode it's ok

Previews don't work — 2023-03-23 14:57:39 in v3 Support
remove /mysite/
Previews don't work — 2023-03-23 14:51:47 in v3 Support
you have a log file ?
Previews don't work — 2023-03-23 14:38:46 in v3 Support

sudo chown -R www-data:www-data /var/www
sudo find /var/www -type d -exec chmod 2775 {} +
sudo find /var/www -type f -exec chmod 664 {} +

IMDb Mod [TTv3] — 2023-03-12 16:03:02 in v3 Mods Completed
la mise en page je ne peux le faire a ta place ! cela depend de ton thème , etc  ....
essayes de changer de place le code .
IMDb Mod [TTv3] — 2023-03-12 13:54:20 in v3 Mods Completed
essayes ce code !

<?php
require_once("backend/functions.php");
require_once("backend/BDecode.php");
dbconn();

$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(T_("ERROR"), T_("THATS_NOT_A_VALID_ID"), 1);

//GET ALL MYSQL VALUES FOR THIS TORRENT
$res = SQL_Query_exec("SELECT torrents.anon, torrents.seeders, torrents.banned, torrents.leechers, torrents.info_hash, torrents.filename, torrents.nfo, torrents.last_action, torrents.numratings, torrents.name, torrents.imdb, torrents.owner, torrents.save_as, torrents.descr, torrents.ddl, torrents.visible, torrents.size, torrents.added, torrents.views, torrents.hits, torrents.times_completed, torrents.id, torrents.type, torrents.external, torrents.image1, torrents.image2, torrents.announce, torrents.numfiles, torrents.freeleech, IF(torrents.numratings < 2, 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 = mysqli_fetch_assoc($res);

//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 ($_GET["hit"]) {
SQL_Query_exec("UPDATE torrents SET views = views + 1 WHERE id = $id");
header("Location: torrents-details.php?id=$id");
die;
}

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

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);

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

if (!$res) {
if (mysqli_errno($GLOBALS["DBconnector"]) == 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_SUCCESS"), T_("RATING_THANK")."<br /><br /><a href='torrents-details.php?id=$id'>" .T_("BACK_TO_TORRENT"). "</a>");
}

//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);

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

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

if (mysqli_affected_rows($GLOBALS["DBconnector"]) == 1)
show_error_msg(T_("COMPLETED"), T_("COMMENT_ADDED"), 0);
else
show_error_msg(T_("ERROR"), T_("UNABLE_TO_ADD_COMMENT"), 0);
}//end insert comment

//START OF PAGE LAYOUT HERE
$char1 = 50; //cut length
$shortname = CutName(htmlspecialchars($row["name"]), $char1);

begin_frame(T_("TORRENT_DETAILS_FOR"). " \"" . $shortname . "\"");

echo "<div align='right'>[<a href='report.php?torrent=$id'><b>" .T_("REPORT_TORRENT"). "</b></a>]&nbsp;";
if ($owned)
echo "[<a href='torrents-edit.php?id=$row[id]&returnto=" . urlencode($_SERVER["REQUEST_URI"]) . "'><b>".T_("EDIT_TORRENT")."</b></a>]";
echo "</div>";

echo "<center><h1>" . $shortname . "</h1></center>";

// 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 = mysqli_fetch_assoc($speedQ);
$totalspeed = mksize($a["totalspeed"]) . "/s";
}else{
$totalspeed = T_("NO_ACTIVITY");
}

//download box
echo "<center><table border='0' width='100%'><tr><td><div id='downloadbox'>";
if ($row["banned"] == "yes"){
print ("<center><b>" .T_("DOWNLOAD"). ": </b>BANNED!</center>");
}else{
print ("<table border='0' cellpadding='0' width='100%'><tr><td align='center' valign='middle' width='54'><a href=\"download.php?id=$id&name=" . rawurlencode($row["filename"]) . "\"><img src=\"".$site_config["SITEURL"]."/images/download_torrent.png\" border=\"0\" alt='' /></a></td>");







// === Added DDL
if (!empty($row["ddl"])) {
print ("<br />Direct download:<br /><a href='".$row['ddl']."' target='_blank'><img src='https://cdn3.iconfinder.com/data/icons/snowish/extras/internet-download.png' width='54'></a><br />");
}
else
{
print ("<br /> &nbsp;<br />");
}
// === Added DDL





print ("<td valign='top'><a href=\"download.php?id=$id&name=" . rawurlencode($row["filename"]) . "\">".T_("DOWNLOAD_TORRENT")."</a><br />");





print ("<b>" .T_("HEALTH"). ": </b><img src='".$site_config["SITEURL"]."/images/health/health_".health($row["leechers"], $row["seeders"]).".gif' alt='' /><br />");
print ("<b>" .T_("SEEDS"). ": </b><font color='green'>" . number_format($row["seeders"]) . "</font><br />");
print ("<b>".T_("LEECHERS").": </b><font color='#ff0000'>" .  number_format($row["leechers"]) . "</font><br />");

if ($row["external"]!='yes'){
print ("<b>".T_("SPEED").": </b>" . $totalspeed . "<br />");
}

print ("<b>".T_("COMPLETED").":</b> " . number_format($row["times_completed"]) . "&nbsp;");

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>]");
}
}
echo "<br />";

if ($row["external"]!='yes' && $row["freeleech"]=='1'){
print ("<b>".T_("FREE_LEECH").": </b><font color='#ff0000'>".T_("FREE_LEECH_MSG")."</font><br />");
}

print ("<b>".T_("LAST_CHECKED").": </b>" . date("d-m-Y H:i:s", utc_to_tz_time($row["last_action"])) . "<br /></td>");

if ($row["external"]=='yes'){

if ($scrape =='1'){
print("<td valign='top' align='right'><b>Tracked: </b>EXTERNAL<br /><br />");
$seeders1 = $leechers1 = $downloaded1 = null;

$tres = SQL_Query_exec("SELECT url FROM announce WHERE torrent=$id");
while ($trow = mysqli_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; // Scrape not supported, ignored
}

// TPB's tracker is dead. Use openbittorrent instead
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'];
SQL_Query_exec("UPDATE `announce` SET `online` = 'yes', `seeders` = $stats[seeds], `leechers` = $stats[peers], `times_completed` = $stats[downloaded] WHERE `url` = ".sqlesc($ann)." AND `torrent` = $id");
} else {
SQL_Query_exec("UPDATE `announce` SET `online` = 'no' WHERE `url` = ".sqlesc($ann)." AND `torrent` = $id");

}
}

if ($seeders1 !== null){ //only update stats if data is received
print ("<b>".T_("LIVE_STATS").": </b><br />");
print ("Seeders: ".number_format($seeders1)."<br />");
print ("Leechers: ".number_format($leechers1)."<br />");
print (T_("COMPLETED").": ".number_format($downloaded1)."<br />");

SQL_Query_exec("UPDATE torrents SET leechers='".$leechers1."', seeders='".$seeders1."', times_completed='".$downloaded1."',last_action= '".get_date_time()."',visible='yes' WHERE id='".$row['id']."'");
}else{
print ("<b>".T_("LIVE_STATS").": </b><br />");
print ("<font color='#ff0000'>Tracker Timeout<br />Please retry later</font><br />");
}

print ("<form action='torrents-details.php?id=$id&scrape=1' method='post'><input type=\"submit\" name=\"submit\" value=\"Update Stats\" /></form></td>");
}else{
print ("<td valign='top' align='right'><b>Tracked:</b> EXTERNAL<br /><br /><form action='torrents-details.php?id=$id&scrape=1' method='post'><input type=\"submit\" name=\"submit\" value=\"Update Stats\" /></form></td>");
}
}

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


echo "<fieldset class='download'><legend><b>Details</b></legend>";
echo "<table cellpadding='3' border='0' width='100%'>";
print("<tr><td align='left'><b>".T_("NAME").":</b></td><td>" . $shortname . "</td></tr>\n");
if(!empty($row["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->Alias = 'N/A';
              $_data->imdbVideo = null;
              }
              $TTCache->Set("imdb/$id", $_data, 900);
}

if ( is_object($_data) ): ?>
      <fieldset class="download">
      <legend><b><?php echo T_("IMDB_SHORT"); ?> - <?php echo $_data->Title; ?></b></legend>
      <table border="0" cellpadding="3" cellspacing="2" width="100%">
  <tr>
      <td width="230"><img src="<?php echo $_data->Poster; ?>" alt="<?php echo $_data->Title; ?>" title="<?php echo $_data->Title; ?>" height="317px" width="214px" /></td>
      <td valign="top">
      <b><?php echo T_("IMDB_LINK"); ?></b><br /> <a href="<?php echo $row['imdb']; ?>" target="_blank"><?php echo htmlspecialchars($row['imdb']); ?></a><br /><br />
      <b><?php echo T_("IMDB_RATED"); ?></b><br /> <?php echo $TTIMDB->getRated( $_data->Rated ); ?><br /><br />
      <b><?php echo T_("IMDB_ALIAS"); ?></b><br /> <?php echo $_data->Alias; ?><br /><br />
      <b><?php echo T_("IMDB_RELEASED"); ?></b><br /> <?php echo $TTIMDB->getReleased($_data->Released); ?><br /><br />
      <b><?php echo T_("IMDB_YEAR"); ?></b><br /> <?php echo $_data->Year; ?><br /><br />
      <b><?php echo T_("IMDB_RUNTIME"); ?></b><br /> <?php echo $_data->Runtime; ?><br /><br />
      <b><?php echo T_("IMDB_GENRE"); ?></b><br /> <?php echo $_data->Genre; ?><br /><br />
      <b><?php echo T_("IMDB_DIRECTOR"); ?></b><br /> <?php echo $_data->Director; ?><br /><br />
      <b><?php echo T_("IMDB_WRITER"); ?></b><br /> <?php echo $_data->Writer; ?><br /><br />
      <b><?php echo T_("IMDB_ACTORS"); ?></b><br /> <?php echo $_data->Actors; ?><br /><br />
      <b><?php echo T_("IMDB_PLOT"); ?></b><br /> <?php echo $_data->Plot; ?>
      </td>
<?php if (($rating = $TTIMDB->getRating($_data->imdbRating)) !== null): ?>
      <td valign="top" align="center">
<?php echo $rating; ?><br /><br />
      <b><?php echo T_("IMDB_VOTES"); ?></b> <?php echo $_data->imdbVotes; ?>
  </td>
      <?php endif; ?>
  </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;
}else{
print("<tr><td align='left' colspan='2'><b>" .T_("DESCRIPTION"). ":</b><br />" .  format_comment($row['descr']) . "</td></tr>\n");

}
print("<tr><td align='left'><b>" .T_("CATEGORY"). ":</b></td><td>" . $row["cat_parent"] . " > " . $row["cat_name"] . "</td></tr>\n");

if (empty($row["lang_name"])) $row["lang_name"] = "Unknown/NA";
print("<tr><td align='left'><b>" .T_("LANG"). ":</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>");

print("<tr><td align='left'><b>" .T_("TOTAL_SIZE"). ":</b></td><td>" . mksize($row["size"]) . " </td></tr>\n");
print("<tr><td align='left'><b>" .T_("INFO_HASH"). ":</b></td><td>" . $row["info_hash"] . "</td></tr>\n");
print("");
if ($row["anon"] == "yes" && !$owned)
print("<tr><td align='left'><b>" .T_("ADDED_BY"). ":</b></td><td>Anonymous</td></tr>");
elseif ($row["username"])
print("<tr><td align='left'><b>" .T_("ADDED_BY"). ":</b></td><td><a href='account-details.php?id=" . $row["owner"] . "'>" . $row["username"] . "</a></td></tr>");
else
print("<tr><td align='left'><b>" .T_("ADDED_BY"). ":</b></td><td>Unknown</td></tr>");

print("<tr><td align='left'><b>" .T_("DATE_ADDED"). ":</b></td><td>" . date("d-m-Y H:i:s", utc_to_tz_time($row["added"])) . "</td></tr>\n");
print("<tr><td align='left'><b>" .T_("VIEWS"). ":</b></td><td>" . number_format($row["views"]) . "</td></tr>\n");
print("<tr><td align='left'><b>".T_("HITS").":</b></td><td>" . number_format($row["hits"]) . "</td></tr>\n");
echo "</table></fieldset><br /><br />";

// $srating IS RATING VARIABLE
$srating = "";
$srating .= "<table class='f-border' cellspacing=\"1\" cellpadding=\"4\" width='100%'><tr><td class='f-title' width='60'><b>".T_("RATINGS").":</b></td><td class='f-title' valign='middle'>";
if (!isset($row["rating"])) {
$srating .= "Not Yet Rated";
}else{
$rpic = ratingpic($row["rating"]);
if (!isset($rpic))
$srating .= "invalid?";
else
$srating .= "$rpic (" . $row["rating"] . " ".T_("OUT_OF")." 5) " . $row["numratings"] . " ".T_("USERS_HAVE_RATED");
}
$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")
);
//if (!$owned || $moderator) {
$xres = SQL_Query_exec("SELECT rating, added FROM ratings WHERE torrent = $id AND user = " . $CURUSER["id"]);
$xrow = mysqli_fetch_assoc($xres);
if ($xrow)
$srating .= "<br /><i>(".T_("YOU_RATED")." \"" . $xrow["rating"] . " - " . $ratings[$xrow["rating"]] . "\")</i>";
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 .= "<input type=\"submit\" value=\"".T_("VOTE")."\" />";
$srating .= "</form>\n";
}
//}
}
$srating .= "</td></tr></table>";

print("<center>". $srating . "</center>");// rating

//END DEFINE RATING VARIABLE

echo "<br />";














                                               
if ($row["image1"] != "" OR $row["image2"] != "") {
if ($row["image1"] != "")
  $img1 = "<img src='".$site_config["SITEURL"]."/uploads/images/$row[image1]' width='150' border='0' alt='' />";
if ($row["image2"] != "")
  $img2 = "<img src='".$site_config["SITEURL"]."/uploads/images/$row[image2]' width='150' border='0' alt='' />";
print("<center>". $img1 . "&nbsp;&nbsp;" . $img2."</center><br />");
}

if ($row["external"]=='yes'){
print ("<br /><b>Tracker:</b><br /> ".htmlspecialchars($row['announce'])."<br />");
}

$tres = SQL_Query_exec("SELECT * FROM `announce` WHERE `torrent` = $id");
if (mysqli_num_rows($tres) > 1){
echo "<br /><b>".T_("THIS_TORRENT_HAS_BACKUP_TRACKERS")."</b><br />";
echo '<table cellpadding="1" cellspacing="2" class="table_table"><tr>';
echo '<th class="table_head">URL</th><th class="table_head">'.T_("SEEDERS").'</th><th class="table_head">'.T_("LEECHERS").'</th><th class="table_head">'.T_("COMPLETED").'</th></tr>';
$x = 1;
while ($trow = mysqli_fetch_assoc($tres)) {
$colour = $trow["online"] == "yes" ? "green" : "red";
echo "<tr class=\"table_col$x\"><td><font color=\"$colour\"><b>".htmlspecialchars($trow['url'])."</b></font></td><td align=\"center\">".number_format($trow["seeders"])."</td><td align=\"center\">".number_format($trow["leechers"])."</td><td align=\"center\">".number_format($trow["times_completed"])."</td></tr>";
$x = $x == 1 ? 2 : 1;
}
echo '</table>';
}

echo "<br /><br /><b>".T_("FILE_LIST").":</b>&nbsp;<img src='images/plus.gif' id='pic1' onclick='klappe_torrent(1)' alt='' /><div id='k1' style='display: none;'><table align='center' cellpadding='0' cellspacing='0' class='table_table' border='1' width='100%'><tr><th class='table_head' align='left'>&nbsp;".T_("FILE")."</th><th width='50' class='table_head'>&nbsp;".T_("SIZE")."</th></tr>";
$fres = SQL_Query_exec("SELECT * FROM `files` WHERE `torrent` = $id ORDER BY `path` ASC");
if (mysqli_num_rows($fres)) {
  while ($frow = mysqli_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>";

if ($row["external"]!='yes'){
echo "<br /><br /><b>".T_("PEERS_LIST").":</b><br />";
$query = SQL_Query_exec("SELECT * FROM peers WHERE torrent = $id ORDER BY seeder DESC");

$result = mysqli_num_rows($query);
if($result == 0) {
echo T_("NO_ACTIVE_PEERS")."\n";
}else{
?>

          <table border="0" cellpadding="3" cellspacing="0" width="100%" class="table_table">
<tr>
              <th class="table_head"><?php echo T_("PORT"); ?></th>
  <th class="table_head"><?php echo T_("UPLOADED"); ?></th>
  <th class="table_head"><?php echo T_("DOWNLOADED"); ?></th>
  <th class="table_head"><?php echo T_("RATIO"); ?></th>
  <th class="table_head"><?php echo T_("_LEFT_"); ?></th>
  <th class="table_head"><?php echo T_("FINISHED_SHORT"). "%"; ?></th>
  <th class="table_head"><?php echo T_("SEED"); ?></th>
  <th class="table_head"><?php echo T_("CONNECTED_SHORT"); ?></th>
  <th class="table_head"><?php echo T_("CLIENT"); ?></th>
  <th class="table_head"><?php echo T_("USER_SHORT"); ?></th>
</tr>

<?php
while($row1 = mysqli_fetch_assoc($query)) {

if ($row1["downloaded"] > 0){
$ratio = $row1["uploaded"] / $row1["downloaded"];
$ratio = number_format($ratio, 3);
}else{
$ratio = "---";
}

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

if ($site_config["MEMBERSONLY"]) {
$res = SQL_Query_exec("SELECT id, username, privacy FROM users WHERE id=".$row1["userid"]."");
$arr = mysqli_fetch_array($res);
                 
                  $arr["username"] = "<a href='account-details.php?id=$arr[id]'>$arr[username]</a>";
}
             
              # With $site_config["MEMBERSONLY"] off this will be shown.
              if ( !$arr["username"] ) $arr["username"] = "Unknown User";
     
if ($arr["privacy"] != "strong" || ($CURUSER["control_panel"] == "yes")) {
print("<tr><td class='table_col2'>".$row1["port"]."</td><td class='table_col1'>".mksize($row1["uploaded"])."</td><td class='table_col2'>".mksize($row1["downloaded"])."</td><td class='table_col1'>".$ratio."</td><td class='table_col2'>".mksize($row1["to_go"])."</td><td class='table_col1'>".$percentcomp."%</td><td class='table_col2'>$row1[seeder]</td><td class='table_col1'>$row1[connectable]</td><td class='table_col2'>".htmlspecialchars($row1["client"])."</td><td class='table_col1'>$arr[username]</td></tr>");
}else{
print("<tr><td class='table_col2'>".$row1["port"]."</td><td class='table_col1'>".mksize($row1["uploaded"])."</td><td class='table_col2'>".mksize($row1["downloaded"])."</td><td class='table_col1'>".$ratio."</td><td class='table_col2'>".mksize($row1["to_go"])."</td><td class='table_col1'>".$percentcomp."%</td><td class='table_col2'>$row1[seeder]</td><td class='table_col1'>$row1[connectable]</td><td class='table_col2'>".htmlspecialchars($row1["client"])."</td><td class='table_col1'>Private</td></tr>");
}

}
echo "</table>";
}
}

echo "<br /><br />";

//DISPLAY NFO BLOCK
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
if($row["nfo"]== "yes"){
$nfofilelocation = "$nfo_dir/$row[id].nfo";
$filegetcontents = file_get_contents($nfofilelocation);
$nfo = htmlspecialchars($filegetcontents);
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_("ERROR")." reading .nfo file!");
      }
}
end_frame();

begin_frame(T_("COMMENTS"));
//echo "<p align=center><a class=index href=torrents-comment.php?id=$id>" .T_("ADDCOMMENT"). "</a></p>\n";

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

if ($commcount) {
list($pagertop, $pagerbottom, $limit) = pager(10, $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.id $limit";
$commres = SQL_Query_exec($commquery);
}else{
unset($commres);
}

if ($commcount) {
print($pagertop);
commenttable($commres, 'torrent');
print($pagerbottom);
}else {
print("<br /><b>" .T_("NOCOMMENTS"). "</b><br />\n");
}

require_once("backend/bbcode.php");

if ($CURUSER) {
echo "<center>";
echo "<form name=\"comment\" method=\"post\" action=\"torrents-details.php?id=$row[id]&takecomment=yes\">";
echo textbbcode("comment","body")."<br />";
echo "<input type=\"submit\"  value=\"".T_("ADDCOMMENT")."\" />";
echo "</form></center>";
}

end_frame();

stdfoot();
?>
IMDb Mod [TTv3] — 2023-03-10 17:05:25 in v3 Mods Completed
kikoo
déjà il faudrait savoir si la description Imdb est prioritaire par rapport a la description manuel.

En gros :quel est la politique de ton TK ?

@choupette40

Quote:
SLy : merci beaucoup et ducoup la description sera en fr ?


oui
Bonjour
Une solution alternative a été pour moi d installer le mod https://torrenttrader.uk/post?id=2365&page=2 et de le rendre obligatoire a l'upload !

Puis de modifier ce code

<legend><b><?php echo T_("IMDB_PLOT"); ?></b></legend><?php echo $bdhaut; echo"<br>"; echo $_data->Plot; echo"<br>" ; echo $bdbas;?></fieldset></td></tr>

par celui ci
<legend><b><?php echo T_("IMDB_PLOT"); ?></b></legend><?php echo $bdhaut; echo"<br>"; /*echo $_data->Plot;*/echo htmlspecialchars($descr['description']); echo"<br>" ; echo $bdbas;?></fieldset></td></tr>
TMDB — 2022-04-12 06:48:17 in v3 Mods in Progress
Bonjour
Comment peut on recupérer une image de fondu

https://goopics.net/i/bxsdl9
Merci
Hello
How can we recover a faded image

https://goopics.net/i/nb4xyq
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: 3
  • Members: 0
  • Guests online: 3
  • Comments: 3
  • Messages: 1,728