Login   Register  
PHP Classes
elePHPant
Icontem

File: chatFrame.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Igor Herson Aquino de França  >  HelpDesk Chat  >  chatFrame.php  >  Download  
File: chatFrame.php
Role: Example script
Content type: text/plain
Description: file to popup the chat window
Class: HelpDesk Chat
Manage chat dialog sessions
Author: By
Last change:
Date: 2008-12-26 11:18
Size: 1,156 bytes
 

Contents

Class file image Download
<?php 
session_start
();
include(
'chat.class.php');
$chat = new chat();
if(isset(
$_SESSION['session']) || isset($_GET['admin'])){
            if(isset(
$_POST['msg'])){
            
$chat->newMsg($_POST['msg']);
        }
?>
<html>
<head>
    <title>chat</title>
</head>
<body>
<iframe src ="<?=$chat->adress("msgsChat.php")?>" width="360px" height="300px" scrolling="no" frameborder="0"></iframe>
<form action="<?=$chat->adress($_SERVER['PHP_SELF'])?>" method="post">
        <input type="hidden" name="mail" value="<?php
        
if(isset($_GET['admin'])){
        echo 
$_GET['admin'];
        }else{
        echo 
$_POST['email'];    
        }
?>" />
    <textarea name="msg" rows="2" cols="35"></textarea>
    <input type="submit" class="submit" name="submit" value="Enviar" style="height:53px; position:relative; top:-17px; left: -3px"/>
</form>
</body>
</html>
<?php }else{ 
    
?>
<html>
<head>
    <title>chat</title>
</head>
<body>
<form action="<?=$_SERVER['PHP_SELF']?>" method="post">
    <input type="text" class="text" name="email" value="" size="20" maxlength="150" />
    <input type="submit" class="submit button" name="submit" value="submit" />
    </form>
</body>
</html>
<?php }?>