All pastes #637180 Raw Edit

Someone

public text v1 · immutable
#637180 ·published 2007-07-28 17:10 UTC
rendered paste body
<?php
					require("include/connect.php");
					$result = mysql_query("SELECT * FROM `articles` ORDER BY `id` DESC LIMIT 3") or die(mysql_error());
					$i=0;
					while($row=mysql_fetch_array($result))
						{
						$id = $row['id'];
						$txt=LimitText($row['inter'], 30);
						$inter=nl2br($txt);
						$main=$row['main'];
						$editor=$row['editor'];
						$date=$row['date'];
						if ($row['picture'] == '') { $article_logo = "images/noimage.gif";}
						else { $article_logo = $row['picture']; }
						if (preg_match('/[א-ת]/',$row['articlename'])) { $dir = 'rtl'; $align=right;} else { $dir = 'ltr'; $align=left;}


							if($main == "1" && $pa=="y") {echo"

<td width=379 height=156 bgcolor=\"#2c2c2c\" valign=middle align=right rowspan=3 style=\"padding-right: 5px;\">
			<table align=right dir=rtl width=378 border=1 valign=middle>
				<tr>
				<td align=center valign=bottom rowspan=4>
				<div style=\"background-color: #404040; height: 145; width: 140; align: center; valign: bottom;\">
				<a href=\"?page=article&id={$row['id']}\">
				<img src=\"" . $article_logo . "\" width=\"130\" height=\"140\" align=\"center\" border=\"0%\">
				</a>
				</div>
				</td>
				<td align=$align valign=top class=title  width=100% height=12 dir=$dir>
				&nbsp;<a href=\"?page=article&id={$row['id']}\">
					<u>{$row['articlename']}</u>
				             </a>&nbsp;&nbsp;({$row['genre']})
				</td>
				</tr>
				<tr>
				<td align=right valign=top class=regular height=65 width=100% style=padding-right: 3;>
				<a href=\"?page=article&id={$row['id']}\">$inter</a>
				</td>
				</tr>
				<tr>
				<td colspan=2 align=right style=padding-right: 3; class=regular valign=top height=10>
					<font class=title>פורסם ע\"י:</font> $editor</td>
				</tr>
				<tr>
				<td colspan=2 align=right style=\"padding-right: 3;\" class=regular valign=top>
					<font class=title>בתאריך:</font> $date</td>
				</tr>
				</table>";}?> 
						</td><td width=4 rowspan=3></td>

<? if($main == "0") {
echo"
<td width=18 height=77 bgcolor=\"#1b1b1b\" background=images/side_article.gif style=\"background-repeat: no-repeat;\" align=right></td>
				<td align=right width=362 height=77 bgcolor=\"#2c2c2c\">
				<div align=center style=\"background-color: #404040; height: 67; width: 69;\">
				<a href=\"?page=article&id={$row['id']}\">
				<img src=\"" . $article_logo . "\" width=\"60\" height=\"60\" align=\"center\" border=\"0%\">
				</a></td>";
			    } 
				$pa="y"; $i++;}?>
				</tr>
					
				<tr><td height=2></td></tr>

				
				</table>