Доброго времени суток всем, заглушку не могу установить на чат , ставлю а она вообще никого не пускает , на всех работает

хоть пополнил хоть нет
вот сам код
<div style="width:679px;padding-bottom:19px" class="block column_2 left_block_profile">
<h1 class="h2 h2_profile_sp_big_block"><center>Беседка</center></h1>
<center><font color='red'></font>[/url]</center>
<center><font color='blue'>Администратор: <font color = 'red'>Sasha</font></center>
<center><font color='blue'>Модератор: <font color = 'red'>Свободно</font></center>
<center>
<a href="/account/chat_rul"><font color='red'>Правила чата(Настоятельно рекомендуем ознакомиться)</font>[/url]</center>
<?php
$_OPTIMIZATION["title"] = "Аккаунт - Чат";
if(!isset($_SESSION["user"]))
return;
header("Content-type: text/html; charset=windows-1251");
$db->query("SET NAMES cp1251");
?>
<?PHP
# Заглушка от халявщиков
if($user_data["insert_sum"] <= 29.99){
?>
<center><font color="red">
В чате могут писать пользователи, пополнившие баланс минимум на 30 руб это защита от флуда</font></center><BR />
<BR />
<?PHP
return;
}
?>
<script type="text/javascript" src="/js/cookies.js" /></script>
<script type="text/javascript" src="/js/jqu.js" /></script>
<script type="text/javascript">
function insert_comm(open, close, no_focus)
{
msgfield = (document.all) ? document.all.forma_com : document.forms['form_com']['comment'];
if (document.selection && document.selection.createRange)
{
if (no_focus != '1' ) msgfield.focus();
sel = document.selection.createRange();
sel.text = open + sel.text + close;
if (no_focus != '1' ) msgfield.focus();
}else if (msgfield.selectionStart || msgfield.selectionStart == '0'){
var startPos = msgfield.selectionStart;
var endPos = msgfield.selectionEnd;
msgfield.value = msgfield.value.substring(0, startPos) + open + msgfield.value.substring(startPos, endPos) + close + msgfield.value.substring(endPos, msgfield.value.length);
msgfield.selectionStart = msgfield.selectionEnd = endPos + open.length + close.length;
if (no_focus != '1' ) msgfield.focus();
}else{
msgfield.value += open + close;
if (no_focus != '1' ) msgfield.focus();
}return;}
function reset_chat(){
$.ajax({
type: "POST",
url: "/ajax/chat.php?p=get",
data: "",
success: function(result){
if($("#chat #chat_scroll").html() != result)
$("#chat #chat_scroll").html(result);
$("#chat #chat_scroll").scrollTo(9999);
}
});
}
function reset_online(){
$.ajax({
type: "POST",
url: "/ajax/chat.php?p=online",
data: "",
success: function(result){
$("#chat #chat-online").html(result);
}
});
}
function reset_warning(){
$("#chat .bbcode #warnings").text('');
}
function swich_close(){
$('body').css('padding-bottom', '7px');
$('#chat').css('bottom', '-150px');
$.cookie('swich', 'close');
}
function swich_open(){
$('body').css('padding-bottom', '157px');
$('#chat').css('bottom', '-0px');
$.cookie('swich', 'open');
}
$(function(){
reset_chat();
reset_online();
setInterval(reset_chat, 7000);
setInterval(reset_online, 5000);
setInterval(reset_warning, 9000);
$('#chat #form_com').submit(function(e){
e.preventDefault();
$.ajax({
type: "POST",
url: "/ajax/chat.php?p=send",
data: $('#chat #form_com').serialize(),
success: function(result){
$("#chat .bbcode #warnings").html(result);
if(result == '<span style="color:#0f0">Сообщение отправлено</span>'){
$('#chat .message input[name="comment"]').val('');
reset_chat();
}
}
});
});
$('#chat #chat_scroll .user').click(function(){
$('#chat .message input[name="comment"]').val($(this).text() + $('#chat .message input[name="comment"]').val());
});
$('#chat #chat-online .user').click(function(){
$('#chat .message input[name="comment"]').val($(this).text() + $('#chat .message input[name="comment"]').val());
});
});
</script>
<style type="text/css">
#chat{position:relative;
bottom:<?php
if(!isset($_SESSION['chathide']))
$_SESSION["chathide"] = false;
if(isset($_GET['chats'])){
if($_SESSION['chathide'] == false)
$_SESSION["chathide"] = true;
else
$_SESSION["chathide"] = false;
}
echo $_SESSION['chathide'] == false?'10':'-155';
?>px; margin:0 auto; height:710px; width:550px; z-index:1; background:#FFE4B5; border:0px solid #5EE426; border-radius:5px; outline:0px solid #1C1C1C; box-shadow: #000 0px 0px 3px 0px; margin-top:30px;}
#chat #chat_scroll{height:500px; width: 420px; display: inline-block; border-bottom:1px solid #1C1C1C; font-size:14px; padding:2px; overflow: auto; line-height:20px;}
#chat .swich{position:absolute; display:block; right:-2px; top:-31px; cursor:pointer; height:33px; width:155px; background:url(/img/chat/swich.png); text-align:center; line-height:33px;}
#chat #chat_scroll .user{font-weight:900; color:00f; text-decoration:underline; cursor:pointer;}
#chat #chat-online .user{font-weight:900; color:00f; text-decoration:underline; cursor:pointer;}
#chat #chat_scroll .user:hover{text-decoration:none;}
#chat #chat-online .user:hover{text-decoration:none;}
#chat #chat_scroll .to{background:#a4c5a3;}
#chat #chat_scroll .private{color:#f00;}
#chat #chat_scroll .time{color:#999;}
#chat #chat_scroll img{vertical-align:middle;}
#chat .bbcode, #chat .message{height:36px; line-height:25px; }
#chat .bbcode{padding:0 10px; color:#fff;}
#chat .bbcode img{padding:0 1px; vertical-align:middle; cursor:pointer;}
#chat .bbcode #warnings{font-weight:900;}
#chat .bbcode,{color=red;}
#chat .message input[name="comment"]{height:28px; width:400px; padding:0; margin:4px 10px; font-size:15px;}
#chat .message input[name="message_sub"]{height:28px; width:106px; border:1px solid #1C1C1C;}
#chat-online {
width: 120px;
display: inline-block;
float: right;
border-left: 1px solid #1C1C1C;
border-bottom:1px solid #1C1C1C;
height:500px;
padding:4px 0px 0px 5px;
overflow: auto;
}
</style>
<div id="chat">
<div id="chat_scroll">Загрузка...</div>
<div id="chat-online">Загрузка...</div>
<div id="clear: both;"></div>
<div class="bbcode">
<img onclick="insert_comm('','')" src="/img/chat/bb/b.gif" alt="" />
<img onclick="insert_comm('','')" src="/img/chat/bb/i.gif" alt="" />
<img onclick="insert_comm('','')" src="/img/chat/bb/u.gif" alt="" />
<img onclick="insert_comm('','')" src="/img/chat/bb/s.gif" alt="" />
<select id="id-color" style="width: 80px; height: 28px; padding: 0; margin: 0;" onchange='insert_comm("","");'>
<option value="black" selected>Цвет</option>
<option style="color: #0000FF;" value="blue">Голубой</option>
<option style="color: #00008B;" value="darkblue">Темно-синий</option>
<option style="color: #8309D7;" value="violet">Фиолетовый</option>
<option style="color: #00FF00;" value="green">Зеленый</option>
<option style="color: #000000;" value="black">Черный</option>
<option style="color: #FFFF00;" value="yellow">Желтый</option>
</select>
<span id="warnings"></span>
</div>
<div class="message">
<form id="form_com" action="#form_com" method="post">
<input type="text" id="comment" name="comment" maxlength="255" />
<input type="hidden" name="to" />
<input type="submit" name="message_sub" value="Отправить" />
<center>
Смайлы:<div class="bbcode">
<img onclick="insert_comm('','*stop*')" src="/img/chat/smile/stop.gif" alt="" />
<img onclick="insert_comm('','*shoot2*')" src="/img/chat/smile/shoot2.gif" alt="" />
<img onclick="insert_comm('','*unsmile*')" src="/img/chat/smile/unsmile.gif" alt="" />
<img onclick="insert_comm('','*smoke*')" src="/img/chat/smile/smoke.gif" alt="" />
<img onclick="insert_comm('','*inlove*')" src="/img/chat/smile/inlove.gif" alt="" />
<img onclick="insert_comm('','*tup*')" src="/img/chat/smile/tup.gif" alt="" />
<img onclick="insert_comm('','*rofl*')" src="/img/chat/smile/rofl.gif" alt="" />
<img onclick="insert_comm('','*devil*')" src="/img/chat/smile/devil.gif" alt="" />
<img onclick="insert_comm('','*boyan*')" src="/img/chat/smile/boyan.gif" alt="" />
<img onclick="insert_comm('','*helpless*')" src="/img/chat/smile/helpless.gif" alt="" />
<img onclick="insert_comm('','*burumburum*')" src="/img/chat/smile/burumburum.gif" alt="" />
<img onclick="insert_comm('','*spasibo*')" src="/img/chat/smile/spasibo.gif" alt="" />
<img onclick="insert_comm('','*draznilka*')" src="/img/chat/smile/draznilka.gif" alt="" />
<img onclick="insert_comm('','*popa*')" src="/img/chat/smile/popa.gif" alt="" />
<img onclick="insert_comm('','*smutili*')" src="/img/chat/smile/smutili.gif" alt="" />
<img onclick="insert_comm('','*mmmm*')" src="/img/chat/smile/mmmm.gif" alt="" />
<img onclick="insert_comm('','*yazyk*')" src="/img/chat/smile/yazyk.gif" alt="" />
<img onclick="insert_comm('','*beer3*')" src="/img/chat/smile/beer3.gif" alt="" />
<img onclick="insert_comm('','*prostite*')" src="/img/chat/smile/prostite.gif" alt="" />
<img onclick="insert_comm('','*beat*')" src="/img/chat/smile/beat.gif" alt="" />
<img onclick="insert_comm('','*clap*')" src="/img/chat/smile/clap.gif" alt="" />
<img onclick="insert_comm('','*music*')" src="/img/chat/smile/music.gif" alt="" />
<img onclick="insert_comm('','*bye*')" src="/img/chat/smile/bye.gif" alt="" />
<img onclick="insert_comm('','*kiss*')" src="/img/chat/smile/kiss.gif" alt="" />
<img onclick="insert_comm('','*lol*')" src="/img/chat/smile/lol.gif" alt="" />
<img onclick="insert_comm('','*pissed*')" src="/img/chat/smile/pissed.gif" alt="" />
<img onclick="insert_comm('','*hilarious*')" src="/img/chat/smile/hilarious.gif" alt="" />
<img onclick="insert_comm('','*xuligan*')" src="/img/chat/smile/moderator-56.gif" alt="" />
<img onclick="insert_comm('','*son*')" src="/img/chat/smile/son-226.gif" alt="" />
<img onclick="insert_comm('','*cwety*')" src="/img/chat/smile/podcvet.gif" alt="" />
<img onclick="insert_comm('','*cwety2*')" src="/img/chat/smile/cvety-557.gif" alt="" />
<img onclick="insert_comm('','*denr*')" src="/img/chat/smile/den-rojdeniya-127.gif" alt="" />
</center>
</div>
</div></div>
</div>
<div style="clear: both;"></div>