亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? function.asp

?? 一個管理文件,能夠進行各種功能
?? ASP
字號:
<%
'*************************************************
'函數名:gotTopic
'作  用:截字符串,漢字一個算兩個字符,英文算一個字符
'參  數:str   ----原字符串
'       strlen ----截取長度
'返回值:截取后的字符串
'*************************************************
function gotTopic(str,strlen)
	if str="" then
		gotTopic=""
		exit function
	end if
	dim l,t,c, i
	str=replace(replace(replace(replace(str,"&nbsp;"," "),"&quot;",chr(34)),"&gt;",">"),"&lt;","<")
	l=len(str)
	t=0
	for i=1 to l
		c=Abs(Asc(Mid(str,i,1)))
		if c>255 then
			t=t+2
		else
			t=t+1
		end if
		if t>=strlen then
			gotTopic=left(str,i) & "…"
			exit for
		else
			gotTopic=str
		end if
	next
	gotTopic=replace(replace(replace(replace(gotTopic," ","&nbsp;"),chr(34),"&quot;"),">","&gt;"),"<","&lt;")
end function

'***********************************************
'函數名:JoinChar
'作  用:向地址中加入 ? 或 &
'參  數:strUrl  ----網址
'返回值:加了 ? 或 & 的網址
'***********************************************
function JoinChar(strUrl)
	if strUrl="" then
		JoinChar=""
		exit function
	end if
	if InStr(strUrl,"?")<len(strUrl) then 
		if InStr(strUrl,"?")>1 then
			if InStr(strUrl,"&")<len(strUrl) then 
				JoinChar=strUrl & "&"
			else
				JoinChar=strUrl
			end if
		else
			JoinChar=strUrl & "?"
		end if
	else
		JoinChar=strUrl
	end if
end function

'***********************************************
'過程名:showpage
'作  用:顯示“上一頁 下一頁”等信息
'參  數:sfilename  ----鏈接地址
'       totalnumber ----總數量
'       maxperpage  ----每頁數量
'       ShowTotal   ----是否顯示總數量
'       ShowAllPages ---是否用下拉列表顯示所有頁面以供跳轉。有某些頁面不能使用,否則會出現JS錯誤。
'       strUnit     ----計數單位
'***********************************************
sub showpage(sfilename,totalnumber,maxperpage,ShowTotal,ShowAllPages,strUnit)
	dim n, i,strTemp,strUrl
	if totalnumber mod maxperpage=0 then
    	n= totalnumber \ maxperpage
  	else
    	n= totalnumber \ maxperpage+1
  	end if
  	strTemp= "<table align='center'><tr><td>"
	if ShowTotal=true then 
		strTemp=strTemp & "共 <b>" & totalnumber & "</b> " & strUnit & "&nbsp;&nbsp;"
	end if
	strUrl=JoinChar(sfilename)
  	if CurrentPage<2 then
    		strTemp=strTemp & "首頁 上一頁&nbsp;"
  	else
    		strTemp=strTemp & "<a href='" & strUrl & "page=1'>首頁</a>&nbsp;"
    		strTemp=strTemp & "<a href='" & strUrl & "page=" & (CurrentPage-1) & "'>上一頁</a>&nbsp;"
  	end if

  	if n-currentpage<1 then
    		strTemp=strTemp & "下一頁 尾頁"
  	else
    		strTemp=strTemp & "<a href='" & strUrl & "page=" & (CurrentPage+1) & "'>下一頁</a>&nbsp;"
    		strTemp=strTemp & "<a href='" & strUrl & "page=" & n & "'>尾頁</a>"
  	end if
   	strTemp=strTemp & "&nbsp;頁次:<strong><font color=red>" & CurrentPage & "</font>/" & n & "</strong>頁 "
    strTemp=strTemp & "&nbsp;<b>" & maxperpage & "</b>" & strUnit & "/頁"
	if ShowAllPages=True then
		strTemp=strTemp & "&nbsp;轉到:<select name='page' size='1' onchange=""javascript:window.location='" & strUrl & "page=" & "'+this.options[this.selectedIndex].value;"">"   
    	for i = 1 to n   
    		strTemp=strTemp & "<option value='" & i & "'"
			if cint(CurrentPage)=cint(i) then strTemp=strTemp & " selected "
			strTemp=strTemp & ">第" & i & "頁</option>"   
	    next
		strTemp=strTemp & "</select>"
	end if
	strTemp=strTemp & "</td></tr></table>"
	response.write strTemp
