View Single Post
  #1  
Old 11th July 2008, 03:52
nako75018 nako75018 is offline
Senior Member
 
Join Date: Jan 2008
Posts: 15
Default TS v1.3.9 by Xam Last 10 Torrents
hello i want make like torrentsstrike x-fusion for last torrent but i don't know what i do in my database beacause when a make this code i have one errer help me

Code:
<?begin_frame("Last 10 Torrents",true,5);?>
<?
    //Start of Last X torrents with poster and marquee mod
    $query="SELECT id, name, poster FROM torrents WHERE poster <> '' ORDER BY added DESC LIMIT 10";
    $result=mysql_query($query);$num = mysql_num_rows($result);
    print("<marquee scrollAmount=3 onMouseover=this.scrollAmount=0 onMouseout=this.scrollAmount=3 scrolldelay=0 direction=left>");
    while ($row = mysql_fetch_assoc($result))  {
    $id = $row['id'];
    $name = $row['name'];
    $poster = $row['poster'];
    $name = str_replace('_', ' ' , $name);
    $name = str_replace('.', ' ' , $name);
    $name = substr($name, 0, 50);
    print("<img src=$poster width=100 height=142 title=$name border=0>");
    }
    print("</marquee></tr>");
    //End of Last X torrents with poster and marquee mod

?>
Reply With Quote