Polish Bittorrent Tracker Support

  • Maj 18, 2012, 05:04:19
  • Witamy, Gość
Zaloguj się lub zarejestruj.

Zaloguj się podając nazwę użytkownika, hasło i długość sesji
Szukanie zaawansowane  

Aktualności:

Autor Wątek: nowy wygląd browse  (Przeczytany 303 razy)

0 użytkowników i 1 Gość przegląda ten wątek.

Daniolos

  • BTDEV Staff
  • Średnio zaawansowany
  • *****
  • Reputacja 46
  • Offline Offline
  • Płeć: Mężczyzna
  • Wiadomości: 67
  • ReactionTorrent.net
nowy wygląd browse
« dnia: Grudzień 22, 2011, 09:10:22 »

Musisz mieć wgrany mod Poster dla torrenta i mytorrents


W bittorrent.php

znajdź :

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

    if ($CURUSER["class"] == UC_LEECHER)
  {
      $gigs = $CURUSER["uploaded"] / (1024*1024*1024);
      $ratio = (($CURUSER["downloaded"] > 0) ? ($CURUSER["uploaded"] / $CURUSER["downloaded"]) : 0);
      if ($ratio < 0.5 || $gigs < 5) $wait = 48;
      elseif ($ratio < 0.65 || $gigs < 6.5) $wait = 24;
      elseif ($ratio < 0.8 || $gigs < 8) $wait = 12;
      elseif ($ratio < 0.95 || $gigs < 9.5) $wait = 6;
      else $wait = 0;
  }
?>
<table border="1" cellspacing=0 cellpadding=5>
<tr>

<td class="colhead" align="center">Kat.</td>
<td class="colhead" align=left>Nazwa</td>
<!--<td class="heading" align=left>DL</td>-->
<?
    if ($wait)
    {
        print("<td class=\"colhead\" align=\"center\">Czekasz</td>\n");
    }

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

?>
<td class="colhead" align=right>Pliki</td>
<td class="colhead" align=right>Koment.</td>
<!--<td class="colhead" align="center">Rating</td>-->
<td class="colhead" align="center">Dodano</td>
<td class="colhead" align="center">TTL</td>
<td class="colhead" align="center">Rozmiar</td>
<!--
<td class="colhead" align=right>Views</td>
<td class="colhead" align=right>Hits</td>
-->
<td class="colhead" align="center">Pobrano</td>
<td class="colhead" align=right>Seedów</td>
<td class="colhead" align=right>Leechów</td>
<?

    if ($variant == "index")
        print("<td class=\"colhead\" align=center>Dodał/a</td>\n");

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

    while ($row = mysql_fetch_assoc($res)) {
        $id = $row["id"];
        print("<tr>\n");

        print("<td align=center 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_base_url" . $row["cat_pic"] . "\" alt=\"" . $row["cat_name"] . "\" />");
            else
                print($row["cat_name"]);
            print("[/url]");
        }
        else
            print("-");
        print("</td>\n");

        $dispname = htmlspecialchars($row["name"]);
        print("<td align=left><a href=\"details.php?");
        if ($variant == "mytorrents")
            print("returnto=" . urlencode($_SERVER["REQUEST_URI"]) . "&amp;");
        print("id=$id");
        if ($variant == "index")
            print("&amp;hit=1");
        print("\">$dispname[/url]\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><a href=\"/faq.php#dl8\"><font color=\"$color\">" . number_format($wait - $elapsed) . " h</font>[/url]</nobr></td>\n");
            }
            else
              print("<td align=center><nobr>None</nobr></td>\n");
        }

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

        else */ if ($variant == "mytorrents")
            print("<td align=\"center\"><a href=\"edit.php?returnto=" . urlencode($_SERVER["REQUEST_URI"]) . "&amp;id=" . $row["id"] . "\">edytuj[/url]\n");
print("</td>\n");
        if ($variant == "mytorrents") {
            print("<td align=\"right\">");
            if ($row["visible"] == "no")
                print("<font color=red>nie</font>");
            else
                print("tak");
            print("</td>\n");
        }

        if ($row["type"] == "single")
            print("<td align=\"right\">" . $row["numfiles"] . "</td>\n");
        else {
            if ($variant == "index")
                print("<td align=\"right\"><a href=\"details.php?id=$id&amp;hit=1&amp;filelist=1\">" . $row["numfiles"] . "[/url]</td>\n");
            else
                print("<td align=\"right\"><a href=\"details.php?id=$id&amp;filelist=1#filelist\">" . $row["numfiles"] . "[/url]</td>\n");
        }

        if (!$row["comments"])
            print("<td align=\"right\">" . $row["comments"] . "</td>\n");
        else {
            if ($variant == "index")
                print("<td align=\"right\"><a href=\"details.php?id=$id&amp;hit=1&amp;tocomm=1\">" . $row["comments"] . "[/url]</td>\n");
            else
                print("<td align=\"right\"><a href=\"details.php?id=$id&amp;page=0#startcomments\">" . $row["comments"] . "[/url]</td>\n");
        }

/*
        print("<td align=\"center\">");
        if (!isset($row["rating"]))
            print("---");
        else {
            $rating = round($row["rating"] * 2) / 2;
            $rating = ratingpic($row["rating"]);
            if (!isset($rating))
                print("---");
            else
                print($rating);
        }
        print("</td>\n");
*/
        print("<td align=center><nobr>" . str_replace(" ", "[br /]", $row["added"]) . "</nobr></td>\n");
        $ttl = (28*24) - floor((gmtime() - sql_timestamp_to_unix_timestamp($row["added"])) / 3600);
        if ($ttl == 1) $ttl .= "[br /]godzinę"; else $ttl .= "[br /]godziny";
        print("<td align=center>$ttl</td>\n");
        print("<td align=center>" . str_replace(" ", "[br /]", 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 = "y";
        print("<td align=center><a href=viewsnatches.php?id=$row[id]>" .          number_format($row["times_completed"]) . "[br /]raz$_s[/url]</td>\n");

        if ($row["seeders"]) {
            if ($variant == "index")
            {
               if ($row["leechers"]) $ratio = $row["seeders"] / $row["leechers"]; else $ratio = 1;
                print("<td align=right><a href=details.php?id=$id&amp;hit=1&amp;toseeders=1><font color=" .
                  get_slr_color($ratio) . ">" . $row["seeders"] . "</font>[/url]</td>\n");
            }
            else
                print("<td align=\"right\"><a class=\"" . linkcolor($row["seeders"]) . "\" href=\"details.php?id=$id&amp;dllist=1#seeders\">" .
                  $row["seeders"] . "[/url]</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><a href=details.php?id=$id&amp;hit=1&amp;todlers=1>" .
                   number_format($row["leechers"]) . ($peerlink ? "[/url]" : "") .
                   "</td>\n");
            else
                print("<td align=\"right\"><a class=\"" . linkcolor($row["leechers"]) . "\" href=\"details.php?id=$id&amp;dllist=1#leechers\">" .
                  $row["leechers"] . "[/url]</td>\n");
        }
        else
            print("<td align=\"right\">0</td>\n");

        if ($variant == "index")
            if($row["anonymous"] == "yes" AND get_user_class() < UC_MODERATOR AND $CURUSER["id"] != $row["owner"]){
   $row["owner"] = "";
   $row["username"] = "---";
  }
  else
   $row["owner"] = "<a href=userdetails.php?id=" . $row["owner"] . ">";
  print("<td align=center>" . (isset($row["username"]) ? ("" . $row["owner"] . "" . htmlspecialchars($row["username"])

. "[/url]") : "unknown") . "</td>\n");

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

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

    return $rows;
}

zamień na

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

    if ($CURUSER["class"] == UC_LEECHER)
  {
      $gigs = $CURUSER["uploaded"] / (1024*1024*1024);
      $ratio = (($CURUSER["downloaded"] > 0) ? ($CURUSER["uploaded"] / $CURUSER["downloaded"]) : 0);
      if ($ratio < 0.5 || $gigs < 5) $wait = 48;
      elseif ($ratio < 0.65 || $gigs < 6.5) $wait = 24;
      elseif ($ratio < 0.8 || $gigs < 8) $wait = 12;
      elseif ($ratio < 0.95 || $gigs < 9.5) $wait = 6;
      else $wait = 0;
  }
?>
<table width="800px" border='1'>
<?
if ($CURUSER["id"] == $row["owner"] || get_user_class() >= UC_MODERATOR)
            $owned = 1;
        else
            $owned = 0;
               
    while ($row = mysql_fetch_assoc($res)) {
        $id = htmlspecialchars(
$row["id"]);

        print("\n");
//balony
$poster = ($row['poster'] == '' ? '<img src="pic/poster.jpg" border="0" width="128" height="178" valign=top />' : '<img src="'.htmlspecialchars($row['poster']).'" border="0" width="128" height="178" valign=top/>');

    if (get_user_class() > UC_UPLOADER) {
        $uprow = (isset($row["username"]) ? ("<a href=userdetails.php?id=" . $row["owner"] . ">" . htmlspecialchars($row["username"]) . "[/url]") : "---");
                    }
                    else
                    {
        $uprow = (isset($row["username"]) && $CURUSER['anonymous'] == yes ? ("<a href=userdetails.php?id=" . $row["owner"] . ">" . htmlspecialchars($row["username"]) . "[/url]") : "---");
            }
               
$pobierz= ("<a href=\"download.php/$id/[Reactiontorrent.net] " . $row["name"] . ".torrent\"\">Pobierz torrent[/url]");




                $smallname =substr(htmlspecialchars_decode($row["name"], ENT_NOQUOTES) , 0, 100);
if ($smallname != htmlspecialchars_decode($row["name"], ENT_NOQUOTES )) {
$smallname .= '...';
}
                      $descr =substr(format_torrent(htmlspecialchars_decode($row[descr], ENT_NOQUOTES)) , 0, 1000);
if ($descr != format_torrent(htmlspecialchars_decode($row[descr], ENT_NOQUOTES))) {
$descr .="[br /][...]
[br /]
?[<a href=\"details.php?id=$id&amp;hit=1\">Zobacz cały opis[/url]]?";







        print("<h1><a href=\"details.php?");
        if ($variant == "mytorrents")
            print("returnto=" . urlencode($_SERVER["REQUEST_URI"]) . "&amp;");
        print("id=$id");
        if ($variant == "index")
            print("&amp;hit=1");
        print("\"><center>$smallname[/url]</center>[/url]</h1>\n");?>
               
<table width="800px" height="400px" cellspacing="0" cellpadding="10">


<!--<td class="heading" align=left>DL</td>-->


<?

   


               
               
                                print("<tr><td border=0 width=128 height=178 valign=top><center>$poster</center>[br /][br /]
                                Kategoria: " . $row["cat_name"] . "
                                [br /]Dodał: $uprow
                                [br /]Data dodania:[br /]". $row["added"] ."
                                [br /] Rozmiar:
                " . str_replace(" ", "", mksize($row["size"])) . "
                [br /]
       
                Seedów:<font style='color:green;'> " . $row["seeders"] . "</font>
               
                [br /]
                Peerów: <font style='color:red;'>" . $row["leechers"] . "
                </font>[br /][br /]
                                Komentarze: ". $row["comments"] ."
                [br /][br /]$pobierz[br /]");
                                print ("</td>
               
               
<td valign=top>$descr</td>


            </tr>               
");


       print(" </table> <h2></h2>\n");
    }

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

    return $rows;
}

w browse.php

znajdź:

$query = "SELECT torrents.id,
po tym dodaj

torrents.descr, torrents.poster,
Screen:

Zapisane
ReactionTorrent.net

kalwin

  • <? print(" ?>
  • VIP
  • Zaawansowany
  • *****
  • Reputacja 12
  • Offline Offline
  • Płeć: Mężczyzna
  • Wiadomości: 183
  • ReactionTorrent.net
Odp: nowy wygląd browse
« Odpowiedź #1 dnia: Grudzień 22, 2011, 09:26:00 »

Dziekujemy damian :)
Zapisane

Berdgradman

  • Początkujący+
  • **
  • Reputacja 5
  • Offline Offline
  • Wiadomości: 12
Odp: nowy wygląd browse
« Odpowiedź #2 dnia: Grudzień 29, 2011, 09:57:01 »

dziekujemy ;)
Zapisane

P2P

  • BTDEV Staff
  • Super zaawansowany
  • *****
  • Reputacja 45
  • Offline Offline
  • Płeć: Mężczyzna
  • Wiadomości: 471
Odp: nowy wygląd browse
« Odpowiedź #3 dnia: Grudzień 30, 2011, 01:56:09 »

Dziękujemy. :police:



Zapisane
Brazylijscy naukowcy odkryli, że ludzie czytający posty i trzymający rękę na myszce mają niższe IQ

Już za późno nie zdejmujcie

Max

  • Super zaawansowany
  • ******
  • Reputacja 14
  • Offline Offline
  • Płeć: Mężczyzna
  • Wiadomości: 215
Odp: nowy wygląd browse
« Odpowiedź #4 dnia: Kwiecień 26, 2012, 10:42:25 »

witam o tóż mam problem z tym modem wyskakuje mi taki błąd z góry dziękuje za pomoc

 :unsure:
Parse error: syntax error, unexpected '/',  expecting T_STRING or T_VARIABLE or T_NUM_STRING in /virtual/nazwa strony/include/bittorrent.php on line 1014
« Ostatnia zmiana: Kwiecień 26, 2012, 10:53:24 wysłana przez Max »
Zapisane

kalwin

  • <? print(" ?>
  • VIP
  • Zaawansowany
  • *****
  • Reputacja 12
  • Offline Offline
  • Płeć: Mężczyzna
  • Wiadomości: 183
  • ReactionTorrent.net
Odp: nowy wygląd browse
« Odpowiedź #5 dnia: Kwiecień 26, 2012, 11:33:58 »

przektałcic chcesz na publika czy prywatny ..?
Zapisane

Max

  • Super zaawansowany
  • ******
  • Reputacja 14
  • Offline Offline
  • Płeć: Mężczyzna
  • Wiadomości: 215
Odp: nowy wygląd browse
« Odpowiedź #6 dnia: Kwiecień 27, 2012, 01:18:16 »

na publika a przez to ten błąd może wgram ten silni z publicznym bo wgralem wersje finalna :)
Zapisane

kalwin

  • <? print(" ?>
  • VIP
  • Zaawansowany
  • *****
  • Reputacja 12
  • Offline Offline
  • Płeć: Mężczyzna
  • Wiadomości: 183
  • ReactionTorrent.net
Odp: nowy wygląd browse
« Odpowiedź #7 dnia: Kwiecień 27, 2012, 01:10:04 »

nom ... sprawdź to... Prywatny track...

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;

}

?>
<table width=737 border="0" cellspacing="0" cellpadding="5">
<?




$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)));
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'] == "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 ($link1 == "") { $link1 = "asc"; } // Nazwa torrenta
if ($link3 == "") { $link3 = "desc"; }
if ($link4 == "") { $link4 = "desc"; }
if ($link5 == "") { $link5 = "desc"; }// Wielko?? torrenta
if ($link6 == "") { $link6 = "desc"; }// Liczba userów którzy pobrali torrenta
if ($link7 == "") { $link7 = "desc"; }// Userzy wysy?aj?cy torrenta
if ($link8 == "") { $link8 = "desc"; }// Userzy pobieraj?cy torrenta
if ($link9 == "") { $link9 = "desc"; }// User który wstawi? torrenta
?>
<tr>
<td class="colhead" align="center">Kat.</td>
<td class="colhead" align="left"><a href="browse.php?<? print $oldlink; ?>sort=1&type=<? print $link1; ?>">Nazwa[/url]</td>


