📄 inc_sys.asp
字号:
<!--#include file="../../conn.asp"-->
<!--#include file="../../inc/class_sys.asp"-->
<!--#include file="../../inc/inc_valid.asp"-->
<!--#include file="../../inc/md5.asp"-->
<!--#include file="../../inc/inc_control.asp"-->
<%
dim oblog
set oblog=new class_sys
oblog.start
chk_sysadmin
dim admin_name
G_P_PerMax=20
sub chk_sysadmin()
dim admin_password,sql,rs
admin_name=oblog.filt_badstr(session("adminname"))
admin_password=oblog.filt_badstr(session("adminpassword"))
if admin_name="" then
response.redirect "admin_login.asp"
exit sub
end if
sql="select id,roleid from oblog_admin where username='" & admin_name & "' and password='"&admin_password&"'"
If Not IsObject(conn) Then link_database
set rs=conn.execute(sql)
if rs.bof and rs.eof then
set rs=nothing
response.redirect "admin_login.asp"
exit Sub
Else
If rs("roleid") <>0 Then
set rs=nothing
response.redirect "admin_login.asp"
exit Sub
End if
end if
rs.close
set rs=nothing
end sub
Function CheckSafePath(byval strMode)
Dim strPathFrom,strPathSelf,arrFrom,arrSelf,i
CheckSafePath=False
If oBlog.ChkPost=False Then Exit Function
strPathFrom = Replace(LCase(CStr(request.ServerVariables("HTTP_REFERER"))),"http://","")
strPathSelf = Replace(LCase(CStr(request.ServerVariables("URL"))),"http://","")
If strPathFrom="" Then Exit Function
If strPathSelf="" Then Exit Function
arrFrom=Split(strPathFrom,"/")
arrSelf=Split(strPathSelf,"/")
For i=0 To UBound(arrFrom)
'Response.Write "arrFrom("&i&")="& arrFrom(i) & "<BR/>"
Next
For i=0 To UBound(arrSelf)
'Response.Write "arrSelf("&i&")="& arrSelf(i) & "<BR/>"
Next
Select Case strMode
Case "0"
For i = 1 To (UBound(arrSelf)-1)
If arrFrom(i)=arrSelf(i) And Left(arrFrom(UBound(arrfrom)),Len(arrSelf(UBound(arrself))))=arrSelf(UBound(arrself))Then CheckSafePath=True
Next
'If arrFrom(1)=arrSelf(1) And Left(arrFrom(2),Len(arrSelf(2)))=arrSelf(2)Then CheckSafePath=True
'Response.Write checkSafePath
End Select
End Function
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)'><< 返回上一页</a></td></tr>" & vbcrlf
strErr=strErr & "</table>" & vbcrlf
strErr=strErr & "</body></html>" & vbcrlf
response.write strErr
end sub
%>
<script language="javascript">
function CheckSel(Voption,Value)
{
var obj = document.getElementById(Voption);
for (i=0;i<obj.length;i++){
if (obj.options[i].value==Value){
obj.options[i].selected=true;
break;
}
}
}
function chang_size(num,objname)
{
var obj=document.getElementById(objname)
if (parseInt(obj.rows)+num>=3) {
obj.rows = parseInt(obj.rows) + num;
}
if (num>0)
{
obj.width="90%";
}
}
</script>
<script language="javascript" src="../inc/div.js"></script>
<style type="text/css">
#showpage{
CLEAR: both;
text-align: center;
width: 100%;
}
</style>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -