without marquee
Code:
OpenTable("Latest 5 Uploads");
$news = mysql_query("SELECT id, name, added, seeders, leechers, post_img FROM ".$db_prefix."_torrents WHERE banned = 'no' AND visible='yes' ORDER BY added DESC LIMIT 5")or sqlerr(__FILE__, __LINE__);
if (mysql_num_rows($news) > 0) {
print("<table align=center cellpadding=0 cellspacing=0 width=100% border=0>");
while ($row2 = mysql_fetch_array($news)) {
$tor = $row2['0'];
$altname = $row2['1'];
$orderby = "ORDER BY ".$db_prefix."_torrents.added DESC"; //Order
$where = "WHERE banned = 'no' AND visible='yes' AND ".$db_prefix."_torrents.id='$tor'";
$res = mysql_query("SELECT ".$db_prefix."_torrents.id, ".$db_prefix."_torrents.seeders, ".$db_prefix."_torrents.leechers, ".$db_prefix."_torrents.post_img, ".$db_prefix."_torrents.screen1, ".$db_prefix."_torrents.screen2, ".$db_prefix."_torrents.screen3, ".$db_prefix."_torrents.screen4, ".$db_prefix."_torrents.added, ".$db_prefix."_torrents.comments,".$db_prefix."_categories.name AS cat_name FROM ".$db_prefix."_torrents LEFT JOIN ".$db_prefix."_categories ON ".$db_prefix."_torrents.category = ".$db_prefix."_categories.id $where $orderby")or sqlerr(__FILE__, __LINE__);
$row = mysql_fetch_array($res);
$cat = $row['cat_name'];
$seed =$row['seeders'];
$comments =$row['comments'];
$leech =$row['leechers'];
$simg1 = $row['screen1'];
$simg2 = $row['screen2'];
$simg3 = $row['screen3'];
$simg4 = $row['screen4'];
$img1 = "<a href='$siteurl/details.php?id=$row[id]'><img border='0' src='$row[post_img]' alt=\"$altname / $cat\" width='130'></a><br><font color=\"green\"><b>Seeds</font> $seed</b> <font color=\"red\"><b>Leech</font> $leech </b><br><b>Comments: <a href=\"details.php?id=".$row["id"].$hit."\">" . $row["comments"] . "</a></b>";
$img2 = "<a href='$siteurl/details.php?id=$row[id]'><img border='0' src='$row[post_img]' alt=\"$altname / $cat\" width='130' ></a><br><font color=\"green\"><b>Seeds</font> $seed</b> <font color=\"red\"><b>Leech</font> $leech </b><br><b>Comments: <a href=\"details.php?id=".$row["id"].$hit."\">" . $row["comments"] . "</a></b>";
if ($row["post_img"] != ""){
if ($row["screen1"]!=''){
print("<td style=\"text-align: center;\">". $img1 ." <BR>\n</td>\n");
}else{
print("<td style=\"text-align: center;\">". $img2 ." <BR>\n</td>\n");
}
}
}
print("</tr></table>");
//}
?>
</div>
</div>
<?php
}
CloseTable();
with marquee
Code:
OpenTable("Latest Posters");
?>
<style type="text/css">
#marqueecontainer{
position: relative;
width: 180px; /*marquee width */
height: 800px; /*marquee height */
overflow: hidden;
padding: 2px;
padding-left: 4px;
}
</style>
<script type="text/javascript">
/***********************************************
* Cross browser Marquee II- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for this script and 100s more.
***********************************************/
var delayb4scroll=1000 //Specify initial delay before marquee starts to scroll on page (2000=2 seconds)
var marqueespeed=1 //Specify marquee scroll speed (larger is faster 1-10)
var pauseit=0 //Pause marquee onMousever (0=no. 1=yes)?
////NO NEED TO EDIT BELOW THIS LINE////////////
var copyspeed=marqueespeed
var pausespeed=(pauseit==0)? copyspeed: 0
var actualheight=''
function scrollmarquee(){
if (parseInt(cross_marquee.style.top)>(actualheight*(-1)+8))
cross_marquee.style.top=parseInt(cross_marquee.style.top)-copyspeed+"px"
else
cross_marquee.style.top=parseInt(marqueeheight)+8+"px"
}
function initializemarquee(){
cross_marquee=document.getElementById("vmarquee")
cross_marquee.style.top=0
marqueeheight=document.getElementById("marqueecontainer").offsetHeight
actualheight=cross_marquee.offsetHeight
if (window.opera || navigator.userAgent.indexOf("Netscape/7")!=-1){ //if Opera or Netscape 7x, add scrollbars to scroll and exit
cross_marquee.style.height=marqueeheight+"px"
cross_marquee.style.overflow="scroll"
return
}
setTimeout('lefttime=setInterval("scrollmarquee()",30)', delayb4scroll)
}
if (window.addEventListener)
window.addEventListener("load", initializemarquee, false)
else if (window.attachEvent)
window.attachEvent("onload", initializemarquee)
else if (document.getElementById)
window.onload=initializemarquee
</script>
<div id="marqueecontainer" onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=marqueespeed">
<div id="vmarquee" style="position: absolute; width: 98%;">
<!--YOUR SCROLL CONTENT HERE-->
<?php
$news = mysql_query("SELECT id, name, added, post_img FROM ".$db_prefix."_torrents WHERE banned = 'no' AND visible='yes' ORDER BY added DESC")or sqlerr(__FILE__, __LINE__);
if (mysql_num_rows($news) > 0) {
print("<table align=center cellpadding=0 cellspacing=0 width=100% border=0>");
while ($row2 = mysql_fetch_array($news)) {
$tor = $row2['0'];
$altname = $row2['1'];
//$date_time=get_date_time(time()-(3600*168)); // the 24 is the hours you want listed change by whatever you want
$orderby = "ORDER BY ".$db_prefix."_torrents.added ASC"; //Order
$where = "WHERE banned = 'no' AND visible='yes' AND ".$db_prefix."_torrents.id='$tor'";
$res = mysql_query("SELECT ".$db_prefix."_torrents.id, ".$db_prefix."_torrents.seeders, ".$db_prefix."_torrents.leechers, ".$db_prefix."_torrents.post_img, ".$db_prefix."_torrents.screen1, ".$db_prefix."_torrents.screen2, ".$db_prefix."_torrents.screen3, ".$db_prefix."_torrents.screen4, ".$db_prefix."_torrents.added, ".$db_prefix."_torrents.comments,".$db_prefix."_categories.name AS cat_name FROM ".$db_prefix."_torrents LEFT JOIN ".$db_prefix."_categories ON ".$db_prefix."_torrents.category = ".$db_prefix."_categories.id $where $orderby")or sqlerr(__FILE__, __LINE__);
$row = mysql_fetch_array($res);
$cat = $row['cat_name'];
$seed =$row['seeders'];
$comments =$row['comments'];
$leech =$row['leechers'];
$added =$row['added'];
/*$simg1 = $row['screen1'];
$simg2 = $row['screen2'];
$simg3 = $row['screen3'];
$simg4 = $row['screen4'];*/
$img1 = "<b>".$row["added"]."</b><br><a href='$siteurl/details.php?id=$row[id]'><img border='0' src='$row[post_img]' alt=\"$altname / $cat\" height='200' width='160' ></a><br><font color=\"green\"><b>Seeds</font> $seed</b> <font color=\"red\"><b>Leech</font> $leech </b><br><b>Comments: <a href=\"details.php?id=".$row["id"].$hit."\">" . $row["comments"] . "</a></b><br>";
$img2 = "<b>".$row["added"]."</b><br><a href='$siteurl/details.php?id=$row[id]'><img border='0' src='$row[post_img]' alt=\"$altname / $cat\" height='200' width='160' ></a><br><font color=\"green\"><b>Seeds</font> $seed</b> <font color=\"red\"><b>Leech</font> $leech </b><br><b>Comments: <a href=\"details.php?id=".$row["id"].$hit."\">" . $row["comments"] . "</a></b><br>";
if ($row["post_img"] != ""){
if ($row["screen1"]!=''){
print("<tr><td align=center>". $img1 ."<BR></td></tr>");
}else{
print("<tr><td align=center>". $img2 ."<BR></td></tr>");
}
}
}
print("</table>");
//}
echo'</div>';
echo'</div>';
}
CloseTable();