end sub

'********************************************
'函數名:IsValidEmail
'作  用:檢查Email地址合法性
'參  數:email ----要檢查的Email地址
'返回值:True  ----Email地址合法
'       False ----Email地址不合法
'********************************************
function IsValidEmail(email)
	dim names, name, i, c
	IsValidEmail = true
	names = Split(email, "@")
	if UBound(names) <> 1 then
	   IsValidEmail = false
	   exit function
	end if
	for each name in names
		if Len(name) <= 0 then
			IsValidEmail = false
    		exit function
		end if
		for i = 1 to Len(name)
		    c = Lcase(Mid(name, i, 1))
			if InStr("abcdefghijklmnopqrstuvwxyz_-.", c) <= 0 and not IsNumeric(c) then
		       IsValidEmail = false
		       exit function
		     end if
	   next
	   if Left(name, 1) = "." or Right(name, 1) = "." then
    	  IsValidEmail = false
	      exit function
	   end if
	next
	if InStr(names(1), ".") <= 0 then
		IsValidEmail = false
	   exit function
	end if
	i = Len(names(1)) - InStrRev(names(1), ".")
	if i <> 2 and i <> 3 then
	   IsValidEmail = false
	   exit function
	end if
	if InStr(email, "..") > 0 then
	   IsValidEmail = false
	end if
end function

'***************************************************
'函數名:IsObjInstalled
'作  用:檢查組件是否已經安裝
'參  數:strClassString ----組件名
'返回值:True  ----已經安裝
'       False ----沒有安裝
'***************************************************
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

'**************************************************
'函數名:strLength
'作  用:求字符串長度。漢字算兩個字符,英文算一個字符。
'參  數:str  ----要求長度的字符串
'返回值:字符串長度
'**************************************************
function strLength(str)
	ON ERROR RESUME NEXT
	dim WINNT_CHINESE
	WINNT_CHINESE    = (len("中國")=2)
	if WINNT_CHINESE then
        dim l,t,c
        dim i
        l=len(str)
        t=l
        for i=1 to l
        	c=asc(mid(str,i,1))
            if c<0 then c=c+65536
            if c>255 then
                t=t+1
            end if
        next
        strLength=t
    else 
        strLength=len(str)
    end if
    if err.number<>0 then err.clear
end function

'------------------檢查某一目錄是否存在-------------------
Function CheckDir(FolderPath)
	dim fso
	folderpath=Server.MapPath(".")&"\"&folderpath
	Set fso1 = Server.CreateObject("Scripting.FileSystemObject")
	If fso.FolderExists(FolderPath) then
	'存在
		CheckDir = True
	Else
	'不存在
		CheckDir = False
	End if
	Set fso = nothing
End Function

'-------------根據指定名稱生成目錄---------
Function MakeNewsDir(foldername)
	dim fso,f
	Set fso = Server.CreateObject("Scripting.FileSystemObject")
    Set f = fso.CreateFolder(foldername)
    MakeNewsDir = True
	Set fso = nothing
End Function


'****************************************************
'函數名:SendMail
'作  用:用Jmail組件發送郵件
'參  數:ServerAddress  ----服務器地址
'        AddRecipient  ----收信人地址
'        Subject       ----主題
'        Body          ----信件內容
'        Sender        ----發信人地址
'****************************************************
function SendMail(MailtoAddress,MailtoName,Subject,MailBody,FromName,MailFrom,Priority)
	on error resume next
	Dim JMail
	Set JMail=Server.CreateObject("JMail.Message")
	if err then
		SendMail= "<br><li>沒有安裝JMail組件</li>"
		err.clear
		exit function
	end if
	JMail.Charset="gb2312"          '郵件編碼
	JMail.silent=true
	JMail.ContentType = "text/html"     '郵件正文格式
	JMail.ServerAddress=MailServer     '用來發送郵件的SMTP服務器
   	'如果服務器需要SMTP身份驗證則還需指定以下參數
	JMail.MailServerUserName = MailServerUserName    '登錄用戶名
   	JMail.MailServerPassWord = MailServerPassword        '登錄密碼
  	JMail.MailDomain = MailDomain       '域名(如果用“name@domain.com”這樣的用戶名登錄時,請指明domain.com
	JMail.AddRecipient MailtoAddress,MailtoName     '收信人
	JMail.Subject=Subject         '主題
	JMail.HMTLBody=MailBody       '郵件正文(HTML格式)
	JMail.Body=MailBody          '郵件正文(純文本格式)
	JMail.FromName=FromName         '發信人姓名
	JMail.From = MailFrom         '發信人Email
	JMail.Priority=Priority              '郵件等級,1為加急,3為普通,5為低級
	JMail.Send(MailServer)
	SendMail =JMail.ErrorMessage
	JMail.Close
	Set JMail=nothing
