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

📄 inc.asp

📁 后台登陆admin.asp
💻 ASP
📖 第 1 页 / 共 2 页
字号:
Hx66_address=rs0("address")
Hx66_vipin=rs0("vipindate")
Hx66_vipend=rs0("vipenddate")
rs0.close
set rs0=nothing
End IF
IF Hx66_Grade=1 and Hx66_vipend-date()<=0 Then conn.Execute("insert into message(incept,sender,title,content,sendtime) values('"&Hx66_name&"','"&webname&"','系统消息--VIP资格到期','亲爱的用户"&Hx66_name&",您的VIP资格有效期已到,非常感谢你对本站的支持。',now())")
IF Hx66_Grade=1 and Hx66_vipend-date()<=0 Then Conn.execute("update [User] set UserGrade=0 where UserID in ("&userid&")")
dim checkmember,SupAdmin
IF blog_yes=1 then
      checkmember=true
Elseif blog_yes=2 and Hx66_Grade=1 then
      checkmember=true
Elseif blog_yes=3 then
   blog_names=split(blog_name,"|")
   for z=0 to ubound(blog_names)
       if Hx66_name=blog_names(z) then
          checkmember=true
          exit for
       end if
   next
Else
      checkmember=False
End if
IF session("adminlogin")=sessionvar and Session("hxStudioAdminDj")=4 then
      SupAdmin=true
Else
      SupAdmin=False
End if
End IF

'=================================================
'过程名:userlogin
'作  用:会员登陆
'参  数:无
'web:    www.ynsky.com.cn
'=================================================
sub userlogin()
if UserLogined=False then%>
<form method='post' action='UserChkLogin.asp?hx66=login'>
<table width='160' height='105' border='0' cellpadding='0' cellspacing='0' align=center>
   <tr>
     <td height='28' align=center>帐号:<input class='input' maxlength='16' size='13' name='username' title='输入您的ID' type='text'></td>
   </tr>
   <tr>
     <td height='28' align=center>密码:<input class='input' type='password' maxlength='20' size='13' name='password' value='' title='输入您的密码'></td>
   </tr>
   <tr>
     <td height='25' align=center>Cookie:<select name=CookieDate class=input><option selected value=0>不保存</option><option value=1>保存一天</option><option value=2>保存一月</option><option value=3>保存一年</option></select></td>
   </tr>
  <tr>
     <td align=center><input name='login' type='image' src='img/login.gif' width='39' height='25' border='0'>&nbsp;<a href='UserReg.asp' target=_blank><img src='img/reg.gif' width='39' height='25' border="0"></a>&nbsp;<a href='user_password.asp' target=_blank><img src='img/zm.gif' border='0' alt='会员找回密码' width='39' height='25'></a></td></form>
  </tr>  
</table>
<%else%>
<table width="160" height="98" border="0" cellpadding="0" cellspacing="0" align="Center">
   <tr>
     <td height="2"></td>
   </tr>
   <tr>
     <td align="Center">
       <table border="0" cellpadding="0" cellspacing="0">
	<tr><td align="center" style="BORDER-RIGHT:#e6e6e6 1px solid; BORDER-TOP:#e6e6e6 1px solid; BORDER-LEFT:#e6e6e6 1px solid; BORDER-BOTTOM:#e6e6e6 1px solid"><%if Hx66_Photo<>"" then%><img src='<%=Hx66_Photo%>' border=0 width="64" height="64" onload="initimg(this,100,100)" onClick="window.open(this.src,null,'')"><%else%><img src='img/face/09.gif' border=0 width=75 height=75><%end if%></td>
	</tr>
       </table>
     </td>
   </tr>
   <tr>
     <td align="Center"><%if Hx66_Grade=0 then%>普通会员<%end if%><%if Hx66_Grade=1 then%><font color=red>VIP会员</font><%end if%>:<%=Hx66_name%></td>
   </tr>
<%
set rsm=server.createobject("adodb.recordset")
sql="select * from message where incept='"&Hx66_name&"' and flag=0 order by flag"
rsm.open sql,conn,1,1
if not rsm.eof then 
%>
   <tr>
     <td align="Center"><a href="Messager.asp?action=inbox">短信<%if rsm("flag")<>0 then%>(0)<%else%><font color=red><b>(<%=rsm.recordcount%>)</b></font><bgsound src="img/mail.wav" loop="1"><%end if%></a>&nbsp;<a href="User_main.asp">会员中心</a>&nbsp;<a href="UserChkLogin.asp?hx66=logout">安全退出</a></td>
   </tr>
<%else%>
   <tr>
     <td align="Center" colspan="3"><a href="Messager.asp?action=inbox">短信(0)</a>&nbsp;<a href="user_main.asp">会员中心</a>&nbsp;<a href="UserChkLogin.asp?hx66=logout">安全退出</a></td>
   </tr>
<%
end if
rsm.close
set rsm=nothing
Response.Write "</table>" & vbCrLf
end if
end sub

'=================================================
'过程名:guesterror,HxErrMsg
'作  用:错误判断页面
'参  数:无
'web:    www.ynsky.com.cn
'=================================================
sub guesterror()%>
<html>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=gb2312' />
<title>您没有权限操作!!</title>
<link href='skin/1/css.css' rel='stylesheet' type='text/css' />
</head>
<body><br><br>
<table width='100%' height='96' border='0' cellpadding='0' cellspacing='0'>
<tr>
<td align='center'><p><font color='##666666'>此页不允许游客观看!请登陆后操作!</font></p><p><font color='##666666'><a href='UserReg.asp'>登陆或注册</a></font></p></td>
</tr>
</table>
</body></html>
<%end sub

