网站最上边浮动的工具条,广告条代码,可关闭

演示地址:http://www.souab.com/Demo/demoClose.html

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>网站最上边浮动的工具条,广告条代码,可关闭</title>
<style type="text/css">
<!--
body { margin: 0px;padding: 0px;text-align: center;}
td {FONT-SIZE: 12px; COLOR: #333;}
#toubiao {BORDER-BOTTOM: #e2e2e2 1px solid;}
a{text-decoration:none;color:#9CCAEF}
-->
</style>

阅读全文>>

ASP屏蔽某个IP或IP段禁止访问网站

可单独放置在某个页面或独立成一个文件进行调用

<%
        '受屏蔽IP地址(段)集合,星号为通配符,通常保存于配置文件中。
        Const BadIPGroup = "94.142.131.20|124.225.74.51|192.168.0.*|59.26.284.*"

        If IsForbidIP(BadIPGroup) = True Then
        Response.Write(GetIP &"系统已记录您的IP地址信息")
  Response.Write("<BR>")
        Response.Write("由于您在本站发布大量垃圾信息!管理员已禁止您访问站点。")
  Response.Write("<BR>")
        Response.Write("需要开通请联系")
        Response.End()
        End If


        '参数vBadIP:要屏蔽的IP段,IP地址集合,用|符号分隔多个IP地址(段)
        '返回Bool:True用户IP在被屏蔽范围,False 反之

        Function IsForbidIP(vBadIP)
        Dim counter, arrIPPart, arrBadIP, arrBadIPPart, i, j
    
       arrBadIP = Split(vBadIP, "|")    
       arrIPPart = Split(GetIP(), ".")
   
       For i = 0 To UBound(arrBadIP)         
      counter = 0
      arrBadIPPart = Split(arrBadIP(i), ".")        
      For j = 0 To UBound(arrIPPart)             
     If(arrBadIPPart(j)) = "*" or Cstr(arrIPPart(j)) = Cstr(arrBadIPPart(j)) Then            
     counter = counter + 1            
             End If            
         Next        
         If counter = 4 Then            
             IsForbidIP = True
             Exit Function
         End If        
     Next
     IsForbidIP = False
     End Function

''返回客户IP地址

        Function GetIP()
       Dim IP
     IP = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
    If IP = "" Then IP = Request.ServerVariables("REMOTE_ADDR")
    GetIP = IP
   End Function
   %>
 

阅读全文>>

post by 不懂戀愛魚兒 | 2009年11月17日 | 归档于 [Asp技术]

仿雅虎首页网站快捷入口

post by 不懂戀愛魚兒 | 2009年7月21日 | 归档于 [TAB标签]
标签: 网站 js

ASP提交留言直接发到指定邮箱(二),现有基础修改

如果网站已经在运行了.且留言是保存到数据库的.现在需要修改的.不防看看下边的文章:

这段代码为演示.如现在的网站留言本样式(具体参照自己的):

<table width="600" border="0" align="center" cellpadding="4" cellspacing="1">
<form action="savegb.asp" method="post" name="add">
  <tr>
    <td>称呼:<input name="name" type="text" id="name"></td>
  </tr>
  <tr>
    <td>电话:<input name="tel" type="text" id="tel"></td>
  </tr>

阅读全文>>

post by 不懂戀愛魚兒 | 2009年6月15日 | 归档于 [Asp技术]

IIS 提示:服务没有及时响应启动或控制请求 解决办法

安装KB939373补丁并重启机器后,winxp系统的IIS默认网站将会停止且无法启动。手动启动时报“服务没有及时响应启动或控制请求”,再进一步检查,World Wide Web Publishing服务不能启动所至,该服务报错为“错误号127,找不到指定的程序”,程序当然是存在的,删除IIS重装还是不行。

阅读全文>>

post by 不懂戀愛魚兒 | 2009年6月13日 | 归档于 [我的日记]
sitemap