View Single Post
  #98  
Old 6th January 2015, 21:37
eckeO5 eckeO5 is offline
Senior Member
 
Join Date: Jan 2011
P2P
Posts: 117
Talking ajaxtorrent1.php
Hello DAKz , lafouine022 and all others,
happy new 2015.

may be you or some1 can help.
question is about ajaxtorrent1.php an all its included phps.

f.e. in top_last.php i got working to see 22 torrents, each row 11 showing up.
looks like this
Click the image to open in full size.

Does ne1 know how to show f.e. 4 rows with exactly 44 torrents in all ???

top_last.php actual looks like this:
PHP Code:
<?php
require('global.php');
dbconn();

header("Content-Type: text/html; charset=iso-8859-1");


//Letzen XX torrents mit bild

define('ANZAHL_NEUESTE_TORRENTS'22);

 
//begin_frame("..:: Die ".ANZAHL_NEUESTE_TORRENTS." neusten Torrents ::..","true","100%");
  
$query="SELECT id, name, t_image, seeders, leechers, category, size, free, doubleupload, silver, offensive, times_completed FROM torrents WHERE t_image <> '' ORDER BY added DESC LIMIT 22";
    
$result=mysql_query($query);
    
$num mysql_num_rows($result);
// count rows
print'<scrollAmount=2 onMouseover="this.scrollAmount=0" onMouseout="this.scrollAmount=2" scrolldelay="0"

direction="left">'
;
print 
'<center><table border=0 cellspacing=0 cellpadding=5><tr>';
$i=20;
$count 11;
while (
$row mysql_fetch_assoc($result)) {

if (
$row['offensive'] == 'yes' && preg_match('#E0#is'$CURUSER['options']))

    {
    continue;
    }

 
$id $row['id'];
if((
$count == 22)) //Wieviel in einer Reihe?
print'</tr><tr><td>';
else
print
'<td>';
$res mysql_query("SELECT name FROM categories WHERE id=$row[category]");
$arr mysql_fetch_assoc($res);
$cat $arr["name"];

$free mysql_query("SELECT * FROM torrents WHERE free = 'yes'") or sqlerr();
if  (
$row[free]=="yes") {
$free="<b><font color=green> [OnlyUpload] </font></b>";
            }
else
{
$free="";
            }

$doubleupload mysql_query("SELECT * FROM torrents WHERE doubleupload = 'yes'") or sqlerr();
if  (
$row[doubleupload]=="yes") {
$doubleupload="<b><font color=yellow> [DoubleUpload] </font></b>";
            }
else
{
$doubleupload="";
            }

$silver mysql_query("SELECT * FROM torrents WHERE silver = 'yes'") or sqlerr();
if  (
$row[silver]=="yes") {
$silver="<b><font color=yellow> [fifty-fifty] </font></b>";
            }
else
{
$silver="";
            }

$size mksize($row["size"]);
$res=mysql_query("SELECT * FROM peers WHERE torrent=$id AND seeder = 'yes'") or sqlerr();
$seeder=mysql_num_rows($res);
$res=mysql_query("SELECT * FROM peers WHERE torrent=$id AND seeder != 'yes'") or sqlerr();
$leecher=mysql_num_rows($res);
$t_image $row['t_image'];
$name $row['name'];
$name str_replace('_'' ' $name);
$name str_replace('.'' ' $name);
$name substr($name0100);
print(
"<a href=\"/details.php?id=$id&hit=1\" onMouseover=\"overlib('<table cellpadding=4 cellspacing=1 width=100% height=80><tr><td class=tablea align=center ><b><font color=white>$name</font></b><br><br><font color=yellow><b>Typ:&nbsp;$cat</font><br><br><font color=lime><b>$seeder&nbsp;Seeder</font><br><font color=red>$leecher&nbsp;Leecher</font><br><br><font color=white>Größe:&nbsp;$size</font><br><font color=white>$row[times_completed] x Runtergeladen</font><br><font color=red>$free<font color=red>$doubleupload<font color=red>$silver</font></td></tr></table>','darkorange')\"
 onMouseout=\"nd()\"><img src=
$t_image width=\"82\" height=\"100\" border=1></a><br><b>$seeder&nbsp;:&nbsp;<font color=green>Seeder</font><br>$leecher&nbsp;:&nbsp;<font color=red>Leecher</font></b>");
 
$i++;
$count++;
}
print
'</td>';
echo 
"</center></table></marquee>";


?>
Would be so glad if some1 can help.

Ahny to all of you.

eckeo5
Reply With Quote