[-
use DBIx::Recordset ;

$r = shift ;

*set = DBIx::Recordset -> Search ({'!DataSource'    => $r -> {dbdsn},
                                   '!Username'      => $r -> {dbuser},
                                   '!Password'      => $r -> {dbpassword},
                                   '!DBIAttr'       => { RaiseError => 1, PrintError => 1, LongReadLen => 32765, LongTruncOk => 0, },
                                   '!Table'         => 'item, itemtext', 
                                   '!TabRelation'   => 'item_id = item.id',
                                   '!Order'         => 'creationtime desc',
                                   'language_id'    => $r -> param -> language,
                                   'category_id'    => 1,
                                   '$max'           => 15}) ;

-]

    <table width="252" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td><img src="[+ $r -> {imageuri} +]/h_news.gif" width="152" height="19"/></td>
      </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>

            [$while ($rec = $set -> Next)$]
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr> 
                      <td bgcolor="#327EA7"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><b>
                        <font color="#FFFFFF">&nbsp;
                            [+ $rec -> {heading} +]
                        </font></b></font></td>
                    </tr>
                    <tr> 
                      <td bgcolor="#C2D9E5"><img src="[+ $r -> {imageuri} +]/linie-news.gif" width="152" height="4"/></td>
                    </tr>
                    <tr> 
                      <td bgcolor="#D2E9F5">
                        <table width="100%" border="0" cellspacing="0" cellpadding="3">
                          <tr>
                            <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">
                                [-
                                $txt = $rec -> {description} ;
                                $txt =~ s#<#&lt;#g ;
                                $txt =~ s#>#&gt;#g ;
                                $txt =~ s#B&lt;(.*?)&gt;#<B>$1</B>#g ;
                                $txt =~ s#(http://[-a-zA-Z.]+)#<A HREF="$1">$1</A>#g ;
                                -]
                                [+ do { local $escmode = 0 ; $txt } +]
                            </font></td>
                          </tr>
                        </table>
                      </td>
                    </tr>
                  </table>
            [$endwhile $]

        </td>
      </tr>
    </table>
