if($user_id && $ban !='1' && $ban !='12') { if ($headmod != "guestbook" && $headmod != "pradd" && $headmod != "load") { echo '
Shoutbox
'; $refer = base64_encode($_SERVER['REQUEST_URI']); echo '
'; echo ''; echo ''; echo '
'; $total = mysql_result(mysql_query("SELECT COUNT(*) FROM `guest` WHERE `adm`='0'"), 0); if ($total) { $req = mysql_query("SELECT `guest`.*, `guest`.`id` AS `gid`, `users`.`lastdate`, `users`.`id`, `users`.`rights`, `users`.`name` FROM `guest` LEFT JOIN `users` ON `guest`.`user_id` = `users`.`id` WHERE `guest`.`adm`='0' ORDER BY `time` DESC LIMIT 4"); echo '
'; 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 (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 '
'; echo'
'; }} mysql_query("UPDATE `users` SET $sql `total_on_site` = '$totalonsite', `lastdate` = " . time() . " WHERE `id` = '65'");