📄 admin_peixunzhuanye.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="conn_fj16.asp" -->
<!--#include file="admin_qx.asp" -->
<% isgjgl %>
<%
by=trim(request("by"))
ID=request("ID")
if ID<>""then
sqldel="select * from zd_peixunzhuanye where ID="&ID&""
set rsdel=server.CreateObject("adodb.recordset")
rsdel.open sqldel,conn,1,2
rsdel.delete
rsdel.close
set rsdel=nothing
end if
peixunzhuanye=request("peixunzhuanye")
isadd=request("isadd")
if isadd="add" then
'检验编号不能在系统中重复
sqlbianhao="select * from zd_peixunzhuanye where peixunzhuanye ='"&peixunzhuanye&"'"
set rsbianhao=server.CreateObject("adodb.recordset")
rsbianhao.open sqlbianhao,conn,1,2
if not rsbianhao.eof then
response.Write "<script language=javascript>{window.alert('报错:培训专业名称重复!原因是该培训专业已经在档案库中,您只可以做删除该培训专业操作!');window.location.href='admin_peixunzhuanye.asp';}</script>"
response.End
end if
sqladd="select * from zd_peixunzhuanye"
set rsadd=server.CreateObject("adodb.recordset")
rsadd.open sqladd,conn,1,2
rsadd.addnew
rsadd("peixunzhuanye")=peixunzhuanye
rsadd.update
rsadd.close
set rsadd=nothing
response.redirect "admin_peixunzhuanye.asp"
end if
sql="select * from zd_peixunzhuanye where id is not null"
set rs=server.CreateObject("adodb.recordset")
if by="" then
sql=sql & " Order by id desc"
end if
if by<>"" then
Select case by
case "peixunzhuanyeasc"
sql=sql & " Order by peixunzhuanye asc"
case "peixunzhuanyedesc"
sql=sql & " Order by peixunzhuanye desc"
End Select
end if
rs.open sql,conn,1,2
%>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<link href="Images/Style.css" rel="stylesheet" type="text/css">
<title>所在培训专业设置</title>
<style type="text/css">
<!--
.style3 {color: #FF0000}
.style1 {color: #0000FF}
body {
background-color: #d6dff7;
}
.STYLE4 {color: #FFFFFF}
.STYLE5 {color: #000000}
.STYLE6 {
font-size: 14px;
color: #FF0000;
}
body,td,th {
font-size: 12px;
}
-->
</style>
</head>
<body>
<p align="center"><a href="javascript:window.history.go(-1)" class="STYLE6"><u>点击此处返回</u></a></p>
<table class=tableBorder width="500" border=0 align="center" cellpadding=5 cellspacing=1>
<tbody>
<tr>
<th width="100%" height=21 sytle="line-height:150%">【培训专业管理】</th>
</tr>
<tr>
<td align="center" valign="middle" class=forumRow><form id="form1" name="form1" method="post" action="admin_peixunzhuanye.asp" onSubmit="return subcheck()">
<table width="392" border="1" align="center" cellpadding="3" cellspacing="0" bordercolor="#E6F7F0">
<tr>
<td width="411" class="STYLE4"><span class="style3">培训专业:</span>
<label>
<input name="peixunzhuanye" type="text" id="peixunzhuanye" />
<input type="submit" name="Submit" value="新增培训专业" style="width:85;background-color: #FFCC66; color: #000000; border: 1 solid #00CC00" />
<input name="isadd" type="hidden" id="isadd" value="add">
</label></td>
</tr>
</table>
<label> </label>
<div align="center">
<label></label>
</form></td>
</tr>
<tr>
<td class=forumRow style="background-color: #D4DEF9"><p align="center">
<table width="380" border="1" align="center" cellpadding="3" cellspacing="1" bordercolor="#F3F3F3" style="border-collapse: collapse">
<tr>
<td width="305" bgcolor="#F1BDFB">培训专业名称<span class="style1"><a title="按升序排列" <%if by="peixunzhuanyeasc" then%> style="color:#FF00FF;"<%end if%> href="admin_peixunzhuanye.asp?by=peixunzhuanyeasc" >↑</a> <a title="按降序排列" <%if by="peixunzhuanyedesc" then%> style="color:#FF00FF;"<%end if%> href="admin_peixunzhuanye.asp?by=peixunzhuanyedesc" >↓</a></span></td>
<td width="68" bgcolor="#F1BDFB"><div align="center">操作</div></td>
</tr>
<%
do while not rs.eof %>
<tr>
<td height="14" bgcolor="#EFE0FE"><span class="STYLE5"><%=rs("peixunzhuanye")%></span></td>
<td height="14" bgcolor="#EFE0FE" ><div align="center"><a href="admin_peixunzhuanye_us.asp?id=<%=rs("id")%>" target="_self"><img src="images/edit.gif" alt="修改" width="13" height="13" border="0"></a> <a href="admin_peixunzhuanye.asp?ID=<%=rs("ID")%>" target="_self" class="STYLE5" onClick="return confirm('确认删除该培训专业吗?')"><img src="images/delete.gif" alt="删除该培训专业" width="13" height="13" border="0"></a></div></td>
</tr>
<%rs.movenext
loop
%>
</table>
<p align="center"><span class="style3">共有<%=rs.recordcount%>个培训专业</span></p></td>
</tr>
</tbody>
</table>
<p align="center"> </p>
</body>
</html>
<script language="javascript">
function subcheck()
{
if (form1.peixunzhuanye.value=="")
{
alert ("所在培训专业不能为空!");
form1.peixunzhuanye.focus ();
return false;
}
return true;
}
</script>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -