Пример #1
0
	if (request_method() == 'post' && !$s_process) {
		redirect(s_link('chat', $chat->data['ch_int_name']));
	}
	
	if (!$user->data['is_member']) {
		do_login('LOGIN_TO_CHAT');
	}
	
	if (!$chat->auth()) {
		trigger_error('CHAT_NO_ACCESS');
	}
	
	$user->setup('chat');
	
	if ($s_process && $mode == 'logout') {
		return $chat->process_data($csid, $mode);
	}
	
	$chat->session($csid);
	
	if ($s_process) {
		return $chat->process_data($csid, $mode);
	}
	
	//$chat->sys_clean();
	$chat->window();
	
	$keepalive = false;
	$htmlpage = 'chat_channel';
	$page_title = lang('chat') . ' | ' . $chat->data['ch_name'];
} else {