📄 show.asp
字号:
<%@ Language=VBScript %>
<%
'文件功能:显示单个员工信息明细
'版权所有:万户网络
'编写人员:房鹏
'编写时间:2003-8-12
'修改人员:房鹏
'修改时间:2003-8-13
'修改目的:设立权限控制
%>
<!-- #include file="../Common/Cls_DbProcess2.1.asp" -->
<!-- #include file="../wh_employees/Cls_wh_employees.asp" -->
<!-- #include file="../pub/conn.asp" -->
<!-- #include file="../pub/fun.asp" -->
<%call checklogin()%>
<HTML>
<HEAD>
<META NAME="GENERATOR" CONTENT="WindSoft Programmer3">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=gb2312">
<TITLE>wh_employees--查看</TITLE>
<%
dim mStr_WINDCallType
mStr_WINDCallType = trim(request.querystring("WINDCallType")) '调用方式
dim mStr_WINDURL '请将需要全局传递的变量链接到本变量上,使用方法参见WINDCallType,多个变量之间采用&链接
mStr_WINDURL = "WINDCallType="+Server.URLEncode(mStr_WINDCallType)
'以下为全局变量定义
dim mStr_PK_employee_id '主鍵
dim dpt_id
call InitData()
dpt_id=getdpt(mStr_PK_employee_id)
%>
</HEAD>
<BODY>
<TABLE WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0">
<TR>
<TD>
<FONT CLASS="locationhead">您的位置:</FONT>
<A CLASS="locationdata" HREF="Main.asp?<% =mStr_WINDURL%>">员工信息</A>>>
<A CLASS="locationlastdata" HREF="javascript:window.location.reload()">查看</A>
</TD>
</TR>
</TABLE>
<BR>
<%
call ShowData_wh_employees() '显示wh_employees
%>
<TABLE BORDER="0" WIDTH="90%">
<TR>
<TD ALIGN="LEFT">
<A HREF="javascript:window.history.back()">返回</A>
</TD>
<TD ALIGN="RIGHT">
<%if session("right")=2 or session("right")=4 then%>
<A HREF="Update.asp?<% =mStr_WINDURL%>">新增</A>
<%end if%>
<%if (session("right")=1 and session("emp")= int(mStr_PK_employee_id)) or session("right") =4 or (session("right")=2 and session("dpt")=dpt_id) or (session("right")=3 and session("emp")= int(mStr_PK_employee_id)) then%>
<A HREF="Update.asp?<% =mStr_WINDURL%>&PK_employee_id=<% Response.write mStr_PK_employee_id%>">修改</A>
<%end if%>
<%if session("right") =4 or (session("right")=2 and session("dpt")=dpt_id) then%>
<A HREF="javascript:DeleteData()">删除</A>
<%end if%>
<A HREF="javascript:WindowPrint()">打印</A>
<A HREF="Search.asp?<% =mStr_WINDURL%>">查询</A>
</TD>
</TR>
</TABLE>
<DIV STYLE="DISPLAY:NONE">
</DIV>
</BODY>
</HTML>
<%
function InitData()
mStr_PK_employee_id = trim(request.querystring("PK_employee_id"))
end function
function ShowData_wh_employees()
dim Str_employee_id 'employee_id
dim Str_employee_name '姓名
dim Str_employee_type '类型
dim Str_employee_edu '学历
dim Str_employee_joindate '参加工作时间
dim Str_employee_birth '生日
dim Str_employee_memo '备注
dim Str_employee_right '权限
dim Str_dpt_id '部门ID
dim Rec_Data '结果集
if (mStr_PK_employee_id<>"") then
set Rec_Data = mCls_wh_employees.GetData(mStr_PK_employee_id)
if (not Rec_Data.eof) then
Str_employee_id = Server.HTMLEncode(trim(Rec_Data.fields("employee_id") & ""))
Str_employee_name = Server.HTMLEncode(trim(Rec_Data.fields("employee_name") & ""))
Str_employee_type = Server.HTMLEncode(trim(Rec_Data.fields("employee_type") & ""))
Str_employee_edu = Server.HTMLEncode(trim(Rec_Data.fields("employee_edu") & ""))
Str_employee_joindate = Server.HTMLEncode(trim(Rec_Data.fields("employee_joindate") & ""))
Str_employee_birth = Server.HTMLEncode(trim(Rec_Data.fields("employee_birth") & ""))
Str_employee_memo = Server.HTMLEncode(trim(Rec_Data.fields("employee_memo") & ""))
Str_employee_right = Server.HTMLEncode(trim(Rec_Data.fields("employee_right") & ""))
Str_dpt_id = Server.HTMLEncode(trim(Rec_Data.fields("dpt_id") & ""))
Str_employee_memo = replace(Str_employee_memo,vbCrlf,"<BR> ")
'显示
%>
<!-- #include file="../wh_employees/ShowOne_wh_employees.asp" -->
<%
end if
Rec_Data.Close
end if
if (mStr_PK_employee_id="") then
call ShowMess(16,"找不到相应的 [wh_employees]!")
call WindowBack()
end if
end function
%>
<SCRIPT LANGUAGE="javascript">
<!--********************************************************************************-->
function DeleteData(){
var w_date=new Date()
if (window.confirm("要删除所选定的 [wh_employees]吗?")){
window.location="Delete.asp?<% =mStr_WINDURL%>&time="+w_date.getTime()+"&PK_employee_id='<% Response.write mStr_PK_employee_id%>'"
}
}
<!--********************************************************************************-->
</SCRIPT>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -