⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 savevalue.asp

📁 网佳网络办公系统(以下简称OA)是一套基于B/S模式的无纸化办公系统。[显著特点:无须安装客户端] 主要功能模块:管理 公文 车辆 通知 档案 值班 人事 审批 仓库 主界面 软件下载 个
💻 ASP
字号:
<%Response.Buffer=true
Response.CacheControl = "no-cache" 
Response.AddHeader "Pragma", "no-cache" 
Response.Expires=0%>
<!--#include file="../config/config.asp"-->
<%nickname=Session("hxf_u_nickname")
zddj=int(Session("hxf_u_value")/1000)
if zddj>99 then zddj=99
useronlinename=Application("hxf_c_useronlinename")
if nickname="" or Session("hxf_u_inthechat")<>"1" or Instr(useronlinename," "&nickname&" ")=0 then Response.Redirect "chaterr.asp?id=001"
maxtimeout=timeout
paofen=fen
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
if DateDiff("n",lasttime,sj)>maxtimeout then
	 Response.Write "<script>top.location.href='nosaytimeout.asp';</script>"
	 Response.End
end if
Application.Lock
onlinelist=Application("hxf_c_onlinelist")
for i=1 to UBound(onlinelist) step 6
 if CStr(onlinelist(i+1))=CStr(nickname) then
  addvalue=DateDiff("n",onlinelist(i+5),sj)
  addvalue1=DateDiff("n",onlinelist(i+5),sj)*paofen
  presj=onlinelist(i+5)
  onlinelist(i+5)=sj
 end if
next
Application("hxf_c_onlinelist")=onlinelist
Application.UnLock
 Session("hxf_u_savetime")=sj
 ip=Request.ServerVariables("REMOTE_ADDR")
Set conn=Server.CreateObject("ADODB.CONNECTION")
Set rs=Server.CreateObject("ADODB.RecordSet")
connstr=Application("hg_connstr")
conn.open connstr
 sql="SELECT * FROM 用户 WHERE 姓名='" & nickname & "'"
 rs.open sql,conn,1,3
 if Not(rs.Eof and rs.Bof) then
ss=1
if rs("会员")=true then
ss=2 
sa="会员存点"
addvalue1=addvalue1*2
else
sa="当前存点"
end if
rs("内力")=rs("内力")+int(addvalue1)
rs("银两")=rs("银两")+int(addvalue1)
rs("经验")=rs("经验")+int(addvalue1)
rs("攻防")=rs("攻防")+int(addvalue1)
bl=rs("配偶")
sf=rs("师傅")
  grade=rs("grade")
  rs("allvalue")=rs("allvalue")+addvalue*ss
  rs("lasttime")=sj
  rs("lastip")=ip
  allvalue=int(rs("allvalue"))
  Session("hxf_u_value")=rs("allvalue")
  rs.Update%>
<html>
<head>
<meta http-equiv='content-type' content='text/html; charset=gb2312'>
<title>保存经验值</title>
<style type='text/css'></style>
<link rel="stylesheet" href="../dg/setup.CSS">
</head>
<body oncontextmenu=self.event.returnValue=false bgcolor="<%=chatbgcolor%>" background="<%=chatimage%>" bgproperties="fixed" topmargin="30" text="#ffffff">
<table width="106" border="1" cellspacing="0" cellpadding="0" bgcolor="<%=chatbgcolor%>" bordercolorlight="#000000" bordercolordark="#FFFFFF" align="center" height="29">
 <tr valign="middle" align="center"> 
   <td width="102">
     <br> 
     <b><%=session("hxf_u_nickname")%></b>的<b><font color=yellow><%=sa%></font></b><br>
      </td>
 </tr> 
 <tr valign="middle">
    <td width="102"><br>等 级:<%=Session("hxf_u_grade")%> 级<br>
      战斗等级:<%=zddj%> 级<br>
      累积分:<%=Session("hxf_u_value")%><br><br>
    </td>
    </tr>   
 <tr valign="middle">    
     <td height="1" width="102"><br><font color=yellow><%=session("hxf_u_nickname")%></font>共增加<br>
      内 力:<%=int(addvalue1)%>点<br>
      经 验:<%=int(addvalue1)%>点<br>
      银 子:<%=int(addvalue1)%>两<br>
      攻 防:<%=int(addvalue1)%>点<br>
      泡 点:<%=addvalue*ss%>点<br>
      时 间:<%=addvalue%>分钟<br><br>
师傅增加:<font color=red><%=sf%></font><br>
<%if sf="无" then
sf=""
else
sql="update 用户 set 魅力=魅力+" & int(addvalue1/100) & ",道德=道德+" & int(addvalue1/100) & "  where 姓名='" & sf & "'"
conn.execute sql%>
道 德:<%=int(addvalue1/100)%>点<br>
魅 力:<%=int(addvalue1/100)%>点<br><br>
<%
end if
%>
<%
if bl="无" then
		bl=""
		else
		sql="update 用户 set 内力=内力+" & addvalue1/2 & ",银两=银两+" & addvalue1/2 & " where 姓名='" & bl & "'"
	conn.execute sql%>
 <tr valign="middle">
	  <td height="1" width="102"><br>伴侣<font color=yellow><%=bl%></font>增加<br>
      内 力:<%=addvalue1/2%>点<br>
      银 两:<%=addvalue1/2%>两<br><br><%end if
else
	chatimage=chatimage
end if
 rs.close
 conn.close
 set rs=nothing
 set conn=nothing
%>
</tr>
</table>

⌨️ 快捷键说明

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