<td class="colhead" align="center">DL</td>
<td class="colhead" align="center"><img src="/pic/files.gif" border="0" align="center"></td>
<td class="colhead" align="right"><a href="browse.php?<? print $oldlink; ?>sort=3&type=<? print $link3; ?>"><img src="/pic/comments.gif" border="0" align="center">[/url]</td>
<td class="colhead" align="center">Dodano</td>


<td class="colhead" align="center"><a href="browse.php?<? print $oldlink; ?>sort=5&type=<? print $link5; ?>">Rozmiar[/url]</td>
<td class="colhead" align="center"><a href="browse.php?<? print $oldlink; ?>sort=6&type=<? print $link6; ?>">Pobra?</td>
<td class="colhead" align="right"><a href="browse.php?<? print $oldlink; ?>sort=7&type=<? print $link7; ?>"><img src="/pic/up.gif" border="0" align="center">[/url]</td>
<td class="colhead" align="right"><a href="browse.php?<? print $oldlink; ?>sort=8&type=<? print $link8; ?>"><img src="/pic/down.gif" border="0" align="center">[/url]</td>
<td class="colhead" align="center"><a href="browse.php?<? print $oldlink; ?>sort=9&type=<? print $link9; ?>">Dodał/a[/url]</td>


 </tr>
 <?
   while ($row = mysql_fetch_assoc($res)) {
        $id = $row["id"];
        print("<tr class=podswietl>\n");
      print("<td class=border align=\"center\" 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_base_url" . $row["cat_pic"] . "\" alt=\"" . $row["cat_name"] . "\" />");
            else
              print($row["cat_name"]);
            print("[/url]");
        }
        else
          print("-");
        print("</td>\n");


$uplreq = ($row["uplreq"]=="yes" ? "<img src='/pic/req.png' title='Torrent b?d?cy spe?nieniem czyjej? pro?by.' />" : "");
$double_lu = ($row["double_lu"]=="yes" ? "<font color=#4bbaf5>[x2]</font>" : "");
$nukee = ($row["nuke"]=="yes" ? "<img src='/pic/nuke.gif' title='Torrent ma b??dy.' />" : "");
$free = ($row["free"]=="yes" ? "<font color=#00ff00>[FL]</font>" : "");
 $podbity = ($row['setnew']=="yes" ? "<img src='pic/podbity.gif' title='Podbity' />" : ""); 




$poster=$row["poster"];
$des = mysql_real_escape_string(format_comment($row["descrbal"]));
$des = ereg_replace('"',"&quot;",$des);
$dispname = htmlspecialchars($row["name"]);

if (!empty($row['genre'])) {
$genre = "(" . htmlspecialchars($row["genre"]) . ")";
}

else {
$genre = "";
}



   
print("<td class=border valign=top align=\"left\">");
        if ($row["pl"] == "yes")
        print ("<img src='pic/PL_OB.gif' title='Torrent polski ' /> ");
        print ("<a href=\"details.php?");



   print("id=$id");

         // print("&amp;hit=1");
       if ($row['filename'])

     


     

         if (sql_timestamp_to_unix_timestamp($row["added"]) >= $last_browse)   {
               
       
print("\"onmouseover=\"return overlib('<table width=100%><tr><td><img src=$poster width=128 height=150></td><td>".CutName($des,460)."</td></tr></table>',  WIDTH, 400, DELAY, 200);\" onmouseout=\"return nd();\">
$dispname[/url]$uplreq $nukee $double_lu $free $podbity <img src='pic/nowy.png' title='Torrent nowy (wstawiony od ostatniej wizyty).'/><>[br /]" . gmdate("d.m.Y - H:i",((strtotime($row["added"]))+(7200))) . " (" . get_elapsed_time(sql_timestamp_to_unix_timestamp($row["added"])) . " temu)\n");
       
         }else{
           print("\"onmouseover=\"return overlib('<table width=100%><tr><td><img src=$poster width=128 height=150></td><td>".CutName($des,460)."</td></tr></table>',  WIDTH, 400, DELAY, 200);\" onmouseout=\"return nd();\">$dispname[/url]$uplreq $nukee $double_lu $free <>[br /]$genre\n");
        }



$DL = '<a href="download.php/' . $id . '/' . $row['filename'] . '"><img src=pic/download.png border=0 alt=Download title="Szybkie pobieranie torrenta.">[/url]';

print("<td class=border align=center>$DL</td>\n");

  print("<td class=border align=\"right\">" . $row["numfiles"] . "</td>\n");

        if (!$row["comments"])
           print("<td class=border align=\"right\">" . $row["comments"] . "</td>\n");
       else {
            if ($variant == "index")
                print("<td class=border align=\"right\"><a href=\"details.php?id=$id&amp;&amp;tocomm=1\">" . $row["comments"] . "[/url]</td>\n");
            else
                print("<td class=border align=\"right\"><a href=\"details.php?id=$id&amp;page=0#startcomments\">" . $row["comments"] . "[/url]</td>\n");
        }
            print("<td class=border align=\"center\"><nobr>" . str_replace(" ", "[br /]", $row["added"]) . "</nobr></td>\n");








 

        $_s = "";
        if ($row["times_completed"] != 1)
          $_s = "y";
       print("<td  class=border align=center>" . str_replace(" ", "", mksize($row["size"])) . "</td><td  class=border align=center><a href=viewsnatches.php?id=$row[id]>" .          number_format($row["times_completed"]) . " raz$_s[/url]</td>\n");
      if ($row["seeders"]) {
            if ($variant == "index")
           {
               if ($row["leechers"]) $ratio = $row["seeders"] / $row["leechers"]; else $ratio = 1;
                print("<td class=border align=right><a href=peery.php?id=$id><font color=" .
                 get_slr_color($ratio) . ">" . $row["seeders"] . "</font>[/url]</td>\n");
          }
          else
                print("<td class=border align=\"right\"><a class=\"" . linkcolor($row["seeders"]) . "\" href=\"peery.php?id=$id\">" .
                  $row["seeders"] . "[/url]</td>\n");
        }
       else
           print("<td class=border align=\"right\"><span class=\"" . linkcolor($row["seeders"]) . "\">" . $row["seeders"] . "</span></td>\n");
        if ($row["leechers"]) {
    if ($variant == "index")
     print("<td class=border align=right><a href=peery.php?id=$id>" .
          number_format($row["leechers"]) . ($peerlink ? "[/url]" : "") .
          "</td>\n");
            else
                print("<td class=border align=\"right\"><a class=\"" . linkcolor($row["leechers"]) . "\" href=\"peery.php?id=$id\">" .
                  $row["leechers"] . "[/url]</td>\n");
        }
        else
            print("<td class=border align=\"right\">0</td>\n");

       



 
     
      $row22 = sql_query("SELECT anonymous FROM users WHERE id = " . $row['owner']);
      $res22 = mysql_fetch_assoc($row22);




  if($res22["anonymous"] == "yes" AND get_user_class() < UC_MODERATOR AND $CURUSER["id"] != $row["owner"]){
   $row["owner"] = "";
   $row["username"] = "Anonimowy";
  }
  else
   $row["owner"] = "<a href=userdetails.php?id=" . $row["owner"] . ">";
  print("<td class=border align=center>" . (isset($row["username"]) ? ("" . $row["owner"] . "" . htmlspecialchars($row["username"])

. "[/url]") : "unknown") . "</td>\n");
 

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


    print("</table>\n");
    return $rows;




}



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;
}
« Ostatnia zmiana: Kwiecień 27, 2012, 03:29:15 wysłana przez kalwin »
Zapisane

