<%
function trubuyarticleadd(artid,tuserid810803)
sql="select trbuyuserusernamegroup810803 from tr_article where id ="&artid&" "'将用户的id记录到文章的用户购买集合中
rs.open sql,conn,1,3
if not rs.eof then
if trim(rs("trbuyuserusernamegroup810803"))="" or isnull(rs("trbuyuserusernamegroup810803")) then
rs("trbuyuserusernamegroup810803")=tuserid810803

else
rs("trbuyuserusernamegroup810803")=tuserid810803&","&rs("trbuyuserusernamegroup810803")
end if
rs.update
end if
rs.close
end function

function trubuylist(title,artid,uname,tuserid810803,minuspoints,uip)
sql="select * from tr_userbuyrecharge810803 "'记录购买的订单，方便用户与管理员查看
rs.open sql,conn,1,3
rs.addnew()
'if not rs.eof then
rs("id")= GetMaxValue("tr_userbuyrecharge810803", "id") + 1
rs("addtime")=FormatDate(now(), 1)
rs("title")="(购买文章)"&title
rs("articleid")=artid
rs("username")=uname
rs("usernamemd5")=trmd5(uname)
rs("userid")=tuserid810803
rs("types")=1
rs("moneys")=minuspoints
gmordernum="GM"&formatDate(now(), 14)&gen_key(8)
rs("ordernum")=gmordernum
rs("tstatus")=1
rs("isdel")=0
rs("ip")=uip
'end if
rs.update
rs.close
end function



%>