end function

'****************************************************
'過程名:WriteErrMsg
'作  用:顯示錯誤提示信息
'參  數:無
'****************************************************
sub WriteErrMsg()
	dim strErr
	strErr=strErr & "<html><head><title>錯誤信息</title><meta http-equiv='Content-Type' content='text/html; charset=gb2312'>" & vbcrlf
	strErr=strErr & "<link href='style.css' rel='stylesheet' type='text/css'></head><body><br><br>" & vbcrlf
	strErr=strErr & "<table cellpadding=2 cellspacing=1 border=0 width=400 class='border' align=center>" & vbcrlf
	strErr=strErr & "  <tr align='center' class='title'><td height='22'><strong>錯誤信息</strong></td></tr>" & vbcrlf
	strErr=strErr & "  <tr class='tdbg'><td height='100' valign='top'><b>產生錯誤的可能原因:</b>" & errmsg &"</td></tr>" & vbcrlf
	strErr=strErr & "  <tr align='center' class='tdbg'><td><a href='javascript:history.go(-1)'>&lt;&lt; 返回上一頁</a></td></tr>" & vbcrlf
	strErr=strErr & "</table>" & vbcrlf
	strErr=strErr & "</body></html>" & vbcrlf
	response.write strErr
end sub

'****************************************************
'過程名:WriteSuccessMsg
'作  用:顯示成功提示信息
'參  數:無
'****************************************************
sub WriteSuccessMsg(SuccessMsg)
	dim strSuccess
	strSuccess=strSuccess & "<html><head><title>成功信息</title><meta http-equiv='Content-Type' content='text/html; charset=gb2312'>" & vbcrlf
	strSuccess=strSuccess & "<link href='style.css' rel='stylesheet' type='text/css'></head><body><br><br>" & vbcrlf
	strSuccess=strSuccess & "<table cellpadding=2 cellspacing=1 border=0 width=400 class='border' align=center>" & vbcrlf
	strSuccess=strSuccess & "  <tr align='center' class='title'><td height='22'><strong>恭喜你!</strong></td></tr>" & vbcrlf
	strSuccess=strSuccess & "  <tr class='tdbg'><td height='100' valign='top'><br>" & SuccessMsg &"</td></tr>" & vbcrlf
	strSuccess=strSuccess & "  <tr align='center' class='tdbg'><td>&nbsp;</td></tr>" & vbcrlf
	strSuccess=strSuccess & "</table>" & vbcrlf
	strSuccess=strSuccess & "</body></html>" & vbcrlf
	response.write strSuccess
end sub

'**************************************************
'函數名:CheckUserLogined
'作  用:檢查用戶是否登錄
'參  數:無
'返回值:True ----已經登錄
'        False ---沒有登錄
'**************************************************
function CheckUserLogined()
	dim Logined,UserName,Password,UserLevel,rs,sql
	Logined=True
	UserName=Request.Cookies("asp163")("UserName")
	Password=Request.Cookies("asp163")("Password")
	UserLevel=Request.Cookies("asp163")("UserLevel")
	if UserName="" then
		Logined=False
	end if
	if Password="" then
		Logined=False
	end if
	if UserLevel="" then
		Logined=False
	end if
	if Logined=True then
		username=replace(trim(username),"'","")
		password=replace(trim(password),"'","")
		UserLevel=Cint(trim(UserLevel))
		set rs=server.createobject("adodb.recordset")
		sql="select * from [User] where LockUser=False and username='" & username & "' and password='" & password &"'"
		rs.open sql,conn,1,1
		if rs.bof and rs.eof then
			Logined=False
		else
			if password<>rs("password") or UserLevel<rs("UserLevel") then
				Logined=False
			end if
		end if
		rs.close
		set rs=nothing
	end if
	CheckUserLogined=Logined
end function

function ReplaceBadChar(strChar)
	if strChar="" then
		ReplaceBadChar=""
	else
		ReplaceBadChar=replace(replace(replace(replace(replace(replace(replace(strChar,"'",""),"*",""),"?",""),"(",""),")",""),"<",""),".","")
	end if
end function


'=================================================
'過程名:ShowSearchForm
'作  用:顯示文章搜索表單
'參  數:ShowType ----顯示方式。1為簡潔模式,2為標準模式,3為高級模式
'=================================================
sub ShowSearchForm(Action,ShowType)
	if ShowType<>1 and ShowType<>2 and ShowType<>3 then
		ShowType=1
	end if
	response.write "<table border='0' cellpadding='0' cellspacing='0'>"
	response.write "<form method='Get' name='SearchForm' action='" & Action & "'>"
	response.write "<tr><td height='28' align='center'>"
	if ShowType=1 then
		response.write "<input type='text' name='keyword'  size='15' value='關鍵字' maxlength='50' onFocus='this.select();'>&nbsp;"
		response.write "<input type='hidden' name='field' value='Title'>"
		response.write "<input type='submit' name='Submit'  value='搜索'>"
		'response.write "<br><br>高級搜索"
	elseif Showtype=2 then
		response.write "<select name='Field' size='1'>"
    	response.write "<option value='Title' selected>文章標題</option>"
	    response.write "<option value='Content'>文章內容</option>"
    	response.write "<option value='Author'>文章作者</option>"
    	response.write "<option value='Editor'>編輯姓名</option>"
		response.write "</select>&nbsp;"
		response.write "<select name='ClassID'><option value=''>所有欄目</option>"
		call Admin_ShowClass_Option(1,0)
		response.write "</select>&nbsp;<input type='text' name='keyword'  size='20' value='關鍵字' maxlength='50' onFocus='this.select();'>&nbsp;"
		response.write "<input type='submit' name='Submit'  value=' 搜索 '>"
	elseif Showtype=3 then
	
	end if
	response.write "</td></tr></form></table>"
end sub

