<%



'功能：检测管理员是否有文件访问权限
'参数：op为权限字符串中对应的值
Function hrPower(op,t)
	admik = Cstr(Trim(Request.Cookies("log")(CacheName&"admik")))
	If admik="0" Then

		hrPower=True
	Else
		If Instr(admik,","&op&",")>0 Then
			hrPower = True

		Else
			hrPower = False

		End If
	End If
	If (t=1) Then
		If hrPower=False Then
			'Response.Write("<style>*{font-size:14px;font-weight:bold;color:red;}</style><br><br><br><br><span style='padding:150px;'>您没有本页的操作权限！</span>")
			Call ReturnError("您没有本页的操作权限！")
			Response.End()
		End If
	End If
End Function







'功能：单独获取管理员权限字符串
Function getAdminPurview()
	If Request.Cookies("log")(CacheName&"admik")<>"0" Then
		getAdminPurview = False
	Else
		getAdminPurview = True
	End If
End Function
'功能：返回管理员名称以添加到数据库
Function getAdminNameToDb()
	If Request.Cookies("log")(CacheName&"admik")<>"0" Then
		getAdminNameToDb = Request.Cookies("log")(CacheName&"admname")
	Else
		getAdminNameToDb = ""
	End If
End Function



'输出错误提示信息
Sub ReturnError(ErrMsg)
	Response.Write "<meta http-equiv=refresh content=3;url=javascript:history.go(-1)>"
	Response.Write "<table cellpadding=5 cellspacing=0 border=0 align=center class=tableBorder1>" & vbCrLf
	Response.Write "  <tr><th colspan=2 align=""left""> 错误提示信息!</th></tr>" & vbCrLf
	Response.Write "  <tr><td align=center width=""20%"" class=TableRow1></td><td width=""80%"" class=TableRow1><b style=color:blue><span id=jump>3</span> 秒钟后系统将自动返回</b><br><b>产生错误的可能原因：</b><BR>" & ErrMsg & "</td></tr>" & vbCrLf
	Response.Write "  <tr><td colspan=2 align=center height=25 class=TableRow2><a href=javascript:history.go(-1)>返回上一页...</a></td></tr>" & vbCrLf
	Response.Write "</table><p>&nbsp;</p>" & vbCrLf
	Response.Write "<script>function countDown(secs){jump.innerText=secs;if(--secs>0)setTimeout(""countDown(""+secs+"")"",1000);}countDown(3);</script>"
	Response.End()
End Sub
'输出成功提示信息
Sub Succeed(SucMsg)
        Response.Write "<meta http-equiv=refresh content=3;url=" & Request.ServerVariables("HTTP_REFERER") & ">"
	Response.Write "<table align=""center"" border=""0"" cellpadding=""5"" cellspacing=""0"" class=""tableBorder1"">" & vbCrLf
	Response.Write "    <tr> " & vbCrLf
	Response.Write "      <th colspan=2 align=""left""> 成功提示信息!</th>" & vbCrLf
	Response.Write "    </tr>" & vbCrLf
	Response.Write "  <tr><td align=center width=""20%"" class=TableRow1></td><td width=""80%"" class=TableRow1>"
	Response.Write " <b style=color:blue><span id=jump>3</span> 秒钟后系统将自动返回</b><br>"
	Response.Write SucMsg & "</td></tr>" & vbCrLf
	Response.Write "  <tr><td colspan=2 align=center height=25 class=TableRow2><a href='" & Request.ServerVariables("HTTP_REFERER") & "'>返回上一页...</a></td></tr>" & vbCrLf
	Response.Write " </table><p>&nbsp;</p>" & vbCrLf
	Response.Write "<script>function countDown(secs){jump.innerText=secs;if(--secs>0)setTimeout(""countDown(""+secs+"")"",1000);}countDown(5);</script>"
	Response.End()
End Sub


%>