📄 zhiwei.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="DataBase/conn.asp" -->
<!--#include file=yan.asp-->
<!--#include file=purview.asp-->
<%
call zhiweishezhi
if request("post")<>"" then
if request("zhiwei")<>"" then
set rs1=server.CreateObject("adodb.recordset")
sql1="Select * from tb_ZhiWei "
rs1.Open sql1,conn,1,3
rs1.addnew
rs1("zhiwei")=request("zhiwei")
rs1("suoshu")=request("suoshu")
rs1.update
rs1.close
set rs1=nothing
response.Write("<script language=javascript>alert('提交成功');location='zhiwei.asp'</script>")
else
response.Write("<script language=javascript>alert('职位名称必须填写');location='zhiwei.asp'</script>")
end if
end if
set rs=server.CreateObject("adodb.recordset")
sql="Select * from tb_dept order by up"
rs.Open sql,conn,1,3
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<style type="text/css">
<!--
body,td,th {
font-size: 12px;
}
a:link {
color: #0000FF;
}
a:visited {
color: #0000FF;
}
a:hover {
color: #0000FF;
}
.style1 {color: #0000FF}
-->
</style>
<link href="CSS/css.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style3 {color: #FF0000}
.style4 {color: #000000}
-->
</style>
</head>
<body topmargin="0" leftmargin="0">
<table width="550" border="0" align="center">
<form name="form1" method="post" action="zhiwei.asp">
<tr>
<td width="55%" height="30"> - <span class="style3">人事管理</span>→<span class="style1">人力规划</span>→<font color="#FF0000">职位设置</font></td>
</tr>
<tr>
<td height="14"> 所属部门:
<select name="suoshu" id="select2">
<%
do while not rs.EOF
xian=""
for i=1 to rs("level")-1
xian= xian&"├"
next
xian = xian&"〖"&trim(rs("title"))&"〗"
%>
<option value="<%=rs("id")%>"><%=xian%></option>
<%
rs.movenext
loop
%>
</select>
职位名称:
<input name="zhiwei" type="text" class="wenben" >
<input name="Submit" type="submit" class="botton" value="添加职位">
<input name="post" type="hidden" id="post" value="true"></td>
</tr>
</form>
</table>
<table width="550" border="0" align="center" cellspacing="0" bgcolor="#FFFFFF">
<tr >
<td width="169" height="30" background="images/index_24.gif" class="leftdian"><div align="center">部门名称</div></td>
<td width="377" background="images/index_24.gif" class="dian"><div align="center">职位名称</div></td>
</tr>
<%
maxpage=0
set rs=server.CreateObject("adodb.recordset")
sql="Select * from tb_dept order by up"
rs.Open sql,conn,1,1
if not rs.eof then
show=5
tol=rs.recordcount
rs.pagesize=show
maxpage=rs.pagecount
requestpage=clng(request("p"))
if requestpage="" or requestpage=0 then
requestpage=1
end if
if requestpage>maxpage then
requestpage=maxpage
end if
if not requestpage=1 then
rs.move (requestpage-1)*rs.pagesize
end if
for i=1 to rs.pagesize and not rs.eof
'职位名称
set rsz=server.CreateObject("adodb.recordset")
sqlz="select * from tb_ZhiWei where suoshu="&rs("id")
rsz.open sqlz,conn,1,1
%>
<tr>
<td height="28" bgcolor="#FFFFFF" class="leftdian"><div align="center"><%=rs("title")%></div></td>
<td colspan="2" class="dian"><%
do while not rsz.eof
%>
<a href="javascript:" onClick="window.open('zhiweiopen.asp?id=<%=rsz("id")%>&name=<%=session("name")%>','','width=350,height=150')"><%=rsz("zhiwei")%></a>
<%
rsz.movenext
loop
%>
</td>
</tr>
<%
rs.MoveNext
if rs.eof then exit for
next
else
response.Write("没有任何职位")
end if
rs.Close()
set rs=nothing
%>
<tr bgcolor="#efefef">
<td height="28" colspan="2"><div align="right">共<%=maxpage%>页 当前页:<%=requestpage%><%if requestpage=1 or requestpage="" then%>上一页<%else%> <a href="zhiwei.asp?p=<%=requestpage-1%>">上一页</a><%end if%> <%if requestpage=maxpage then%>下一页<%else%><a href="zhiwei.asp?p=<%=requestpage+1%>">下一页</a><%end if%> </div></td>
</tr>
</table>
<p> </p>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -