⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 f_text.asp

📁 人事管理系统。。。 包括了所有的基本功能
💻 ASP
字号:
<% 
'////定义错误指向页
sub cnerror(errtext,errurl)
'判断错误使用的跳转方式
if errurl="0" then errurl="javascript:history.back()"
if errurl="1" then errurl=Request.ServerVariables("HTTP_REFERER")
if errurl="" then errurl="index.asp"
%>
<link href="fun/style.css" rel="stylesheet" type="text/css" />
<body>
<script language="JavaScript" type="text/javascript">
document.write('<div style="width:'+document.body.clientWidth+'px; height:580px;position:absolute;z-index:2; left:0px; top:0px; background-image:url(skins/indexb.gif)"><div style="position:absolute;z-index:3;left:'+document.body.clientWidth/4+'px;top:200px;width:50%;border:solid 1px #0066CC;background-color: #FFFFFF;padding:20px;"><div style=" height: 30px;"><b>系统提示:</b></div><div><%=errtext%></div><br><div align="center"><a href="<%=errurl%>"><img src="skins/tishi_submit.png"/  border=0></a></div></div></div>');
</script>

</body>
<% Response.end 
end sub

'///////////////////////
'输入字符限制
function cnshu(shutext,shuds,shuxs,shuname,shulei)
'数内容,最大,最小,提示名,类别,处理方式
if len(shutext)>shuds or len(shutext)<shuxs  then call cnerror("您输入的  "&shuname&" 的信息不能为空,或者与规定的输入要求不符合,请返回检查一次\n\n\规定字符为 "&shuxs&" 至 "&shuds&" 个字符数内!",0)
select case shulei
case "0"  '普通文字型 转
cnshu=replace(replace(Server.HtmlEncode(shutext),chr(32),"&nbsp;"),chr(13)&chr(10),"<br>")
case "1"   '数字型 不能包含
If not isNumeric(shutext) then call cnerror("您输入的 "&shuname&",规定只能是数字,请返回检查!",0)
if  instr(shutext,",")<>0 or shutext<0  then
call cnerror("您输入的 "&shuname&",规定只能是数字,请返回检查!",0)
else
cnshu=shutext
end if
case "2"   '文字型 但是不过滤
cnshu=replace(shutext,"'","""")
if chulizhuru<>"" then
zhuruguolv=split("||and||select||update||chr||delete|| from||script||;||insert||mid||master.||set||chr(37)","||") 
for gl=0 to ubound(zhuruguolv)
cnshu=replace(cnshu,zhuruguolv(gl),"")
next
end if
end select
end function

'///////////////////////////////////
'SQL过滤
'--------定义部份------------------
Dim Fy_Post,Fy_Get,Fy_In,Fy_Inf,Fy_Xh,Fy_db,Fy_dbstr
'自定义需要过滤的字串,用 "|" 分隔
Fy_In = "'|and|exec|insert|select|delete|update|count|*|%|chr|mid|master|truncate|char|script|declare"
'----------------------------------

Fy_Inf = split(Fy_In,"|")
'--------POST部份------------------
if chulizhuru="" then
If Request.Form<>"" Then
For Each Fy_Post In Request.Form

For Fy_Xh=0 To Ubound(Fy_Inf)
If Instr(LCase(Request.Form(Fy_Post)),Fy_Inf(Fy_Xh))<>0 Then
call cnerror("您输入的信息中不要包括\n\n"&replace(Server.HtmlEncode(Fy_Inf(Fy_Xh)),"'","’")&"\n\n请返回检查请取消此内容",0)
End If
Next

Next
End If
end if


'----------------------------------

'--------GET部份-------------------
If Request.QueryString<>"" Then
For Each Fy_Get In Request.QueryString

For Fy_Xh=0 To Ubound(Fy_Inf)
If Instr(LCase(Request.QueryString(Fy_Get)),Fy_Inf(Fy_Xh))<>0 Then
call cnerror("您输入的信息中不要包括\n\n"&replace(Server.HtmlEncode(Fy_Inf(Fy_Xh)),"'","’")&"\n\;请返回检查请取消此内容",0)
End If
Next
Next
End If


'定义
sessname=session("myname")
sesszhiwei=session("myzhiwei")
sesszname=session("myzname")
sessji=session("myshangji")
'Response.Write(session("quanxian"))
sessquan=session("quanxian")

fanhuiurl=Request.ServerVariables("HTTP_REFERER")
if fanhuiurl="" then fanhuiurl="index.asp"

'=================
'登陆验证

sub userok()
if sessname="" then call cnerror("您已经长时间未操作,登陆超时,请重新登陆。","index.asp")
end sub 

%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -