<?php
session_start(); 
include("connect.php");


$user=$_SESSION["user"];

// Процесс авторизации и вывода данных о пользователе

if ($user!="") {

$sqlus="SELECT * FROM tb_users WHERE login='$user'";
$resultus=mysql_query($sqlus);
$rowus=mysql_fetch_array($resultus);


}


?>


<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>

    <script>   
        function show()   
        {   
            $.ajax({   
                url: "online_chat.php",   
                cache: false,   
                success: function(html){   
                    $("#content").html(html);   
                }   
            });   
        }   
       
        $(document).ready(function(){   
            show();   
            setInterval('show()',30000);   
        });   
    </script> 

<div id="content">
<?php

require("online_chat.php");

?></div>