<!--#include file="function.mian.asp"-->
<!--#include file="function.Cookies.asp"-->
<!--#include file="function.DH.asp"-->
<!--#include file="function.CT.asp"-->
<!--#include file="function.CZ.asp"-->
<!--#include file="function.RegEx.asp"-->
<!--#include file="function.tag.asp"-->
<!--#include file="function.class.asp"-->
<!--#include file="function.demo.asp"-->
<!--#include file="function.Make.asp"-->
<!--#include file="function.Makeindex.asp"-->
<%
'function.mian.asp 主函数 公共函数
'function.DH.asp   导航子函数
'function.city.asp 城市子函数
'function.HY.asp   行业子函数
'function.RegEx.asp正则函数
'function.tag.asp  标签函数
'function.Make.asp 生成函数

sub LOADING_BUFFER_INI
	response.expires = 0
	response.expiresabsolute = now() - 1
	response.addheader "pragma","no-cache"
	response.addheader "cache-control","private"
	response.cachecontrol = "no-cache"
end sub

sub LOADING_ADMIN_HEAD
	LINE "<html><head><title></title>"
	LINE "<meta http-equiv=""Content-Type"" content=""text/html; charset=gb2312"">"
	LINE "<meta http-equiv=""Content-Language"" content=""gb2312"">"
	LINE "<link href=""css/654_a.css"" rel=""stylesheet"" type=""text/css"">"
	LINE "<link id=""sklink"" href=""css/654_3.css"" rel=""stylesheet"" type=""text/css"">"
	LINE "<SCRIPT src=""css/lib.js"" type=text/javascript></SCRIPT></head>"
	LINE "<body leftmargin=""1"" topmargin=""10"" scroll=""auto"">"
	LINE "<script language=""javascript"">get_skin()</script>"
end sub
	REM 当你在千方百计去掉版权信息时
	REM 是否曾想过自己在失去什么？
sub LOADING_ADMIN_FOOT
	if isobject("conn") then
		conn.close:set conn = nothing
	elseif isobject("conn2") then
		conn2.close:set conn2 = nothing
	end if
	LINE "<table align=""center"" width=""100%"" cellpadding=""2"" cellspacing=""1"" border=""0"">"
	LINE "<tr>"
	LINE "<td align=""middle"" valign=""middle"">"
	LINE "<table align=""center"" width=""100%"" cellpadding=""2"" cellspacing=""1"" class=""tbl"" id=tbl>"
	LINE "<tr>"
	LINE "<td height=""50"" class=""tbl_head""><div align=""center""><b>&copy;2007-2008 CopyRight www1.itmop.com  All Rights Reserved.<BR>Version 2008 Beta 10.08 终极版</b></div></td>"
	LINE "</tr>"
	LINE "</table>"
	LINE "</td>"
	LINE "</tr>"
	LINE "</table>"
	LINE "</body></html>"
end sub
Function Check_Popedom(Pop_Str)
	Dim PopList
	Check_Popedom = false
	If InStr(1,Session("Admin_Pop_List"),"DH654",1)>0 Then	'如果是超级管理员
		Check_Popedom = true
	Else
		PopList = Session("Admin_Pop_List")
		If (PopList <> "") And (Pop_Str <> "") Then
			If InStr(PopList,Pop_Str) <> 0 Then
				Check_Popedom = true
			Else
				Check_Popedom = false
			End if
		Else
			Check_Popedom = false
		End if
	End if
End Function

Function Popedom_List(Pop_Str)
    Dim Popedom_Name
	if InStr(1,Pop_Str,"DH654",1)>0 then
	   Popedom_Name="超级管理员"
	elseif InStr(1,Pop_Str,"DH001",1)>0 then
	   Popedom_Name="系统管理员"
	elseif InStr(1,Pop_Str,"DH002",1)>0 then
	   Popedom_Name="网址审核员"
	elseif InStr(1,Pop_Str,"DH003",1)>0 then
	   Popedom_Name="网址录入员"
	elseif InStr(1,Pop_Str,"DH004",1)>0 then
	   Popedom_Name="留言管理员"
	else
	   Popedom_Name="无权限人员"
	end if
	Popedom_List=Popedom_Name
End Function

