if ($row["external"]!='yes' && $row["freeleech"]=='1'){
print ("<B>Free Leech: </b><font color=red><b>This torrent is freeleech so only upload counts!</b></font><BR>");
}
and after add
if ($row["external"]!='yes' && $row["silver"]=='1'){
print ("<B>Silver torrent: </b><font color=red><b>This torrent is 50% freeleech so only 50% download counts!</b></font><BR>");
}
and in the res=mysql after
torrents.freeleech,
add
torrents.silver, if ($site_config['SPEEDTEST']){
begin_frame("Speedtest");
echo '<IFRAME name="Speedtest" src="'.$site_config["SITEURL"].'/speedtest.php" frameborder="0" marginheight="0" marginwidth="0" width="100%" height="100%" scrolling="no" align="center"></IFRAME>';
end_frame();
}<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Speedtest.net Mini Bandwidth Speed Test</title>
</head>
<body bgcolor="#000000">
<table border=0 width=100% height=100%>
<tr><td align=center valign=center>
<!-- BEGIN SPEED TEST - DO NOT ALTER BELOW-->
<script type="text/javascript" src="speedtest/speedtest/swfobject.js"></script>
<div id="speedtest">
Speed Test requires at least version 8 of Flash. <a href="http://www.macromedia.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash">Please update your client</a>.
</div>
<script type="text/javascript">
var so = new SWFObject("speedtest/speedtest.swf?v=2.1.5", "speedtest", "450", "250", "8", "#171715");
so.addVariable("upload_extension", "php");
so.write("speedtest");
</script>
<!-- END SPEED TEST - DO NOT ALTER ABOVE -->
</td></tr>
</table>
</body>
</html>create file speedtest.php and put in <?
require_once("backend/functions.php");
dbconn(false);
stdhead("SpeedTest Mini");
//Speedtest
if (!$site_config["MEMBERSONLY"] || $CURUSER) {
begin_frame("Oo. SpeedTest Mini .oO");
echo file_get_contents("speedtest/index.html");
end_frame();
}
stdfoot();
?>
then i created a link in navigation block where you want it to show
echo "- <a href=speedtest.php>Speedtest</a><BR>";<?
require_once("backend/functions.php");
dbconn(false);
stdhead("SpeedTest Mini");
//Speedtest
if (!$site_config["MEMBERSONLY"] || $CURUSER) {
begin_frame("Oo. SpeedTest Mini .oO");
echo file_get_contents("speedtest/index.html");
end_frame();
}
stdfoot();
?><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Speedtest.net Mini Bandwidth Speed Test</title>
</head>
<body bgcolor="#000000">
<table border=0 width=100% height=100%>
<tr><td align=center valign=center>
<!-- BEGIN SPEED TEST - DO NOT ALTER BELOW-->
<script type="text/javascript" src="speedtest/speedtest/swfobject.js"></script>
<div id="speedtest">
Speed Test requires at least version 8 of Flash. <a href="http://www.macromedia.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash">Please update your client</a>.
</div>
<script type="text/javascript">
var so = new SWFObject("speedtest/speedtest.swf?v=2.1.5", "speedtest", "450", "250", "8", "#171715");
so.addVariable("upload_extension", "php");
so.write("speedtest");
</script>
<!-- END SPEED TEST - DO NOT ALTER ABOVE -->
</td></tr>
</table>
</body>
</html>and my speedtest.php<?
require_once("backend/functions.php");
dbconn(false);
{
$site_config["RIGHTNAV"] = $site_config["MIDDLENAV"] = $site_config["RIGHTNAV"] = false;}
{
$site_config["LEFTNAV"] = $site_config["MIDDLENAV"] = $site_config["LEFTNAV"] = false;}
stdhead("SpeedTest Mini");
//Speedtest
if (!$site_config["MEMBERSONLY"] || $CURUSER) {
begin_frame("Oo. SpeedTest Mini .oO");
echo file_get_contents("speedtest/index.html");
end_frame();
}
stdfoot();
?>"whiteshadow1890, post: 70262":i'll put mine up in a bit m8 , i had problems with thisI have done exactly as you said, but it gives me this error, and i have the latest pack. [url="http://torrents.imediazone.net/speedtest.php"]http://torrents.imediazone.net/speedtest.php[/url]
//////////////////////////////////////SNATCHED/////////////////////////////////
$r = mysql_query("SELECT snatched.torrentid, snatched.uploaded, snatched.downloaded, snatched.complete_date, snatched.last_action, snatched.start_date, torrents.seeders, torrents.leechers, UNIX_TIMESTAMP(snatched.start_date) AS st, UNIX_TIMESTAMP(snatched.last_action) AS lt, UNIX_TIMESTAMP(snatched.complete_date) AS ct, snatched.start_date, snatched.recorded_time FROM snatched JOIN torrents ON torrents.id = snatched.torrentid WHERE snatched.finished='yes' AND userid=$id ORDER BY last_action") or sqlerr();
$completed = "<table class=main border=1 cellspacing=0 cellpadding=3>\n" ."<tr>\n" ."<td class=table_head align=center>Cat</td>\n" ."<td class=table_head align=center>Torrent</td>\n" ."<td class=table_head align=center>Upl.</td>\n" ."<td class=table_head align=center>Downl.</td>\n" ."<td class=table_head align=center>Ratio</td>\n" ."<td class=table_head align=center>Startdate</td>\n" ."<td class=table_head align=center>Enddate</td>\n" ."<td class=table_head align=center>Last action</td>\n" ."<td class=table_head align=center>Leechtime</td>\n" ."<td class=table_head align=center>Seed Time</td>\n" ."<td class=table_head align=center>Seeder</td>\n" ."<td class=table_head align=center>Leecher</td>\n" ."<td class=table_head align=center>Seeding?</td>\n" ."<td class=table_head align=center>Ask Reseed</td>\n" ."</tr>\n";
while ($a = mysql_fetch_assoc($r)) {
$r1 = mysql_query("SELECT * FROM torrents WHERE id = ". $a[torrentid] ."") or sqlerr(__FILE__, __LINE__);
$a1 = mysql_fetch_assoc($r1);
$r2 = mysql_query("SELECT name, image FROM categories WHERE id = ". $a1[category] ."") or sqlerr(__FILE__, __LINE__);
$a2 = mysql_fetch_assoc($r2);
if ($a["downloaded"] > 0) {
$ratio = number_format($a["uploaded"] / $a["downloaded"], 3);
$ratio = "<font color=" . get_ratio_color($ratio) . ">$ratio</font>";
}elseif ($a["uploaded"] > 0)
$ratio = "Inf.";
else
$ratio = "---";
$uploaded =mksize($a["uploaded"]);
$downloaded = mksize($a["downloaded"]);
$cat = "<img src=\"/images/categories/$a2[image]\" alt=\"$a2[name]\" border=\"0\">";
$starttime = $a['start_date'];
$endtime = $a['complete_date'];
$last_action = $a['last_action'];
$leechtime = mkprettytime($a[ct] - $a[st]);
//$seedtime = mkprettytime($a[lt] - $a[ct]);
$seedtime = seedtime($a[recorded_time]);
$td = mysql_query("SELECT * FROM torrents WHERE id = ". $a[torrentid] ."");
while ($tdl = mysql_fetch_assoc($td)) {
$timesdownloaded = $a["downloaded"] / $tdl["size"];
}
$res3 = mysql_query("SELECT * FROM peers WHERE torrent=". $a[torrentid] ." AND userid=$id");
$arr3 = mysql_fetch_assoc($res3);
$seedeur = $arr3["seeder"];
if ($seedeur == "yes") {
$reseed = "<font color=green>Seeding</font>";
} else {
$reseed = "<b><a href=torressed.php?id=".$a[torrentid]."&mecid=$id>Reseed</a></b>";
}
$seeder = $a["seeders"];
$smallname3 =substr(htmlspecialchars($a1["name"]) , 0, 20);
if ($smallname3 != htmlspecialchars($a1["name"])) {
$smallname3 .= '...';
}
$completed .= "<tr>\n" ."<td class=table_col1 align=center><a href=torrents.php?cat=". $a1[category] .">$cat</a></td>\n" ."<td class=table_col2><a href=torrents-details.php?id=". $a[torrentid] ."><b>$smallname3</b></a></td>\n" ."<td class=table_col1 align=center>$uploaded</td>\n" ."<td class=table_col2 align=center>$downloaded</td>\n" ."<td class=table_col2 align=center>$ratio</td>\n" ."<td class=table_col1 align=center>$starttime</td>\n" ."<td class=table_col2 align=center>$endtime</td>\n" ."<td class=table_col1 align=center>$last_action</td>\n" ."<td class=table_col2 align=center>$leechtime</td>\n" ."<td class=table_col2 align=center>".(is_null($seedtime)?"0":$seedtime)."</td>\n" ."<td class=table_col1 align=center>". $a[seeders] ."</td>\n" ."<td class=table_col1 align=center>". $a[leechers] ."</td>\n" ."<td class=table_col1 align=center>" . ($arr3["seeder"] == "yes" ? "<b><font color=green>Yes</font>" : "<font color=red>No</font></b>") . "</td>\n" ."<td class=table_col2 align=center>$reseed</td>\n" ."</tr>\n";
}
$completed .= "</table>";
$res_tor_c = mysql_query("SELECT id FROM snatched WHERE userid = ". $user[id] ." AND finished='yes'");
$tor_c = mysql_num_rows($res_tor_c);
if ($user["id"] == $CURUSER["id"] || $CURUSER["edit_torrents"]=="yes") {
if ($completed)
begin_frame("User's Snatched Torrents");
echo "<B>Completed torrents:</B> <img src='images/plus.gif' id='pic1' onclick='klappe_torrent(1)'> <b>$tor_c Completed Torrent(s)</b><div id='k1' style='display: none;'>$completed</div>";
end_frame();
}
//////////////////////////////////////////////////////////////////////////////