';
while ($gres = mysql_fetch_assoc($req)) {
$post = $gres['text'];
if(strlen($post) > 160) {
$post = substr($post, 0, 160).'....';
}
$post = functions::checkout($gres['text'], 1, 1);
if ($set_user['smileys'])
$post = functions::smileys($post, $gres['rights'] ? 1 : 0);
if($user_id) {
$post = str_replace('[you]', $login, $post);
} else {
$post = str_replace('[you]', 'Kha�ch', $post);
}
echo ceil(ceil($i / 2) - ($i / 2)) == 0 ? '
';
echo'' : '
';
echo (time() > $gres['lastdate'] + 900 ? '• ' : '• ');
if ($gres['rights'] == 0 ) {
$colornick['colornick'] = '000000';
}
if ($gres['rights'] == 1 ) {
$colornick['colornick'] = 'FFD700';
}
if ($gres['rights'] == 2 ) {
$colornick['colornick'] = '7192a8';
}
if ($gres['rights'] == 3 ) {
$colornick['colornick'] = '0000FF';
}
if ($gres['rights'] == 4 ) {
$colornick['colornick'] = '40E000';
}
if ($gres['rights'] == 5 ) {
$colornick['colornick'] = '40E000';
}
if ($gres['rights'] == 6 ) {
$colornick['colornick'] = '228622';
}
if ($gres['rights'] == 7 ) {
$colornick['colornick'] = '860086';
}
if ($gres['rights'] == 8 ) {
$colornick['colornick'] = 'FF0000';
}
if ($gres['rights'] == 9 ) {
$colornick['colornick'] = 'FF0000';
}
if ($gres['rights'] == 10 ) {
$colornick['colornick'] = '7192a8';
}
if (!empty($user_id) && ($user_id != $gres['user_id'])) {
echo ''.$gres['name'].' : ';}
else{echo''.$gres['name'].' : ';}
// text
if (mb_strlen($post) >= 200)
{
$post = mb_substr($post, 0, 200);
echo $post.' ';
echo '...more';
}
else
{
echo $post;
}
echo '
';
++$i;
}
}else {
echo '' . $lng['guestbook_empty'] . '
';
}
echo '