Shoutbox problem

372
.
elvin97
Hello everyone.i have a qchat module but it gives errors.for example:

Opening and ending tag mismatch: body line 0 and div

...Please help me .This is code

if($user_id && $ban !='1' && $ban !='12') {
if ($headmod != "guestbook" && $headmod != "pradd" && $headmod != "load") {
echo '<div class="mainbox"><div class="mainblok"><div class="nfooter"><b>Shoutbox</b></div>';
$refer = base64_encode($_SERVER['REQUEST_URI']);
echo '<div class="currentpage"><form name="form" action="/guestbook/index.php?act=say" method="post">';
echo '<textarea cols="30" rows="2" name="msg"></textarea>';
echo '<input type="hidden" name="ref" value="'.$refer.'">';
echo '<input type="submit" name="submit" value="Shout"><br/></form></div>';
$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 '<div class="">';
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&#65533;ch', $post);
}
echo ceil(ceil($i / 2) - ($i / 2)) == 0 ? '<div class="textshout" style="background: #ffffff; border-bottom: 1px solid #e9e9e9; margin: 2px 4px -1px 4px; padding: 3px 2px 2px 2px">' : '<div class="textshout" style="background: #ffffff; border-bottom: 1px solid #e9e9e9; margin: 2px 4px -1px 4px; padding: 3px 2px 2px 2px">';
echo (time() > $gres['lastdate'] + 900 ? '<font color="red">&#x2022;</font> ' : '<font color="green">&#x2022;</font> ');
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 '<a href="'.$home.'/users/'.$gres['name'].'"><span style="color:#' . $colornick['colornick'] . '"><b>'.$gres['name'].'</b></span></a> :&nbsp;';}
else{echo'<span style="color:#' . $colornick['colornick'] . '"><b>'.$gres['name'].'</b></span> :&nbsp;';}

// text
if (mb_strlen($post) >= 200)
{
$post = mb_substr($post, 0, 200);
echo $post.' ';
echo '...<a href="../guestbook/index.php">more</a>';
}
else
{
echo $post;
}
echo '</div>';
++$i;
}
}else {
echo '<div class="textshout">' . $lng['guestbook_empty'] . '</div>';
}
echo '<div class="forumb"><center><a href="#">Refresh</a> &bull; <a href="/pages/img.php">BBimg</a> &bull; <a href="/guestbook/index.php">Shoutbox</a></center></div></div></div>';
echo'</div></div></div>';
}}
mysql_query("UPDATE `users` SET $sql `total_on_site` = '$totalonsite', `lastdate` = " . time() . " WHERE `id` = '65'");
.
here is code
Прикрепленные файлы:
Всего: 2