PHP Classes

File: request.php

Recommend this page to a friend!
  Classes of Harish Chauhan   Chat Class   request.php   Download  
File: request.php
Role: Example script
Content type: text/plain
Description: example
Class: Chat Class
Chat room management with talks stored in files
Author: By
Last change:
Date: 18 years ago
Size: 998 bytes
 

Contents

Class file image Download
<?php
   
@session_start();
    include_once(
"chat.inc.php");

   
$mychat=new Chat($_REQUEST['room']);
   
    if(!empty(
$_POST[msg]))
       
$mychat->putMessage(trim($_POST[msg]),$_SESSION['SES_USER_NAME']);
    if(isset(
$_POST['Logout']))
    {
       
$mychat->putMessage($_SESSION['SES_USER_NAME']." has loged out at ".date("h:i:s a"));
       
$mychat->delUser($_SESSION['SES_USER_NAME']);
       
?>
<SCRIPT LANGUAGE="JavaScript">
        <!--
            window.parent.close();
        -->
        </SCRIPT>
        <?
   
}
?>
<HTML>
<body topmargin=0>
<form name='form1' method='Post' action=''>
<INPUT TYPE="hidden" name='room' value="<?=$_REQUEST['room']?>">
<input type="text" name="msg" size=75 >
<input type="Submit" value="Send">
<input type="Submit" name="Logout" value='Bye!'>
<br>
<span style='font-family:verdana;font-size:10px;color:#CC0000'>*Kindly use the bye button to close properly. It is recommended.</span>
</form>
<SCRIPT LANGUAGE="JavaScript">
<!--
document.form1.msg.focus();
//-->
</SCRIPT>
</body>
</HTML>