Max

  • Super zaawansowany
  • ******
  • Reputacja 14
  • Offline Offline
  • Płeć: Mężczyzna
  • Wiadomości: 215
Odp: nowy wygląd browse
« Odpowiedź #8 dnia: Kwiecień 28, 2012, 11:12:32 »

jest ten sam błąd niedziała kalwin :(
Zapisane

WhiteTorr

  • Użytkownik
  • Reputacja 0
  • Offline Offline
  • Wiadomości: 8
Odp: nowy wygląd browse
« Odpowiedź #9 dnia: Kwiecień 28, 2012, 11:59:38 »

To daj swój plik.
Zapisane

Max

  • Super zaawansowany
  • ******
  • Reputacja 14
  • Offline Offline
  • Płeć: Mężczyzna
  • Wiadomości: 215
Odp: nowy wygląd browse
« Odpowiedź #10 dnia: Kwiecień 28, 2012, 12:51:14 »

prosze zapodaje ten plik :) to jest z czystym torrenttable bedziesz musial dac ten kod co na suporcie 
Zapisane

WhiteTorr

  • Użytkownik
  • Reputacja 0
  • Offline Offline
  • Wiadomości: 8
Odp: nowy wygląd browse
« Odpowiedź #11 dnia: Kwiecień 28, 2012, 03:33:21 »

