topage($thread['userName']), 'agent' => topage($thread['agentName']), 'link' => $_SERVER['PHP_SELF']."?thread=$threadid&force=true" ); start_html_output(); require('../view/confirm.php'); exit; } if (!$viewonly) take_thread($thread,$operator); $token = $thread['ltoken']; header("Location: $webimroot/operator/agent.php?thread=$threadid&token=$token&level=$remote_level"); exit; } $token = verifyparam( "token", "/^\d{1,8}$/"); $thread = thread_by_id($threadid); if( !$thread || !isset($thread['ltoken']) || $token != $thread['ltoken'] ) { die("wrong thread"); } setup_chatview_for_operator($thread, $operator); start_html_output(); $pparam = verifyparam( "act", "/^(redirect)$/", "default"); if( $pparam == "redirect" ) { $found = get_operators(); setup_pagination($found); $page['params'] = array('thread' => $threadid, 'token' => $token); require('../view/redirect.php'); } else { require('../view/chat_ajaxed.php'); } ?>