<?php

function ackhelpspot(){
	global $db;
	$topic=SGET('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=? and helptopic=?";
	$rs=sql_prep($query,$db,array($userid,$topic));
	if ($myrow=sql_fetch_assoc($rs)) return;
	
	$query="insert into userhelpspots(userid,helptopic) values (?,?)";
	sql_prep($query,$db,array($userid,$topic));
	
	
}