%>

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
中文一区一区三区高中清不卡| a级精品国产片在线观看| 欧美日韩国产乱码电影| 亚洲国产一区二区三区| 色综合激情五月| 中文字幕av资源一区| 国产成人啪免费观看软件| 国产精品久久一卡二卡| 成人激情电影免费在线观看| 国产精品欧美一区二区三区| 色综合久久88色综合天天免费| **欧美大码日韩| 91老师片黄在线观看| 午夜视频一区在线观看| 日韩午夜电影在线观看| 精品一区二区在线视频| 国产精品久久久久三级| 91黄色小视频| 欧美国产日韩a欧美在线观看 | 日本不卡在线视频| 欧美一区二区国产| 激情成人综合网| 成人免费小视频| 欧美日韩综合一区| 香蕉成人伊视频在线观看| 日韩欧美一级在线播放| 国产成人av电影免费在线观看| 国产人久久人人人人爽| 欧美在线观看一区| 日韩精品国产精品| www精品美女久久久tv| 91免费看片在线观看| 亚洲国产综合视频在线观看| 91超碰这里只有精品国产| 国产成人精品免费视频网站| 亚洲精品午夜久久久| 在线视频你懂得一区二区三区| 老色鬼精品视频在线观看播放| 久久精品人人做人人爽人人| 久久99精品视频| 国产精品国产三级国产普通话99| 一本一本久久a久久精品综合麻豆 一本一道波多野结衣一区二区 | 一区二区三区小说| 91精品免费在线观看| 免费在线观看精品| 欧美国产综合一区二区| 日本韩国一区二区三区视频| 国产资源精品在线观看| 一区二区视频在线| 欧美电影免费观看高清完整版| 99久久99久久免费精品蜜臀| 三级久久三级久久久| 久久午夜电影网| 欧美日韩国产美女| 国产电影一区在线| 亚洲一区二区偷拍精品| 国产欧美一区二区精品久导航| 日本道精品一区二区三区| 天天综合网 天天综合色| 亚洲欧洲99久久| 91精品国产麻豆国产自产在线| 国产麻豆精品视频| 视频一区视频二区在线观看| 中文字幕欧美国产| 欧美日韩国产免费| 成人黄色a**站在线观看| 日韩不卡手机在线v区| 亚洲精品写真福利| 久久男人中文字幕资源站| 不卡的av电影| 精品中文字幕一区二区小辣椒| 久久久久久久久99精品| 欧美精品免费视频| 91麻豆福利精品推荐| 国产一区二区视频在线| 一色桃子久久精品亚洲| 久久精品男人天堂av| 欧美久久久久免费| 成人激情免费网站| 国内成人精品2018免费看| 亚洲专区一二三| 成人免费视频在线观看| 久久久久久久综合色一本| 欧美喷水一区二区| 色香蕉久久蜜桃| 国产成人精品免费看| 日本成人在线一区| 一区二区激情视频| 久久精品日韩一区二区三区| 欧美一区二区黄| 欧美色图一区二区三区| 91原创在线视频| 免费成人在线观看视频| 五月天网站亚洲| 一区二区视频在线看| 亚洲卡通欧美制服中文| 国产精品久久免费看| 日韩无一区二区| 日韩一级完整毛片| 欧美日韩精品三区| 欧美日本一道本| 色呦呦一区二区三区| 东方aⅴ免费观看久久av| 国产成人精品一区二| 精品亚洲成a人在线观看 | 久久久噜噜噜久噜久久综合| 91麻豆精品国产91久久久使用方法 | 欧美激情综合五月色丁香| 日韩欧美一区在线| 日韩精品一区二区三区在线观看| 欧美日本免费一区二区三区| 欧美性生活大片视频| 欧美日韩在线播放三区| 色天使久久综合网天天| 色综合网站在线| 91农村精品一区二区在线| 成人免费毛片高清视频| 99精品视频一区| www.亚洲免费av| 床上的激情91.| 99综合影院在线| 成人av在线资源网站| 狠狠色丁香久久婷婷综| 高清免费成人av| 成人一区二区三区| 北条麻妃一区二区三区| www.久久精品| 92国产精品观看| 在线观看91视频| 欧美三级一区二区| 欧美性受xxxx| 日韩欧美国产午夜精品| 精品少妇一区二区三区| 国产片一区二区| 中文av一区特黄| 国产精品美女久久久久久| 亚洲精品一卡二卡| 亚洲一区二区三区四区在线观看 | 国产精品一级片| 大胆欧美人体老妇| 91在线高清观看| 欧美精品第一页| 欧美大片免费久久精品三p| 国产亚洲一区二区三区四区| 中文字幕乱码一区二区免费| 中文字幕在线一区免费| 亚洲v日本v欧美v久久精品| 日本午夜精品视频在线观看 | 日韩一区中文字幕| 亚洲伊人伊色伊影伊综合网| 亚洲一区二区在线播放相泽| 美女国产一区二区| 狠狠色狠狠色合久久伊人| 国产乱子伦视频一区二区三区 | 午夜精品福利一区二区三区蜜桃| 美女看a上一区| 国内精品在线播放| 国产成人精品一区二区三区四区 | 欧美疯狂做受xxxx富婆| 欧美成人精精品一区二区频| 精品国产乱码久久久久久1区2区 | 蜜乳av一区二区| fc2成人免费人成在线观看播放| 日本韩国精品在线| 欧美精品自拍偷拍| 久久亚洲精精品中文字幕早川悠里 | 国产一区 二区 三区一级| 91视频你懂的| 在线播放视频一区| 欧美精品一区二区三区久久久| 中文字幕中文字幕一区| 亚洲444eee在线观看| 国产黑丝在线一区二区三区| 91麻豆视频网站| 日韩美一区二区三区| 国产精品久久综合| 亚洲在线成人精品| 欧美a级一区二区| 波多野结衣欧美| 欧美猛男男办公室激情| 国产欧美日韩精品一区| 亚洲免费观看高清| 麻豆精品视频在线| 91麻豆123| 欧美xxxxx牲另类人与| 亚洲精品欧美二区三区中文字幕| 日韩精品电影在线观看| 国产成人午夜视频| 91精品国产91热久久久做人人 | 亚洲成在线观看| 国产激情视频一区二区三区欧美| 欧美午夜精品一区| 中文字幕精品三区| 日本免费新一区视频| 成人午夜精品一区二区三区| 日韩精品一区二区三区四区 | 久久精品欧美一区二区三区不卡 | 亚洲午夜久久久久久久久久久| 紧缚捆绑精品一区二区| 欧美日本在线视频|