<?php
	/**************************************************************************\
	* phpGroupWare - Chat                                                      *
	* http://www.phpgroupware.org                                              *
	* This application written by Joseph Engo <jengo@phpgroupware.org>         *
	* --------------------------------------------                             *
	*  This program is free software; you can redistribute it and/or modify it *
	*  under the terms of the GNU General Public License as published by the   *
	*  Free Software Foundation; either version 2 of the License, or (at your  *
	*  option) any later version.                                              *
	\**************************************************************************/

	/* $Id: body.php,v 1.6.2.2 2002/11/24 15:02:03 ralfbecker Exp $ */

	$GLOBALS['phpgw_info']['flags'] = array(
		'currentapp' => 'chat',
		'noheader'   => True,
		'nonavbar'   => True
	);
	include('../header.inc.php');

	function get_var($name,$from)	// a simple version
	{
		if (!is_array($from)) $from = explode(',',$from);
		while ((list(,$f) = each($from)) && !isset($GLOBALS['HTTP_'.$f.'_VARS'][$name])) ;
		$ret = $GLOBALS['HTTP_'.$f.'_VARS'][$name];
		//echo "HTTP_$f"."_VARS[$name]=$ret<br>\n";
		return $ret;
	}

	$cannel   = get_var('channel',array('POST','GET'));
	$action   = get_var('action',array('POST','GET'));
	$location = get_var('location',array('GET','POST'));
	$user2    = get_var('user2',array('POST','GET'));
?>
<html>
	<head></head>
	<FRAMESET ROWS="*,130" BORDER="0" SCROLLING="NO">
<?php
	echo '<FRAME SRC="' . $GLOBALS['phpgw']->link('/chat/messages.php',array(
		'channel' => $channel,
		'action'  => $action,
		'location'=> $location
	)) . '#bottom" NAME="messages">';
	echo '<FRAME SRC="' . $GLOBALS['phpgw']->link('/chat/sendmsg.php',array(
		'channel' => $channel,
		'location'=> $location,
		'user2'   => $user2
	)) . '" NAME="sendmsg" SCROLLING="NO">';
?>
	</FRAMESET>
</html>