Function Pop_User_List(Pop_Str)
    Dim Popedom_Name
	if InStr(1,Pop_Str,"U004",1)>0 then
	   Popedom_Name="特邀贵宾"
	elseif InStr(1,Pop_Str,"U003",1)>0 then
	   Popedom_Name="高级会员"
	elseif InStr(1,Pop_Str,"U002",1)>0 then
	   Popedom_Name="中级会员"
	elseif InStr(1,Pop_Str,"U001",1)>0 then
	   Popedom_Name="初级会员"
	else
	   Popedom_Name="无权会员"
	end if
	Pop_User_List=Popedom_Name
End Function
Function Check_User_Pop(Pop_Str)
	Dim PopList
	Check_User_Pop = false
	PopList = Session("Pop")
	If (PopList <> "") And (Pop_Str <> "") Then
	   If InStr(PopList,Pop_Str) <> 0 Then
		   Check_User_Pop = true
	   Else
		   Check_User_Pop = false
	   End if
	Else
	   Check_User_Pop = false
    End if
End Function


Function IS_Pop(Pop_Str)  '判断是否的 网站配置中心
	IS_Pop = false
	If (site_dh_pop <> "") And (Pop_Str <> "") Then
		If InStr(site_dh_pop,Pop_Str) <> 0 Then
			IS_Pop = true
		Else
			IS_Pop = false
		End if
	Else
		IS_Pop = false
	End if
End Function


'//以下是验证ip锁定函数判断
Function lockedIpCheck
	dim ip  '防止代理ip
    ip = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
    if ip = ""  then
       ip=Request.ServerVariables("Remote_Addr")
    end if
    if instr(ip,"'")>0 then
       ip="0.0.0.0"
    end if	
	dim num_ip,rs_ip,sql_ip
 	num_ip=IpEncode(ip)
    set rs_ip=server.createobject("adodb.recordset")   '限制IP段访问.
	sql_ip="select * from IP654_Lock where int(StartIP)<="&num_ip&" and int(EndIP)>=" & num_ip
    rs_ip.open sql_ip,conn
	if not rs_ip.eof or not rs_ip.bof then
	   rs_ip.close
	   set rs_ip=nothing
	   response.write"<div align=center>你所在网段已被封锁。可能该网段有人捣乱，请联系管理员！</a>"
	   response.end
	end if
    rs_ip.close
    set rs_ip=nothing	
end function
function IpDecode(byval uip)
	if trim(uip)="" or not isnumeric(uip) then
		IpDecode=0
	else
		uip=Cdbl(uip)
		dim ary_ip(3)
        ary_ip(0)=fix(uip/16777216)
        ary_ip(1)=fix((uip-ary_ip(0)*16777216)/65536)
        ary_ip(2)=fix((uip-fix(uip/65536)*65536)/256)
        uip=uip-fix(uip/65536)*65536
        ary_ip(3)=fix(uip-fix(uip/256)*256)
        IpDecode=join(ary_ip,".")
	end if
end function
function IpEncode(byval uip)
	if isnull(uip) or uip="" then
		IpEncode=0
	else
		dim ary_ip,n
		ary_ip=split(trim(uip),".")
		n=ubound(ary_ip)
		if n=3 then
			IpEncode=ary_ip(0)*256*256*256+ary_ip(1)*65536+ary_ip(2)*256+ary_ip(3)
		else
			IpEncode=0
		end if
	end if
end function

Function IsObjInstalled(strClassString)  '组件检测
	On Error Resume Next
	IsObjInstalled = False
	Err = 0
	Dim xTestObj
	Set xTestObj = Server.CreateObject(strClassString)
	If 0 = Err Then IsObjInstalled = True
	Set xTestObj = Nothing
	Err = 0
End Function
Function GetVer(ClassStr)
	'On Error Resume Next
	GetVer = ""
	Err = 0
	Dim xTestObj
	Set xTestObj = Server.CreateObject(ClassStr)
	If 0 = Err Then GetVer = xTestObj.Version
	Set xTestObj = Nothing
	Err = 0
End Function
REM 修改后台版权的撞车去死！
REM 本身都没有要求你的模板上保留版权，已经够意思的了，还修改后台版权。
REM 你Y祖宗十八代肯定都是木jj的太监！！
REM 就因为你这种垃圾，国内优秀的asp程序都加DLL了


'//以下是表格提交函数判断

%>

