PHP Classes

File: msgsChat.php

Recommend this page to a friend!
  Classes of Igor Herson Aquino de França   HelpDesk Chat   msgsChat.php   Download  
File: msgsChat.php
Role: Example script
Content type: text/plain
Description: file to show and refresh the messengers
Class: HelpDesk Chat
Manage chat dialog sessions
Author: By
Last change:
Date: 15 years ago
Size: 775 bytes
 

Contents

Class file image Download
<?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>