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); $agent_list = ""; $params = array('thread' => $threadid, 'token' => $token); for( $indagent = 0; $indagent < count($page['pagination.items']); $indagent += 1 ) { $agent = $page['pagination.items'][$indagent]; $params['nextAgent'] = $agent['operatorid']; $agent_list .= "
  • ".topage($agent['vclocalename']).""; } $page['pagination_list'] = $agent_list; expand("../design/default/redirect.tpl"); } else { expand("../design/default/chat.tpl"); } ?>