preg_match_all('/\[img=right\](.*?)\[\/img\]/i', $tText['post_text'], $tPaImg, PREG_SET_ORDER);
preg_match_all('/\[img=left\](.*?)\[\/img\]/i', $tText['post_text'], $tPaImg2, PREG_SET_ORDER);
preg_match_all('/\[img\](.*?)\[\/img\]/i', $tText['post_text'], $tPaImg3, PREG_SET_ORDER);
$url = '';
if (@$tPaImg[0][1])
{
$url = $tPaImg[0][1];
}
elseif (@$tPaImg2[0][1])
{
$url = $tPaImg2[0][1];
}
elseif (@$tPaImg3[0][1])
{
$url = $tPaImg3[0][1];
}
preg_match_all('/\[img=right\](.*?)\[\/img\]/i', $tText['post_text'], $tPaImg, PREG_SET_ORDER);
preg_match_all('/\[img=left\](.*?)\[\/img\]/i', $tText['post_text'], $tPaImg2, PREG_SET_ORDER);
preg_match_all('/\[img\](.*?)\[\/img\]/i', $tText['post_text'], $tPaImg3, PREG_SET_ORDER);
preg_match_all('/\[poster\](.*?)\[\/poster\]/i', $tText['post_text'], $tPaImg4, PREG_SET_ORDER);
$url = '';
if (@$tPaImg[0][1])
{
$url = $tPaImg[0][1];
}
elseif (@$tPaImg2[0][1])
{
$url = $tPaImg2[0][1];
}
elseif (@$tPaImg3[0][1])
{
$url = $tPaImg3[0][1];
}
elseif (@$tPaImg4[0][1])
{
$url = $tPaImg4[0][1];
}
<!-- IF LAST_ADDED_ON -->
<div class="catnew">
<div class="spacer"> </div>
<table cellpadding="0"><tr>
<td><h8>{L_LAST_ADDED}</h8></td>
</tr>
<!-- BEGIN lastAdded -->
<tr>
<td class="catnew">
<table class="med pad_3" height="0" cellspacing="0" cellpadding="0" width="100%">
<tr>
<td class="release-th pad_2 tLeft bold" colspan="2"><span style="font-size:10px"><b style="color: #666666;"><center>[</b><b style="color: #666666;"><a href="viewforum.php?f={lastAdded.FORUM_ID}">{lastAdded.FORUM}</a>
</b><b style="color: #666666;">]<br><hr>Статус: {lastAdded.TOR_STATUS_ICON}{lastAdded.TOR_STATUS_TEXT}</center></b></span>
<div class="spacer_4"></div>
</td>
</tr>
<tr>
<td class="release-td vTop tCenter" width="48%" rowspan="5">
<div class="viewposts1">
<br>
<a href="viewtopic.php?t={lastAdded.TOPIC_ID}"><center><img width="75" src="{lastAdded.POSTER_IMG}"></center></a>
</div>
</td>
</tr>
<tr>
<td class="release-th vTop"><small><b style="color: #666666;"> Название:</b></small>
<div class="spacer_2"></div>
<p><a href="viewtopic.php?t={lastAdded.TOPIC_ID}"> {lastAdded.TITLE}</a></p>
</td>
</tr>
<tr>
<td class="release-th vTop"><small><b style="color: #666666;"> {L_AUTHOR}:</b></small>
<div class="spacer_2"></div>
<p><a href="profile.php?mode=viewprofile&u={lastAdded.POSTER_ID}"> {lastAdded.POSTER}</p></a>
</td>
</tr>
<tr>
<td class="release-th vTop"><small><b style="color: #666666;"> Дата:</b></small>
<div class="spacer_2"></div>
<p><small> {lastAdded.TORRENT_TIME}</small></p>
</td>
</tr>
<tr>
<td class="release-th vTop"><small><b style="color: #666666;"> Пиры:</b></small>
<div class="spacer_2"></div>
<div class="item_box"><p><small> <span id="seed">{lastAdded.SEEDERS}</span><span id="leech">{lastAdded.LEECHERS}</span></small></p></div>
</td>
</tr>
</table>
</td>
</tr>
<!-- END lastAdded -->
</table></div>
<!-- ENDIF -->