Bravo List

Bravo List (https://www.bvlist.com/index.php)
-   Downloads (https://www.bvlist.com/forumdisplay.php?f=16)
-   -   BestZone v1.2 (https://www.bvlist.com/showthread.php?t=8882)

aeon-design 16th February 2013 09:48

BestZone v1.2
 
2 Attachment(s)
http://iceimg.com/i/6f/c4/0b968c3146.png

http://iceimg.com/i/6b/08/cdb80d4526.png

http://iceimg.com/i/c0/8b/da299bf6bb.png

INSTALL

1. Unrar source in xampp / htdocs, if you put on localhost.
2. up sql in phpmyadmin bestzone name
3. killerdemon login name and password and 123456 are owner

2013 Aeon Design

Other download link: http://fisierulmeu.ro/26W6R5X4JX3I/B...-v1-2-rar.html



SaiDo-Sa 16th February 2013 13:40

Not working :(
 
hi , again :(

i'ts not working to me , just like "Deluxe Torrent"

the url : http://localhost:808/source/

what the page shows :

PHP Code:

15) { stdhead();   stdmsg("FUCK OFF...", "STOP CHEATING MOTHER FUCKER");   stdfoot();   exit; } loggedinorreturn(); maxsysop();  if ($_SERVER["REQUEST_METHOD"] == "POST") {   $choice = $_POST["choice"];   if ($CURUSER && $choice != "" && $choice < 256  && $choice == floor($choice))   {     $res = mysql_query("SELECT * FROM polls ORDER BY added DESC LIMIT  1") or sqlerr();     $arr = mysql_fetch_assoc($res) or die("No poll");     $pollid = $arr["id"];     $userid = $CURUSER["id"]; mysql_query("UPDATE users SET seedbonus = seedbonus+1.0 WHERE id =  $CURUSER[id]") or sqlerr(__FILE__, __LINE__);     $res = mysql_query("SELECT * FROM pollanswers WHERE pollid=$pollid  && userid=$userid") or sqlerr();     $arr = mysql_fetch_assoc($res);     if ($arr) die("Dupe vote");     mysql_query("INSERT INTO pollanswers VALUES(0, $pollid, $userid,  $choice)") or sqlerr();     if (mysql_affected_rows() != 1)       stderr("Error", "An error occured. Your vote has not been  counted.");     header("Location: $BASEURL/");     die;   }   else     stderr("Error", "Please select an option."); }  $a = @mysql_fetch_assoc(@mysql_query("SELECT id,username FROM users  WHERE status='confirmed' ORDER BY id DESC LIMIT 1")) or  die(mysql_error()); if ($CURUSER)   $latestuser = "" . $a["username"] . ""; else    $latestuser = $a['username'];  $male = number_format(get_row_count("users", "WHERE gender='Male'")); $female = number_format(get_row_count("users", "WHERE  gender='Female'")); $nobody = number_format(get_row_count("users", "WHERE gender='N/A'")); $invites = number_format(get_row_count("users", "WHERE  invited_by>'0'")); //$rated = number_format(get_row_count("torrents", "WHERE  numratings>'0'")); //$extern = number_format(get_row_count("torrents", "WHERE  extern='yes'")); $topics = number_format(get_row_count("topics")); $posts = number_format(get_row_count("posts")); $registered = number_format(get_row_count("users")); $todayreg = get_row_count('users', 'WHERE added > DATE_SUB(NOW(),  INTERVAL 1 DAY)'); $unverified = number_format(get_row_count("users", "WHERE  status='pending'")); $torrents = number_format(get_row_count("torrents")); $dead = number_format(get_row_count("torrents", "WHERE visible='no'")); $warnedu = number_format(get_row_count("users", "WHERE warned='yes'")); $disabled = number_format(get_row_count("users", "WHERE enabled='no'")); $NAT = number_format(get_row_count("peers", "WHERE connectable='no'"));  $r = mysql_query("SELECT value_u FROM avps WHERE arg='seeders'") or  sqlerr(__FILE__, __LINE__); $a = mysql_fetch_row($r); $seeders = $a[0]; $r = mysql_query("SELECT value_u FROM avps WHERE arg='leechers'") or  sqlerr(__FILE__, __LINE__); $a = mysql_fetch_row($r); $leechers = $a[0]; $seeders = (get_row_count("peers", "WHERE seeder='yes'")); $leechers = (get_row_count("peers", "WHERE seeder='no'")); $peers = ($seeders + $leechers); $uniqpeer = (get_row_count("peers", "WHERE connectable='yes'")*3); if ($leechers == 0) $tratio = 0; else $tratio = round(($seeders / $leechers), 2); if ($leechers == 0) $sratio = 0;  //$sratio = round(($seeders / $leechers) * 100); $sratio = round((($seeders + 1) / ($leechers + 1)) * 100);  $result = mysql_query("SELECT SUM(downloaded) AS totaldl, SUM(uploaded)  AS totalul FROM users") or sqlerr(__FILE__, __LINE__); $row = mysql_fetch_assoc($result); $totaldownloaded = $row["totaldl"]; $totaluploaded = $row["totalul"]; $totaldata = $totaldownloaded+$totaluploaded;  $dt = gmtime() - 3600; $dt = sqlesc(get_date_time($dt)); $result = mysql_query("SELECT SUM(last_access >= $dt) AS totalol FROM  users") or sqlerr(__FILE__, __LINE__);  while ($row = mysql_fetch_array ($result)) { $totalonline = $row["totalol"]; $rec = @mysql_fetch_array(@mysql_query("SELECT * FROM onlinerec LIMIT  1")); if ($rec[users] < $totalonline) mysql_query("UPDATE onlinerec SET  users=$totalonline, date='".get_date_time()."' WHERE  users=$rec[users]"); }  if (get_user_class() >= UC_UPLOADER) {     $activeuser_class = 15; } else {     $activeuser_class = 7; }  $dt = gmtime() - 3600; $dt = sqlesc(get_date_time($dt)); $res = mysql_query("SELECT id, username, class, uploaded, downloaded,  avatar, added, donor, warned FROM users WHERE class <=  $activeuser_class AND last_access >= $dt ORDER BY class  DESC,username") or sqlerr(__FILE__, __LINE__); while ($arr = mysql_fetch_assoc($res))  { if ($activeusers) $activeusers .= ",\n";  $res2 = mysql_query("SELECT COUNT(*) FROM peers WHERE userid=" .  htmlspecialchars($arr["id"]) . " AND seeder='yes'") or  print(mysql_error());  $row = mysql_fetch_row($res2);  $activeseed = "$row[0]";  $res2 = mysql_query("SELECT COUNT(*) FROM peers WHERE userid=" .  htmlspecialchars($arr["id"]) . " AND seeder='no'") or  print(mysql_error());  $row = mysql_fetch_row($res2);  $activeleech = "$row[0]";  if ($arr[added] == "0000-00-00 00:00:00") $joindate = 'N/A'; else $joindate = "Jn: " . get_elapsed_time(sql_timestamp_to_unix_timestamp($arr["added"])) . " ago";  if ($arr["downloaded"] > 0) { $ratio = number_format($arr["uploaded"] / $arr["downloaded"], 3); $ratio = "$ratio"; } else if ($arr["uploaded"] > 0) $ratio = "Inf."; else $ratio = "---";  $uploaded = mksize($arr["uploaded"]); $downloaded = mksize($arr["downloaded"]); $username = "" . htmlspecialchars($arr['username']) . ""; //$username = $arr["username"]; $usrclass = "".get_user_class_name($arr['class']).""; if ($arr["avatar"]) $avatarover = "" . htmlspecialchars($arr['avatar']) . ""; //$avatarover = $arr["avatar"]; elseif (!$arr["avatar"]) $avatarover = "/pic/default_avatar.png";   switch ($arr["class"]) { case UC_OWNER: $arr["username"] = "$joindate
 
Cl: $usrclass

 UP
: $uploaded
 DL
: $downloaded
', CAPTION, '  R:$ratio [IMG]http://localhost:808/source/pic/arrowupp.gif[/IMG] $activeseed [IMG]http://localhost:808/pic/arrowdownn.gif[/IMG] $activeleech');\" onmouseout=\"return nd();\"> " . htmlspecialchars($arr["username"]) . ""; break; case UC_SVISOR: $arr["username"] = "$joindate
 
Cl: $usrclass

 UP
: $uploaded
 DL
: $downloaded
', CAPTION, '  R:$ratio [IMG]http://localhost:808/source/pic/arrowupp.gif[/IMG] $activeseed [IMG]http://localhost:808/pic/arrowdownn.gif[/IMG] $activeleech');\" onmouseout=\"return nd();\"> " . htmlspecialchars($arr["username"]) . ""; break; case UC_SYSOP: $arr["username"] = "$joindate
 
Cl: $usrclass

 UP
: $uploaded
 DL
: $downloaded
', CAPTION, '  R:$ratio [IMG]http://localhost:808/source/pic/arrowupp.gif[/IMG] $activeseed [IMG]http://localhost:808/pic/arrowdownn.gif[/IMG] $activeleech');\" onmouseout=\"return nd();\"> " . htmlspecialchars($arr["username"]) . ""; break; case UC_ELITE_ADMINISTRATOR: $arr["username"] = "$joindate
 
Cl: $usrclass

 UP
: $uploaded
 DL
: $downloaded
', CAPTION, '  R:$ratio [IMG]http://localhost:808/source/pic/arrowupp.gif[/IMG] $activeseed [IMG]http://localhost:808/pic/arrowdownn.gif[/IMG] $activeleech');\" onmouseout=\"return nd();\"> " . htmlspecialchars($arr["username"]) . ""; break; case UC_ADMINISTRATOR: $arr["username"] = "$joindate
 
Cl: $usrclass

 UP
: $uploaded
 DL
: $downloaded
', CAPTION, '  R:$ratio [IMG]http://localhost:808/source/pic/arrowupp.gif[/IMG] $activeseed [IMG]http://localhost:808/pic/arrowdownn.gif[/IMG] $activeleech');\" onmouseout=\"return nd();\"> " . htmlspecialchars($arr["username"]) . ""; break; case UC_MASTER_MODERATOR: $arr["username"] = "$joindate
 
Cl: $usrclass

 UP
: $uploaded
 DL
: $downloaded
', CAPTION, '  R:$ratio [IMG]http://localhost:808/source/pic/arrowupp.gif[/IMG] $activeseed [IMG]http://localhost:808/pic/arrowdownn.gif[/IMG] $activeleech');\" onmouseout=\"return nd();\"> " . htmlspecialchars($arr["username"]) . ""; break; case UC_MODERATOR: $arr["username"] = "$joindate
 
Cl: $usrclass

 UP
: $uploaded
 DL
: $downloaded
', CAPTION, '  R:$ratio [IMG]http://localhost:808/source/pic/arrowupp.gif[/IMG] $activeseed [IMG]http://localhost:808/pic/arrowdownn.gif[/IMG] $activeleech');\" onmouseout=\"return nd();\"> " . htmlspecialchars($arr["username"]) . ""; break; case UC_PREMIUM_UPLOADER: $arr["username"] = "$joindate
 
Cl: $usrclass

 UP
: $uploaded
 DL
: $downloaded
', CAPTION, '  R:$ratio [IMG]http://localhost:808/source/pic/arrowupp.gif[/IMG] $activeseed [IMG]http://localhost:808/pic/arrowdownn.gif[/IMG] $activeleech');\" onmouseout=\"return nd();\"> " . htmlspecialchars($arr["username"]) . ""; break; case UC_UPLOADER: $arr["username"] = "$joindate
 
Cl: $usrclass

 UP
: $uploaded
 DL
: $downloaded
', CAPTION, '  R:$ratio [IMG]http://localhost:808/source/pic/arrowupp.gif[/IMG] $activeseed [IMG]http://localhost:808/pic/arrowdownn.gif[/IMG] $activeleech');\" onmouseout=\"return nd();\"> " . htmlspecialchars($arr["username"]) . ""; break; case UC_VIP: $arr["username"] = "$joindate
 
Cl: $usrclass

 UP
: $uploaded
 DL
: $downloaded
', CAPTION, '  R:$ratio [IMG]http://localhost:808/source/pic/arrowupp.gif[/IMG] $activeseed [IMG]http://localhost:808/pic/arrowdownn.gif[/IMG] $activeleech');\" onmouseout=\"return nd();\"> " . htmlspecialchars($arr["username"]) . ""; break; case UC_LEGEND_USER: $arr["username"] = "$joindate
 
Cl: $usrclass

 UP
: $uploaded
 DL
: $downloaded
', CAPTION, '  R:$ratio [IMG]http://localhost:808/source/pic/arrowupp.gif[/IMG] $activeseed [IMG]http://localhost:808/pic/arrowdownn.gif[/IMG] $activeleech');\" onmouseout=\"return nd();\"> " . htmlspecialchars($arr["username"]) . ""; break; case UC_EXTREME_USER: $arr["username"] = "$joindate
 
Cl: $usrclass

 UP
: $uploaded
 DL
: $downloaded
', CAPTION, '  R:$ratio [IMG]http://localhost:808/source/pic/arrowupp.gif[/IMG] $activeseed [IMG]http://localhost:808/pic/arrowdownn.gif[/IMG] $activeleech');\" onmouseout=\"return nd();\"> " . htmlspecialchars($arr["username"]) . ""; break; case UC_ELITE_USER: $arr["username"] = "$joindate
 
Cl: $usrclass

 UP
: $uploaded
 DL
: $downloaded
', CAPTION, '  R:$ratio [IMG]http://localhost:808/source/pic/arrowupp.gif[/IMG] $activeseed [IMG]http://localhost:808/pic/arrowdownn.gif[/IMG] $activeleech');\" onmouseout=\"return nd();\"> " . htmlspecialchars($arr["username"]) . ""; break; case UC_POWER_USER: $arr["username"] = "$joindate
 
Cl: $usrclass

 UP
: $uploaded
 DL
: $downloaded
', CAPTION, '  R:$ratio [IMG]http://localhost:808/source/pic/arrowupp.gif[/IMG] $activeseed [IMG]http://localhost:808/pic/arrowdownn.gif[/IMG] $activeleech');\" onmouseout=\"return nd();\"> " . htmlspecialchars($arr["username"]) . ""; break; case UC_USER: $arr["username"] = "$joindate
 
Cl: $usrclass

 UP
: $uploaded
 DL
: $downloaded
', CAPTION, '  R:$ratio [IMG]http://localhost:808/source/pic/arrowupp.gif[/IMG] $activeseed [IMG]http://localhost:808/pic/arrowdownn.gif[/IMG] $activeleech');\" onmouseout=\"return nd();\"> " . htmlspecialchars($arr["username"]) . ""; break; }   $donator = $arr["donor"] === "yes"; if ($donator)  $activeusers .= ""; $warned = $arr["warned"] === "yes"; if ($warned)  $activeusers .= ""; if ($warned) $activeusers .= "[IMG]http://localhost:808/source/%7B$pic_base_url%7Dwarned.gif[/IMG]"; } if (!$activeusers) $activeusers = "There have been no active users in the last 15 minutes.";  stdhead("Home");  echo "Welcome to last user :   $latestuser\n";  // Extra //print("[B][IMG]http://localhost:808/source/extra/invite2.gif[/IMG][/B]

\n"); //print("[B][IMG]http://localhost:808/source/extra/star.gif[/IMG] //[IMG]http://localhost:808/source/extra/uploadapp.png[/IMG] //[IMG]http://localhost:808/source/extra/star.gif[/IMG] //[IMG]http://localhost:808/source/extra/staffapp.png[/IMG] //[IMG]http://localhost:808/source/extra/star.gif[/IMG][/B]

\n"); // End Extra  begin_main_frame ();  print("
");  if (get_user_class() >= UC_SVISOR){ print("
Tracker News  [New Item]"); print("\n"); } else{ print("Tracker News"); }  $res  = mysql_query("SELECT * FROM news WHERE ADDDATE(added, INTERVAL 365  DAY) > NOW() ORDER BY added DESC LIMIT 5") or sqlerr(__FILE__,  __LINE__); if (mysql_num_rows($res) > 0) {     print("\n");     $news_flag = 0;      while($array = mysql_fetch_array($res))     {         $user = mysql_fetch_assoc(mysql_query("SELECT username FROM users WHERE id = $array[userid]")) or sqlerr();         if ($news_flag == 0) {              print("
[IMG]http://localhost:808/source/%5C%22pic/minus.gif%5C%22[/IMG] " . gmdate("M-d-y",strtotime($array['added'])) . " - " ."". $array['title'] . "  ");  if (get_user_class() >= UC_MODERATOR)             {                 print("    [E]");                 print(" [D]");              }             print(" ".format_comment($array["body"],0)." 
 
");              $news_flag = 1;         }         else {              print("
[IMG]http://localhost:808/source/%5C%22pic/plus.gif%5C%22[/IMG] " . gmdate("M-d-y",strtotime($array['added'])) . " - " ."". $array['title'] . "  ");  if (get_user_class() >= UC_MODERATOR)             {                 print("    [E]");                 print(" [D]");              }             print(" ".format_comment($array["body"],0)." 
 
");         }            print(" ".str_replace(array("n", " "), array("n", " "), $array["body"])."");         print("");     }     print("\n"); }  //print("

\n"); //print("Partenerul si sursa noastra zilnica de jocuri bune!
\
n"); //print("[IMG]http://www.movies-vault.org/extra/gamer.png[/IMG]\n");  ?>    "); $query = "SELECT * FROM banners WHERE 1=1"; $sql = mysql_query($query); while ($row = mysql_fetch_array($sql)) { $link = $row['link']; $banner = $row['banner']; print("[IMG]http://localhost:808/source/$banner[/IMG]"); } print(" ");  ////////////////////////////////////////////////////////////////////////////////////// ?> 
Torrents Area Radio -  Kiss FM --           "); $query = "SELECT * FROM leftbanner WHERE 1=1"; $sql = mysql_query($query); while ($row = mysql_fetch_array($sql)) { $link1 = $row['link1']; $banner1 = $row['banner1']; print(""); } $query = "SELECT * FROM rightbanner WHERE 1=1"; $sql = mysql_query($query); while ($row = mysql_fetch_array($sql)) { $link2 = $row['link2']; $banner2 = $row['banner2']; print(""); } print("  [IMG]http://localhost:808/source/[/IMG][IMG]http://kissfm.ro/blogs/resita/files/2012/01/header_kiss_fm_nr_1_2012_640x480.jpg[/IMG]");  //////////////////////////////////////////////////////////////////////////////////////   if ($CURUSER) {   // Get current poll   $res = mysql_query("SELECT * FROM polls ORDER BY added DESC LIMIT 1") or sqlerr();   if($pollok=(mysql_num_rows($res)))   {           $arr = mysql_fetch_assoc($res);           $pollid = $arr["id"];           $userid = $CURUSER["id"];           $question = format_comment($arr["question"]);           $o = array($arr["option0"], $arr["option1"], $arr["option2"], $arr["option3"], $arr["option4"],             $arr["option5"], $arr["option6"], $arr["option7"], $arr["option8"], $arr["option9"],             $arr["option10"], $arr["option11"], $arr["option12"], $arr["option13"], $arr["option14"],             $arr["option15"], $arr["option16"], $arr["option17"], $arr["option18"], $arr["option19"]);    // Check if user has already voted           $res = mysql_query("SELECT * FROM pollanswers WHERE pollid=$pollid AND userid=$userid") or sqlerr();           $arr2 = mysql_fetch_assoc($res);   }    print("[B]Recent Poll");    if (get_user_class() >= UC_SYSOP)   {           print("");                 print(" - [New]\n");                 if($pollok) {                   print(" - [Edit]\n");                   //      print(" - [Delete]");                 }                 print("");         }         print("[/B]

\n");         if($pollok) {                 print("\n");           print("");           print("[CENTER]$question[/CENTER]
\n");           $voted = $arr2;           if ($voted)           {             // display results             if ($arr["selection"])               $uservote = $arr["selection"];             else               $uservote = -1;                         // we reserve 255 for blank vote.             $res = mysql_query("SELECT selection FROM pollanswers WHERE pollid=$pollid AND selection < 20") or sqlerr();             $tvotes = mysql_num_rows($res);              $vs = array(); // array of             $os = array();              // Count votes             while ($arr2 = mysql_fetch_row($res))               $vs[$arr2[0]] += 1;              reset($o);             for ($i = 0; $i < count($o); ++$i)               if ($o[$i])                 $os[$i] = array($vs[$i], $o[$i]);              function srt($a,$b)             {               if ($a[0] > $b[0]) return -1;               if ($a[0] < $b[0]) return 1;               return 0;             }              // now os is an array like this: array(array(123, "Option 1"), array(45, "Option 2"))             if ($arr["sort"] == "yes")                     usort($os, srt);              print("\n");             $i = 0;             while ($a = $os[$i])             {               if ($i == $uservote)                 $a[1] .= " *";               if ($tvotes == 0)                       $p = 0;               else                       $p = round($a[0] / $tvotes * 100);               if ($i % 2)                 $c = "";               else                 $c = "";               print("\n");               ++$i;             }             print("" . $a[1] . "  " .                 "[IMG]http://localhost:808/pic/bar_left.gif[/IMG][IMG]http://localhost:808/pic/bar.gif[/IMG][IMG]http://localhost:808/pic/bar_right.gif[/IMG] $p%\n");                         $tvotes = number_format($tvotes);             print("[CENTER]Votes: $tvotes[/CENTER]
\n");           }           else           {             print("\n");             $i = 0;             while ($a = $o[$i])             {               print("$a
\n");               ++$i;             }             print("
");             print("Blank vote (a.k.a. \" Vreau doar sa vad rezultatele ! \")
\n");             print("");           } ?>  Anterioare | Sugestii\n"); ?>   \n";           echo "";           echo"[B]No Active Polls[/B]

\n";           echo "";         } } ?> = UC_USER) { ?>       "; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo "[IMG]http://localhost:808/source/pic/bold.png[/IMG][IMG]http://localhost:808/source/pic/italic.png[/IMG][IMG]http://localhost:808/source/pic/underline.png[/IMG][IMG]http://localhost:808/source/pic/url.png[/IMG][IMG]http://localhost:808/source/pic/image.png[/IMG]                           
        
         
"; } ?>   
[B]Shoutbox[/B]

                       = UC_USER) { ?> 
Useri Activi: 
Notice:  Undefined variable: totalonline in C:\xampp\htdocs\Source\index.php on line 691
         

                                   [B]More Smilies[/B]

   
[IMG]http://localhost:808/source/pic/smilies/smile2.gif[/IMG] [IMG]http://localhost:808/source/pic/smilies/rofl.gif[/IMG] [IMG]http://localhost:808/source/pic/smilies/smile1.gif[/IMG] [IMG]http://localhost:808/source/pic/smilies/grin.gif[/IMG] [IMG]http://localhost:808/source/pic/smilies/laugh.gif[/IMG] [IMG]http://localhost:808/source/pic/smilies/cool1.gif[/IMG] [IMG]http://localhost:808/source/pic/smilies/noexpression.gif[/IMG] [IMG]http://localhost:808/source/pic/smilies/confused.gif[/IMG] [IMG]http://localhost:808/source/pic/smilies/sad.gif[/IMG] [IMG]http://localhost:808/source/pic/smilies/weep.gif[/IMG] [IMG]http://localhost:808/source/pic/smilies/hmmm.gif[/IMG] [IMG]http://localhost:808/source/pic/smilies/w00t.gif[/IMG] [IMG]http://localhost:808/source/pic/smilies/sly.gif[/IMG] [IMG]http://localhost:808/source/pic/smilies/greedy.gif[/IMG] [IMG]http://localhost:808/source/pic/smilies/sneaky.gif[/IMG] [IMG]http://localhost:808/source/pic/smilies/kiss.gif[/IMG] [IMG]http://localhost:808/source/pic/smilies/evil.gif[/IMG] [IMG]http://localhost:808/source/pic/smilies/crazy.gif[/IMG] [IMG]http://localhost:808/source/pic/smilies/wave.gif[/IMG] [IMG]http://localhost:808/source/pic/smilies/geek.gif[/IMG] [IMG]http://localhost:808/source/pic/smilies/tongue.gif[/IMG]          
Notice:  Undefined variable: activeusers in C:\xampp\htdocs\Source\index.php on line 696
    = UC_VIP) { ?>  
Tracker Statistics                           Maximum Users             
Notice:  Undefined variable: maxusers in C:\xampp\htdocs\Source\index.php on line 708
                   Registered Users         
Notice:  Undefined variable: registered in C:\xampp\htdocs\Source\index.php on line 710
                   Today registered         
Notice:  Undefined variable: todayreg in C:\xampp\htdocs\Source\index.php on line 712
                   Invited Users             
Notice:  Undefined variable: invites in C:\xampp\htdocs\Source\index.php on line 714
                   Unconfirmed Users         
Notice:  Undefined variable: unverified in C:\xampp\htdocs\Source\index.php on line 716
                   Online Users             
Notice:  Undefined variable: totalonline in C:\xampp\htdocs\Source\index.php on line 718
                   Unconnectable Peers         
Notice:  Undefined variable: NAT in C:\xampp\htdocs\Source\index.php on line 720
                                       Male Users                 
Notice:  Undefined variable: male in C:\xampp\htdocs\Source\index.php on line 726
                   Female Users             
Notice:  Undefined variable: female in C:\xampp\htdocs\Source\index.php on line 728
                   Undecided Users             
Notice:  Undefined variable: nobody in C:\xampp\htdocs\Source\index.php on line 730
                   Warned Users             
Notice:  Undefined variable: warnedu in C:\xampp\htdocs\Source\index.php on line 732
                   Disabled Users             
Notice:  Undefined variable: disabled in C:\xampp\htdocs\Source\index.php on line 734
                   Forum Topics             
Notice:  Undefined variable: topics in C:\xampp\htdocs\Source\index.php on line 736
                   Forum Posts                 
Notice:  Undefined variable: posts in C:\xampp\htdocs\Source\index.php on line 738"; if ($CURUSER) $activeusers .= "{$arr["username"]}"; else $activeusers .= "{$arr["username"]}"; if ($donator) $activeusers .= "[IMG]http://localhost:808/source/%7B$pic_base_url%7Dstar.gif[/IMG] 


Phpmyadmin :
Quote:

Import has been successfully finished, 106 queries executed. (bestzone.sql)
maxsecrets.php :

PHP Code:

<?

$mysql_host 
= "localhost";
$mysql_user = "root";
$mysql_pass = "12345";
$mysql_db = "bestzone";

?>

bittorrent.php :
PHP Code:

<?
include "ctracker.php";

function 
security_staff () 
{
    global 
$CURUSER;
    
$clasa  = 16; //number class of Owner
    
$glavnii = array("BigMax","BORG","Thor");
    
// Case sensitive. (example: array("adminname1","adminname2","adminname3","adminname4","so far")
    
if ($CURUSER["class"] >= $clasa)
        if (!
in_array($CURUSER["username"], $glavnii, true)) { // true for strict comparison
        
$msg = "[b]ATENTIE ! - un idiot incearca sa atace trackerul :[/b]
        
        [b]Username[/b]: "
.$CURUSER["username"]." ; 
        [b]User ID[/b]: "
.$CURUSER["id"]." ;
        [b]IP[/b]: "
.getip();
        
mysql_query("INSERT INTO messages (poster, sender, receiver, added, msg) VALUES(0, 0, '1', '" . get_date_time() . "', " .sqlesc($msg) . ")") or sqlerr(__FILE__, __LINE__);
mysql_query("UPDATE users set enabled='no' WHERE id=$CURUSER[id]") or sqlerr(__FILE__, __LINE__);
mysql_query("UPDATE users set class='1' WHERE id=$CURUSER[id]") or sqlerr(__FILE__, __LINE__);
        
stderr("Acces Denied!","Your username not found in security code, your account will be DISABLED.");
}
}

// Anti SQL injection
    
$x = str_replace("--", '--', $x);
    
$x = str_replace("UPDATE", '', $x);
    
$x = str_replace("DELETE", '', $x);
    
$x = str_replace("DROP", '', $x);
    
$x = str_replace("INSERT", '', $x);
    
$x = str_replace("$mysql_", '', $x);
    
$x = str_replace("java script:", '', $x);
    
//
    
// PHP5 with register_long_arrays off?
if (!isset($HTTP_POST_VARS) && isset($_POST))
{
$HTTP_POST_VARS = $_POST;
$HTTP_GET_VARS = $_GET;
$HTTP_SERVER_VARS = $_SERVER;
$HTTP_COOKIE_VARS = $_COOKIE;
$HTTP_ENV_VARS = $_ENV;
$HTTP_POST_FILES = $_FILES;
}

// Anti SQL injection
function isAlphaNumeric( $szInput )
{
   return (bool) 
preg_match( '/^[a-zA-Z0-9]$/', $szInput );
}
// usage:
if( isAlphaNumeric( 'mystring123' ) )
{
   
// valid
}else
{
   
// invalid
}

function 
strip_magic_quotes($arr)
{
foreach (
$arr as $k => $v)
{
if (
is_array($v))
{ 
$arr[$k] = strip_magic_quotes($v); }
else
{ 
$arr[$k] = stripslashes($v); }
}

return 
$arr;
}

if (
get_magic_quotes_gpc())
{
if (!empty(
$_GET)) { $_GET = strip_magic_quotes($_GET); }
if (!empty(
$_POST)) { $_POST = strip_magic_quotes($_POST); }
if (!empty(
$_COOKIE)) { $_COOKIE = strip_magic_quotes($_COOKIE); }
}


// addslashes to vars if magic_quotes_gpc is off
// this is a security precaution to prevent someone
// trying to break out of a SQL statement.
//

if( !get_magic_quotes_gpc() )
{
if( 
is_array($HTTP_GET_VARS) )
{
while( list(
$k, $v) = each($HTTP_GET_VARS) )
{
if( 
is_array($HTTP_GET_VARS[$k]) )
{
while( list(
$k2, $v2) = each($HTTP_GET_VARS[$k]) )
{
$HTTP_GET_VARS[$k][$k2] = addslashes($v2);
}
@
reset($HTTP_GET_VARS[$k]);
}
else
{
$HTTP_GET_VARS[$k] = addslashes($v);
}
}
@
reset($HTTP_GET_VARS);
}

if( 
is_array($HTTP_POST_VARS) )
{
while( list(
$k, $v) = each($HTTP_POST_VARS) )
{
if( 
is_array($HTTP_POST_VARS[$k]) )
{
while( list(
$k2, $v2) = each($HTTP_POST_VARS[$k]) )
{
$HTTP_POST_VARS[$k][$k2] = addslashes($v2);
}
@
reset($HTTP_POST_VARS[$k]);
}
else
{
$HTTP_POST_VARS[$k] = addslashes($v);
}
}
@
reset($HTTP_POST_VARS);
}

if( 
is_array($HTTP_COOKIE_VARS) )
{
while( list(
$k, $v) = each($HTTP_COOKIE_VARS) )
{
if( 
is_array($HTTP_COOKIE_VARS[$k]) )
{
while( list(
$k2, $v2) = each($HTTP_COOKIE_VARS[$k]) )
{
$HTTP_COOKIE_VARS[$k][$k2] = addslashes($v2);
}
@
reset($HTTP_COOKIE_VARS[$k]);
}
else
{
$HTTP_COOKIE_VARS[$k] = addslashes($v);
}
}
@
reset($HTTP_COOKIE_VARS);
}
}

function 
maxsysop () {
global 
$CURUSER;
// Check Staff Names
$lmaxclass  = 16;
$lsysopnames = array("BigMax","BORG","Thor"); // Case sensitive. Change this (YOUR SYSOP-ADMIN NAMES GOES HERE) (example: array("adminname1","adminname2","adminname3","adminname4","so far")
    
if ($CURUSER["class"] >= $lmaxclass)
        if (!
in_array($CURUSER["username"], $lsysopnames, true)) { // true for strict comparison
            
$msg = "Fake Account Detected: Username: ".$CURUSER["username"]." - UserID: ".$CURUSER["id"]." - UserIP : ".getip();
            
write_log($msg);
            
stderr("Access Denied!","We come to believe you are using a fake account, therefore we've logged this action!");
        }

// Check Staff IDS        
define ('UC_OWNER', 15); // Minumum Staff Level (9= UC_MODERATOR)
if ($CURUSER['class'] >= UC_OWNER) {
    
$allowed_ID = array(1,2,3,4.5); // Change this (YOUR SYSOP-ADMIN IDS GOES HERE) (example: array(1,2,3,4,5))
        
if (!in_array((int)$CURUSER["id"], $allowed_ID, true)) { // true for strict comparison
            
$msg = "Fake Account Detected: Username: ".$CURUSER["username"]." - UserID: ".$CURUSER["id"]." - UserIP : ".getip();
            
write_log($msg);
            
stderr("Access Denied!","We come to believe you are using a fake account, therefore we've logged this action!");            
        }        
    }
}

function 
local_user()
{
  return 
$_SERVER["SERVER_ADDR"] == $_SERVER["REMOTE_ADDR"];
}

$FUNDS = "$0";

$SITE_ONLINE = true;
//$SITE_ONLINE = local_user();
//$SITE_ONLINE = false;

$max_torrent_size = 1048576;
$announce_interval = 60 * 30;
$signup_timeout = 1 * 86400;
$minvotes = 1;
$max_dead_torrent_time = 1 * 2600;
$invites = 400000000;
$autoclean_interval = 300;

// Max users on site
$maxusers = 40000;

// ONLY USE ONE OF THE FOLLOWING DEPENDING ON YOUR O/S!!!
$torrent_dir = "warehouse";    # FOR UNIX ONLY - must be writable for httpd user
$SUBSPATH = "subs";
//$torrent_dir = "/opt/lampp/htdocs/torrents";    # FOR WINDOWS ONLY - must be writable for httpd user

# the first one will be displayed on the pages
$announce_urls = array();
$announce_urls[] = "http://xzone.ttl60.com/announce.php";

if (
$HTTP_SERVER_VARS["HTTP_HOST"] == "")
  
$HTTP_SERVER_VARS["HTTP_HOST"] = $HTTP_SERVER_VARS["SERVER_NAME"];
$BASEURL = "http://" . $HTTP_SERVER_VARS["HTTP_HOST"];

// Set this to your site URL... No ending slash!
$DEFAULTBASEURL = "http://xzone.ttl60.com";

// For USER AGREEMENT purpose only!
$DEFAULTBASEURL1 = "http://xzone.ttl60.com";

//set this to true to make this a tracker that only registered users may use
$MEMBERSONLY = true;

//maximum number of peers (seeders+leechers) allowed before torrents starts to be deleted to make room...
//set this to something high if you don't require this feature
$PEERLIMIT = 999999;

// Site donation email
$DONATEMAIL = "[email protected]";

// Email for sender/return path.
$SITEEMAIL = "[email protected]";

$SITENAME = "BEST zone";

$pic_base_url = "/pic/";
$imgdir = "/pic/";

// Maximum size of files uploaded into the BitBucket in bytes
$GLOBALS["MAX_UPLOAD_FILESIZE"] = 500 * 1024;

// Maximum size of the BitBucket per user in bytes
$GLOBALS["MAX_BITBUCKET_SIZE_USER"] = 1 * 1024 * 1024;

// Maximum size of the BitBucket for uploaders in bytes
$GLOBALS["MAX_BITBUCKET_SIZE_UPLOADER"] = 100 * 1024 * 1024;

// Path where all Bit-Bucket files are stored. These are:
// User's files, torrent and NFO images
// This path MUST be a subdir of the tracker root, and MUST be
// publicly available, optionally with referrer check
// Webserver MUST have write permission on this directory!
// No trailing slash.
$GLOBALS["BITBUCKET_DIR"] = "bitbucket";

// Relative or absolute URL where all images for the interface are stored.
// MUST include a trailing slash!
$GLOBALS["PIC_BASE_URL"] = "pic/";

require_once(
"maxsecrets.php");
require_once(
"maxcleanup.php");

$maxloginattempts = 6; // change this whatever u want. if u dont know what is this, leave it default

//Do not modify -- versioning system
//This will help identify code for support issues at tbdev.net
define ('TBVERSION','3.0');

/**** validip/getip courtesy of manolete <[email protected]> ****/

// IP Validation
function validip($ip)
{
        if (!empty(
$ip) && $ip == long2ip(ip2long($ip)))
        {
                
// reserved IANA IPv4 addresses
                // http://www.iana.org/assignments/ipv4-address-space
                
$reserved_ips = array (
                                array(
'0.0.0.0','2.255.255.255'),
                                array(
'10.0.0.0','10.255.255.255'),
                                array(
'127.0.0.0','127.255.255.255'),
                                array(
'169.254.0.0','169.254.255.255'),
                                array(
'172.16.0.0','172.31.255.255'),
                                array(
'192.0.2.0','192.0.2.255'),
                                array(
'192.168.0.0','192.168.255.255'),
                                array(
'255.255.255.0','255.255.255.255')
                );

                foreach (
$reserved_ips as $r)
                {
                                
$min = ip2long($r[0]);
                                
$max = ip2long($r[1]);
                                if ((
ip2long($ip) >= $min) && (ip2long($ip) <= $max)) return false;
                }
                return 
true;
        }
        else return 
false;
}

// Patched function to detect REAL IP address if it's valid
function getip() {
   if (isset(
$_SERVER)) {
     if (isset(
$_SERVER['HTTP_X_FORWARDED_FOR']) && validip($_SERVER['HTTP_X_FORWARDED_FOR'])) {
       
$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
     } elseif (isset(
$_SERVER['HTTP_CLIENT_IP']) && validip($_SERVER['HTTP_CLIENT_IP'])) {
       
$ip = $_SERVER['HTTP_CLIENT_IP'];
     } else {
       
$ip = $_SERVER['REMOTE_ADDR'];
     }
   } else {
     if (
getenv('HTTP_X_FORWARDED_FOR') && validip(getenv('HTTP_X_FORWARDED_FOR'))) {
       
$ip = getenv('HTTP_X_FORWARDED_FOR');
     } elseif (
getenv('HTTP_CLIENT_IP') && validip(getenv('HTTP_CLIENT_IP'))) {
       
$ip = getenv('HTTP_CLIENT_IP');
     } else {
       
$ip = getenv('REMOTE_ADDR');
     }
   }

   return 
$ip;
 }

function 
dbconn($autoclean = false)
{
    global 
$mysql_host, $mysql_user, $mysql_pass, $mysql_db;

    if (!@
mysql_connect($mysql_host, $mysql_user, $mysql_pass))
    {
          switch (
mysql_errno())
          {
                case 
1040:
                case 
2002:
                        if (
$_SERVER[REQUEST_METHOD] == "GET")
                                die(
"<html><head><meta http-equiv=refresh content=\"5 $_SERVER[REQUEST_URI]\"></head><body><table border=0 width=100% height=100%><tr><td><h3 align=center>The server load is very high at the moment. Retrying, please wait...</h3></td></tr></table></body></html>");
                        else
                                die(
"Too many users. Please press the Refresh button in your browser to retry.");
        default:
                die(
"[" . mysql_errno() . "] dbconn: mysql_connect: " . mysql_error());
      }
    }
    
mysql_select_db($mysql_db)
        or die(
'dbconn: mysql_select_db: ' + mysql_error());

    
userlogin();

    if (
$autoclean)
        
register_shutdown_function("autoclean");
}


function 
userlogin() {
    global 
$SITE_ONLINE;
    unset(
$GLOBALS["CURUSER"]);

    
$ip = getip();
        
$nip = ip2long($ip);
    
$res = mysql_query("SELECT * FROM bans WHERE $nip >= first AND $nip <= last") or sqlerr(__FILE__, __LINE__);
    if (
mysql_num_rows($res) > 0)
    {
      
header("HTTP/1.0 403 Forbidden");
      print(
"<html><body><h1>403 Forbidden</h1>Unauthorized IP address.</body></html>\n");
      die;
    }

    if (!
$SITE_ONLINE || empty($_COOKIE["uid"]) || empty($_COOKIE["pass"]))
        return;
    
$id = (int)$_COOKIE["uid"];
    if (!
$id || strlen($_COOKIE["pass"]) != 32)
        return;
    
$res = mysql_query("SELECT * FROM users WHERE id = $id AND enabled='yes' AND status = 'confirmed' LIMIT 1");// or die(mysql_error());
    
$row = mysql_fetch_array($res);
    if (!
$row)
        return;
    
$sec = hash_pad($row["secret"]);
    if (
$_COOKIE["pass"] !== $row["passhash"])
        return;
        if ((
$ip != $row["ip"]) && $row["ip"])
    
mysql_query("INSERT INTO iplog (ip, userid, access) VALUES (" . sqlesc($row["ip"]) . ", " . $row["id"] . ", '" . $row["last_access"] . "')");
    
mysql_query("UPDATE users SET last_access='" . get_date_time() . "', ip=".sqlesc($ip)." WHERE id=" . $row["id"]);// or die(mysql_error());
    
$row['ip'] = $ip;
    
$GLOBALS["CURUSER"] = $row;
}

function 
autoclean() {
    global 
$autoclean_interval;

    
$now = time();
    
$docleanup = 0;

    
$res = mysql_query("SELECT value_u FROM avps WHERE arg = 'lastcleantime'");
    
$row = mysql_fetch_array($res);
    if (!
$row) {
        
mysql_query("INSERT INTO avps (arg, value_u) VALUES ('lastcleantime',$now)");
        return;
    }
    
$ts = $row[0];
    if (
$ts + $autoclean_interval > $now)
        return;
    
mysql_query("UPDATE avps SET value_u=$now WHERE arg='lastcleantime' AND value_u = $ts");
    if (!
mysql_affected_rows())
        return;

    
docleanup();
}

function 
unesc($x) {
    if (
get_magic_quotes_gpc())
        return 
stripslashes($x);
    return 
$x;
}

function 
mksize($bytes)
{
    if (
$bytes < 1000 * 1024)
        return 
number_format($bytes / 1024, 2, ".", ".") . " KB";
        elseif (
$bytes < 1000 * 1048576)
            return 
number_format($bytes / 1048576, 2, ".", ".") . " MB";
            elseif (
$bytes < 1000 * 1073741824)
                return 
number_format($bytes / 1073741824, 2, ".", ".") . " GB";
                elseif (
$bytes < 1000 * 1099511627776)
                    return 
number_format($bytes / 1099511627776, 2, ".", ".") . " TB";
                    else
                    return 
number_format($bytes / 1125899906842624, 2, ".", ".") . " PB";
                    }
                    
                    function 
mksizeint($bytes)
                    {
                    
$bytes = max(0, $bytes);
                    if (
$bytes < 1000)
                    return 
number_format(floor($bytes), 0, ",", ".") . " B";
                    elseif (
$bytes < 1000 * 1024)
                    return 
number_format(floor($bytes / 1024), 0, ",", ".") . " KB";
                    elseif (
$bytes < 1000 * 1048576)
                    return 
number_format(floor($bytes / 1048576), 0, ",", ".") . " MB";
                    elseif (
$bytes < 1000 * 1073741824)
                    return 
number_format(floor($bytes / 1073741824), 0, ",", ".") . " GB";
                    elseif (
$bytes < 1000 * 1099511627776)
                    return 
number_format(floor($bytes / 1099511627776), 0, ",", ".") . " TB";
                    else
                    return 
number_format(floor($bytes / 1125899906842624), 0, ".". ".") . " PB";
                    }

function 
prefixed($bytes)
{
    
$prefixes = array("", "k", "M", "G", "T", "P", "E", "Z", "Y", "B", "Geop");
    
$i = 0;
    
$div = 1;
    while (
$bytes / $div > 1024 && $i < count($prefixes)) {
        
$i++;
        
$div *= 1024;
    }

    return 
round($bytes / $div, 2) . " " . $prefixes[$i] . "B";
}

function 
deadtime() {
    global 
$announce_interval;
    return 
time() - floor($announce_interval * 1.3);
}

function 
display_date_time($time) {
  global 
$CURUSER;
  return 
date("d-m-Y H:i:s", strtotime($time) + (($CURUSER["timezone"] + $CURUSER["dst"]) * 60));
}

function 
mkprettytime($s) {
    if (
$s < 0)
        
$s = 0;
    
$t = array();
    foreach (array(
"60:sec","60:min","24:hour","0:day") as $x) {
        
$y = explode(":", $x);
        if (
$y[0] > 1) {
            
$v = $s % $y[0];
            
$s = floor($s / $y[0]);
        }
        else
            
$v = $s;
        
$t[$y[1]] = $v;
    }

    if (
$t["day"])
        return 
$t["day"] . "d " . sprintf("%02d:%02d:%02d", $t["hour"], $t["min"], $t["sec"]);
    if (
$t["hour"])
        return 
sprintf("%d:%02d:%02d", $t["hour"], $t["min"], $t["sec"]);
//    if ($t["min"])
        
return sprintf("%d:%02d", $t["min"], $t["sec"]);
//    return $t["sec"] . " secs";
}

function 
mkglobal($vars) {
    if (!
is_array($vars))
        
$vars = explode(":", $vars);
    foreach (
$vars as $v) {
        if (isset(
$_GET[$v]))
            
$GLOBALS[$v] = unesc($_GET[$v]);
        elseif (isset(
$_POST[$v]))
            
$GLOBALS[$v] = unesc($_POST[$v]);
        else
            return 
0;
    }
    return 
1;
}

function 
tr($x,$y,$noesc=0) {
    if (
$noesc)
        
$a = $y;
    else {
        
$a = htmlspecialchars($y);
        
$a = str_replace("\n", "\n", $a);
    }
    print(
"<tr><td class=\"heading\" valign=\"top\" align=\"right\">$x</td><td valign=\"top\" align=left>$a</td></tr>\n");
}

function 
validfilename($name) {
    return 
preg_match('/^[^\0-\x1f:\\\\\/?*\xff#<>|]+$/si', $name);
}

function 
validemail($email) {
    return 
preg_match('/^[\w.-]+@([\w.-]+\.)+[a-z]{2,6}$/is', $email);
}

function 
sqlesc($x) {
    return 
"'".mysql_real_escape_string($x)."'";
}

function 
sqlwildcardesc($x) {
    return 
str_replace(array("%","_"), array("\\%","\\_"), mysql_real_escape_string($x));
}

function 
urlparse($m) {
    
$t = $m[0];
    if (
preg_match(',^\w+://,', $t))
        return 
"<a href=\"$t\">$t</a>";
    return 
"<a href=\"http://$t\">$t</a>";
}

function 
parsedescr($d, $html) {
    if (!
$html)
    {
      
$d = htmlspecialchars($d);
      
$d = str_replace("\n", "\n", $d);
    }
    return 
$d;
}

function 
stdhead($title = "", $msgalert = true) {
    global 
$CURUSER, $SITE_ONLINE, $FUNDS, $SITENAME;

  if (!
$SITE_ONLINE)
    die(
"Site is down for maintenance, please check back again later... thanks");

    
//header("Content-Type: text/html; charset=utf-8");        //== anulat de BigMax pentru viewnfo.php ==//
    //header("Pragma: No-cache");
    
if ($title == "")
        
$title = $SITENAME .(isset($_GET['tbv'])?" (".TBVERSION.")":'');
    else
        
$title = $SITENAME .(isset($_GET['tbv'])?" (".TBVERSION.")":''). " :: " . htmlspecialchars($title);
  if (
$CURUSER)
  {
    
$ss_a = @mysql_fetch_array(@mysql_query("SELECT uri FROM stylesheets WHERE id=" . $CURUSER["stylesheet"]));
    if (
$ss_a) $ss_uri = $ss_a["uri"];
  }
  if (!
$ss_uri)
  {
    (
$r = mysql_query("SELECT uri FROM stylesheets WHERE id=1")) or die(mysql_error() );
    (
$a = mysql_fetch_array($r)) or die(mysql_error());
    
$ss_uri = $a["uri"];
  }
  if (
$msgalert && $CURUSER)
  {
    
$res = mysql_query("SELECT COUNT(*) FROM messages WHERE receiver=" . $CURUSER["id"] . " && unread='yes'") or die("OopppsY!");
    
$arr = mysql_fetch_row($res);
    
$unread = $arr[0];
  }
  if (
$CURUSER["fader"] == "yes")
  {
  
?>
<script>
  var color = "<?=$CURUSER["fadecolor"]?>";
</script>
<script language="JavaScript1.2">
function log_out()
{
    ht = document.getElementsByTagName("html");
    ht[0].style.filter = "progid:DXImageTransform.Microsoft.BasicImage(grayscale=1)";
    if (confirm(l_logout))
    {
        return true;
    }
    else
    {
        ht[0].style.filter = "";
        return false;
    }
}
var l_logout="Are you sure, you want to logout ?";
</script>
  <?
  
}
?>
<html>
<head>
<title><?= $title ?></title>
<link rel="shortcut icon" href="/favicon.ico">
<? if ($CURUSER) { ?>
<link rel="stylesheet" href="/<?=$ss_uri?>" type="text/css">
<link rel="alternate" type="application/rss+xml" title="Latest Torrents" href="<?=$DEFAULTBASEURL?>/rss.php">
<script type="text/javascript" src="js/main.js"></script>
<? } else { ?>
<link rel="stylesheet" href="/css/login.css" type="text/css">
<? }?>
</head>
<body>
<script type="text/javascript" src="js/wz_tooltip.js"></script>
<noscript><div style="position: absolute; padding: 360px; top: 2%; left: 10%; z-index: 80002; border: #514B79 solid 1px; background-image: url(pic/black.png); color: #FF0000"><div align="center"><strong>This page can not display properly without JavaScript.Please enable JavaScript and reload this page.</strong></div></div></noscript>


<? if ($CURUSER) { ?>
<table class="main" width="966" align="center" cellspacing="0" cellpadding="0" style="background: transparent">
<tr>
<td class="clear">
<div align="center"><img src="pic/header.gif" class="header" usemap="#m_header" /></div>


                     <!-- /////////// Mapare header la teme //////////// -->

<? if (($CURUSER["stylesheet"] == 1) || (!$CURUSER)) { ?>                                          <!-- /// Aeon Design /// -->
<map name="m_header">
<area shape="rect" coords="152,148,199,186" href="index.php" />
  <area shape="rect" coords="203,150,252,185" href="browse.php" />
  <area shape="rect" coords="256,152,315,184" href="donate.php" />
  <area shape="rect" coords="319,153,360,183" href="browseadult.php" />
  <area shape="rect" coords="363,154,408,182" href="ticketnew.php" />
  <area shape="rect" coords="413,154,470,181" href="viewrequests.php" />
  <area shape="rect" coords="475,154,522,181" href="my.php" />
  <area shape="rect" coords="526,154,576,181" href="upload.php" />
  <area shape="rect" coords="580,155,631,180" href="forums.php" />
  <area shape="rect" coords="635,156,677,179" href="users.php" />
  <area shape="rect" coords="681,155,725,179" href="topten.php" />
  <area shape="rect" coords="729,156,759,178" href="faq.php" />
  <area shape="rect" coords="763,156,802,177" href="rules.php" />
  <area shape="rect" coords="807,156,847,177" href="staff.php" />
</map>
<? } ?>

<? if (($CURUSER["stylesheet"] == 2) || (!$CURUSER)) { ?>                                          <!-- /// Aeon Design /// -->
<map name="m_header">
<area shape="rect" coords="152,148,199,186" href="index.php" />
<area shape="rect" coords="203,150,252,185" href="browse.php" />
  <area shape="rect" coords="256,152,315,184" href="donate.php" />
  <area shape="rect" coords="319,153,360,183" href="browseadult.php" />
  <area shape="rect" coords="363,154,408,182" href="ticketnew.php" />
  <area shape="rect" coords="413,154,470,181" href="viewrequests.php" />
  <area shape="rect" coords="475,154,522,181" href="my.php" />
  <area shape="rect" coords="526,154,576,181" href="upload.php" />
  <area shape="rect" coords="580,155,631,180" href="forums.php" />
  <area shape="rect" coords="635,156,677,179" href="users.php" />
  <area shape="rect" coords="681,155,725,179" href="topten.php" />
  <area shape="rect" coords="729,156,759,178" href="faq.php" />
  <area shape="rect" coords="763,156,802,177" href="rules.php" />
  <area shape="rect" coords="807,156,847,177" href="staff.php" />
</map>
<? } ?>

</td></tr></table>
<? } ?>


<? /*
<!-- /////// some vars for the statusbar;o) //////// -->
*/ 
?>
<? 
if ($CURUSER) { ?>
<?
$datum 
= gmdate("H:i", time() + (($CURUSER["timezone"] + $CURUSER["dst"]) * 60));
$datumm = gmdate("l, M d Y H:i", time() + (($CURUSER["timezone"] + $CURUSER["dst"]) * 60));
$res4 = mysql_query("SELECT invites FROM users WHERE id=" . sqlesc($CURUSER["id"]) . " LIMIT 1") or print(mysql_error());
$arr = mysql_fetch_assoc($res4);
$invites = "$arr[invites]";
$usrclass = "&nbsp;-<font style=font:italic><b>&nbsp;".get_user_class_name($CURUSER['class'])."&nbsp;</b></font>&nbsp;|";
$uped = mksize($CURUSER['uploaded']);
$downed = mksize($CURUSER['downloaded']);
if (
$CURUSER["downloaded"] > 0)
{
$ratio = $CURUSER['uploaded'] / $CURUSER['downloaded'];
$ratio = number_format($ratio, 3);
$color = get_ratio_color($ratio);
if (
$color)
$ratio = "$ratio";
}
else
if (
$CURUSER["uploaded"] > 0)
$ratio = "Inf.";
else
$ratio = "---";

if (
$CURUSER['donor'] == "yes")
$medaldon = "<img src=pic/star.png alt=donor title=donor>";

if (
$CURUSER['warned'] == "yes")
$warn = "<img src=pic/warned.gif alt=warned title=warned>";

//// check for messages //////////////////
$res1 = mysql_query("SELECT COUNT(*) FROM messages WHERE receiver=" . $CURUSER["id"] . " AND location IN ('in', 'both')") or print(mysql_error());
$arr1 = mysql_fetch_row($res1);
$messages = $arr1[0];
$res1 = mysql_query("SELECT COUNT(*) FROM messages WHERE receiver=" . $CURUSER["id"] . " AND location IN ('in', 'both') AND unread='yes'") or print(mysql_error());
$arr1 = mysql_fetch_row($res1);
$unread = $arr1[0];
$res1 = mysql_query("SELECT COUNT(*) FROM messages WHERE sender=" . $CURUSER["id"] . " AND location IN ('out', 'both')") or print(mysql_error());
$arr1 = mysql_fetch_row($res1);
$outmessages = $arr1[0];
$res1 = mysql_query("SELECT COUNT(*) FROM messages WHERE receiver=" . $CURUSER["id"] . " && unread='yes'") or die("OopppsY!");
$arr1 = mysql_fetch_row($res1);
$unread = $arr1[0];
if (
$unread)
$inboxpic = "<img height=14px style=border:none alt=inbox title='inbox (new messages)' src=pic/pn_inboxnew.gif>";
else
$inboxpic = "<img height=14px style=border:none alt=inbox title='inbox (no new messages)' src=pic/pn_inbox.gif>";

//// check active torrents ///////////////////////
$res2 = mysql_query("SELECT COUNT(*) FROM peers WHERE userid=" . $CURUSER["id"] . " AND seeder='yes'") or print(mysql_error());
$row = mysql_fetch_row($res2);
$activeseed = $row[0];
$res2 = mysql_query("SELECT COUNT(*) FROM peers WHERE userid=" . $CURUSER["id"] . " AND seeder='no'") or print(mysql_error());
$row = mysql_fetch_row($res2);
$activeleech = $row[0];
//// end

// check if user is connectable or not
$res3 = mysql_query("SELECT connectable FROM peers WHERE userid=" . sqlesc($CURUSER["id"]) . " LIMIT 1") or print(mysql_error());
if(
$row = mysql_fetch_row($res3)){
       
$connect = $row[0];
       if(
$connect == "yes"){
         
$connectable = "<b><font color=green><a title='Connectable = Yes'>Connectable</a></font></b>";
       }else{
         
$connectable = "<b><font color=red><a title='Connectable = No'>Unconnectable</a></font></b>";
       }
}else{
$connectable ="<b><a title='Unknow'>Unknown</a></b>";
}
$bonus = number_format($CURUSER['seedbonus'], 1);
// end
?>
<? 
/*
<!-- //////// start the statusbar ///////////// -->
*/ 
?>
<table class="mainn" align="center" cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="tableaa"><table class="tableaa" align="center" cellspacing="0" cellpadding="12" border="0">
<tr>
<td class="bottom" align="left"><span class="smallfont">
<?
if(($datum >= 6) && ($datum < 12)){ $hai = "<b>Buna Dimineata</b>"; }
if((
$datum >= 12) && ($datum < 18)){ $hai = "<b>Buna Ziua</b>"; }
if((
$datum >= 18) && ($datum < 24)){ $hai = "<b>Buna Seara</b>"; }
if((
$datum >= 0) && ($datum < 6)){ $hai = "<b>Noapte Buna</b>"; }
echo 
$hai;?>&nbsp;<b><a href="userdetails.php?id=<?=$CURUSER[ 'id' ] ?>"><?=$CURUSER ['username']?></a></b><?=$medaldon?><?=$warn?><?=$usrclass;?> 
<!--<a href="userchat.php"><font color=seagreen><b>CHAT</b></font></a> | -->
<? if (get_user_class() >= UC_VIP) { ?> <a href="mytorrents.php"><font color=#9F81F7><b>My Torrents</b></font></a> | 
<?}?><? if (get_user_class() >= UC_POWER_USER) { ?><a href="subnet.php"><b><font color=#04B4AE>Network</font></b></a> | 
<?}?><? if ($CURUSER[seedbonus] != "0") { ?><b><a href="mybonus.php"><font color=#E7E700>Bonus: </font><?=$bonus?></a></b> | 
<?}?><? if ($CURUSER[invites] != "0") { ?><b><a href="invite.php"><font color=#FE9A2E> Invites: </font><?=$invites?></a></b> | 
<?}?><? if (get_user_class() < UC_VIP) { ?><a href="donate.php"><font color=#FF4D00><b>BE VIP !</b></font></a> | 
<?}?><a href="casino.php"><b>&nbsp;<img src= "pic/jack.png"></img>&nbsp;</b></a> | 
<!--<a href="blackjack.php">&nbsp;<img src= "pic/jack.png"></img>&nbsp;</a> | -->
<? if (get_user_class() >= UC_MODERATOR) { ?><a href="staffpanel.php"><img height=17px style=border:none src="pic/stap.png"></a> | 
<?}?><? if (get_user_class() >= UC_MODERATOR) { ?> <a href="staffbox.php"><img height=17px style=border:none src="pic/stam.png"></a></b> | 
<?}?><? if (get_user_class() >= UC_ADMINISTRATOR) { ?><a href="uploadapps.php"><img height=17px style=border:none src="pic/upap.png"></a> | 
<?}?><? if (get_user_class() >= UC_SVISOR) { ?><a href="staffapps.php"><img height=17px style=border:none src="pic/stafap.png"></a> | 
<?}?>
&nbsp;<a href="leaveprofile.php" onClick="return log_out()"><img height=15px style=border:none src="pic/exit.png"></a>&nbsp;<br/>

<font color=#5882FA><b>Ratio:</b></font> <font class="statusdetails"><b><?=$ratio?></b></font>&nbsp;|
<font color=#00CE00><b>Uploaded:</b></font> <font class="statusdetails"><b><?=$uped?></b></font>&nbsp;|
<font color=#FF0000><b>Downloaded:</b></font> <font class="statusdetails"><b><?=$downed?></b></font>&nbsp;|
<font class="statusdetails"><b><font color=#81BEF7>Active Torrents:</font></b>&nbsp;</span> <img alt="Torrents seeding" title="Torrents seeding" src="pic/arrowup.gif">&nbsp;<b><font class="statusdetails"><span class="smallfont"><?=$activeseed?></span></font>&nbsp;<img alt="Torrents leeching" title="Torrents leeching" src="pic/arrowdown.gif">&nbsp;<font class="statusdetails"><span class="smallfont"><?=$activeleech?>&nbsp;|
<?=$connectable?>&nbsp;&nbsp;</b></span></font></td>

<td class="bottom" align="right"><span class="smallfont"><div style="margin-top: 8px"><?=$datumm?></div><br/>
<?
if ($messages){
print(
"<span class=smallfont><a href=inbox.php>$inboxpic</a> $messages ($unread New)</span>");
if (
$outmessages)
print(
"<span class=smallfont>&nbsp;&nbsp;<a href=inbox.php?out=1><img height=14px style=border:none alt=sentbox title=sentbox src=pic/pn_sentbox.gif></a> $outmessages</span>&nbsp;");
else
print(
"<span class=smallfont>&nbsp;&nbsp;<a href=inbox.php?out=1><img height=14px style=border:none alt=sentbox title=sentbox src=pic/pn_sentbox.gif></a> 0</span>&nbsp;");
}
else
{
print(
"<span class=smallfont><a href=inbox.php><img height=14px style=border:none alt=inbox title=inbox src=pic/pn_inbox.gif></a> 0</span>");
if (
$outmessages)
print(
"<span class=smallfont>&nbsp;&nbsp;<a href=inbox.php?out=1><img height=14px style=border:none alt=sentbox title=sentbox src=pic/pn_sentbox.gif></a> $outmessages</span>&nbsp;");
else
print(
"<span class=smallfont>&nbsp;&nbsp;<a href=inbox.php?out=1><img height=14px style=border:none alt=sentbox title=sentbox src=pic/pn_sentbox.gif></a> 0</span>&nbsp;");
}
print(
"&nbsp;<a href=friends.php><img style=border:none alt=Buddylist title=Buddylist src=pic/buddylist.gif></a>&nbsp;");
print(
"&nbsp;<a href=rss.php?feed=dl&cat=23,22,1,24,7,25,12,30,4,21,17,26,27,28,29,35,36,20,31,5,32,19,6,34,33,9&passkey=$CURUSER[passkey]><img style=border:none alt=Rss title=Rss src=pic/rss.gif></a>");
?>
</span></td>

</tr>
</table></table>

<? } else { ?>
<? 
} ?>
<? 
/*
                     <!-- /////////// Latime middle la teme //////////// -->
*/ 
?>
<?php

?>
<? 
if ($CURUSER) { ?>
<? 
if (($CURUSER["stylesheet"] == 1) || (!$CURUSER)) { ?>          <!-- /// Default Theme /// -->
<table class="mainouter" width="1000" align="center" border="0" cellspacing="0" cellpadding="10">
<? } ?>

<? if (($CURUSER["stylesheet"] == 2) || (!$CURUSER)) { ?>                 <!-- /// Aliens /// -->
<table class="mainouter" width="1000" align="center" border="0" cellspacing="0" cellpadding="10">
<? } ?>

<? } else { ?>
<table class="mainouter" width="450" align="center" border="0" cellspacing="0" cellpadding="10">
<? } ?>
<? 
/*
<!------------- MENU ------------------------------------------------------------------------>
*/ 
?>
<? $fn 
= substr($_SERVER['PHP_SELF'], strrpos($_SERVER['PHP_SELF'], "/") + 1); ?>
<tr><td align="center" class="outer" style="padding-top: 10px; padding-bottom: 20px">
<?

/*
if ($CURUSER) {
if (get_user_class() < UC_UPLOADER || get_user_class() == UC_OWNER) {
  print("<p><table border=0 cellspacing=0 cellpadding=0><tr><td align=center style='width: 404px; height: 38px; border: 0px; padding-top: 5px; background: url(pic/ann.png)'>\n");
  print("<a href=$BASEURL/donate.php><font size=2 color=white><b>Toate pachetele <font color=red>xMail</font> cumparate pe data de <font color=red>20.06.2009</font> beneficiaza de <font color=red>+50% upload</font> !</b></font></b>");
  print("</td></tr></table></p>\n");
}
}
*/

/*
if ($CURUSER) {
if (get_user_class() < UC_UPLOADER || get_user_class() == UC_OWNER) {
  print("<a href=$BASEURL/donate.php><img src=/pic/addvert/promo.png border=none alt=Promo /></a>");
  print("");
}
*/

$announcement = $CURUSER['announce'];
if (
$announcement == "yes")
  print(
"<a href=$BASEURL/announcement.php><img src=/pic/ann.png border=none alt=Announcement /></a>");
  print(
"");

if (
$unread)
{
  print(
"<p><table border=0 cellspacing=0 cellpadding=10 bgcolor=red><tr><td style='padding: 10px; background: url(pic/back_newpm.gif)'>\n");
  print(
"<b><a href=$BASEURL/inbox.php><font color=white>You have $unread new message" . ($unread > 1 ? "s" : "") . " !</font></a></b>");
  print(
"</td></tr></table></p>\n");
}

if (
$CURUSER) {
    
$res = mysql_query("SELECT * FROM polls ORDER BY added DESC LIMIT 1") or sqlerr();
    
$arr = mysql_fetch_assoc($res);
    
$pollid = $arr["id"];


       
$id = $CURUSER["id"];
    
$respoll = mysql_query("SELECT userid FROM pollanswers WHERE pollid=$pollid AND userid=$id") or sqlerr();
    
$arrpoll = mysql_fetch_assoc($respoll);
    if (!
$arrpoll[userid]) {
        print(
"<p><table border=0 cellspacing=0 cellpadding=10 bgcolor=yellow><tr><td style='padding: 10px; background: url(pic/back_new.gif)'>\n");
        print(
"<b><a href=\"$BASEURL/index.php?action=viewindex\">New poll, please vote !</a></b>");
        print(
"</td></tr></table></p>\n");
    }
}

//=== report link for big red box thanks carphunter18 :)
if (get_user_class() >= UC_MODERATOR) {
$res_reports = mysql_query("SELECT COUNT(*) FROM reports WHERE delt_with = '0'");
$arr_reports = mysql_fetch_row($res_reports);
$num_reports = $arr_reports[0];
if (
$num_reports > 0)
echo
"<p><table border=0 cellspacing=0 cellpadding=10 bgcolor=red><tr><td style='padding: 5px; background: url(pic/back_newpm.gif)' align=center><b>Hey $CURUSER[username]! $num_reports Report" . ($num_reports > 1 ? "s" : "") . " to be dealt withclick <a href=reports.php>HERE</a> to view reports</b></td></tr></table></p>\n";
}

}

function 
stdfoot() {
global 
$CURUSER;
if (!
$CURUSER) {
exit();
}
?>
<? 
if ($CURUSER) { ?>
</td></tr></table></td></tr></table><div align="center"><img src="pic/footer.gif" class="footer" usemap="#m_footer" /></div>
<? } ?>


                     <!-- /////////// Mapare footer la teme //////////// -->
                     

<? if (($CURUSER["stylesheet"] == 1) || (!$CURUSER)) { ?>                                         <!-- /// Aeon Design /// -->
<map name="m_footer">
<area shape="rect" coords="361,18,426,39" href="bitbucket.php" />
  <area shape="rect" coords="428,17,468,40" href="links.php" />
  <area shape="rect" coords="470,16,539,40" href="useragreement.php" />
  <area shape="rect" coords="541,16,572,40" href="log" />
  <area shape="rect" coords="575,16,637,39" href="chat.php" />
</map>
<center><img src="pic/themes/default/rebrom.png"></img></center></br>
</br>
<? } ?>

<? if (($CURUSER["stylesheet"] == 2) || (!$CURUSER)) { ?>                                         <!-- /// Aeon Design /// -->
<map name="m_footer">
<area shape="rect" coords="361,18,426,39" href="bitbucket.php" />
  <area shape="rect" coords="428,17,468,40" href="links.php" />
  <area shape="rect" coords="470,16,539,40" href="useragreement.php" />
  <area shape="rect" coords="541,16,572,40" href="log" />
  <area shape="rect" coords="575,16,637,39" href="chat.php" />
</map>
<center><img src="pic/themes/aliens/rebro.png"></img></center></br>
</br>
<? } ?>

<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-10926027-1");
pageTracker._trackPageview();
} catch(err) {}</script>

<?
print("</td></tr></table>\n");
print(
"</body></html>\n");
}

function 
genbark($x,$y) {
    
stdhead($y);
    print(
"<h2>" . htmlspecialchars($y) . "</h2>\n");
    print(
"<p>" . htmlspecialchars($x) . "</p>\n");
    
stdfoot();
    exit();
}

function 
mksecret($len = 20) {
    
$ret = "";
    for (
$i = 0; $i < $len; $i++)
        
$ret .= chr(mt_rand(0, 255));
    return 
$ret;
}

function 
httperr($code = 404) {
    
header("HTTP/1.0 404 Not found");
    print(
"<h1>Not Found</h1>\n");
    print(
"<p>Sorry pal :(</p>\n");
    exit();
}

function 
gmtime()
{
   return 
strtotime(get_date_time());

}
/*
function logincookie($id, $password, $secret, $updatedb = 1, $expires = 0x7fffffff) {
    $md5 = md5($secret . $password . $secret);
    setcookie("uid", $id, $expires, "/");
    setcookie("pass", $md5, $expires, "/");

    if ($updatedb)
        mysql_query("UPDATE users SET last_login = NOW() WHERE id = $id");
}
*/

function logincookie($id, $passhash, $updatedb = 1, $expires = 0x7fffffff)
{
        
setcookie("uid", $id, $expires, "/");
        
setcookie("pass", $passhash, $expires, "/");

  if (
$updatedb)
          
mysql_query("UPDATE users SET last_login = NOW() WHERE id = $id");
}


function 
logoutcookie() {
    
setcookie("uid", "", 0x7fffffff, "/");
    
setcookie("pass", "", 0x7fffffff, "/");
}

function 
loggedinorreturn() {
    global 
$CURUSER;
    if (!
$CURUSER) {
        
header("Location: $BASEURL/notlogin.php?returnto=" . urlencode($_SERVER["REQUEST_URI"]));
        exit();
    }
}

function 
deletetorrent($id) {
  global 
$torrent_dir;
  
mysql_query("DELETE FROM torrents WHERE id = $id");
  foreach(
explode(".","peers.files.comments") as $x)
      
mysql_query("DELETE FROM $x WHERE torrent = $id");
  
unlink("$torrent_dir/$id.torrent");
}

function 
pager($rpp, $count, $href, $opts = array()) {
    
$pages = ceil($count / $rpp);

    if (!
$opts["lastpagedefault"])
        
$pagedefault = 0;
    else {
        
$pagedefault = floor(($count - 1) / $rpp);
        if (
$pagedefault < 0)
            
$pagedefault = 0;
    }

    if (isset(
$_GET["page"])) {
        
$page = 0 + $_GET["page"];
        if (
$page < 0)
            
$page = $pagedefault;
    }
    else
        
$page = $pagedefault;

    
$pager = "<td class=\"embedded\" style=\"text-align:left;\">";

    
$mp = $pages - 1;
    
$as = "<img src=\"pic/pager/prevpager.png\" border=\"0\" alt=\"Prev page\"/></td>";
    if (
$page >= 1) {
        
$pager .= "<a href=\"{$href}page=" . ($page - 1) . "\">";
        
$pager .= $as;
        
$pager .= "</a>";
    }
    else
        
$pager .= $as;
    
    
$pager .= "<td class=\"embedded\" style=\"text-align:center;\">";
    
    
$pager2 .= "<td class=\"embedded\" style=\"text-align:right;\">";
    
$as = "<img src=\"pic/pager/nextpager.png\" border=\"0\" alt=\"Next page\"/>";
    if (
$page < $mp && $mp >= 0) {
        
$pager2 .= "<a href=\"{$href}page=" . ($page + 1) . "\">";
        
$pager2 .= $as;
        
$pager2 .= "</a></td>";
    }
    else
        
$pager2 .= $as;

    if (
$count) {
        
$pagerarr = array();
        
$dotted = 0;
        
$dotspace = 2;
        
$dotend = $pages - $dotspace;
        
$curdotend = $page - $dotspace;
        
$curdotstart = $page + $dotspace;
        for (
$i = 0; $i < $pages; $i++) {
            if ((
$i >= $dotspace && $i <= $curdotend) || ($i >= $curdotstart && $i < $dotend)) {
                if (!
$dotted)
                    
$pagerarr[] = "<font color=lime>&nbsp;&nbsp;<--->&nbsp;&nbsp;</font>";
                
$dotted = 1;
                continue;
            }
            
$dotted = 0;
            
$start = $i * $rpp + 1;
            
$end = $start + $rpp - 1;
            if (
$end > $count)
                
$end = $count;
            
$text = "$start&nbsp;-&nbsp;$end";
            if (
$i != $page)
                
$pagerarr[] = "<a href=\"{$href}page=$i\"><b>$text</b></a>";
            else
                
$pagerarr[] = "<b>$text</b>";
        }
        
$pagerstr = join(" | ", $pagerarr);
        
$pagertop = "<table class=\"pager\" style=\"height:23px\"><tr>$pager $pagerstr</td>$pager2</tr></table>\n";
        
$pagerbottom = "<table class=\"pager\" style=\"height:23px\"><tr>$pager $pagerstr</td>$pager2</tr></table>\n";
    }
    else {
        
$pagertop = "<table class=\"pager\" style=\"height:23px\" width=\"880\"><tr>$pager</tr></table>\n";
        
$pagerbottom = $pagertop;
    }

    
$start = $page * $rpp;

    return array(
$pagertop, $pagerbottom, "LIMIT $start,$rpp");
}

function 
downloaderdata($res) {
    
$rows = array();
    
$ids = array();
    
$peerdata = array();
    while (
$row = mysql_fetch_assoc($res)) {
        
$rows[] = $row;
        
$id = $row["id"];
        
$ids[] = $id;
        
$peerdata[$id] = array(downloaders => 0, seeders => 0, comments => 0);
    }

    if (
count($ids)) {
        
$allids = implode(",", $ids);
        
$res = mysql_query("SELECT COUNT(*) AS c, torrent, seeder FROM peers WHERE torrent IN ($allids) GROUP BY torrent, seeder");
        while (
$row = mysql_fetch_assoc($res)) {
            if (
$row["seeder"] == "yes")
                
$key = "seeders";
            else
                
$key = "downloaders";
            
$peerdata[$row["torrent"]][$key] = $row["c"];
        }
        
$res = mysql_query("SELECT COUNT(*) AS c, torrent FROM comments WHERE torrent IN ($allids) GROUP BY torrent");
        while (
$row = mysql_fetch_assoc($res)) {
            
$peerdata[$row["torrent"]]["comments"] = $row["c"];
        }
    }

    return array(
$rows, $peerdata);
}

function 
commenttable($rows)
{
        global 
$CURUSER;
        
begin_main_frame();
        
begin_frame();
        
$count = 0;
        foreach (
$rows as $row)
        {
 
//Sort shit out
  
if ($row["downloaded"] > 0)
 {
  
$ratio = number_format($row["uploaded"] / $row["downloaded"], 3);
  
$ratio = "<font color=" . get_ratio_color($ratio) . ">$ratio</font>";
 }
 else
  if (
$arr2["uploaded"] > 0)
  
$ratio = "Inf.";
 else
  
$ratio = "---";

 
$uploaded = mksize($row["uploaded"]);
 
$downloaded = mksize($row["downloaded"]);
   
 
$posterid = $row["user"];
 
//end sort shit out

   //add popup to display
echo ("<div id=\"popup$posterid\"
style=\"position:absolute; width:140px; height:40px; border:1px solid black; display:none;
background-color:COCOCO\" align='center'> Downloaded: 
$downloaded
  Uploaded: 
$uploaded  Ratio: $ratio</div>\n");
// end add popup to display

//------- Classes color -------//
$T = array(
"Owner" => "#8D38C9",
"Super Visor" => "#9172EC",
"System Operator" => "#FF0000",
"Elite Admin" => "#009AFF",
"Administrator" => "#0066FF",
"Master Moderator" => "#00C000",
"Moderator" => "#009A00",
"Premium Uploader" => "#6EDEFF",
"Uploader" => "#45B5D7",
"VIP" => "#CCF916",
"Legend User" => "#EAC117",
"Extreme User" => "#FDD017",
"Elite User" => "#D4A017",
"Power User" => "#F87217",
"User" => "#F88017");
//----- End Classes color -----//

$title_color = $T[get_user_class_name($row["class"])];

              print(
"<p class=sub>#" . $row["id"] . " by ");
    if (isset(
$row["username"]))
                {
                       
$clas = get_user_class_name($row["class"]);  //repus iar cu cel de jos!
                       
$title = $row["title"];
                        if (
$title == "")
                        
//$title = get_user_class_name($row["class"]); //sters cand se pune cel de jos!
                        
$title = htmlspecialchars($title);  //Trebuie repus dinou dupa ce se sterge cel de sus!

print("<a name=comm onMouseOver='show($posterid)' onMouseOut='hide($posterid)' ". $row["id"] .
            
" href=userdetails.php?id=" . $row["user"] . "><b>" .
            
htmlspecialchars($row["username"]) . "</b></a>" . ($row["donor"] == "yes" ? "<img src=pic/star.png alt='Donor'>" : "") . ($row["warned"] == "yes" ? "<img src=".
                
"/pic/warned.gif alt=\"Warned\">" : "") . " - <b><font color=$title_color>" . format_comment("$title") . "</font></b>  <b><font color='green'>$clas</font></b>\n");

                }
                else
                   print(
"<a name=\"comm" . $row["id"] . "\"><i>(orphaned)</i></a>\n");

                print(
" - at " . display_date_time($row["added"]) . " " .
                        (
$row["user"] == $CURUSER["id"] || get_user_class() >= UC_MODERATOR ? " - [<a href=comment.php?action=edit&cid=$row[id]>Edit</a>]" : "") .
                        (
get_user_class() >= UC_MODERATOR ? " - [<a href=comment.php?action=delete&cid=$row[id]>Delete</a>]" : "") .
                        (
$row["editedby"] && get_user_class() >= UC_MODERATOR ? " - [<a href=comment.php?action=vieworiginal&cid=$row[id]>View original</a>]" : "") . 
                        (
$row["user"] != $CURUSER["id"] ? " - [<a href=report.php?type=Comment&id=$row[id]>Report</a>]" : "") ."</p>\n");
                
$avatar = ($CURUSER["avatars"] == "yes" ? htmlspecialchars($row["avatar"]) : "");
                if (!
$avatar)
                        
$avatar = "/pic/default_avatar.png";
                
$text = format_comment($row["text"]);
    if (
$row["editedby"])
            
$text .= "<p><font size=1 class=small>Last edited by <a href=userdetails.php?id=$row[editedby]><b>$row[username]</b></a> at ".display_date_time($row["editedat"])."</font></p>\n";
                
begin_table(true);
                print(
"<tr valign=top>\n");
                print(
"<td align=center width=150 style='padding: 2px'><img width=150 src=$avatar></td>\n");
                print(
"<td class=text>$text</td>\n");
                print(
"</tr>\n");
     
end_table();
  }
        
end_frame();
        
end_main_frame();
}

function 
searchfield($s) {
    return 
preg_replace(array('/[^a-z0-9]/si', '/^\s*/s', '/\s*$/s', '/\s+/s'), array(" ", "", "", " "), $s);
}

function 
genrelist() {
    
$ret = array();
    
$res = mysql_query("SELECT id, name FROM categories ORDER BY name");
    while (
$row = mysql_fetch_array($res))
        
$ret[] = $row;
    return 
$ret;
}

function 
linkcolor($num) {
    if (!
$num)
        return 
"red";
//    if ($num == 1)
//        return "yellow";
    
return "green";
}

function 
ratingpic($num) {
    global 
$pic_base_url;
    
$r = round($num * 2) / 2;
    if (
$r < 1 || $r > 5)
        return;
    return 
"<img src=\"$pic_base_url$r.gif\" border=\"0\" alt=\"rating: $num / 5\" />";
}

function 
CutName ($txt, $len)
{ return (
strlen($txt)>$len ? substr($txt,0,$len-4) .'...':$txt);
}

function 
torrenttable($res, $variant = "index") {
        global 
$pic_base_url, $CURUSER;
        
        
$last_browse = $CURUSER['last_browse'];

        
$time_now = gmtime();

        if (
$last_browse > $time_now) {

         
$last_browse=$time_now;
}

          
$wait = 0;
?>
<table border="1" width="880" cellspacing="0" cellpadding="5">
<tr>
<?
// sorting by MarkoStamcar

$count_get = 0;

foreach (
$_GET as $get_name => $get_value) {

$get_name = mysql_escape_string(strip_tags(str_replace(array("\"","'"),array("",""),$get_name)));

$get_value = mysql_escape_string(strip_tags(str_replace(array("\"","'"),array("",""),$get_value)));

$get_name = mysql_escape_string(strip_tags(str_replace(array("\"","'"),array("",""),$get_name)));

$get_value = mysql_escape_string(strip_tags(str_replace(array("\"","'"),array("",""),$get_value)));

if (
$get_name != "sort" && $get_name != "type") {
if (
$count_get > 0) {
$oldlink = $oldlink . "&" . $get_name . "=" . $get_value;
} else {
$oldlink = $oldlink . $get_name . "=" . $get_value;
}
$count_get++;
}

}

if (
$count_get > 0) {
$oldlink = $oldlink . "&";
}

if (
$_GET['sort'] == "1") {
if (
$_GET['type'] == "desc") {
$link1 = "asc";
} else {
$link1 = "desc";
}
}
if (
$_GET['sort'] == "2") {
if (
$_GET['type'] == "desc") {
$link2 = "asc";
} else {
$link2 = "desc";
}
}
if (
$_GET['sort'] == "3") {
if (
$_GET['type'] == "desc") {
$link3 = "asc";
} else {
$link3 = "desc";
}
}
if (
$_GET['sort'] == "4") {
if (
$_GET['type'] == "desc") {
$link4 = "asc";
} else {
$link4 = "desc";
}
}
if (
$_GET['sort'] == "5") {
if (
$_GET['type'] == "desc") {
$link5 = "asc";
} else {
$link5 = "desc";
}
}
if (
$_GET['sort'] == "6") {
if (
$_GET['type'] == "desc") {
$link6 = "asc";
} else {
$link6 = "desc";
}
}
if (
$_GET['sort'] == "7") {
if (
$_GET['type'] == "desc") {
$link7 = "asc";
} else {
$link7 = "desc";
}
}
if (
$_GET['sort'] == "8") {
if (
$_GET['type'] == "desc") {
$link8 = "asc";
} else {
$link8 = "desc";
}
}
if (
$_GET['sort'] == "9") {
if (
$_GET['type'] == "desc") {
$link9 = "asc";
} else {
$link9 = "desc";
}
}
if (
$_GET['sort'] == "10") {
if (
$_GET['type'] == "desc") {
$link10 = "asc";
} else {
$link10 = "desc";
}
}
if (
$_GET['sort'] == "11") {
if (
$_GET['type'] == "desc") {
$link11 = "asc";
} else {
$link11 = "desc";
}
}

if (
$link1 == "") { $link1 = "desc"; } // for torrent name
if ($link2 == "") { $link2 = "desc"; }
if (
$link3 == "") { $link3 = "desc"; }
if (
$link4 == "") { $link4 = "desc"; }
if (
$link5 == "") { $link5 = "desc"; }
if (
$link6 == "") { $link6 = "desc"; }
if (
$link7 == "") { $link7 = "desc"; }
if (
$link8 == "") { $link8 = "desc"; }
if (
$link9 == "") { $link9 = "desc"; }
if (
$link10 == "") { $link10 = "asc"; }
if (
$link11 == "") { $link11 = "desc"; }
?>
<td class="colhead" align="center" width="1%"><a href="browse.php?<? print $oldlink; ?>sort=10&type=<? print $link10; ?>">Type</a></td>
<td class="colhead" align="left"><a href="browse.php?<? print $oldlink; ?>sort=1&type=<? print $link1; ?>">Name</a></td>
<?
        
if ($wait)
        {
                print(
"<td class=\"colhead\" align=\"center\"><img src=/pic/warned0.gif border=none alt=Wait></td>\n");
        }

        if (
$variant == "mytorrents")
  {
          print(
"<td class=\"colhead\" align=\"center\">Edit</td>\n");
    print(
"<td class=\"colhead\" align=\"center\">Visible</td>\n");
        }

?>
<td class="colhead" align="center"><a href="browse.php?<? print $oldlink; ?>sort=2&type=<? print $link2; ?>">Files</a></td>
<td class="colhead" align="center"><a href="browse.php?<? print $oldlink; ?>sort=3&type=<? print $link3; ?>"><img src=pic/comment.gif></a></td>
<td class="colhead" align="center"><a href="browse.php?<? print $oldlink; ?>sort=4&type=<? print $link4; ?>">Added</a></td>
<td class="colhead" align="center"><a href="browse.php?<? print $oldlink; ?>sort=5&type=<? print $link5; ?>">Size</a></td>
<td class="colhead" align="center"><a href="browse.php?<? print $oldlink; ?>sort=6&type=<? print $link6; ?>"><img src=pic/top.gif border=0 /></a></td>
<td class="colhead" align="center"><a href="browse.php?<? print $oldlink; ?>sort=7&type=<? print $link7; ?>"><img src=pic/arrowup.gif border=0 /></a></td>
<td class="colhead" align="center"><a href="browse.php?<? print $oldlink; ?>sort=8&type=<? print $link8; ?>"><img src=pic/arrowdown.gif border=0 /></a></td>
<?

                    
if (get_user_class() >= UC_MODERATOR)
        if (
$variant == "index")
        print(
"<td class=\"colhead\" align=\"center\"><a href=\"browse.php?{$oldlink}sort=9&type={$link9}\">Upped&nbsp;by</a></td>\n");
        if (
get_user_class()>= UC_SVISOR)
        print(
"<td class=\"colhead\" align=\"center\"><a href=\"browse.php?{$oldlink}sort=9&type={$link9}\"><img src=pic/delete.png></a></td>\n");
    print(
"</tr>\n");

    while (
$row = mysql_fetch_assoc($res)) {
/**
* @author StarionTurbo
* @copyright 2007
* @modname Show torrents by day
* @version v1.0
*/

if (get_user_class() >= UC_MODERATOR) {
if (
$variant == "index")
    
$colspan = 10;
elseif (
$variant == "mytorrents")
    
$colspan = 11;
}
else {
if (
$variant == "index")
    
$colspan = 9;
elseif (
$variant == "mytorrents")
    
$colspan = 11;
}
?>
<script language="JavaScript1.2">
function confirmdel()
{
    ht = document.getElementsByTagName("html");
    ht[0].style.filter = "progid:DXImageTransform.Microsoft.BasicImage(grayscale=1)";
    if (confirm(l_confirmdel))
    {
        return true;
    }
    else
    {
        ht[0].style.filter = "";
        return false;
    }
}
var l_confirmdel="Are you sure you want to delete this torrent?";
</script>

<?


//$numtorrents = number_format(get_row_count("torrents", "WHERE added LIKE '%".$thisdate." %'"));

/** If date already exist, disable $cleandate varible **/
if($thisdate==$prevdate){
$cleandate = '';

/** If date does not exist, make some varibles **/
}else{
$day_added = ' '.date('l j-M-Y', strtotime($row['added']) + (($CURUSER["timezone"] + $CURUSER["dst"]) * 60)); // You can change this to something else
//$cleandate = "<tr><td colspan=$colspan><b>$day_added - $numtorrents Torrent" . ($numtorrents > 1 ? "s" : "") . "</b></td></tr>\n"; // This also...
$cleandate = "<tr><td colspan=$colspan><b>$day_added</b></td></tr>\n"; // This also...
}
/** Prevent that "torrents added..." wont appear again with the same date **/
$prevdate = $thisdate;

$man = array(
    
'Jan' => 'January',
    
'Feb' => 'February',
    
'Mar' => 'March',
    
'Apr' => 'April',
    
'May' => 'May',
    
'Jun' => 'June',
    
'Jul' => 'July',
    
'Aug' => 'August',
    
'Sep' => 'September',
    
'Oct' => 'October',
    
'Nov' => 'November',
    
'Dec' => 'December'
);

foreach(
$man as $eng => $ger){
    
$cleandate = str_replace($eng, $ger,$cleandate);
}

$dag = array(
    
'Mon' => 'Monday',
    
'Tues' => 'Tuesday',
    
'Wednes' => 'Wednesday',
    
'Thurs' => 'Thursday',
    
'Fri' => 'Friday',
    
'Satur' => 'Saturday',
    
'Sun' => 'Sunday'
);

foreach(
$dag as $eng => $ger){
    
$cleandate = str_replace($eng.'day', $ger.'',$cleandate);
}
/** If torrents not listed by added date **/
if ($row["sticky"] == "no") // delete this line if you dont have sticky torrents or you want to display the addate for them also
if(!$_GET['sort'] && !$_GET['d']){
echo 
$cleandate."\n";
}
        
$id = $row["id"];
        
        if (
$row["sticky"] == "yes"){
        print(
"<tr class=\"sticky\">\n");
        } else {
        print(
"<tr class=\"browse\">\n");
        }
        
        print(
"<td align=center width=42 height=42 style='padding: 0px'>");
        if (isset(
$row["cat_name"])) {
            print(
"<a href=\"browse.php?cat=" . $row["category"] . "\">");
            if (isset(
$row["cat_pic"]) && $row["cat_pic"] != "")
                print(
"<img border=\"0\" src=\"pic/cate.gif\" class=\"cate".$row["category"]."\" alt=\"" . $row["cat_name"] . "\" />");
            else
                print(
$row["cat_name"]);
            print(
"</a>");
        }
        else
            print(
"-");
        print(
"</td>\n");

        
$dispname = htmlspecialchars($row["name"]);
        
$nos_garums=strlen($dispname);
        
$nos_pielaujamais="70"; // maximum lenght
        
if($nos_garums > $nos_pielaujamais){
        
$nos_alt="title=\"$dispname \"";
        
$dispname=substr($dispname, 0, $nos_pielaujamais) . "...";
        }
        
$dispname = str_replace(array(" ",","),".",$dispname);
        
$request = ($row[request]=="yes" ? "&nbsp;<img src='pic/request.gif' align='right' title='Request' alt='Request' />" : "");
        
$res2 = mysql_query("SELECT torrents.poster FROM torrents WHERE torrents.id = $id") or sqlerr();
        
$row2 = mysql_fetch_row($res2);
        if (!empty(
$row2["0"])){
    
$poster = $row2[0];
            
$poster3 = "<img src=$poster width=160 />";
         }
         else
            
$poster3 = "";
         
        if (!empty(
$row['description'])) {
        
$description = "Genre:&nbsp;" . htmlspecialchars($row["description"]) . "";
        }
        else {
        
$description = "";
        }
        
$char = 55; //Max long...
        
print("<td align=left><a href=\"details.php?");
        if (
$variant == "mytorrents")
        print(
"returnto=" . urlencode($_SERVER["REQUEST_URI"]) . "&");
        print(
"id=$id");
        if (
$variant == "index")
        print(
"&hit=1");



        
$thisisfree = ($row[free]=="yes" ? "&nbsp;<img src='pic/freedownload.gif' align='right' title='Free' alt='Free' />" : "");
        
$thisisx2 = ($row[x2]=="yes" ? "&nbsp;<img src='pic/x2.png' align='right' title='x2' alt='x2' />" : "");
        
$thisisseedb = ($row[seedb]=="yes" ? "&nbsp;<img src='pic/seedb.png' align='right' title='seedb' alt='seedb' />" : "");
        
//$thisisdht = ($row[extern]=="yes" ? "&nbsp;<img src='pic/seedbox.png' align='right' title='SeedBox' alt='dht' />" : "");
        
$nuked = ($row[nuked]=="yes" ? "&nbsp;<img src='pic/nuked.gif' align='right' title='Nuked' alt='Nuked' />" : "");
        if (
sql_timestamp_to_unix_timestamp($row["added"]) >= $last_browse)

              print(
"\" onmouseover=\"{overlib('$poster3', VAUTO, WIDTH, 0, DELAY, 0);}\" onmouseout=\"return nd();\"><b>$dispname</b></a><div style=\"float:right;vertical-align:bottom\">&nbsp;<img src=/pic/new.png border=none alt=NEW></div>$nuked $thisisfree $thisisx2 $thisisseedb $thisisdht $request$description\n");
          else
              print(
"\" onmouseover=\"{overlib('$poster3', VAUTO, WIDTH, 0, DELAY, 0);}\" onmouseout=\"return nd();\"><b>$dispname</b></a>$nuked $thisisfree $thisisx2 $thisisseedb $thisisdht $request$description\n");
                                if (
$wait)
                                {
                                  
$elapsed = floor((gmtime() - strtotime($row["added"])) / 3600);
                if (
$elapsed < $wait)
                {
                  
$color = dechex(floor(127*($wait - $elapsed)/48 + 128)*65536);
                  print(
"<td align=center><nobr><font color=\"$color\">" . number_format($wait - $elapsed) . " h</font></a></nobr></td>\n");
                }

                else
                  print(
"<td align=center><nobr>None</nobr></td>\n");
        }

        if (
$row["nfoav"] && get_user_class() >= UC_POWER_USER)
          print(
"&nbsp;&nbsp;<a href=viewnfo.php?id=$row[id]><img src='pic/viewnfo.gif' border='0' alt='View NFO' /></a>\n");

        if (
$variant == "index")
            print(
"<a href=\"download.php/$id/" . rawurlencode($row["filename"]) . "\"><img src='pic/download.gif' border='0' alt='Download' /></a>\n");

        elseif (
$variant == "mytorrents")
            print(
"<td align=\"center\"><a href=\"edit.php?returnto=" . urlencode($_SERVER["REQUEST_URI"]) . "&id=" . $row["id"] . "\">edit</a>\n");


print(
"</td>\n");


        if (
$variant == "mytorrents") {
            print(
"<td align=\"right\">");
            if (
$row["visible"] == "no")
                print(
"<b>no</b>");
            else
                print(
"yes");
            print(
"</td>\n");
        }
        if (
$row["type"] == "single")
            print(
"<td align=\"right\">" . $row["numfiles"] . "</td>\n");
        else {
            if (
$variant == "index")
                print(
"<td align=\"right\"><b><a href=\"details.php?id=$id&hit=1&filelist=1\">" . $row["numfiles"] . "</a></b></td>\n");
            else
                print(
"<td align=\"right\"><b><a href=\"details.php?id=$id&filelist=1#filelist\">" . $row["numfiles"] . "</a></b></td>\n");
        }
        if (!
$row["comments"])
            print(
"<td align=\"right\">" . $row["comments"] . "</td>\n");
        else {
            if (
$variant == "index")
                print(
"<td align=\"right\"><b><a href=\"details.php?id=$id&hit=1&tocomm=1\">" . $row["comments"] . "</a></b></td>\n");
            else
                print(
"<td align=\"right\"><b><a href=\"details.php?id=$id&page=0#startcomments\">" . $row["comments"] . "</a></b></td>\n");
        }
        print(
"<td align=center><nobr>" . str_replace(" ", "", display_date_time($row["added"])) . "</nobr></td>\n");
//                $ttl = (36*40) - floor((gmtime() - sql_timestamp_to_unix_timestamp($row["added"])) / 3600);
//                if ($ttl == 1) $ttl .= "hour"; else $ttl .= "hours";
//        print("<td align=center>$ttl</td>\n");
        
print("<td align=center>" . str_replace(" ", "", mksize($row["size"])) . "</td>\n");
//        print("<td align=\"right\">" . $row["views"] . "</td>\n");
//        print("<td align=\"right\">" . $row["hits"] . "</td>\n");
        
$_s = "";
        if (
$row["times_completed"] != 1)
          
$_s = "s";
print(
"<td align=center>".($row["times_completed"] > 0 ? "<a href=snatches.php?id=$id>".number_format($row["times_completed"])."time$_s</a>" : "0 times")."</td>\n");

        if (
$row["seeders"]) {
            if (
$variant == "index")
            {
               if (
$row["leechers"]) $ratio = $row["seeders"] / $row["leechers"]; else $ratio = 1;
                print(
"<td align=right><b><a href=details.php?id=$id&hit=1&toseeders=1><font color=" .
                  
get_slr_color($ratio) . ">" . $row["seeders"] . "</font></a></b></td>\n");
            }
            else
                print(
"<td align=\"right\"><b><a class=\"" . linkcolor($row["seeders"]) . "\" href=\"details.php?id=$id&dllist=1#seeders\">" .
                  
$row["seeders"] . "</a></b></td>\n");
        }
        else
            print(
"<td align=\"right\"><span class=\"" . linkcolor($row["seeders"]) . "\">" . $row["seeders"] . "</span></td>\n");

        if (
$row["leechers"]) {
            if (
$variant == "index")
                print(
"<td align=right><b><a href=details.php?id=$id&hit=1&todlers=1>" .
                   
number_format($row["leechers"]) . ($peerlink ? "</a>" : "") .
                   
"</b></td>\n");
            else
                print(
"<td align=\"right\"><b><a class=\"" . linkcolor($row["leechers"]) . "\" href=\"details.php?id=$id&dllist=1#leechers\">" .
                  
$row["leechers"] . "</a></b></td>\n");
        }
        else
            print(
"<td align=\"right\">0</td>\n");

                    if (
get_user_class() >= UC_MODERATOR)
        if (
$variant == "index")
            print(
"<td align=center>" . (isset($row["username"]) ? ("<a href=userdetails.php?id=" . $row["owner"] . "><b>" . htmlspecialchars($row["username"]) . "</b></a>") : "<i>(unknown)</i>") . "</td>\n");


    


        if (
get_user_class()>= UC_SVISOR) {
print(
"<form method=\"post\" action=\"fastdel.php\">\n");
print(
"<input type=\"hidden\" name=\"id\" value=\"$id\">\n");
print(
"<td align=center><input type=submit onclick='return confirmdel()' value='X' style='cursor:hand; color:000000; background-color:ff0000;'></td>");
print(
"</form>");
}
print(
"</tr>\n");
}
    print(
"</table>\n");

    return 
$rows;
}

function 
torrenttablex($res, $variant = "index") {
        global 
$pic_base_url, $CURUSER;

        
$last_browsex = $CURUSER['last_browsex'];

        
$time_now = gmtime();

        if (
$last_browsex > $time_now) {

         
$last_browsex=$time_now;
}

          
$wait = 0;
?>
<table border="1" width="880" cellspacing="0" cellpadding="5">
<tr>
<?
$count_get 
= 0;

foreach (
$_GET as $get_name => $get_value) {

$get_name = mysql_escape_string(strip_tags(str_replace(array("\"","'"),array("",""),$get_name)));

$get_value = mysql_escape_string(strip_tags(str_replace(array("\"","'"),array("",""),$get_value)));

$get_name = mysql_escape_string(strip_tags(str_replace(array("\"","'"),array("",""),$get_name)));

$get_value = mysql_escape_string(strip_tags(str_replace(array("\"","'"),array("",""),$get_value)));

if (
$get_name != "sort" && $get_name != "type") {
if (
$count_get > 0) {
$oldlink = $oldlink . "&" . $get_name . "=" . $get_value;
} else {
$oldlink = $oldlink . $get_name . "=" . $get_value;
}
$count_get++;
}

}
if (
$count_get > 0) {
$oldlink = $oldlink . "&";
}

if (
$_GET['sort'] == "1") {
if (
$_GET['type'] == "desc") {
$link1 = "asc";
} else {
$link1 = "desc";
}
}
if (
$_GET['sort'] == "2") {
if (
$_GET['type'] == "desc") {
$link2 = "asc";
} else {
$link2 = "desc";
}
}
if (
$_GET['sort'] == "3") {
if (
$_GET['type'] == "desc") {
$link3 = "asc";
} else {
$link3 = "desc";
}
}
if (
$_GET['sort'] == "4") {
if (
$_GET['type'] == "desc") {
$link4 = "asc";
} else {
$link4 = "desc";
}
}
if (
$_GET['sort'] == "5") {
if (
$_GET['type'] == "desc") {
$link5 = "asc";
} else {
$link5 = "desc";
}
}
if (
$_GET['sort'] == "6") {
if (
$_GET['type'] == "desc") {
$link6 = "asc";
} else {
$link6 = "desc";
}
}
if (
$_GET['sort'] == "7") {
if (
$_GET['type'] == "desc") {
$link7 = "asc";
} else {
$link7 = "desc";
}
}
if (
$_GET['sort'] == "8") {
if (
$_GET['type'] == "desc") {
$link8 = "asc";
} else {
$link8 = "desc";
}
}
if (
$_GET['sort'] == "9") {
if (
$_GET['type'] == "desc") {
$link9 = "asc";
} else {
$link9 = "desc";
}
}
if (
$_GET['sort'] == "10") {
if (
$_GET['type'] == "desc") {
$link10 = "asc";
} else {
$link10 = "desc";
}
}
if (
$_GET['sort'] == "11") {
if (
$_GET['type'] == "desc") {
$link11 = "asc";
} else {
$link11 = "desc";
}
}

if (
$link1 == "") { $link1 = "desc"; } // for torrent name
if ($link2 == "") { $link2 = "desc"; }
if (
$link3 == "") { $link3 = "desc"; }
if (
$link4 == "") { $link4 = "desc"; }
if (
$link5 == "") { $link5 = "desc"; }
if (
$link6 == "") { $link6 = "desc"; }
if (
$link7 == "") { $link7 = "desc"; }
if (
$link8 == "") { $link8 = "desc"; }
if (
$link9 == "") { $link9 = "desc"; }
if (
$link10 == "") { $link10 = "asc"; }
if (
$link11 == "") { $link11 = "desc"; }
?>
<td class="colhead" align="center" width="1%"><a href="browseadult.php?<? print $oldlink; ?>sort=10&type=<? print $link10; ?>">Type</a></td>
<td class="colhead" align="left"><a href="browseadult.php?<? print $oldlink; ?>sort=1&type=<? print $link1; ?>">Name</a></td>
<?
        
if ($wait)
        {
                print(
"<td class=\"colhead\" align=\"center\"><img src=/pic/warned0.gif border=none alt=Wait></td>\n");
        }

        if (
$variant == "mytorrents")
  {
          print(
"<td class=\"colhead\" align=\"center\">Edit</td>\n");
    print(
"<td class=\"colhead\" align=\"center\">Visible</td>\n");
        }

?>
<script language="JavaScript1.2">
function confirmdelad()
{
    ht = document.getElementsByTagName("html");
    ht[0].style.filter = "progid:DXImageTransform.Microsoft.BasicImage(grayscale=1)";
    if (confirm(l_confirmdel1))
    {
        return true;
    }
    else
    {
        ht[0].style.filter = "";
        return false;
    }
}
var l_confirmdel1="Are you sure you want to delete this torrent?";
</script>

<td class="colhead" align="center"><a href="browseadult.php?<? print $oldlink; ?>sort=2&type=<? print $link2; ?>">Files</a></td>
<td class="colhead" align="center"><a href="browseadult.php?<? print $oldlink; ?>sort=3&type=<? print $link3; ?>"><img src=pic/comment.gif></a></td>
<td class="colhead" align="center"><a href="browseadult.php?<? print $oldlink; ?>sort=4&type=<? print $link4; ?>">Added</a></td>
<td class="colhead" align="center"><a href="browseadult.php?<? print $oldlink; ?>sort=5&type=<? print $link5; ?>">Size</a></td>
<td class="colhead" align="center"><a href="browseadult.php?<? print $oldlink; ?>sort=6&type=<? print $link6; ?>"><img src=pic/top.gif border=0 /></a></td>
<td class="colhead" align="center"><a href="browseadult.php?<? print $oldlink; ?>sort=7&type=<? print $link7; ?>"><img src=pic/arrowup.gif border=0 /></a></td>
<td class="colhead" align="center"><a href="browseadult.php?<? print $oldlink; ?>sort=8&type=<? print $link8; ?>"><img src=pic/arrowdown.gif border=0 /></a></td>
<?
                    
if (get_user_class() >= UC_MODERATOR)
        if (
$variant == "index")
        print(
"<td class=\"colhead\" align=\"center\"><a href=\"browseadult.php?{$oldlink}sort=9&type={$link9}\">Upped&nbsp;by</a></td>\n");
        if (
get_user_class()>= UC_SVISOR)
        print(
"<td class=\"colhead\" align=\"center\"><a href=\"browseadult.php?{$oldlink}sort=9&type={$link9}\"><img src=pic/delete.png></a></td>\n");
    print(
"</tr>\n");

    print(
"</tr>\n");

    while (
$row = mysql_fetch_assoc($res)) {

if (
get_user_class() >= UC_MODERATOR) {
if (
$variant == "index")
    
$colspan = 10;
elseif (
$variant == "mytorrents")
    
$colspan = 11;
}
else {
if (
$variant == "index")
    
$colspan = 9;
elseif (
$variant == "mytorrents")
    
$colspan = 11;
}

$day_added = $row['added'];
$day_show = strtotime($day_added) + (($CURUSER["timezone"] + $CURUSER["dst"]) * 60);
$thisdate = date('Y-m-d',$day_show);

if(
$thisdate==$prevdate){
$cleandate = '';

}else{
$day_added = ' '.date('l j-M-Y', strtotime($row['added']) + (($CURUSER["timezone"] + $CURUSER["dst"]) * 60)); // You can change this to something else
$cleandate = "<tr><td colspan=$colspan><b>$day_added</b></td></tr>\n"; // This also...
}
$prevdate = $thisdate;

$man = array(
    
'Jan' => 'January',
    
'Feb' => 'February',
    
'Mar' => 'March',
    
'Apr' => 'April',
    
'May' => 'May',
    
'Jun' => 'June',
    
'Jul' => 'July',
    
'Aug' => 'August',
    
'Sep' => 'September',
    
'Oct' => 'October',
    
'Nov' => 'November',
    
'Dec' => 'December'
);
foreach(
$man as $eng => $ger){
    
$cleandate = str_replace($eng, $ger,$cleandate);
}
$dag = array(
    
'Mon' => 'Monday',
    
'Tues' => 'Tuesday',
    
'Wednes' => 'Wednesday',
    
'Thurs' => 'Thursday',
    
'Fri' => 'Friday',
    
'Satur' => 'Saturday',
    
'Sun' => 'Sunday'
);

foreach(
$dag as $eng => $ger){
    
$cleandate = str_replace($eng.'day', $ger.'',$cleandate);
}
if (
$row["sticky"] == "no") // delete this line if you dont have sticky torrents or you want to display the addate for them also
if(!$_GET['sort'] && !$_GET['d']){
echo 
$cleandate."\n";
}
        
$id = $row["id"];
        
        if (
$row["sticky"] == "yes"){
        print(
"<tr class=\"sticky\">\n");
        } else {
        print(
"<tr class=\"browse\">\n");
        }

        print(
"<td align=center width=42 height=42 style='padding: 0px'>");
        if (isset(
$row["cat_name"])) {
            print(
"<a href=\"browseadult.php?cat=" . $row["category"] . "\">");
            if (isset(
$row["cat_pic"]) && $row["cat_pic"] != "")
                print(
"<img border=\"0\" src=\"pic/cate.gif\" class=\"cate".$row["category"]."\" alt=\"" . $row["cat_name"] . "\" />");
            else
                print(
$row["cat_name"]);
            print(
"</a>");
        }
        else
            print(
"-");
        print(
"</td>\n");

        
$dispname = htmlspecialchars($row["name"]);
        
$nos_garums=strlen($dispname);
        
$nos_pielaujamais="70"; // maximum lenght
        
if($nos_garums > $nos_pielaujamais){
        
$nos_alt="title=\"$dispname \"";
        
$dispname=substr($dispname, 0, $nos_pielaujamais) . "...";
        }
        
$dispname = str_replace(array(" ",","),".",$dispname);
        
$request = ($row[request]=="yes" ? "&nbsp;<img src='pic/request.gif' align='right' title='Request' alt='Request' />" : "");
        
$res2 = mysql_query("SELECT torrents.poster FROM torrents WHERE torrents.id = $id") or sqlerr();
        
$row2 = mysql_fetch_row($res2);
        if (!empty(
$row2["0"])){
    
$poster = $row2[0];
            
$poster3 = "<img src=$poster width=160 />";
         }
         else
            
$poster3 = "";
         
        if (!empty(
$row['description'])) {
        
$description = "Genre:&nbsp;" . htmlspecialchars($row["description"]) . "";
        }
        else {
        
$description = "";
        }
        
$char = 55; //Max long...
        
print("<td align=left><a href=\"details.php?");
        if (
$variant == "mytorrents")
        print(
"returnto=" . urlencode($_SERVER["REQUEST_URI"]) . "&");
        print(
"id=$id");
        if (
$variant == "index")
        print(
"&hit=1");



        
//$thisisfree = ($row[free]=="yes" ? "<div style=\"float:right;vertical-align:bottom\"> <img src=pic/freedownload.gif></div>" : "");
        //$thisisx2 = ($row[x2]=="yes" ? "<div style=\"float:right;vertical-align:bottom\"> <img src=pic/x2.png></div>" : "");
        
$thisisfree = ($row[free]=="yes" ? "&nbsp;<img src='pic/freedownload.gif' align='right' title='Free' alt='Free' />" : "");
        
$thisisx2 = ($row[x2]=="yes" ? "&nbsp;<img src='pic/x2.png' align='right' title='x2' alt='x2' />" : "");
        
$thisisseedb = ($row[seedb]=="yes" ? "&nbsp;<img src='pic/seedb.png' align='right' title='seedb' alt='seedb' />" : "");
        
//$thisisdht = ($row[extern]=="yes" ? "&nbsp;<img src='pic/seedbox.png' align='right' title='SeedBox' alt='dht' />" : "");
        
$nuked = ($row[nuked]=="yes" ? "&nbsp;<img src='pic/nuked.gif' align='right' title='Nuked' alt='Nuked' />" : "");
        if (
sql_timestamp_to_unix_timestamp($row["added"]) >= $last_browsex)

              print(
"\" onmouseover=\"{overlib('$poster3', VAUTO, WIDTH, 0, DELAY, 0);}\" onmouseout=\"return nd();\"><b>$dispname</b></a><div style=\"float:right;vertical-align:bottom\">&nbsp;<img src=/pic/new.png border=none alt=NEW></div>$nuked $thisisfree $thisisx2 $thisisseedb $thisisdht $request$description\n");
          else
              print(
"\" onmouseover=\"{overlib('$poster3', VAUTO, WIDTH, 0, DELAY, 0);}\" onmouseout=\"return nd();\"><b>$dispname</b></a>$nuked $thisisfree $thisisx2 $thisisseedb $thisisdht $request$description\n");

                                if (
$wait)
                                {
                                  
$elapsed = floor((gmtime() - strtotime($row["added"])) / 3600);
                if (
$elapsed < $wait)
                {
                  
$color = dechex(floor(127*($wait - $elapsed)/48 + 128)*65536);
                  print(
"<td align=center><nobr><font color=\"$color\">" . number_format($wait - $elapsed) . " h</font></a></nobr></td>\n");
                }
                else
                  print(
"<td align=center><nobr>None</nobr></td>\n");
        }


        if (
$row["nfoav"] && get_user_class() >= UC_POWER_USER)
          print(
"&nbsp;&nbsp;<a href=viewnfo.php?id=$row[id]><img src='pic/viewnfo.gif' border='0' alt='View NFO' /></a>\n");
        if (
$variant == "index")
            print(
"<a href=\"download.php/$id/" . rawurlencode($row["filename"]) . "\"><img src='pic/download.gif' border='0' alt='Download' /></a>\n");
        elseif (
$variant == "mytorrents")
            print(
"<td align=\"center\"><a href=\"edit.php?returnto=" . urlencode($_SERVER["REQUEST_URI"]) . "&id=" . $row["id"] . "\">edit</a>\n");
print(
"</td>\n");
        if (
$variant == "mytorrents") {
            print(
"<td align=\"right\">");
            if (
$row["visible"] == "no")
                print(
"<b>no</b>");
            else
                print(
"yes");
            print(
"</td>\n");
        }
        if (
$row["type"] == "single")
            print(
"<td align=\"right\">" . $row["numfiles"] . "</td>\n");
        else {
            if (
$variant == "index")
                print(
"<td align=\"right\"><b><a href=\"details.php?id=$id&hit=1&filelist=1\">" . $row["numfiles"] . "</a></b></td>\n");
            else
                print(
"<td align=\"right\"><b><a href=\"details.php?id=$id&filelist=1#filelist\">" . $row["numfiles"] . "</a></b></td>\n");
        }
        if (!
$row["comments"])
            print(
"<td align=\"right\">" . $row["comments"] . "</td>\n");
        else {
            if (
$variant == "index")
                print(
"<td align=\"right\"><b><a href=\"details.php?id=$id&hit=1&tocomm=1\">" . $row["comments"] . "</a></b></td>\n");
            else
                print(
"<td align=\"right\"><b><a href=\"details.php?id=$id&page=0#startcomments\">" . $row["comments"] . "</a></b></td>\n");
        }
        print(
"<td align=center><nobr>" . str_replace(" ", "", display_date_time($row["added"])) . "</nobr></td>\n");
        print(
"<td align=center>" . str_replace(" ", "", mksize($row["size"])) . "</td>\n");
        
$_s = "";
        if (
$row["times_completed"] != 1)
          
$_s = "s";
        print(
"<td align=center>" . number_format($row["times_completed"]) . "time$_s</td>\n");

        if (
$row["seeders"]) {
            if (
$variant == "index")
            {
               if (
$row["leechers"]) $ratio = $row["seeders"] / $row["leechers"]; else $ratio = 1;
                print(
"<td align=right><b><a href=details.php?id=$id&hit=1&toseeders=1><font color=" .
                  
get_slr_color($ratio) . ">" . $row["seeders"] . "</font></a></b></td>\n");
            }
            else
                print(
"<td align=\"right\"><b><a class=\"" . linkcolor($row["seeders"]) . "\" href=\"details.php?id=$id&dllist=1#seeders\">" .
                  
$row["seeders"] . "</a></b></td>\n");
        }
        else
            print(
"<td align=\"right\"><span class=\"" . linkcolor($row["seeders"]) . "\">" . $row["seeders"] . "</span></td>\n");
        if (
$row["leechers"]) {
            if (
$variant == "index")
                print(
"<td align=right><b><a href=details.php?id=$id&hit=1&todlers=1>" .
                   
number_format($row["leechers"]) . ($peerlink ? "</a>" : "") .
                   
"</b></td>\n");
            else
                print(
"<td align=\"right\"><b><a class=\"" . linkcolor($row["leechers"]) . "\" href=\"details.php?id=$id&dllist=1#leechers\">" .
                  
$row["leechers"] . "</a></b></td>\n");
        }
        else
            print(
"<td align=\"right\">0</td>\n");
                    if (
get_user_class() >= UC_MODERATOR)
        if (
$variant == "index")
            print(
"<td align=center>" . (isset($row["username"]) ? ("<a href=userdetails.php?id=" . $row["owner"] . "><b>" . htmlspecialchars($row["username"]) . "</b></a>") : "<i>(unknown)</i>") . "</td>\n");
        
        if (
get_user_class()>= UC_SVISOR) {
print(
"<form method=\"post\" action=\"fastdeladult.php\">\n");
print(
"<input type=\"hidden\" name=\"id\" value=\"$id\">\n");
print(
"<td align=center><input type=submit onclick='return confirmdelad()' value='X' style='cursor:hand; color:000000; background-color:ff0000;'></td>");
print(
"</form>");
}
print(
"</tr>\n");
    }
    print(
"</table>\n");
    
    return 
$rows;
}

function 
torrenttablem($res, $variant = "index") {
        global 
$pic_base_url, $CURUSER;

        
$last_browsem = $CURUSER['last_browsem'];

        
$time_now = gmtime();

        if (
$last_browsem > $time_now) {

         
$last_browsem=$time_now;
}

          
$wait = 0;
?>
<table border="1" width="880" cellspacing="0" cellpadding="5">
<tr>
<?
$count_get 
= 0;

foreach (
$_GET as $get_name => $get_value) {

$get_name = mysql_escape_string(strip_tags(str_replace(array("\"","'"),array("",""),$get_name)));

$get_value = mysql_escape_string(strip_tags(str_replace(array("\"","'"),array("",""),$get_value)));

$get_name = mysql_escape_string(strip_tags(str_replace(array("\"","'"),array("",""),$get_name)));

$get_value = mysql_escape_string(strip_tags(str_replace(array("\"","'"),array("",""),$get_value)));

if (
$get_name != "sort" && $get_name != "type") {
if (
$count_get > 0) {
$oldlink = $oldlink . "&" . $get_name . "=" . $get_value;
} else {
$oldlink = $oldlink . $get_name . "=" . $get_value;
}
$count_get++;
}

}
if (
$count_get > 0) {
$oldlink = $oldlink . "&";
}

if (
$_GET['sort'] == "1") {
if (
$_GET['type'] == "desc") {
$link1 = "asc";
} else {
$link1 = "desc";
}
}
if (
$_GET['sort'] == "2") {
if (
$_GET['type'] == "desc") {
$link2 = "asc";
} else {
$link2 = "desc";
}
}
if (
$_GET['sort'] == "3") {
if (
$_GET['type'] == "desc") {
$link3 = "asc";
} else {
$link3 = "desc";
}
}
if (
$_GET['sort'] == "4") {
if (
$_GET['type'] == "desc") {
$link4 = "asc";
} else {
$link4 = "desc";
}
}
if (
$_GET['sort'] == "5") {
if (
$_GET['type'] == "desc") {
$link5 = "asc";
} else {
$link5 = "desc";
}
}
if (
$_GET['sort'] == "6") {
if (
$_GET['type'] == "desc") {
$link6 = "asc";
} else {
$link6 = "desc";
}
}
if (
$_GET['sort'] == "7") {
if (
$_GET['type'] == "desc") {
$link7 = "asc";
} else {
$link7 = "desc";
}
}
if (
$_GET['sort'] == "8") {
if (
$_GET['type'] == "desc") {
$link8 = "asc";
} else {
$link8 = "desc";
}
}
if (
$_GET['sort'] == "9") {
if (
$_GET['type'] == "desc") {
$link9 = "asc";
} else {
$link9 = "desc";
}
}
if (
$_GET['sort'] == "10") {
if (
$_GET['type'] == "desc") {
$link10 = "asc";
} else {
$link10 = "desc";
}
}
if (
$_GET['sort'] == "11") {
if (
$_GET['type'] == "desc") {
$link11 = "asc";
} else {
$link11 = "desc";
}
}

if (
$link1 == "") { $link1 = "desc"; } // for torrent name
if ($link2 == "") { $link2 = "desc"; }
if (
$link3 == "") { $link3 = "desc"; }
if (
$link4 == "") { $link4 = "desc"; }
if (
$link5 == "") { $link5 = "desc"; }
if (
$link6 == "") { $link6 = "desc"; }
if (
$link7 == "") { $link7 = "desc"; }
if (
$link8 == "") { $link8 = "desc"; }
if (
$link9 == "") { $link9 = "desc"; }
if (
$link10 == "") { $link10 = "asc"; }
if (
$link11 == "") { $link11 = "desc"; }
?>
<td class="colhead" align="center" width="1%"><a href="browsemusic.php?<? print $oldlink; ?>sort=10&type=<? print $link10; ?>">Type</a></td>
<td class="colhead" align="left"><a href="browsemusic.php?<? print $oldlink; ?>sort=1&type=<? print $link1; ?>">Name</a></td>
<?
        
if ($wait)
        {
                print(
"<td class=\"colhead\" align=\"center\"><img src=/pic/warned0.gif border=none alt=Wait></td>\n");
        }

        if (
$variant == "mytorrents")
  {
          print(
"<td class=\"colhead\" align=\"center\">Edit</td>\n");
    print(
"<td class=\"colhead\" align=\"center\">Visible</td>\n");
        }

?>
<script language="JavaScript1.2">
function confirmdelmu()
{
    ht = document.getElementsByTagName("html");
    ht[0].style.filter = "progid:DXImageTransform.Microsoft.BasicImage(grayscale=1)";
    if (confirm(l_confirmdel2))
    {
        return true;
    }
    else
    {
        ht[0].style.filter = "";
        return false;
    }
}
var l_confirmdel2="Are you sure you want to delete this torrent?";
</script>

<td class="colhead" align="center"><a href="browsemusic.php?<? print $oldlink; ?>sort=2&type=<? print $link2; ?>">Files</a></td>
<td class="colhead" align="center"><a href="browsemusic.php?<? print $oldlink; ?>sort=3&type=<? print $link3; ?>"><img src=pic/comment.gif></a></td>
<td class="colhead" align="center"><a href="browsemusic.php?<? print $oldlink; ?>sort=4&type=<? print $link4; ?>">Added</a></td>
<td class="colhead" align="center"><a href="browsemusic.php?<? print $oldlink; ?>sort=5&type=<? print $link5; ?>">Size</a></td>
<td class="colhead" align="center"><a href="browsemusic.php?<? print $oldlink; ?>sort=6&type=<? print $link6; ?>"><img src=pic/top.gif border=0 /></a></td>
<td class="colhead" align="center"><a href="browsemusic.php?<? print $oldlink; ?>sort=7&type=<? print $link7; ?>"><img src=pic/arrowup.gif border=0 /></a></td>
<td class="colhead" align="center"><a href="browsemusic.php?<? print $oldlink; ?>sort=8&type=<? print $link8; ?>"><img src=pic/arrowdown.gif border=0 /></a></td>
<?
                    
if (get_user_class() >= UC_MODERATOR)
        if (
$variant == "index")
        print(
"<td class=\"colhead\" align=\"center\"><a href=\"browsemusic.php?{$oldlink}sort=9&type={$link9}\">Upped&nbsp;by</a></td>\n");
        if (
get_user_class()>= UC_SVISOR)
        print(
"<td class=\"colhead\" align=\"center\"><a href=\"browse.php?{$oldlink}sort=9&type={$link9}\"><img src=pic/delete.png></a></td>\n");
    print(
"</tr>\n");

    print(
"</tr>\n");

    while (
$row = mysql_fetch_assoc($res)) {

if (
get_user_class() >= UC_MODERATOR) {
if (
$variant == "index")
    
$colspan = 10;
elseif (
$variant == "mytorrents")
    
$colspan = 11;
}
else {
if (
$variant == "index")
    
$colspan = 9;
elseif (
$variant == "mytorrents")
    
$colspan = 11;
}

$day_added = $row['added'];
$day_show = strtotime($day_added) + (($CURUSER["timezone"] + $CURUSER["dst"]) * 60);
$thisdate = date('Y-m-d',$day_show);

if(
$thisdate==$prevdate){
$cleandate = '';

}else{
$day_added = ' '.date('l j-M-Y', strtotime($row['added']) + (($CURUSER["timezone"] + $CURUSER["dst"]) * 60)); // You can change this to something else
$cleandate = "<tr><td colspan=$colspan><b>$day_added</b></td></tr>\n"; // This also...
}
$prevdate = $thisdate;

$man = array(
    
'Jan' => 'January',
    
'Feb' => 'February',
    
'Mar' => 'March',
    
'Apr' => 'April',
    
'May' => 'May',
    
'Jun' => 'June',
    
'Jul' => 'July',
    
'Aug' => 'August',
    
'Sep' => 'September',
    
'Oct' => 'October',
    
'Nov' => 'November',
    
'Dec' => 'December'
);
foreach(
$man as $eng => $ger){
    
$cleandate = str_replace($eng, $ger,$cleandate);
}
$dag = array(
    
'Mon' => 'Monday',
    
'Tues' => 'Tuesday',
    
'Wednes' => 'Wednesday',
    
'Thurs' => 'Thursday',
    
'Fri' => 'Friday',
    
'Satur' => 'Saturday',
    
'Sun' => 'Sunday'
);

foreach(
$dag as $eng => $ger){
    
$cleandate = str_replace($eng.'day', $ger.'',$cleandate);
}
if (
$row["sticky"] == "no") // delete this line if you dont have sticky torrents or you want to display the addate for them also
if(!$_GET['sort'] && !$_GET['d']){
echo 
$cleandate."\n";
}
        
$id = $row["id"];
        
        if (
$row["sticky"] == "yes"){
        print(
"<tr class=\"sticky\">\n");
        } else {
        print(
"<tr class=\"browse\">\n");
        }

        print(
"<td align=center width=42 height=42 style='padding: 0px'>");
        if (isset(
$row["cat_name"])) {
            print(
"<a href=\"browsemusic.php?cat=" . $row["category"] . "\">");
            if (isset(
$row["cat_pic"]) && $row["cat_pic"] != "")
                print(
"<img border=\"0\" src=\"pic/cate.gif\" class=\"cate".$row["category"]."\" alt=\"" . $row["cat_name"] . "\" />");
            else
                print(
$row["cat_name"]);
            print(
"</a>");
        }
        else
            print(
"-");
        print(
"</td>\n");

        
$dispname = htmlspecialchars($row["name"]);
        
$nos_garums=strlen($dispname);
        
$nos_pielaujamais="70"; // maximum lenght
        
if($nos_garums > $nos_pielaujamais){
        
$nos_alt="title=\"$dispname \"";
        
$dispname=substr($dispname, 0, $nos_pielaujamais) . "...";
        }
        
$dispname = str_replace(array(" ",","),".",$dispname);
        
$request = ($row[request]=="yes" ? "&nbsp;<img src='pic/request.gif' align='right' title='Request' alt='Request' />" : "");
        
$res2 = mysql_query("SELECT torrents.poster FROM torrents WHERE torrents.id = $id") or sqlerr();
        
$row2 = mysql_fetch_row($res2);
        if (!empty(
$row2["0"])){
    
$poster = $row2[0];
            
$poster3 = "<img src=$poster width=160 />";
         }
         else
            
$poster3 = "";
         
        if (!empty(
$row['description'])) {
        
$description = "Genre:&nbsp;" . htmlspecialchars($row["description"]) . "";
        }
        else {
        
$description = "";
        }
        
$char = 55; //Max long...
        
print("<td align=left><a href=\"details.php?");
        if (
$variant == "mytorrents")
        print(
"returnto=" . urlencode($_SERVER["REQUEST_URI"]) . "&");
        print(
"id=$id");
        if (
$variant == "index")
        print(
"&hit=1");


        
//$thisisfree = ($row[free]=="yes" ? "<div style=\"float:right;vertical-align:bottom\"> <img src=pic/freedownload.gif></div>" : "");
        //$thisisx2 = ($row[x2]=="yes" ? "<div style=\"float:right;vertical-align:bottom\"> <img src=pic/x2.pg></div>" : "");
        
$thisisfree = ($row[free]=="yes" ? "&nbsp;<img src='pic/freedownload.gif' align='right' title='Free' alt='Free' />" : "");
        
$thisisx2 = ($row[x2]=="yes" ? "&nbsp;<img src='pic/x2.png' align='right' title='x2' alt='x2' />" : "");
        
$nuked = ($row[nuked]=="yes" ? "&nbsp;<img src='pic/nuked.gif' align='right' title='Nuked' alt='Nuked' />" : "");
        if (
sql_timestamp_to_unix_timestamp($row["added"]) >= $last_browsem)

              print(
"\" onmouseover=\"{overlib('$poster3', VAUTO, WIDTH, 0, DELAY, 0);}\" onmouseout=\"return nd();\"><b>$dispname</b></a><div style=\"float:right;vertical-align:bottom\">&nbsp;<img src=/pic/new.png border=none alt=NEW></div>$nuked $thisisfree $thisisx2 $thisisseedb $thisisdht $request$description\n");
          else
              print(
"\" onmouseover=\"{overlib('$poster3', VAUTO, WIDTH, 0, DELAY, 0);}\" onmouseout=\"return nd();\"><b>$dispname</b></a>$nuked $thisisfree $thisisx2 $thisisseedb $thisisdht $request$description\n");

                                if (
$wait)
                                {
                                  
$elapsed = floor((gmtime() - strtotime($row["added"])) / 3600);
                if (
$elapsed < $wait)
                {
                  
$color = dechex(floor(127*($wait - $elapsed)/48 + 128)*65536);
                  print(
"<td align=center><nobr><font color=\"$color\">" . number_format($wait - $elapsed) . " h</font></a></nobr></td>\n");
                }
                else
                  print(
"<td align=center><nobr>None</nobr></td>\n");
        }

        if (
$row["nfoav"] && get_user_class() >= UC_POWER_USER)
          print(
"&nbsp;&nbsp;<a href=viewnfo.php?id=$row[id]><img src='pic/viewnfo.gif' border='0' alt='View NFO' /></a>\n");
        if (
$variant == "index")
            print(
"<a href=\"download.php/$id/" . rawurlencode($row["filename"]) . "\"><img src='pic/download.gif' border='0' alt='Download' /></a>\n");
        elseif (
$variant == "mytorrents")
            print(
"<td align=\"center\"><a href=\"edit.php?returnto=" . urlencode($_SERVER["REQUEST_URI"]) . "&id=" . $row["id"] . "\">edit</a>\n");
print(
"</td>\n");
        if (
$variant == "mytorrents") {
            print(
"<td align=\"right\">");
            if (
$row["visible"] == "no")
                print(
"<b>no</b>");
            else
                print(
"yes");
            print(
"</td>\n");
        }
        if (
$row["type"] == "single")
            print(
"<td align=\"right\">" . $row["numfiles"] . "</td>\n");
        else {
            if (
$variant == "index")
                print(
"<td align=\"right\"><b><a href=\"details.php?id=$id&hit=1&filelist=1\">" . $row["numfiles"] . "</a></b></td>\n");
            else
                print(
"<td align=\"right\"><b><a href=\"details.php?id=$id&filelist=1#filelist\">" . $row["numfiles"] . "</a></b></td>\n");
        }
        if (!
$row["comments"])
            print(
"<td align=\"right\">" . $row["comments"] . "</td>\n");
        else {
            if (
$variant == "index")
                print(
"<td align=\"right\"><b><a href=\"details.php?id=$id&hit=1&tocomm=1\">" . $row["comments"] . "</a></b></td>\n");
            else
                print(
"<td align=\"right\"><b><a href=\"details.php?id=$id&page=0#startcomments\">" . $row["comments"] . "</a></b></td>\n");
        }
        print(
"<td align=center><nobr>" . str_replace(" ", "", display_date_time($row["added"])) . "</nobr></td>\n");
        print(
"<td align=center>" . str_replace(" ", "", mksize($row["size"])) . "</td>\n");
        
$_s = "";
        if (
$row["times_completed"] != 1)
          
$_s = "s";
        print(
"<td align=center>" . number_format($row["times_completed"]) . "time$_s</td>\n");

        if (
$row["seeders"]) {
            if (
$variant == "index")
            {
               if (
$row["leechers"]) $ratio = $row["seeders"] / $row["leechers"]; else $ratio = 1;
                print(
"<td align=right><b><a href=details.php?id=$id&hit=1&toseeders=1><font color=" .
                  
get_slr_color($ratio) . ">" . $row["seeders"] . "</font></a></b></td>\n");
            }
            else
                print(
"<td align=\"right\"><b><a class=\"" . linkcolor($row["seeders"]) . "\" href=\"details.php?id=$id&dllist=1#seeders\">" .
                  
$row["seeders"] . "</a></b></td>\n");
        }
        else
            print(
"<td align=\"right\"><span class=\"" . linkcolor($row["seeders"]) . "\">" . $row["seeders"] . "</span></td>\n");
        if (
$row["leechers"]) {
            if (
$variant == "index")
                print(
"<td align=right><b><a href=details.php?id=$id&hit=1&todlers=1>" .
                   
number_format($row["leechers"]) . ($peerlink ? "</a>" : "") .
                   
"</b></td>\n");
            else
                print(
"<td align=\"right\"><b><a class=\"" . linkcolor($row["leechers"]) . "\" href=\"details.php?id=$id&dllist=1#leechers\">" .
                  
$row["leechers"] . "</a></b></td>\n");
        }
        else
            print(
"<td align=\"right\">0</td>\n");
                    if (
get_user_class() >= UC_MODERATOR)
        if (
$variant == "index")
            print(
"<td align=center>" . (isset($row["username"]) ? ("<a href=userdetails.php?id=" . $row["owner"] . "><b>" . htmlspecialchars($row["username"]) . "</b></a>") : "<i>(unknown)</i>") . "</td>\n");
        
        if (
get_user_class()>= UC_SVISOR) {
print(
"<form method=\"post\" action=\"fastdelmusic.php\">\n");
print(
"<input type=\"hidden\" name=\"id\" value=\"$id\">\n");
print(
"<td align=center><input type=submit onclick='return confirmdelmu()' value='X' style='cursor:hand; color:000000; background-color:ff0000;'></td>");
print(
"</form>");
}
print(
"</tr>\n");
    }
    print(
"</table>\n");
    
    return 
$rows;
}

function 
hash_pad($hash) {
    return 
str_pad($hash, 20);
}

function 
hash_where($name, $hash) {
    
$shhash = preg_replace('/ *$/s', "", $hash);
    return 
"($name = " . sqlesc($hash) . " OR $name = " . sqlesc($shhash) . ")";
}

function 
get_user_icons($arr, $big = false)
{
        if (
$big)
        {
                
$donorpic = "starbig.gif";
                
$warnedpic = "warnedbig.gif";
                
$disabledpic = "disabledbig.gif";
                
$style = "style='margin-left: 4pt'";
        }
        else
        {
                
$donorpic = "star.png";
                
$warnedpic = "warned.gif";
                
$disabledpic = "disabled.gif";
                
$style = "style=\"margin-left: 2pt\"";
        }
        
$pics = $arr["donor"] == "yes" ? "<img src=pic/$donorpic alt='Donor' border=0 $style>" : "";
        if (
$arr["enabled"] == "yes")
                
$pics .= $arr["warned"] == "yes" ? "<img src=pic/$warnedpic alt=\"Warned\" border=0 $style>" : "";
        else
                
$pics .= "<img src=pic/$disabledpic alt=\"Disabled\" border=0 $style>\n";
        return 
$pics;
}

function 
parked()
{
       global 
$CURUSER;
       if (
$CURUSER["parked"] == "yes")
 
stderr("Error", "Your account is parked.");
}

require 
"max_global.php";

function 
mksize1($bytes){
return 
number_format($bytes / 1024, 2);
}
?>

can you tell whats wrong please , i'll appreciate your help :)

Chez 16th February 2013 13:44

it's the same source ... only theme is different :chch:

SaiDo-Sa 16th February 2013 13:52

Quote:

Originally Posted by Chez (Post 39507)
it's the same source ... only theme is different :chch:

ok ... , do you whats wrong with it ?

aMiGo1972 16th February 2013 14:09

very nice theme :drink:

Chez 16th February 2013 14:20

Quote:

Originally Posted by aMiGo1972 (Post 39509)
very nice theme :drink:

the theme is from XtremeZone (http://myxz.org)

Thunder™ 19th February 2013 04:25

nice but you have to do much to get them valid:ok:

hunt3r1989 19th February 2013 17:33

hi
 
I need a little help when i try to make me owner on this tracker he show me this error how i fix this error? :wallbash: Access Denied!
We come to believe you are using a fake account, therefore we've logged this action! :sos::sos:

DND 19th February 2013 21:52

you translate the statusbar but not the whole site ? :wallbash::wallbash::wallbash::wallbash:

MJUER 21st February 2013 22:01

Quote:

Originally Posted by aeon-design (Post 39505)
It is the same source stream published on the net just sucks that more paint and they each theme and ready source ... So let sports PHP

http://iceimg.com/i/6b/08/cdb80d4526.png

http://iceimg.com/i/c0/8b/da299bf6bb.png

INSTALL

1. Unrar source in xampp / htdocs, if you put on localhost.
2. up sql in phpmyadmin bestzone name
3. killerdemon login name and password and 123456 are owner

2013 Aeon Design

Other download link: http://fisierulmeu.ro/26W6R5X4JX3I/B...-v1-2-rar.html



It is the same source stream published on the net just sucks that more paint and they each theme and ready source ... So let sports PHP

Bump: aeon design for you even struggle to change the login page and show different kind + that you're a badass coder and designer are dust

Source FluxZone + Bugs Themes MyXz Shit Coder Shit Designer WTF STOLEN

daffy 21st February 2013 22:06

^^ i agree:lol::lol: :friend: lot of time wasted on old time

Chez 22nd February 2013 13:30

Quote:

Originally Posted by MJUER (Post 39618)
It is the same source stream published on the net just sucks that more paint and they each theme and ready source ... So let sports PHP

Bump: aeon design for you even struggle to change the login page and show different kind + that you're a badass coder and designer are dust

Source FluxZone + Bugs Themes MyXz Shit Coder Shit Designer WTF STOLEN

I'm agree with you :suicide::friend:

bizzarre13 21st April 2013 18:15

The security is very weak!

Solid26 23rd April 2013 21:00

1 Attachment(s)
please where is problem? :sos::suicide: when i go to the site blank page and It works!

and whne i add this addres [HIDE]http://www.sk-tracker.sk/login.php[/HIDE]

[HIDE]Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in /home/html/sk-tracker.sk/public_html/include/bittorrent.php on line 363[/HIDE]

Please help

cobra 23rd April 2013 21:48

index
 
Quote:

Originally Posted by Solid26 (Post 40497)
please where is problem? :sos::suicide: when i go to the site blank page and It works!

and whne i add this addres *** hidden content ***

*** hidden content ***

Please help


Hi.

Delete index html :ok:

Lolle 23rd April 2013 21:49

..
 
Quote:

Originally Posted by Solid26 (Post 40497)
please where is problem? :sos::suicide: when i go to the site blank page and It works!

and whne i add this addres *** hidden content ***

*** hidden content ***

Please help



write http://www.sk-tracker.sk/index.php

if it does not work then delete .htaccess

Solid26 23rd April 2013 22:10

and when i go recovery.php then error SORRY PAL :(

thne this
Login failed !
Username or password incorrect

TheGodRo 5th May 2013 02:12

And hot to recover? At recover says not logged in ..wtf is this? :lol:

Bump:
Quote:

Originally Posted by TheGodRo (Post 40684)
And hot to recover? At recover says not logged in ..wtf is this? :lol:

At all of your sorces recover doesent work :suicide:(FZ)

bastos230573 9th October 2013 16:02

What is wrong with?
Upload failed!

missing form data





http://www.bvlist.com/data:image/png...AAAElFTkSuQmCC

DavePL 3rd December 2013 13:54

Quote:

Originally Posted by aeon-design (Post 39505)
http://iceimg.com/i/6f/c4/0b968c3146.png

http://iceimg.com/i/6b/08/cdb80d4526.png

http://iceimg.com/i/c0/8b/da299bf6bb.png

INSTALL

1. Unrar source in xampp / htdocs, if you put on localhost.
2. up sql in phpmyadmin bestzone name
3. killerdemon login name and password and 123456 are owner

2013 Aeon Design

Other download link: http://fisierulmeu.ro/26W6R5X4JX3I/B...-v1-2-rar.html



Login failed !

Username or password incorrect

to any source code aeon-design can not log in :wallbash:

kerem1213 22nd April 2014 10:57

login failed
 
Login failed !

Username or password incorrect

to any source code aeon-design can not log in :wallbash::wallbash::wallbash:

MikaTake 19th May 2014 14:50

1 Attachment(s)
Quote:

Originally Posted by DavePL (Post 43416)
Login failed !

Username or password incorrect

to any source code aeon-design can not log in :wallbash:

Quote:

Originally Posted by kerem1213 (Post 44390)
Login failed !

Username or password incorrect

to any source code aeon-design can not log in :wallbash::wallbash::wallbash:


Extinguish the user's table in the SQL and insert this here.

Code:

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;

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

--
-- Tabellenstruktur für Tabelle `users`
--

CREATE TABLE IF NOT EXISTS `users` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `username` varchar(40) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL DEFAULT '',
  `old_password` varchar(40) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL DEFAULT '',
  `passhash` varchar(32) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL DEFAULT '',
  `secret` varchar(20) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT '',
  `email` varchar(80) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL DEFAULT '',
  `status` enum('pending','confirmed') CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL DEFAULT 'pending',
  `added` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `last_login` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `last_access` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `last_catchup` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `editsecret` varchar(20) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT '',
  `privacy` enum('normal','strong') CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL DEFAULT 'normal',
  `stylesheet` int(10) DEFAULT '1',
  `info` text CHARACTER SET latin1 COLLATE latin1_general_ci,
  `acceptpms` enum('yes','friends','no') CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL DEFAULT 'yes',
  `ip` varchar(15) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL DEFAULT '',
  `class` tinyint(2) unsigned NOT NULL DEFAULT '1',
  `avatar` varchar(100) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL DEFAULT '',
  `uploaded` bigint(20) unsigned NOT NULL DEFAULT '0',
  `downloaded` bigint(20) unsigned NOT NULL DEFAULT '0',
  `title` varchar(60) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL,
  `country` int(10) unsigned NOT NULL DEFAULT '0',
  `notifs` varchar(100) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL DEFAULT '',
  `modcomment` text CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL,
  `enabled` enum('yes','no') NOT NULL DEFAULT 'yes',
  `disable_reason` text NOT NULL,
  `imunity` enum('yes','no') NOT NULL DEFAULT 'no',
  `avatars` enum('yes','no') CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL DEFAULT 'yes',
  `donor` enum('yes','no') CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL DEFAULT 'no',
  `warned` enum('yes','no') CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL DEFAULT 'no',
  `warneduntil` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `torrentsperpage` int(3) unsigned NOT NULL DEFAULT '0',
  `topicsperpage` int(3) unsigned NOT NULL DEFAULT '0',
  `postsperpage` int(3) unsigned NOT NULL DEFAULT '0',
  `deletepms` enum('yes','no') CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL DEFAULT 'yes',
  `savepms` enum('yes','no') CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL DEFAULT 'no',
  `parked` enum('yes','no') CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL DEFAULT 'no',
  `announce` enum('yes','no') CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL DEFAULT 'yes',
  `passkey` varchar(32) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL DEFAULT '',
  `last_browse` int(11) NOT NULL DEFAULT '0',
  `last_browsex` int(11) NOT NULL DEFAULT '0',
  `last_browsem` int(11) NOT NULL DEFAULT '0',
  `fader` enum('yes','no') CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL DEFAULT 'yes',
  `fadecolor` varchar(255) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL DEFAULT 'FF0000',
  `support` enum('yes','no') CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL DEFAULT 'no',
  `supportfor` text CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL,
  `supportlang` varchar(50) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL DEFAULT '',
  `invited_by` int(10) NOT NULL DEFAULT '0',
  `invitees` varchar(100) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL DEFAULT '',
  `totalinvite` int(10) unsigned NOT NULL DEFAULT '0',
  `invites` int(1) NOT NULL DEFAULT '0',
  `gender` enum('Male','Female','N/A') CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL DEFAULT 'N/A',
  `invitedate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `view_adult` enum('yes','no') CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL DEFAULT 'yes',
  `view_music` enum('yes','no') CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL DEFAULT 'yes',
  `view_adult_browse` enum('yes','no') CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL DEFAULT 'yes',
  `view_music_browse` enum('yes','no') CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL DEFAULT 'yes',
  `view_musiclo_browse` enum('yes','no') CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL DEFAULT 'yes',
  `view_musicvi_browse` enum('yes','no') CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL DEFAULT 'yes',
  `view_musicpks_browse` enum('yes','no') CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL DEFAULT 'yes',
  `advertisename` enum('yes','no') CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL DEFAULT 'no',
  `signatures` enum('yes','no') CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL DEFAULT 'yes',
  `signature` varchar(225) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL DEFAULT '',
  `uploadpos` enum('yes','no') NOT NULL DEFAULT 'no',
  `downloadpos` enum('yes','no') NOT NULL DEFAULT 'yes',
  `forumpost` enum('yes','no') NOT NULL DEFAULT 'yes',
  `chatpost` enum('yes','no') NOT NULL DEFAULT 'no',
  `chatdisable` enum('yes','no') NOT NULL DEFAULT 'no',
  `donated` decimal(8,2) NOT NULL DEFAULT '0.00',
  `last_pm` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `last_comment` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `last_post` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `forum_access` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `last_staffmsg` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `timezone` smallint(3) NOT NULL DEFAULT '120',
  `dst` tinyint(2) NOT NULL DEFAULT '0',
  `commentpm` enum('yes','no') NOT NULL DEFAULT 'yes',
  `staff_chat_access` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `groups` int(10) unsigned NOT NULL DEFAULT '0',
  `rangclass` int(10) unsigned NOT NULL DEFAULT '0',
  `zodiac` int(10) unsigned NOT NULL DEFAULT '0',
  `donoruntil` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `total_donated` decimal(8,2) NOT NULL DEFAULT '0.00',
  `last_check` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `leechwarn` enum('yes','no') NOT NULL DEFAULT 'no',
  `cell` varchar(255) NOT NULL DEFAULT '',
  `tenpercent` enum('yes','no') NOT NULL DEFAULT 'no',
  `seedbonus` decimal(5,1) NOT NULL DEFAULT '0.0',
  `bonuscomment` text,
  PRIMARY KEY (`id`),
  UNIQUE KEY `username` (`username`),
  KEY `status_added` (`status`,`added`),
  KEY `ip` (`ip`),
  KEY `uploaded` (`uploaded`),
  KEY `downloaded` (`downloaded`),
  KEY `country` (`country`),
  KEY `last_access` (`last_access`),
  KEY `warned` (`warned`),
  KEY `passkey` (`passkey`),
  KEY `id` (`id`,`username`,`old_password`,`passhash`,`secret`),
  KEY `stylesheet` (`stylesheet`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=121 ;

--
-- Daten für Tabelle `users`
--

INSERT INTO `users` (`id`, `username`, `old_password`, `passhash`, `secret`, `email`, `status`, `added`, `last_login`, `last_access`, `last_catchup`, `editsecret`, `privacy`, `stylesheet`, `info`, `acceptpms`, `ip`, `class`, `avatar`, `uploaded`, `downloaded`, `title`, `country`, `notifs`, `modcomment`, `enabled`, `disable_reason`, `imunity`, `avatars`, `donor`, `warned`, `warneduntil`, `torrentsperpage`, `topicsperpage`, `postsperpage`, `deletepms`, `savepms`, `parked`, `announce`, `passkey`, `last_browse`, `last_browsex`, `last_browsem`, `fader`, `fadecolor`, `support`, `supportfor`, `supportlang`, `invited_by`, `invitees`, `totalinvite`, `invites`, `gender`, `invitedate`, `view_adult`, `view_music`, `view_adult_browse`, `view_music_browse`, `view_musiclo_browse`, `view_musicvi_browse`, `view_musicpks_browse`, `advertisename`, `signatures`, `signature`, `uploadpos`, `downloadpos`, `forumpost`, `chatpost`, `chatdisable`, `donated`, `last_pm`, `last_comment`, `last_post`, `forum_access`, `last_staffmsg`, `timezone`, `dst`, `commentpm`, `staff_chat_access`, `groups`, `rangclass`, `zodiac`, `donoruntil`, `total_donated`, `last_check`, `leechwarn`, `cell`, `tenpercent`, `seedbonus`, `bonuscomment`) VALUES
(1, 'Admin', '', '805ea6f2bc4228dc63747f7915d107d8', '„éá×dM˜Ï€A\nAw~â†x', '[email protected]', 'confirmed', '2014-05-19 14:41:30', '0000-00-00 00:00:00', '2014-05-19 14:41:30', '0000-00-00 00:00:00', '', 'normal', 1, NULL, 'yes', '', 15, '', 0, 0, '', 0, '', '', 'yes', '', 'no', 'yes', 'no', 'no', '0000-00-00 00:00:00', 0, 0, 0, 'yes', 'no', 'no', 'yes', '', 0, 0, 0, 'yes', 'FF0000', 'no', '', '', 0, '', 0, 0, 'N/A', '0000-00-00 00:00:00', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'no', 'yes', '', 'no', 'yes', 'yes', 'no', 'no', 0.00, '0000-00-00 00:00:00', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 120, 0, 'yes', '0000-00-00 00:00:00', 0, 0, 0, '0000-00-00 00:00:00', 0.00, '0000-00-00 00:00:00', 'no', '', 'no', 0.0, NULL);

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;


Login:
Name: Admin
PW: 123456

david07 8th June 2014 05:21

can someone please upload the source.The link in the description is down :(

Krypto 8th June 2014 11:32

No need for it to be uploaded again as it's also attached to the 1st post :wallbash:

yuly 16th July 2014 20:33

When i create a new account it not connet , but it existe in database

and the admin don't connect also


(sorry for my english)

redred2 24th July 2014 22:21

hi
 
do i need short_open_tag=On or off?

bizzarre13 6th August 2019 16:38

something is strange.
when i try to edit a torrent, it says ' Successfully edited! ' but the torrent remain the same.
For example in description i have something like that: "ok test" , and if i try to edit the text , i write "no good test" , press edit, it says Successfully edited! and the text does not edit...

Napon 6th August 2019 17:01

So here is how to fix it look at edit see what is in it now add to the takeedit file

bizzarre13 6th August 2019 18:11

i think takeedit.php is the problem, but i can't see the error

Code:


require_once("include/bittorrent.php");

function bark($msg) {
        genbark($msg, "Edit failed!");
}

if (!mkglobal("id:name:descr:type"))
        bark("missing form data");

$id = 0 + $id;
if (!$id)
        die();

dbconn();
security_staff();
if ($CURUSER["class"] > 15)
{
stdhead();
  stdmsg("FUCK OFF...", "STOP CHEATING MOTHER FUCKER");
  stdfoot();
  exit;
}

loggedinorreturn();

maxsysop();

$res = mysql_query("SELECT owner, filename, save_as FROM torrents WHERE id = $id");
$row = mysql_fetch_array($res);
if (!$row)
        die();

if ($CURUSER["id"] != $row["owner"] && get_user_class() < UC_MODERATOR)
        bark("You're not the owner! How did that happen?\n");

$updateset = array();

$fname = $row["filename"];
preg_match('/^(.+)\.torrent$/si', $fname, $matches);
$shortfname = $matches[1];
$smalldescr = $_POST["description"];
$dname = $row["save_as"];

if (!empty($_POST['url']))
$url = $_POST['url'];

if (!empty($_POST['poster']))
$poster = unesc($_POST['poster']);
$nuked = $_POST["nuked"];
$nfoaction = $_POST['nfoaction'];
if ($nfoaction == "update")
{
  $nfofile = $_FILES['nfo'];
  if (!$nfofile) die("No data " . var_dump($_FILES));
  if ($nfofile['size'] > 65535)
    bark("NFO is too big! Max 65,535 bytes.");
  $nfofilename = $nfofile['tmp_name'];
  if (@is_uploaded_file($nfofilename) && @filesize($nfofilename) > 0)
    $updateset[] = "nfo = " . sqlesc(str_replace("\x0d\x0d\x0a", "\x0d\x0a", file_get_contents($nfofilename)));
}
else
  if ($nfoaction == "remove")
    $updateset[] = "nfo = ''";

$updateset[] = "name = " . sqlesc($name);
$updateset[] = "description = " . sqlesc($smalldescr);
$updateset[] = "request = '" . ($_POST["request"] == "no" ? "no" : "yes") . "'";
$updateset[] = "search_text = " . sqlesc(searchfield("$shortfname $dname $torrent"));
$updateset[] = "descr = " . sqlesc($descr);
$updateset[] = "url = " . sqlesc($url);
$updateset[] = "ori_descr = " . sqlesc($descr);
$updateset[] = "category = " . (0 + $type);

if (get_user_class()>= UC_ADMINISTRATOR) {

        if ($_POST["banned"]) {
                $updateset[] = "banned = 'yes'";
                $_POST["visible"] = 0;
        }
        else
                $updateset[] = "banned = 'no'";
}

if ((isset($_POST['allow_comments'])) && (($allow_comments = $_POST['allow_comments']) != $row['allow_comments'])) {
        if (get_user_class()>= UC_ADMINISTRATOR)
                $updateset[] = "allow_comments = " . sqlesc($allow_comments);
        } else
                $updateset[] = "allow_comments = 'yes'";

if ($_POST['seedb'] == "yes")
        $updateset[] = "seedb = 'yes'";
else
        $updateset[] = "seedb = 'no'";



if (get_user_class()>= UC_MASTER_MODERATOR)
$updateset[] = "sticky = '" . ($_POST["sticky"] ? "yes" : "no") . "'";
$updateset[] = "visible = '" . ($_POST["visible"] ? "yes" : "no") . "'";

if (get_user_class()>= UC_ADMINISTRATOR)
$updateset[] = "free = '" . ($_POST["free"] ? "yes" : "no") . "'";
$updateset[] = "x2 = '" . ($_POST["x2"] ? "yes" : "no") . "'";

//$updateset[] = "free = '".($_POST["free"]==1 ? 'yes' : 'no')."'";
$updateset[] = "poster = " . sqlesc($poster);
$updateset[] = "nuked = " . sqlesc($nuked);


mysql_query("UPDATE torrents SET " . join(",", $updateset) . " WHERE id = $id");

//write_log("Torrent $id ($name) was edited by $CURUSER[username]");
write_log("Torrent: $name | ID: $id | Was edited. by $CURUSER[username].");

$returl = "details.php?id=$id&edited=1";
if (isset($_POST["returnto"]))
        $returl .= "&returnto=" . urlencode($_POST["returnto"]);
header("Refresh: 0; url=$returl");
?>


son 6th August 2019 21:27

Hello
 
Quote:

Originally Posted by bizzarre13 (Post 53955)
something is strange.
when i try to edit a torrent, it says ' Successfully edited! ' but the torrent remain the same.
For example in description i have something like that: "ok test" , and if i try to edit the text , i write "no good test" , press edit, it says Successfully edited! and the text does not edit...


The last post to this was 6 years ago, firstly the complete code base probably needs to be updated to current well " EVERYTHING". Then secondly, those that can't setup a webserver, should find / pay for this to be set-up properly, caution"find someone you can trust.

allfree 15th August 2019 10:39

which version is tbdev 2009 or tbdev 2008 ???


All times are GMT +2. The time now is 21:59.

Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2026, vBulletin Solutions Inc.