auth(); $inc->template(); $inc->monitor(); $inc->department(); $inc->operator(); // Check to see if the person is not logged in $GLOBALS['auth']->check_logout(); $GLOBALS['template']->assign('chatid', $_GET['chatid']); $GLOBALS['template']->assign('info', $GLOBALS['monitor']->info(addslashes($_GET['chatid']))); $GLOBALS['template']->assign('departments', $GLOBALS['department']->listall($GLOBALS['operator']->id())); if (isset($_POST['department'])) { // Initiate the chat session $GLOBALS['monitor']->initiate(addslashes($_POST['department']), $GLOBALS['operator']->id(), addslashes($_GET['chatid'])); // Close the window $GLOBALS['template']->assign('onload', ' onload="window.close()"'); } // Include the javascript files $GLOBALS['template']->assign('javascript', ''); // Display the output $GLOBALS['template']->display('monitor_initiate.tpl'); // do events that need to be done at the end of the file $inc->finished(); ?>