Location: PHPKode > projects > HelpDesk Chat > helpdesk-chat/chatFrame.php
<?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 }?>
Return current item: HelpDesk Chat