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
Uploader Info (from tbdev)
Controls ·  Search New posts · Mark unread

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

Unknown User
2011-01-28 12:07:11
I took this mod from tbdev and made some minor changes for TT

all creds to orig coder (tbdev)

first open

admincp.php

find

<td align="center"><a href=admincp.php?action=ipbans><img src="images/admin/blocked.gif" border=0 width=32 height=32><BR>Banned IPs</a><BR></td>
underneath add




<td align="center"><a href=admincp.php?action=upinfo&do=run><img src="images/upload.jpg" border=0 width=32 height=32><BR>Uploader Info</a><BR></td>





then find



f (!$action){

stdhead("Admin CP");

navmenu();

stdfoot();

}





Above add





if ($action=="upinfo" && $do=="run") {

stdhead("Admin CP");

navmenu();

echo '<div style="height:800px;overflow:scroll;">';

include ('uploaderinfo.php');

echo '</div>';

echo '</td></tr></table>'; stdfoot();

}





now make a new php file in your root dir and call it uploaderinfo.php

and add this to it





<?php



dbconn(true);



loggedinonly();



stdhead("Uploaders");



if ($CURUSER['class'] == 7)



{



$query = "SELECT id, username, added, uploaded, downloaded, donated, warned FROM users WHERE class = 4";

$result = mysql_query($query);

$num = mysql_num_rows($result); // how many uploaders

echo "<h2>Uploaders Info Panel</h2>";

echo "<p>We have " . $num . " uploaders</p>";



$zerofix = $num - 1; // remove one row because mysql starts at zero



if ($num > 0)

{

echo "<table cellpadding=4 align=left border=1>";

echo "<tr>";

echo "<td class=colhead>Num</td>";

echo "<td class=colhead>Username</td>";

echo "<td class=colhead>Uploaded/Downloaded</td>";

echo "<td class=colhead>Ratio</td>";

echo "<td class=colhead>Num torrents</td>";

echo "<td class=colhead>Last upload</td>";

echo "<td class=colhead>Send PM</td>";

echo "</tr>";



for ($i = 0; $i <= $zerofix; $i++)

{

$id = mysql_result($result, $i, "id");

$username = mysql_result($result, $i, "username");

$added = mysql_result($result, $i, "added");

$uploaded = mksize(mysql_result($result, $i, "uploaded"));

$downloaded = mksize(mysql_result($result, $i, "downloaded"));

$uploadedratio = mysql_result($result, $i, "uploaded");

$downloadedratio = mysql_result($result, $i, "downloaded");

$donor = mysql_result($result, $i, "donated");

$warned = mysql_result($result, $i, "warned");



// get uploader torrents activity

$upperquery = "SELECT added FROM torrents WHERE owner = $id";

$upperresult = mysql_query($upperquery);



$torrentinfo = mysql_fetch_array($upperresult);



$numtorrents = mysql_num_rows($upperresult);

 

if ($downloaded > 0)

 {

 $ratio = $uploadedratio / $downloadedratio;

 $ratio = number_format($ratio, 3);

 $color = get_ratio_color($ratio);

 if ($color)

 $ratio = "<font color=$color>$ratio</font>";

 }

else

 if ($uploaded > 0)

  $ratio = "Inf.";

 else

  $ratio = "---";

 

// get donor

if ($donor == "yes")

$star = "<img src=images/star.gif>";

else

$star = "";



// get warned

if ($warned == "yes")

$klicaj = "<img src=images/warned.gif>";

else

$klicaj = "";



$counter = $i + 1;



echo "<tr>";

echo "<td align=center>$counter.</td>";

echo "<td><a href=/account-details.php?id=$id>$username</a> $star $klicaj</td>";

echo "<td>$uploaded / $downloaded</td>";

echo "<td>$ratio</td>";

echo "<td>$numtorrents torrents</td>";

if ($numtorrents > 0)

 {

 $lastadded = mysql_result($upperresult, $numtorrents - 1, "added");

 echo "<td>" . get_elapsed_time(sql_timestamp_to_unix_timestamp($lastadded)) . " ago (" . gmdate("d. M Y",strtotime($lastadded)) . ")</td>";

 }

else

 echo "<td>---</td>";

 echo "<td align=center><a href=mailbox.php?compose&id=$id><img src=images/pm.png></a></td>";







echo "</tr>";





}

echo "</table>";

}



}



