Giorgatzelos |
23rd July 2013 02:36 |
/blocks/latestimages_block.php
this is my current latestimages_block.php modded file
PHP Code:
<?php
if (!defined('IN_PMBT')) die ("You can't access this file directly");
OpenTable("Τελευταίες Προσθήκες:");
$news = $db->sql_query("SELECT id, name, added, post_img FROM ".$db_prefix."_torrents WHERE banned = 'no' AND visible='yes' ORDER BY ".$db_prefix."_torrents.id DESC LIMIT 5")or sqlerr(__FILE__, __LINE__);
if ($db->sql_numrows($news) > 0) {
print("<marquee scrollamount=\"3\" onmouseover=\"this.scrollAmount=0\" onmouseout=\"this.scrollAmount=3\" scrolldelay=\"0\" direction=\"left\"><table align=center cellpadding=0 cellspacing=0 width=100% border=0>\n<tr>\n");
while ($row2 = $db->sql_fetchrow($news)) { $tor = $row2['0'];
$altname = $row2['1']; $orderby = "ORDER BY ".$db_prefix."_torrents.id DESC"; //Order $limit = "LIMIT 5"; //Limit $where = "WHERE banned = 'no' AND visible='yes' AND ".$db_prefix."_torrents.id='$tor'"; $res = $db->sql_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 $limit")or sqlerr(__FILE__, __LINE__); $row = $db->sql_fetchrow($res); $cat = $row['cat_name']; $seed =$row['seeders']; $comments =$row['comments']; $leech =$row['leechers']; $dispname = htmlspecialchars($row2["name"]); $dispname = str_replace("_", " ", $dispname); $dispname = str_replace(".", " ", $dispname);
$simg1 = $row['screen1']; $simg2 = $row['screen2']; $simg3 = $row['screen3']; $simg4 = $row['screen4']; $show2 = ($simg2 != '')? ($simg2 != 'NULL')?"<td><img src=$simg2 height='160' width=250 border=0></td>" : '' : '' ; $show3 = ($simg3 != '')? ($simg3 != 'NULL')?"<td><img src=$simg3 height='160' width=250 border=0></td>" : '' : '' ; $show4 = ($simg4 != '')? ($simg4 != 'NULL')?"<td><img src=$simg4 height='160' width=250 border=0></td>" : '' : '' ;
$img1 = "<b><font color=#2f74b3>" . $dispname . "</color></b><b><font color=white>".$row["added"]."</color></b><a href='$siteurl/details.php?id=$row[id]'><img border='0' src='$row[post_img]' alt=\"$altname / $cat\" height='115' width='170' onmouseover=\" return overlib('<center><h1><b>Στιγμιότυπα:</b></h1></center><hr><table width=100%><tr><td><img src=$simg1 width=250 border=0></td><td><img src=$simg2 width=250 border=0></td><td><img src=$simg3 width=250 border=0></td><td><img src=$simg4 width=250 border=0></td></tr></table>', CENTER, HEIGHT, 195, WIDTH, 300, FGCOLOR, '#313131', BGCOLOR, '#313131');\" onmouseout=\"return nd();\"></a><font color=\"green\"><b>Τροφοδότες $seed </font></b> <font color=\"red\"><b>Αποδέκτες $leech </font></b><b><font color=#2f74b3>Σχόλια: <a href=\"details.php?id=".$row["id"].$hit."\">" . $row["comments"] . "</a></b>"; $img2 = "<b><font color=#2f74b3>" . $dispname . "</color></b><b><font color=white>".$row["added"]."</color></b><a href='$siteurl/details.php?id=$row[id]'><img border='0' src='$row[post_img]' alt=\"$altname / $cat\" height='115' width='170' onmouseover=\" return overlib('<center><h1><b>Στιγμιότυπα:</b></h1></center><hr><table width=100%><tr><td><center><font color=#2f74b3 size=4><b>Sorry no screens available</b></font></center></td></tr></table>', CENTER, HEIGHT, 195, WIDTH, 300, FGCOLOR, '#313131', BGCOLOR, '#313131');\" onmouseout=\"return nd();\"></a><font color=\"green\"><b>Τροφοδότες $seed </font></b> <font color=\"red\"><b>Αποδέκτες $leech </font></b><b><font color=#2f74b3>Σχόλια: <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></marquee>"); } CloseTable(); ?>
and i want this:
PHP Code:
$img1 = "<b><font color=#2f74b3>" . $dispname . "</color></b><b><font color=white>".$row["added"]."</color></b><a href='$siteurl/details.php?id=$row[id]'><img border='0' src='$row[post_img]' alt=\"$altname / $cat\" height='115' width='170' onmouseover=\" return overlib('<center><h1><b>Στιγμιότυπα:</b></h1></center><hr><table width=100%><tr><td><img src=$simg1 width=250 border=0></td><td><img src=$simg2 width=250 border=0></td><td><img src=$simg3 width=250 border=0></td><td><img src=$simg4 width=250 border=0></td></tr></table>', CENTER, HEIGHT, 195, WIDTH, 300, FGCOLOR, '#313131', BGCOLOR, '#313131');\" onmouseout=\"return nd();\"></a><font color=\"green\"><b>Τροφοδότες $seed </font></b> <font color=\"red\"><b>Αποδέκτες $leech </font></b><b><font color=#2f74b3>Σχόλια: <a href=\"details.php?id=".$row["id"].$hit."\">" . $row["comments"] . "</a></b>"; $img2 = "<b><font color=#2f74b3>" . $dispname . "</color></b><b><font color=white>".$row["added"]."</color></b><a href='$siteurl/details.php?id=$row[id]'><img border='0' src='$row[post_img]' alt=\"$altname / $cat\" height='115' width='170' onmouseover=\" return overlib('<center><h1><b>Στιγμιότυπα:</b></h1></center><hr><table width=100%><tr><td><center><font color=#2f74b3 size=4><b>Sorry no screens available</b></font></center></td></tr></table>', CENTER, HEIGHT, 195, WIDTH, 300, FGCOLOR, '#313131', BGCOLOR, '#313131');\" onmouseout=\"return nd();\"></a><font color=\"green\"><b>Τροφοδότες $seed </font></b> <font color=\"red\"><b>Αποδέκτες $leech </font></b><b><font color=#2f74b3>Σχόλια: <a href=\"details.php?id=".$row["id"].$hit."\">" . $row["comments"] . "</a></b>";
to look like this:
PHP Code:
if($theme == 'archeCtypo_Original') {
$img1 = "<b><font color=#2f74b3>" . $dispname . "</color></b><b><font color=white>".$row["added"]."</color></b><a href='$siteurl/details.php?id=$row[id]'><img border='0' src='$row[post_img]' alt=\"$altname / $cat\" height='115' width='170' onmouseover=\" return overlib('<center><h1><b>Στιγμιότυπα:</b></h1></center><hr><table width=100%><tr><td><img src=$simg1 width=250 border=0></td><td><img src=$simg2 width=250 border=0></td><td><img src=$simg3 width=250 border=0></td><td><img src=$simg4 width=250 border=0></td></tr></table>', CENTER, HEIGHT, 195, WIDTH, 300, FGCOLOR, '#313131', BGCOLOR, '#313131');\" onmouseout=\"return nd();\"></a><font color=\"green\"><b>Τροφοδότες $seed </font></b> <font color=\"red\"><b>Αποδέκτες $leech </font></b><b><font color=#2f74b3>Σχόλια: <a href=\"details.php?id=".$row["id"].$hit."\">" . $row["comments"] . "</a></b>"; $img2 = "<b><font color=#2f74b3>" . $dispname . "</color></b><b><font color=white>".$row["added"]."</color></b><a href='$siteurl/details.php?id=$row[id]'><img border='0' src='$row[post_img]' alt=\"$altname / $cat\" height='115' width='170' onmouseover=\" return overlib('<center><h1><b>Στιγμιότυπα:</b></h1></center><hr><table width=100%><tr><td><center><font color=#2f74b3 size=4><b>Sorry no screens available</b></font></center></td></tr></table>', CENTER, HEIGHT, 195, WIDTH, 300, FGCOLOR, '#313131', BGCOLOR, '#313131');\" onmouseout=\"return nd();\"></a><font color=\"green\"><b>Τροφοδότες $seed </font></b> <font color=\"red\"><b>Αποδέκτες $leech </font></b><b><font color=#2f74b3>Σχόλια: <a href=\"details.php?id=".$row["id"].$hit."\">" . $row["comments"] . "</a></b>";
} if ($theme == '2'){ ... } if ($theme == '3')... if ($theme == '4')...
basically, i only want to load the same line for each theme but with changed FGCOLOR...so that i make it "color-fit" with every theme i use!...
|