chat(); $inc->template(); if (isset($_GET['admin'])) { $GLOBALS['template']->assign('admin', 'true'); $admin = 'true'; } else { $GLOBALS['template']->assign('admin', 'false'); $admin = 'false'; } $GLOBALS['chat']->assign(addslashes($_GET['chatid'])); $GLOBALS['template']->assign('chatid', addslashes($_GET['chatid'])); $GLOBALS['template']->assign('messages', $GLOBALS['chat']->get_messages($admin, addslashes($_GET['chatid']))); if (isset($_GET['admin']) && $_SESSION['hcl_'.addslashes($_GET['chatid'])]['isoperator'] == 'true') { $GLOBALS['template']->assign('onload', ' onload="scroll(0,10000000);parent.window.Chat.checksum = '.$GLOBALS['chat']->checksum(addslashes($_GET['chatid']), 'true').';"'); $GLOBALS['template']->assign('now_chatting', parse_with_session(addslashes($_GET['chatid']), $GLOBALS['lang']['now_chatting'], 'guest')); } else { $GLOBALS['template']->assign('onload', ' onload="scroll(0,10000000);parent.window.Chat.checksum = '.$GLOBALS['chat']->checksum(addslashes($_GET['chatid']), 'false').';"'); $GLOBALS['template']->assign('now_chatting', parse_with_session(addslashes($_GET['chatid']), $GLOBALS['lang']['now_chatting'], 'operator')); } // Display the output $GLOBALS['template']->display('chat_display.tpl'); // do events that need to be done at the end of the file $inc->finished(); ?>