📄 savevalue.asp
字号:
<%@ LANGUAGE=VBScript.Encode codepage ="936" %>
<%
Response.Buffer = True
Response.Expires = 0
Response.CacheControl = "Private"
chatbgcolor=Application("wsaxhxf_c_chatbgcolor")
chatimage=Application("wsaxhxf_c_chatimage")
nickname=Session("hxf_u_nickname")
useronlinename=Application("wsaxhxf_c_useronlinename")
if nickname="" or Session("hxf_u_inthechat")<>"1" or Instr(useronlinename," "&nickname&" ")=0 then Response.Redirect "chaterr.asp?id=001"
Sub Msg(v)
Response.Write "<meta http-equiv='Content-Type' content='text/html; charset=gb2312'><meta http-equiv='pragma' content='no-cache'><body text=#000000>"
Response.Write "<script Language=JavaScript>"
Response.Write "alert('" & v & "');javascript:history.back();"
Response.Write "</script>"
Response.End
End Sub
maxtimeout=int(Application("wsaxhxf_c_maxtimeout"))
lasttime=Session("hxf_u_lasttime")
n=Year(date())
y=Month(date())
r=Day(date())
s=Hour(time())
f=Minute(time())
m=Second(time())
if len(y)=1 then y="0" & y
if len(r)=1 then r="0" & r
if len(s)=1 then s="0" & s
if len(f)=1 then f="0" & f
if len(m)=1 then m="0" & m
t=s & ":" & f & ":" & m
sj=n & "-" & y & "-" & r & " " & t
%>
<html>
<head>
<meta http-equiv='content-type' content='text/html; charset=gb2312'>
<title>保存经验值</title>
<style type='text/css'>
body {font-size:12pt;}
td {font-size:10.5pt;}
input{font-size:9pt}
select{font-size:9pt}
textarea{font-size:9pt}
.p9{font-size:9pt}
</style>
</head>
<body oncontextmenu=self.event.returnValue=false bgcolor="<%=chatbgcolor%>" background="<%=chatimage%>" bgproperties="fixed">
<%
if DateDiff("n",lasttime,sj)>maxtimeout then
Response.Write "<script>top.location.href=" & chr(34) & "nosaytimeout.asp" & chr(34) & ";</script>"
Response.End
end if
Application.Lock
onlinelist=Application("wsaxhxf_c_onlinelist")
for i=1 to UBound(onlinelist) step 8
if CStr(onlinelist(i+1))=CStr(nickname) then
addvalue=DateDiff("n",onlinelist(i+5),sj)
presj=onlinelist(i+5)
onlinelist(i+5)=sj
end if
next
Application("wsaxhxf_c_onlinelist")=onlinelist
Application.UnLock
if addvalue>0 then
Session("hxf_u_savetime")=sj
ip=Request.ServerVariables("REMOTE_ADDR")
Set conn=Server.CreateObject("ADODB.CONNECTION")
Set rs=Server.CreateObject("ADODB.RecordSet")
connstr=Application("wsaxhg_connstr")
conn.open connstr
sql="SELECT grade,value,mvalue,hb,lasttime,lastip,shj FROM reginfo WHERE kill='0' and username='" & nickname & "'"
rs.open sql,conn,1,3
if Not(rs.Eof and rs.Bof) then
grade=rs("grade")
rs("value")=rs("value")+addvalue
rs("hb")=rs("hb")+addvalue
if DateDiff("m",presj,sj)=0 then
rs("mvalue")=rs("mvalue")+addvalue
else
rs("mvalue")=addvalue
end if
rs("lasttime")=sj
rs("lastip")=ip
value=int(rs("value"))
hb=int(rs("hb"))
shj=int(rs("shj"))
If shj = 1 Then
if value>=int(Application("wsaxhxf_c_level1to2")) and grade<2 then grade=2
if value>=int(Application("wsaxhxf_c_level2to3")) and grade<3 then grade=3
if value>=int(Application("wsaxhxf_c_level3to4")) and grade<4 then grade=4
if value>=int(Application("wsaxhxf_c_level4to5")) and grade<5 then grade=5
End if
rs("grade")=grade
Session("hxf_u_grade")=grade
Session("hxf_u_value")=rs("value")
Session("hxf_u_mvalue")=rs("mvalue")
Session("hxf_u_hb")=rs("hb")
rs.Update
rs.close
end if
conn.close
set rs=nothing
set conn=nothing
Response.Cookies("cniaohqt")("maxsave")=sj
end if%>
<table width="100%" border="0" height="100%" align="center">
<tr>
<td align="center">
<table width=100% border=1 cellspacing=0 bordercolorlight=000000 bordercolordark=FFFFFF bgcolor="#DCD8D0" cellpadding=4 align="center">
<tr>
<td>
<div align="center"></div>
<p align=center><font color="red">保存经验值</font></p>
<p align=center>增长:<font color="#FF0000"><%=addvalue%></font> 分<br>
<a style=cursor:'hand' title=刷新 onclick=javascript:history.go(0)><font color="blue">当前状态<br>
</font></a></p>
<p>
级别:<font color="#FF0000"><%=Session("hxf_u_grade")%></font> 级<br>
月积:<font color="#FF0000"><%=Session("hxf_u_mvalue")%></font><br>
累积:<font color="#FF0000"><%=Session("hxf_u_value")%></font><br>
货币:<font color="#FF0000"><%=Session("hxf_u_hb")%></font>¥
</td>
</tr>
</table>
</tr>
</table>
<script Language="JavaScript">
var tid=null;tid=setTimeout('relist()',10000);
function relist(){parent.f3.location.href='f3.asp';}
</script>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -