<!-- #include file="include/skin.asp" -->
<%

if request("chk")="yes" then
call web_error("post")
else
call forum_buypost()
end if

sub forum_buypost()
 dim username,emoney,forumid,viewid
   username=trim(request("username"))
  if symbol_name(username)=true then
   emoney=trim(request("emoney"))
   forumid=trim(request("forum_id"))
   viewid=trim(request("view_id"))
  call joekoe_cms.exec("insert into notes(username,nsort,iid,emoney,tim) values('"&login_username&"','b"&forumid&"',"&viewid&","&emoney&",'"&joekoe_cms.now_time&"')",0)
  call joekoe_cms.exec("update user_data set emoney=emoney-"&emoney&" where username='"&login_username&"'",0)
  call joekoe_cms.exec("update user_data set emoney=emoney+"&emoney&" where username='"&username&"'",0)
  response.redirect "forum_view.asp?forum_id="&forumid&"&view_id="&viewid&""
 end if
end sub
%>