<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%> <%Session.CodePage=65001 Response.Charset = "utf-8"%> <%datapath="../../"%> <%str="" tempflag=false tempstr="" tempstr2="" id=int(EW_Char.checkchar(EW_Char.requestFun("id"),0)) set rs=conn.execute("select * from ZH_OnlineTools where id=" & id) if not rs.eof then jifen=rs("jiage") if jifen=0 then '可以免费使用 tempstr2="该工具免费使用,毋须扣除包装币" tempflag=true else u_id=int(EW_Char.checkchar(u_id,0)) set rs2=conn.execute("select * from BZ_Users where id=" & u_id) if not rs2.eof then set rs4=conn.execute("select * from ZH_FangAnPay where comid=" & u_id & " and pay=1 and (toolids like'" & id & "' or toolids like'%, " & id & ",%' or toolids like'%, " & id & "' or toolids like '" & id & ",%')") if not rs4.eof then '已经购买过 tempstr2="您已拥有该工具的永久使用权" tempflag=true else youxiaoqi=rs2("youxiaoqi") if youxiaoqi="" or isnull(youxiaoqi) or not isdate(youxiaoqi) then youxiaoqi=date ss=datediff("d",date,youxiaoqi) if rs("shiyong")=1 and ss>0 then '可试用 tempstr2="您免费试用该工具的时间还有" & datediff("d",date,youxiaoqi)+1 & "天" tempflag=true set rs3=conn.execute("select * from BZ_Users_DownorLook where userid=" & u_id & " and sortid=3 and conid=" & id) if not rs3.eof then '使用过的记录,能继续使用 tempstr2="您已拥有该工具的永久使用权" tempflag=true else if u_jifen>jifen then '当前积分够使用当前工具 tempstr2="购买此工具须扣除" & jifen & "包装币" else tempstr2="购买此工具须扣除" & jifen & "包装币" end if end if rs3.close set rs3=nothing end if end if rs4.close set rs4=nothing end if rs2.close set rs2=nothing end if end if rs.close set rs=nothing str2=" " str="var toolspan=document.getElementById('toolspan');if(toolspan){toolspan.innerHTML=unescape('" & escape(tempstr2) & "')}" if id=47 or id=31 or id=32 or id=33 or id=34 or id=35 or id=36 then if tempflag then str=str & "function entertojs(f_obj){ajaxtosave(f_obj)}" else str=str & "function entertojs(f_obj){dialog('使用在线工具','url:get?ajax_if.asp?id=" & id & "&rnd=' + parseInt(Math.random()*100000),'500','auto','');}" end if else if id=26 then for kii=1 to 4 str3=str2 if tempflag then str=str & "var btn_js" & kii & "=document.getElementById('btn_js" & kii & "');if(btn_js" & kii & "){btn_js" & kii & ".innerHTML=unescape('" & escape(replace(str3,"ajaxtosave()","ajaxtosave(" & ((kii+1) mod 2)+1 & ")")) & "')}" else str=str & "var btn_js" & kii & "=document.getElementById('btn_js" & kii & "');if(btn_js" & kii & "){btn_js" & kii & ".innerHTML=unescape('" & escape(replace(str3,"ajaxtosave()","dialog('使用在线工具','url:get?ajax_if.asp?id=" & id & "&rnd=' + parseInt(Math.random()*100000)+'&kii=" & ((kii+1) mod 2)+1 & "','500','auto','');")) & "')}" end if next else str3=str2 tempflag=true if tempflag then str=str & "var btn_js=document.getElementById('btn_js');if(btn_js){btn_js.innerHTML=unescape('" & escape(str2) & "')}" else str=str & "var btn_js=document.getElementById('btn_js');if(btn_js){btn_js.innerHTML=unescape('" & escape(replace(str2,"ajaxtosave()","dialog('使用在线工具','url:get?ajax_if.asp?id=" & id & "&rnd=' + parseInt(Math.random()*100000),'500','auto','');")) & "')}" end if end if end if response.write str%>