sub HxErrMsg()
	dim HxErr
	HxErr=HxErr & "<html><head><title>错误信息</title><meta http-equiv='Content-Type' content='text/html; charset=gb2312'>" & vbcrlf
	HxErr=HxErr & "<link href='skin/1/css.css' rel='stylesheet' type='text/css'></head><body><br><br>" & vbcrlf
	HxErr=HxErr & "<table cellpadding=2 cellspacing=1 border=0 width=400 class='border' align=center>" & vbcrlf
	HxErr=HxErr & "  <tr align='center' class='title'><td height='22'><strong>错误信息</strong></td></tr>" & vbcrlf
	HxErr=HxErr & "  <tr class='tdbg'><td height='100' valign='top'><b>产生错误的可能原因:</b>" & errmsg &"</td></tr>" & vbcrlf
	HxErr=HxErr & "  <tr align='center' class='tdbg'><td><a href='javascript:history.go(-1)'>&lt;&lt; 返回上一页</a></td></tr>" & vbcrlf
	HxErr=HxErr & "</table>" & vbcrlf
	HxErr=HxErr & "</body></html>" & vbcrlf
	response.write HxErr
end sub

'=================================================
'过程名:Cms_diary
'作  用:公告调用公用函数
'参  数:dclass
'        dclass——公告分类ID,1-首页,2-新闻文章,3-音乐影视,4-图片资源,5-留言,6-商城供求
'web:    www.ynsky.com.cn
'=================================================
sub Cms_diary(dclass)
Response.Write "<MARQUEE scrollAmount=2 scrollDelay=4 width=450 align=""left"" onmouseover=""this.stop()"" onmouseout=""this.start()"">"
sql="SELECT d_content,d_date FROM diary Where d_top=0 and (d_class=0 or d_class="&dclass&") ORDER BY d_id DESC"   
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
i=0
do while not rs.eof
i=i+1
Response.Write "&nbsp;&nbsp;"&i&"、"&rs("d_content")&""
Response.Write "&nbsp;["&year(rs("d_date"))&"-"&month(rs("d_date"))&"-"&day(rs("d_date"))&"]" & vbCrLf
rs.movenext
loop
if rs.eof and rs.bof then
Response.Write "<font color=""#666666"">目前尚无公告!</font>"
end if
rs.close
set rs=nothing
Response.Write "</MARQUEE>"
end sub

'=================================================
'过程名:count
'作  用:首网站统计调用函数
'参  数:无
'web:    www.ynsky.com.cn
'=================================================
sub count()
set newsuser = conn.execute("select top 1 UserID,UserName from [User] order by UserID desc")
sql="select * from allcount"
set rs=conn.execute(sql)
articlecount=rs("articlecount")
softcount=rs("softcount")
coolsitescount=rs("coolsitescount")
djcount=rs("djcount")
newscount=rs("newscount")
piccount=rs("piccount")
jscount=rs("jscount")
usercount=rs("usercount")
jokecount=rs("jokecount")
flashcount=rs("flashcount")
%>
&nbsp;□-走进云南:<font color=red><%=newscount%></FONT> 篇<br>
&nbsp;□-<a href="http://www.ynsky.com.cn">云南旅游</a>:<font color=red><%=articlecount%></FONT> 条<br>
&nbsp;□-旅游手记:<font color=red><%=coolsitescount%></FONT> 篇<br>
&nbsp;□-精美图片:<font color=red><%=piccount%></FONT> 张<br>
&nbsp;□-幽默笑话:<font color=red><%=jokecount%></FONT> 篇<br>
&nbsp;□-注册会员:<font color=red><%=usercount%></FONT> 人<br>
&nbsp;□-新进来宾:<font color=red><%=newsuser(1)%></FONT><br>
&nbsp;□-<a href="http://www.ynsky.com.cn">云南旅游信息网</a><br>
&nbsp;□-昆明康辉国旅欢迎您
<%end sub

'=================================================
'过程名:valid_ip
'作  用:IP 过滤判断
'参  数:无
'web:    www.ynsky.com.cn
'=================================================
function valid_ip(guest_ip)    'IP 过滤判断
  valid_ip="true"
  dim ti,tdim,hn,aabb,ccdd
  hn=guest_ip
  tdim=split(bad_ip,"|")
  aabb=split(hn,".")
  for ti=0 to ubound(tdim)
    ccdd=split(tdim(ti),".")
    if ccdd(3)="*" then
      if ccdd(2)="*" and ccdd(3)="*" then
        if ccdd(1)="*" and ccdd(2)="*" and ccdd(3)="*" then
          hn=aabb(0)&".*.*.*"
          if instr(hn,tdim(ti))>0 then valid_ip="false":erase tdim:exit function
		else
          hn=aabb(0)&"."&aabb(1)&".*.*"
          if instr(hn,tdim(ti))>0 then valid_ip="no":erase tdim:exit function
		end if
	  else
        hn=aabb(0)&"."&aabb(1)&"."&aabb(2)&".*"
        if instr(hn,tdim(ti))>0 then valid_ip="false":erase tdim:exit function
	  end if
    else
      hn=aabb(0)&"."&aabb(1)&"."&aabb(2)&"."&aabb(3)
	  if instr(hn,tdim(ti))>0 then valid_ip="false":erase tdim:exit function
	end if
  next
  erase tdim
end function


'****************************************************
%>

⌨️ 快捷键说明

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