else

echo "Not permitted.";



stdfoot();



?>



place this in your images folder or add your own

name it upload.jpg

and pm.png

Unknown User
2011-01-30 17:35:14
plz adjust anyone at top of code with

loggedinonly();
Unknown User
2011-01-30 19:20:00
"sonicvip, post: 70205":
plz adjust anyone at top of code with
loggedinonly();

thanks sonicvip first post updated  :rolleyes:
Unknown User
2011-02-02 05:12:04
Hi,

Thank you serph work fine.

- I just add begin_block and end_block , like that is better for me..

thank you again for this addon
Unknown User
2011-02-19 11:10:55
Nice job !!
Unknown User
2011-02-20 12:29:50
seems tho it will not run on my site version 2.06 modded
Unknown User
2011-02-20 14:29:42
Thank you very much.

Worked perfect on 2.05 heavily modded.

Just had to remove the bold part below in the new [url="http://www.torrenttrader.org/index.php?showtopic=13353&hl=admincp"]admin-cp[/url] otherwise it wont work.

if ($action=="upinfo" && $do=="run") {

stdhead("Admin CP");

navmenu();

echo '<div style="height:800px;overflow:scroll;">';

include ('uploaderinfo.php');

echo '</div>';

echo '</td></tr></table>'; stdfoot();

}
Unknown User
2011-02-20 17:10:57
thnaks for info @ freeinfo will try that in a bit see if it fixes it here
Unknown User
2011-02-20 23:36:18
i would put the loggedinonly part below the dbconn and also the if ($CURUSER['class'] >= 7) is not best for everybody because if somebody adds a normal member group without changing the code then that group would be able to access it. so it is best to make it if ($CURUSER['class'] == 7) if you only want the owner to access it
Unknown User
2011-02-21 06:28:36
"walker1977, post: 70848":
i would put the loggedinonly part below the dbconn and also the if ($CURUSER['class'] >= 7) is not best for everybody because if somebody adds a normal member group without changing the code then that group would be able to access it. so it is best to make it if ($CURUSER['class'] == 7) if you only want the owner to access it

Thanks for the tips walker

first post edited
Unknown User
2012-06-02 14:28:21
Error please help..



Warning: Cannot modify header information - headers already sent by (output started at D:SERVERxampphtdocsblocksthemelang_block.php:49) in D:SERVERxampphtdocsbackendfunctions.php on line 59






&







Warning: mysql_close(): no MySQL-Link resource supplied in D:SERVERxampphtdocsbackendfunctions.php on line 242

Unknown User
2012-06-02 15:05:16
Post those files
Unknown User
2012-06-03 09:47:08
here..

[url="http://devscorner.xyz/applications/core/interface/file/attachment.php?id=5779"]uploaderinfo.php[/url]

[url="http://devscorner.xyz/applications/core/interface/file/attachment.php?id=5780"]functions.php[/url]

[url="http://devscorner.xyz/applications/core/interface/file/attachment.php?id=5781"]themelang_block.php[/url]
uploaderinfo.php
Download
functions.php
Download
themelang_block.php
Download
Unknown User
2012-06-03 11:16:47
dbconn sets the header for the charset and thats called in two places one in admincp.php and secondly in uploaderinfo.php



if ($action=="upinfo" && $do=="run") {

       stdhead("Admin CP");

       navmenu();

       echo '<div style="height:800px;overflow:scroll;">';

       include ('uploaderinfo.php');

       echo '</div>';

               echo '</td></tr></table>'; stdfoot();

}






