<?php
session_start();
include('chat.class.php');
$chat = new chat();
$chat->refreshStatus();
?>
<html>
<head>
<META HTTP-EQUIV="Refresh" CONTENT="5 ; URL=<?=$chat->adress("msgsChat.php")?>">
<title>chat</title>
<style>
div.container { position: relative; height: 290px; width: 320px;
overflow-y:hidden;
border: dashed 1px black; }
div.container div.text { position: absolute; bottom: 0px;
}
.adminText{
color: #ff0000;
}
</style>
</head>
<body>
<div class="container"> <div class="text">
<?php
foreach($chat->showMsgs() as $row){
$admin = "";
if($row['admin'] == 1){
$admin = "class=\"adminText\"";
}
echo "<p $admin ><b>".$row['email']."</b> - ";
echo $row['msg']."</p>";
}
?>
</div></div>
</body>
</html>
|