<?php

function ackhelpspot(){
	global $db;
	$topic=GETSTR('topic');
	$user=userinfo();
	$userid=$user['userid']+0;

			
	checkgskey('ackhelpspot_'.$topic);
	
	global $helpspots;
	
	if (!isset($helpspots[$topic])) apperror('invalid help topic');
	
	
	cache_delete('userhelpspots_'.$userid);

	$query="select * from userhelpspots where userid=$userid and helptopic='$topic'";
	$rs=sql_query($query,$db);
	if ($myrow=sql_fetch_assoc($rs)) return;
	
	$query="insert into userhelpspots(userid,helptopic) values ($userid,'$topic')";
	sql_query($query,$db);
	
	
}