Danielos, popraw ten kod.
Bo masz tam br'y z bbcode, url'e i inne.
I czemu nie htmlspecialchars tylko htmlspecialchars_decode ?

Zapisane

P2P

  • BTDEV Staff
  • Super zaawansowany
  • *****
  • Reputacja 45
  • Offline Offline
  • Płeć: Mężczyzna
  • Wiadomości: 471
Odp: nowy wygląd browse
« Odpowiedź #12 dnia: Kwiecień 28, 2012, 04:43:11 »

Zapisane
Brazylijscy naukowcy odkryli, że ludzie czytający posty i trzymający rękę na myszce mają niższe IQ

Już za późno nie zdejmujcie

WhiteTorr

  • Użytkownik
  • Reputacja 0
  • Offline Offline
  • Wiadomości: 8
Odp: nowy wygląd browse
« Odpowiedź #13 dnia: Kwiecień 28, 2012, 05:55:59 »

Serialnie P2P?
Się pytam dlaczego on tego używa a nie co to znaczy.
Zapisane

Max

  • Super zaawansowany
  • ******
  • Reputacja 14
  • Offline Offline
  • Płeć: Mężczyzna
  • Wiadomości: 215
Odp: nowy wygląd browse
« Odpowiedź #14 dnia: Kwiecień 28, 2012, 11:14:34 »

dobra sam se poradziłem problem jest w tym url  a twój kalwin kod niedziałą  ;)
« Ostatnia zmiana: Kwiecień 29, 2012, 12:35:45 wysłana przez Max »
Zapisane

