% if request("action")="addComments" then Comments=request("Comments") id=request("id") author=conn.execute("select NameEn from [user] where username='"&request.Cookies("username")&"'")(0) if isNull(author) then author=request.Cookies("username") end if insql="insert into Comments (newsid,Content,author) values ("&id&",'"&Comments&"','"&author&"')" conn.execute(insql) end if if request("action")="delc" then did=request("did") id=request("id") delsql="delete * from Comments where id="&did conn.execute(delsql) rurl="blogshow.asp?id="&id response.Redirect(rurl) end if updatesql="update news set clicknum=clicknum+1 where id="&request("id") conn.execute(updatesql) %>
|