<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%> <%dim D_P:D_P="../"%> <% dim id,up,c id = 0 up = 0 c = 0 if qs("id")<>"" then id = qs("id") if qs("up")<>"" then up = qs("up") if isint(id)=false or isint(up)=false then response.End() end if if cint(id)=0 then response.End() odb() dim rs,sql set rs = server.CreateObject("adodb.recordset") sql = "select info_views from product_info where info_id="&id rs.open sql,conn,1,1 if rs.recordcount=0 then rs.close:set rs=nothing cdb() response.End() end if c = rs("info_views") rs.close:set rs=nothing if cint(up)>0 then c = c + 1 conn.execute "update product_info set info_views=info_views+1 where info_id="&id end if cdb() %> document.write(<%=c%>)