kalwin

  • <? print(" ?>
  • VIP
  • Zaawansowany
  • *****
  • Reputacja 12
  • Offline Offline
  • Płeć: Mężczyzna
  • Wiadomości: 183
  • ReactionTorrent.net
Odp: nowy wygląd browse
« Odpowiedź #15 dnia: Kwiecień 29, 2012, 12:20:52 »

hmm a cos takiego... ?;/

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


    if ($CURUSER["class"] == UC_LEECHER)
  {
      $gigs = $CURUSER["uploaded"] / (1024*1024*1024);
      $ratio = (($CURUSER["downloaded"] > 0) ? ($CURUSER["uploaded"] / $CURUSER["downloaded"]) : 0);
      if ($ratio < 0.5 || $gigs < 5) $wait = 48;
      elseif ($ratio < 0.65 || $gigs < 6.5) $wait = 24;
      elseif ($ratio < 0.8 || $gigs < 8) $wait = 12;
      elseif ($ratio < 0.95 || $gigs < 9.5) $wait = 6;
      else $wait = 0;
  }
?>
<table width="800px" border='1'>
<?
if ($CURUSER["id"] == $row["owner"] || get_user_class() >= UC_MODERATOR)
$owned = 1;
else
$owned = 0;

    while ($row = mysql_fetch_assoc($res)) {
$row['seeders'] += $row['ext_seed'];
  $row['leechers'] += $row['ext_leech'];
        $id = htmlspecialchars(
$row["id"]);


        print("\n");
//balony
$poster = ($row['poster'] == '' ? '<img class="glossy" src=pic/poster.jpg" border="0" width="128" height="178" valign=top />' : '<img class="glossy" src="'.htmlspecialchars($row['poster']).'" border="0" width="128" height="178" valign=top/>');


if (get_user_class() > UC_UPLOADER) {
$uprow = (isset($row["username"]) ? ("<a href=userdetails.php?id=" . $row["owner"] . "><b>" . htmlspecialchars($row["username"]) . "</b></a>") : "<i>---</i>");
                    }
                    else
                    {
$uprow = (isset($row["username"]) && $CURUSER['anonymous'] == yes ? ("<a href=userdetails.php?id=" . $row["owner"] . "><b>" . htmlspecialchars($row["username"]) . "</b></a>") : "<i>---</i>");
    }

$pobierz= ("<a href=\"download.php/$id/[Reactiontorrent.net] " . $row["name"] . ".torrent\"\"><img src=pic/download1.gif></a>");


if ($row["ext_seed"]){
$seed=(isset($row["ext_seed"]) < 0 ? ("" . $row["ext_seed"] . "") : "<font color='green'><b>" . $row["ext_seed"] . "</b></font>");
}


                    else
                    {
$seed=(isset($row["ext_seed"]) > 1  ? ("" . $row["ext_seed"] . "") : "<font color='red'><b>---</b></font>");
}


if ($row["ext_leech"]){
$leechers=(isset($row["ext_leech"]) < 0 ? ("" . $row["ext_leech"] . "") : "<font color='red'><b>" . $row["ext_leech"] . "</b></font>");
}


                    else
                    {
$leechers=(isset($row["ext_leech"]) > 1  ? ("" . $row["ext_leech"] . "") : "<font color='green'><b>---</b></font>");
}
$smallname =substr(htmlspecialchars_decode($row["name"], ENT_NOQUOTES) , 0, 100);
if ($smallname != htmlspecialchars_decode($row["name"], ENT_NOQUOTES )) {
$smallname .= '...';
}
      $descr =substr(format_torrent(htmlspecialchars_decode($row[descr], ENT_NOQUOTES)) , 0, 1755);
if ($descr != format_torrent(htmlspecialchars_decode($row[descr], ENT_NOQUOTES))) {
$descr .="[...]<br><br>


»[<a href=\"details.php?id=$id\">Zobacz cały opis</a>] «";













        print("<h1><a href=\"details.php?");
        if ($variant == "mytorrents")
            print("returnto=" . urlencode($_SERVER["REQUEST_URI"]) . "&amp;");
        print("id=$id");
        if ($variant == "index")
            print("&amp;hit=1");
        print("\"><b><center>$smallname</a></center></b></a></h1>\n");
?>

<table width="800px" height="400px" class='tlodetails' cellspacing="0" cellpadding="10">




<!--<td class="heading" align=left>DL</td>-->




<?


   






print("<tr><td class=descr3 border=0 width=128 height=178 valign=top><center>$poster</center><br><br>
<b>Kategoria</b>: " . $row["cat_name"] . "
<br><b>Dodał</b>: $uprow
<br><b>Data dodania</b>:<br>". $row["added"] ."
    <br> <b>Rozmiar</b>:
                " . str_replace(" ", "", mksize($row["size"])) . "
                <br>
       
                <b>Seedów</b>: $seed
               
                <br>
                <b>Peerów</b>: $leechers
                </font><br><br>
<b>Komentarze: ". $row["comments"] ."</b>
                <br><br>$pobierz<br>");

if ($row["pl"] == "yes")
        print ("<img src='pic/pl.gif' /> ");
print ("</td>


<td class='descr'   valign=top>$descr</td>




</tr>
\n");




       print(" </table> <h2></h2>\n");
    }


    print("\n");


    return $rows;
}
function torrenttablep($res, $variant = "index") {
    global $pic_base_url, $CURUSER;


    if ($CURUSER["class"] == UC_LEECHER)
  {
      $gigs = $CURUSER["uploaded"] / (1024*1024*1024);
      $ratio = (($CURUSER["downloaded"] > 0) ? ($CURUSER["uploaded"] / $CURUSER["downloaded"]) : 0);
      if ($ratio < 0.5 || $gigs < 5) $wait = 48;
      elseif ($ratio < 0.65 || $gigs < 6.5) $wait = 24;
      elseif ($ratio < 0.8 || $gigs < 8) $wait = 12;
      elseif ($ratio < 0.95 || $gigs < 9.5) $wait = 6;
      else $wait = 0;
  }
?>
<table border="1" cellspacing=0 cellpadding=5>
<tr>


<td class="colhead" align="center">Kat.</td>
<td class="colhead" align=left>Nazwa</td>
<!--<td class="heading" align=left>DL</td>-->
<?
    if ($wait)
    {
        print("<td class=\"colhead\" align=\"center\">Czekasz</td>\n");
    }


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


?>
<td class="colhead" align=right>Pliki</td>
<td class="colhead" align=right>Koment.</td>
<!--<td class="colhead" align="center">Rating</td>-->
<td class="colhead" align="center">Dodano</td>
<td class="colhead" align="center">TTL</td>
<td class="colhead" align="center">Rozmiar</td>
<!--
<td class="colhead" align=right>Views</td>
<td class="colhead" align=right>Hits</td>
-->
<td class="colhead" align="center">Pobrano</td>
<td class="colhead" align=right>Seedów</td>
<td class="colhead" align=right>Leechów</td>
<?


    if ($variant == "index")
        print("<td class=\"colhead\" align=center>Dodał/a</td>\n");


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


    while ($row = mysql_fetch_assoc($res)) {
        $id = $row["id"];
        print("<tr>\n");


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


        $dispname = htmlspecialchars($row["name"]);
        print("<td align=left><a href=\"detailsp.php?");
        if ($variant == "mytorrents")
            print("returnto=" . urlencode($_SERVER["REQUEST_URI"]) . "&amp;");
        print("id=$id");
        if ($variant == "index")
            print("&amp;hit=1");
        print("\"><b>$dispname</b></a>\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><a href=\"/faq.php#dl8\"><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("<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");


        else */ if ($variant == "mytorrents")
            print("<td align=\"center\"><a href=\"editp.php?returnto=" . urlencode($_SERVER["REQUEST_URI"]) . "&amp;id=" . $row["id"] . "\">edytuj</a>\n");
print("</td>\n");
        if ($variant == "mytorrents") {
            print("<td align=\"right\">");
            if ($row["visible"] == "no")
                print("<font color=red>nie</font>");
            else
                print("tak");
            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=\"detailsp.php?id=$id&amp;hit=1&amp;filelist=1\">" . $row["numfiles"] . "</a></b></td>\n");
            else
                print("<td align=\"right\"><b><a href=\"detailsp.php?id=$id&amp;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=\"detailsp.php?id=$id&amp;hit=1&amp;tocomm=1\">" . $row["comments"] . "</a></b></td>\n");
            else
                print("<td align=\"right\"><b><a href=\"detailsp.php?id=$id&amp;page=0#startcomments\">" . $row["comments"] . "</a></b></td>\n");
        }


/*
        print("<td align=\"center\">");
        if (!isset($row["rating"]))
            print("---");
        else {
            $rating = round($row["rating"] * 2) / 2;
            $rating = ratingpic($row["rating"]);
            if (!isset($rating))
                print("---");
            else
                print($rating);
        }
        print("</td>\n");
*/
        print("<td align=center><nobr>" . str_replace(" ", "<br />", $row["added"]) . "</nobr></td>\n");
        $ttl = (28*24) - floor((gmtime() - sql_timestamp_to_unix_timestamp($row["added"])) / 3600);
        if ($ttl == 1) $ttl .= "<br>godzinę"; else $ttl .= "<br>godziny";
        print("<td align=center>$ttl</td>\n");
        print("<td align=center>" . str_replace(" ", "<br>", 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 = "y";
        print("<td align=center><a href=viewsnatches.php?id=$row[id]>" .          number_format($row["times_completed"]) . "<br>raz$_s</a></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=detailsp.php?id=$id&amp;hit=1&amp;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=\"detailsp.php?id=$id&amp;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&amp;hit=1&amp;todlers=1>" .
                   number_format($row["leechers"]) . ($peerlink ? "</a>" : "") .
                   "</b></td>\n");
            else
                print("<td align=\"right\"><b><a class=\"" . linkcolor($row["leechers"]) . "\" href=\"detailsp.php?id=$id&amp;dllist=1#leechers\">" .
                  $row["leechers"] . "</a></b></td>\n");
        }
        else
            print("<td align=\"right\">0</td>\n");


        if ($variant == "index")
            if($row["anonymous"] == "yes" AND get_user_class() < UC_MODERATOR AND $CURUSER["id"] != $row["owner"]){
   $row["owner"] = "";
   $row["username"] = "---";
  }
  else
   $row["owner"] = "<a href=userdetails.php?id=" . $row["owner"] . ">";
  print("<td align=center>" . (isset($row["username"]) ? ("" . $row["owner"] . "<b>" . htmlspecialchars($row["username"])


. "</b></a>") : "<i>unknown</i>") . "</td>\n");


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


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


    return $rows;}
Zapisane
 

Strona wygenerowana w 0.225 sekund z 22 zapytaniami.