+ Odpowiedz na ten temat
Pokaż wyniki od 1 do 3 z 3

Temat: Dzisiaj uploadowano torrenty

  1. #1
    V.I.P Avatar HERKULES
    Grupa
    V.I.P
    Dołączył
    24-01-06
    Postów
    1,672
    » Panel Piwny
    Piwo (Postawione)
    0
    Piwo (Otrzymane)
    21
    » Reputacja
    Punkty:     0
    Siła:          8

    Dzisiaj uploadowano torrenty

    Mod pokazuje jakie torrenty w dzisiejszym dniu uploadowano.

    Utwórz plik dzis.php i wklej ten kod:

    Kod:
    <?
    require_once&#40;"include/bittorrent.php"&#41;;
    dbconn&#40;false&#41;;
    loggedinorreturn&#40;&#41;;
    stdhead&#40;&#41;;
    
    
    $orderby = "ORDER BY torrents.id DESC";
    
    $date_time=get_date_time&#40;time&#40;&#41;-&#40;3600*48&#41;&#41;; // the 72 is the hours you want listed
    $result= mysql_query&#40;"SELECT id FROM categories"&#41;;
    $catcount=1;
    $noofcats=mysql_num_rows&#40;$result&#41;;
    while&#40;$catcount <> $noofcats and $_GET&#91;"cat"&#93; == 0&#41; &#123;
    $result= mysql_query&#40;"SELECT * FROM torrents where category ='$catcount' AND visible = 'yes' AND added>='$date_time'"&#41;;
    $nooftor=mysql_num_rows&#40;$result&#41;;
    $result= mysql_query&#40;"SELECT name FROM categories where id=$catcount"&#41;;
    $temp=mysql_fetch_assoc&#40;$result&#41;;
    $catname=$temp&#91;"name"&#93;;
    if &#40;$nooftor <> 0&#41; &#123;
    begin_frame&#40;"$catname", center&#41;;
    $dead=1;
    if &#40;$_GET&#91;"incldead"&#93; == 1&#41; &#123;
    $addparam .= "incldead=1&";
    if &#40;!isset&#40;$CURUSER&#41; || get_user_class < UC_ADMINISTRATOR&#41;
    $wherea&#91;&#93; = "banned != 'yes'";
    &#125;
    else
    if &#40;$_GET&#91;"incldead"&#93; == 2&#41;
    $wherea&#91;&#93; = "seeders = '0'";
    else
    $wherea&#91;&#93; = "seeders >= '1'";
    $where = "WHERE seeders >= '1' AND category = '$catcount'";
    $query = "SELECT torrents.id, torrents.category, torrents.leechers, torrents.seeders, torrents.name, torrents.times_completed, torrents.size, torrents.added, torrents.comments,torrents.numfiles,torrents.filename,torrents.nfo,torrents.owner,IF&#40;torrents.nfo <> '', 1, 0&#41; as nfoav," .
    "IF&#40;torrents.numratings < $minvotes, NULL, ROUND&#40;torrents.ratingsum / torrents.numratings, 1&#41;&#41; AS rating, categories.name AS cat_name, categories.image AS cat_pic, users.username FROM torrents LEFT JOIN categories ON category = categories.id LEFT JOIN users ON torrents.owner = users.id $where AND torrents.added>='$date_time' $orderby $limit";
    $res = mysql_query&#40;$query&#41;
    or die&#40;mysql_error&#40;&#41;&#41;;
    
    if &#40;$CURUSER != ""&#41;&#123;
    if &#40;$nooftor&#41; &#123;
    list&#40;$pagertop, $pagerbottom, $limit&#41; = pager&#40;1000, $count, "index.php?" . $addparam&#41;;
    echo '
    ';
    torrenttable&#40;$res&#41;;
    echo '
    ';
    &#125;
    if &#40;!$nooftor&#41;&#123;
    begin_frame&#40;"Nie znaleziono!"&#41;;
    echo"
    
    Nie uploadowano dzisiaj torrentów!
    
    ";
    end_frame&#40;&#41;;
    &#125;
    &#125;
    else
    bark2&#40;"Musisz być zalogowany, aby oglądać najnowsze torrenty!", "Zarejetruj sie, i zaloguj się, aby je obejrzeć!"&#41;;
    
    end_frame&#40;&#41;;
    &#125;
    $catcount=$catcount+1;
    &#125;
    stdfoot&#40;&#41;;
    ?>

  2. #2
    User Avatar hammond1
    Grupa
    Użytkownik
    Dołączył
    17-07-09
    Wiek
    39
    Postów
    25
    » Panel Piwny
    Piwo (Postawione)
    0
    Piwo (Otrzymane)
    0
    » Reputacja
    Punkty:     0
    Siła:          3
    Działa to ale nie do końca nie pokazuje wszystkich kategori np. filmy/xvid jakieś pomysły czemu tak jest.

  3. #3
    Zablokowany Avatar P2PST
    Grupa
    Zablokowany
    Dołączył
    29-03-10
    Wiek
    28
    Postów
    1
    » Panel Piwny
    Piwo (Postawione)
    0
    Piwo (Otrzymane)
    0
    » Reputacja
    Punkty:     0
    Siła:          0
    masz tutaj ten kod bo cos krzaczki były w powyższym poscie jka dałem:

    Kod:
    <?
    require_once("include/bittorrent.php");
    dbconn(false);
    loggedinorreturn();
    stdhead("Dzisiaj wstawione torrenty");
    
    
    $orderby = "ORDER BY torrents.id DESC";
    
    $date_time=get_date_time(time()-(3600*24)); // the 72 is the hours you want listed
    $id_result= mysql_query("SELECT id FROM categories");
    $noofcats=mysql_num_rows($id_result);
    while ( $cat_array = mysql_fetch_array($id_result, MYSQL_ASSOC) and $_GET["cat"] == 0) {
    $id_array = $cat_array["id"];
    $result= mysql_query("SELECT * FROM torrents where category ='$id_array' AND visible = 'yes' AND added>='$date_time'");
    $nooftor=mysql_num_rows($result);
    $result= mysql_query("SELECT name FROM categories where id='$id_array'");
    $temp=mysql_fetch_assoc($result);
    $catname=$temp["name"];
    if ($nooftor <> 0) {
    begin_frame("$catname", center);
    $dead=1;
    if ($_GET["incldead"] == 1) {
    $addparam .= "incldead=1&";
    if (!isset($CURUSER) || get_user_class < UC_ADMINISTRATOR)
    $wherea[] = "banned != 'yes'";
    **
    else
    if ($_GET["incldead"] == 2)
    $wherea[] = "seeders = '0'";
    else
    $wherea[] = "seeders >= '1'";
    $where = "WHERE seeders >= '0' AND category = '$id_array'";
    $query = "SELECT torrents.id, torrents.category, torrents.leechers, torrents.seeders, torrents.name, torrents.times_completed, torrents.size, torrents.added, torrents.comments,torrents.numfiles,torrents.filename,torrents.nfo,torrents.owner,IF(torrents.nfo <> '', 1, 0) as nfoav," .
    "IF(torrents.numratings < $minvotes, NULL, ROUND(torrents.ratingsum / torrents.numratings, 1)) AS rating, categories.name AS cat_name, categories.image AS cat_pic, users.username, users.anonymous FROM torrents LEFT JOIN categories ON category = categories.id LEFT JOIN users ON torrents.owner = users.id $where AND torrents.added>='$date_time' $orderby $limit";
    $res = mysql_query($query)
    or die(mysql_error());
    
    if ($CURUSER != ""){
    if ($nooftor) {
    list($pagertop, $pagerbottom, $limit) = pager(1000, $count, "index.php?" . $addparam);
    echo '<br>';
    torrenttable($res);
    echo '<br>';
    **
    if (!$nooftor){
    begin_frame("Nie znaleziono!");
    echo"<BR><BR>Nie uploadowano dzisiaj torrentów!<BR><BR>";
    end_frame();
    **
    **
    else
    bark2("Musisz być zalogowany, aby ogl&#177;dać najnowsze torrenty!", "Zarejetruj sie, i zaloguj się, aby je obejrzeć!");
    
    end_frame();
    **
    $catcount=$catcount+1;
    **
    stdfoot();
    ?>
    zamist tego ** wstaw klamerke czyli zamkniecie i otwarcie
    Ostatnio edytowane przez roberto1972 ; 09-04-10 o 09:24

+ Odpowiedz na ten temat

Informacje o Temacie

Users Browsing this Thread

Aktualnie 1 użytkownik(ów) przegląda ten temat. (0 zarejestrowany(ch) oraz 1 gości)

     

Podobne wątki

  1. Od dzisiaj tylko jeden...
    przez nonckiewicz w forum Centrum Dyskusyjne
    Odpowiedzi: 51
    Ostatni post: 24-07-11, 14:51
  2. Jak za darmo pobierać torrenty z Torrenty.org
    przez mytorrents w forum Centrum Dyskusyjne
    Odpowiedzi: 26
    Ostatni post: 03-04-09, 14:20
  3. Dzisiaj Wszystkich Swietych
    przez edek508 w forum Dyskusje
    Odpowiedzi: 11
    Ostatni post: 01-11-08, 13:58
  4. Powrót SuprNov'ej dzisiaj
    przez mariozab7 w forum Wiadomości P2P
    Odpowiedzi: 6
    Ostatni post: 23-08-07, 19:54

Bookmarks

Uprawnienia

  • Nie możesz zakładać nowych tematów
  • Nie możesz pisać wiadomości
  • Nie możesz dodawać załączników
  • Nie możesz edytować swoich postów