If uploaderinfo.php is called directly then its not going to shoiw anything apart from a white screen or a fatal error... do this instead









if ($action=="upinfo" && $do=="run") {

       stdhead("Admin CP");

       navmenu();

       echo '<div style="height:800px;overflow:scroll;">';





if ($CURUSER['class'] == 7)



{



$query = "SELECT id, username, added, uploaded, downloaded, donated, warned FROM users WHERE class = 4";

$result = mysql_query($query);

$num = mysql_num_rows($result); // how many uploaders

echo "<h2>Uploaders Info Panel</h2>";

echo "<p>We have " . $num . " uploaders</p>";



$zerofix = $num - 1; // remove one row because mysql starts at zero



if ($num > 0)

{

echo "<table cellpadding=4 align=left border=1>";

echo "<tr>";

echo "<td class=colhead>Num</td>";

echo "<td class=colhead>Username</td>";

echo "<td class=colhead>Uploaded/Downloaded</td>";

echo "<td class=colhead>Ratio</td>";

echo "<td class=colhead>Num torrents</td>";

echo "<td class=colhead>Last upload</td>";

echo "<td class=colhead>Send PM</td>";

echo "</tr>";



for ($i = 0; $i <= $zerofix; $i++)

{

$id = mysql_result($result, $i, "id");

$username = mysql_result($result, $i, "username");

$added = mysql_result($result, $i, "added");

$uploaded = mksize(mysql_result($result, $i, "uploaded"));

$downloaded = mksize(mysql_result($result, $i, "downloaded"));

$uploadedratio = mysql_result($result, $i, "uploaded");

$downloadedratio = mysql_result($result, $i, "downloaded");

$donor = mysql_result($result, $i, "donated");

$warned = mysql_result($result, $i, "warned");



// get uploader torrents activity

$upperquery = "SELECT added FROM torrents WHERE owner = $id";

$upperresult = mysql_query($upperquery);



$torrentinfo = mysql_fetch_array($upperresult);



$numtorrents = mysql_num_rows($upperresult);



if ($downloaded > 0)

 {

 $ratio = $uploadedratio / $downloadedratio;

 $ratio = number_format($ratio, 3);

 $color = get_ratio_color($ratio);

 if ($color)

 $ratio = "<font color=$color>$ratio</font>";

 }

else

 if ($uploaded > 0)

  $ratio = "Inf.";

 else

  $ratio = "---";

 

// get donor

if ($donor == "yes")

$star = "<img src=images/star.gif>";

else

$star = "";



// get warned

if ($warned == "yes")

$klicaj = "<img src=images/warned.gif>";

else

$klicaj = "";



$counter = $i + 1;



echo "<tr>";

echo "<td align=center>$counter.</td>";

echo "<td><a href=/account-details.php?id=$id>$username</a> $star $klicaj</td>";

echo "<td>$uploaded / $downloaded</td>";

echo "<td>$ratio</td>";

echo "<td>$numtorrents torrents</td>";

if ($numtorrents > 0)

 {

 $lastadded = mysql_result($upperresult, $numtorrents - 1, "added");

 echo "<td>" . get_elapsed_time(sql_timestamp_to_unix_timestamp($lastadded)) . " ago (" . gmdate("d. M Y",strtotime($lastadded)) . ")</td>";

 }

else

 echo "<td>---</td>";

 echo "<td align=center><a href=mailbox.php?compose&id=$id><img src=images/pm.png></a></td>";







echo "</tr>";





}

echo "</table>";

}



}



else

echo "Not permitted.";



    echo '</div>';

               echo '</td></tr></table>'; stdfoot();

}



Unknown User
2012-06-03 14:07:31
No mate still not working help please..
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: 9
  • Members: 0
  • Guests online: 9
  • Comments: 3
  • Messages: 1,728