Последние отзывы в блоке от модуля guestbook

Выводим последние отзывы в блоке от модуля guestbook:


if (module_exists('guestbook')) {  // guestbook_status seems to store 0 for enabled and 1 for disabled

$result = db_query(

    "SELECT left(g.message, 250) as message, g.created, anonname as author

    FROM {guestbook} g

    ORDER BY g.created DESC

    LIMIT 5");

//check if there are entries in the GB

// if (db_result($result)){

//if yes, print off list

print '


while ($entry = db_fetch_object($result))


//print GB entries

print '



read more