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
download.php with countdown based on the
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / v2.08 / v2 Only Mods Complete

Unknown User
2010-03-04 22:57:26
Hi everyone. Once again I thank everyone for everything you did for me <_<


I have a module in my tracker, witch is in test mode for 2 months. Then I saw so much spam in the download area.



My module is:



And it was tested in torrent tard 2.06


rename the download.php file to download1.php

in the download1.php find

	if($CURUSER["can_download"]=="no")

show_error_msg("Error","You do not have permission to download torrents",1);

}
then add


if ($_POST['action'] != "Download")

show_error_msg("Attention", "You cannot use this Direct Download, Thanks!",1);



add save



add this in the functions.php file



function count_ratio_down($ratioranck) {

if ($ratio < 0.1) return "120";

if ($ratio < 0.5) return "75";

if ($ratio < 0.9) return "53";

return "0";

}


add save

create a new file with the name download-php and paste

<?
//

//  TorrentTrader v2.x

// This file was last updated: 29/Aug/2007

//

// http://www.torrenttrader.org

//

//

require_once("backend/functions.php");

dbconn();

loggedinonly();

//check permissions

if ($site_config["MEMBERSONLY"]){

loggedinonly();

if($CURUSER["can_download"]=="no")

show_error_msg("Error","You do not have permission to download torrents",1);

}

$id = (int)$_GET["id"];

if (!$id)

show_error_msg("ID not found", "You can't download, if you don't tell me what you want!",1);

$res = mysql_query("SELECT filename, banned, external, announce FROM torrents WHERE id =".intval($id));

$row = mysql_fetch_array($res);

$trackerurl = $row['announce'];

$torrent_dir = $site_config["torrent_dir"];

$fn = "$torrent_dir/$id.torrent";

if (!$row)

show_error_msg("File not found", "No file has been found with that ID!",1);

if ($row["banned"] == "yes")

show_error_msg("Error", "Torrent is banned.", 1);

if (!is_file($fn))

show_error_msg("File not found", "The ID has been found on the Database, but the torrent has gone!<BR><BR>Check Server Paths and CHMODs Are Correct!",1);

if (!is_readable($fn))

show_error_msg("File not found", "The ID and torrent were found, but the torrent is NOT readable!",1);

$names = $row['filename'];

stdhead("Downloads");

begin_frame("<CENTER><B>Download do \"".$names."\"</B></CENTER>");

if ($CURUSER["downloaded"] > 0) {

$ratioranck = number_format($CURUSER["uploaded"] / $CURUSER["downloaded"], 2);

}else{

$ratioranck = "0";

}

?>

<script language="javascript">

var temporestante;

var countdown;

function checkAll()

{

if(download.everything.checked)

{

var div_ref = document.all("id_div");

div_ref.style.visibility = "visible";

temporestante = '<?php echo count_ratio_down($ratioranck) ?>';

countDown();

} else {

var div_ref = document.all("id_div");

div_ref.style.visibility = "hidden";

stopDown();

}

}

function countDown(){

temporestante = temporestante - 1;

// Calculate time remaining

var remaining_sec = (temporestante % 60);

var remaining_min = (((temporestante - remaining_sec) % 3600) / 60);

var remaining_hours = ((((temporestante - remaining_sec) - (remaining_min * 60)) % 86400) / 3600);

if(remaining_sec < 10){ remaining_sec = '0' + remaining_sec; }

if(remaining_min < 10){ remaining_min = '0' + remaining_min; }

if(remaining_hours < 10){ remaining_hours = '0' + remaining_hours; }

if (temporestante > 0) {

document.getElementById("dl").innerHTML='You have to wait <b><font color="RED">'+ remaining_min+' minuto e '+ remaining_sec+'</font></b> seconds to Download because of your Ratio.</a>';

countdown = setTimeout("countDown()", 1000);

}

else

document.getElementById("dl").innerHTML='Download OK<BR><input type=submit name=action value=Download class=btn>';

}

function stopDown(){

clearTimeout(countdown);

}

</script>

<?

echo "<P align=\"center\">";

echo "<form name=download method=post action=download1.php?id=$id&name=" . rawurlencode($row["filename"]) . "><b>Li, e compreendo os termos de Utiliza
Unknown User
2010-06-18 23:36:17
"RuiMoutinho, post: 62557":
Hi everyone. Once again I thank everyone for everything you did for me :blink:
I have a module in my tracker, witch is in test mode for 2 months. Then I saw so much spam in the download area.



My module is:



And it was tested in torrent tard 2.06



Sorry but I have not had Understood What is your code exactly, can you explain please?

Thank you
Unknown User
2010-06-19 18:22:01
looking at it, it looks like a wait time on downloads for people with  low ratios  :blink:
Unknown User
2010-06-19 20:31:44
Try This....

Create robots.txt and upload to root

User-agent: msnbot

User-agent: googlebot



Disallow: /download.php*$

Disallow: /backups

Disallow: /import

Disallow: /backend

Disallow: /blocks

Disallow: /images

Disallow: /cache

Disallow: /themes

Disallow: /languages

Disallow: /uploads/images



User-agent: *

Disallow: /download.php*$

Disallow: /backups

Disallow: /import

Disallow: /backend

Disallow: /blocks

Disallow: /images

Disallow: /cache

Disallow: /themes

Disallow: /languages

Disallow: /uploads/images
Unknown User
2011-06-03 18:17:31
Hello everybody I apologize because I left the server to use torrents.

[[[[]]]] :D
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