usersave.asp

来自「聊天室源码呵呵你好用~~~~~~2.0版本」· ASP 代码 · 共 99 行

ASP
99
字号
<%@ LANGUAGE=VBScript%>
<%Response.Expires=0
username=Session("a_c_user_name")
if username="" or Session("a_c_user_outchat")=1 then
 Response.Redirect "close.asp"
end if
Application.Lock
online=Application("a_c_user_online")
inthechat=Application("a_c_user_inthechat")
Dim user_online()
uoc=1
for i=1 to inthechat*4 step 4
 if online(i)=username then
  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
  sj=s & ":" & f & ":" & m
  sj2= n & "-" & y & "-" & r & " " & sj
  addvalue_name=username
  addvalue_ip=Request.ServerVariables("REMOTE_ADDR")
  Session("a_c_user_ip")=addvalue_ip
  zz=DateDiff("n",online(i+2),sj2)
  addvalue_value=Session("a_c_user_value")+zz
  Session("a_c_user_value")=addvalue_value
  Redim Preserve user_online(uoc),user_online(uoc+1),user_online(uoc+2),user_online(uoc+3)
  user_online(uoc)=username
  user_online(uoc+1)=addvalue_ip
  user_online(uoc+2)=sj2
  Session("a_c_user_savetime")=sj2
  user_online(uoc+3)=online(i+3)
  uoc=uoc + 4
 else
  Redim Preserve user_online(uoc),user_online(uoc+1),user_online(uoc+2),user_online(uoc+3)
  user_online(uoc)=online(i)
  user_online(uoc+1)=online(i+1)
  user_online(uoc+2)=online(i+2)
  user_online(uoc+3)=online(i+3)
  uoc=uoc + 4
 end if
next
Application("a_c_user_online")=user_online
input=Application("a_c_reg_data")
for i=5 to Application("a_c_reg_num") step 8
 if input(i)=addvalue_name then
  if addvalue_value>=300 and input(i+2)<2 then input(i+2)=2
  if addvalue_value>=1000 and input(i+2)<3 then input(i+2)=3
  if addvalue_value>=5000 and input(i+2)<4 then input(i+2)=4
  if addvalue_value>=10000 and input(i+2)<5 then input(i+2)=5
  Session("a_c_user_level")=input(i+2)
  input(i+4)=addvalue_value
  input(i+6)=sj2
  input(i+7)=addvalue_ip
 end if
next
Application("a_c_reg_data")=input
Application.UnLock%><html>
<head>
<title>保存经验值</title>
<style type='text/css'>
<!--
body {line-height:150%;font-size:12pt;}
td {line-height:170%;font-size:10.5pt;}
.p9 {line-height:120%;font-size:9pt;}
A {color:white;text-decoration:none;}
A:Hover {color:black;text-decoration:none;}
A:Active {color:black}
-->
</style>
<meta http-equiv="refresh" content="23;URL=f3.asp">
</head>
<body bgcolor="008888" background="read/bg.gif" bgproperties="fixed" style="margin-left: 10px; margin-right: 5px; margin-top: 10px" text="#FFFFFF">
<div align="center"><font color="#FFFFFF" style="font-size:10.5pt"><%=Application("a_c_chatroom_name")%></font></div>
<center>
<hr size=1 color=FFFF00>
<font color=FF0000><b><%=Application("a_c_user_inthechat")%></b></font><font color=0000FF><span class=p9>(<%=Application("a_c_user_active")%>)</span>人在线</font> 
<br>
<br>
<font color="#FFFF00">保存经验值</font>
<table border="0" width="100%">
<tr>
<td>
<p>增长:<font color="#00FFFF"><%=zz%></font> 分</p>
<div align=center><font color="#FFFF00">当前状态</font></div>
经验:<font color="#00FFFF"><%=addvalue_value%></font> 分<br>
等级:<font color="#00FFFF"><%=Session("a_c_user_level")%></font> 级
</td>
</tr>
</table>
</center>
</body>
</html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?