📄 admin_bookclass.asp
字号:
<!--
=========================================================
超e工作室(http://www.chaoe.com)
用专业的心,做专业的事。。。
==========================================================
本系统是超e工作室专门为黑龙江广厦学院开发的高考录取程序,没有参照任何脚本,盗用必追究其法律责任。
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
作者:徐佳
QQ:95973
邮件:jia@chaoe.com
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-->
<%if session("adminuser")<>"" then%>
<!--#include file="conn.asp"-->
<html>
<head>
<title>黑龙江广厦学院高考录取查询系统</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="ccs/style.css" rel="stylesheet" type="text/css">
</head>
<script language=javascript>
function checkform()
{
if(form1.fwlei.value==""){
alert("专业类别不能为空!");
form1.fwlei.focus();
return false;
}
document.form1.submit();
}
</script>
<body text="#000000" topmargin="0">
<table width="85%" border="0" cellspacing="1" cellpadding="0" align="center" height="100%" class="bian" bgcolor="#F4FAED">
<tr>
<td height="23" valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="24" bgcolor="#E1E1E1" class="unnamed1">
<tr>
<td height="18" align="center" valign="middle"><font color="#FF0000"><b>录取专业类别管理</b></font></td>
</tr>
</table>
</td>
</tr>
<tr>
<td valign="top" align="center"> <br><%
action=request("action")
select case action
case "add"
call add()
case "update"
call update()
case "updateto"
call updateto()
case "del"
call del()
case else
call main()
end select%>
<%sub main()%>
<table width="503" height="37" border="1" cellpadding="1" cellspacing="1" bordercolor="#FFFFFF" bgcolor="#E1E1E1" class="xuxian">
<tr align="center">
<td width="211" height="27"><font color="#000000">专业类别</font></td>
<td height="27" colspan="2"><font color="#000000">操作</font></td>
</tr>
<%sql="select * from bookclass order by id desc"
pmcount=10
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
rcount=rs.recordcount
if pmcount="" or isempty(pmcount) or pmcount<1 then
pmcount=10
end if
rs.pagesize=pmcount
mpage=rs.pagecount
pageno=request("pageno")
if isempty(pageno) or cint(pageno)<1 or cint(pageno)>mpage then
pageno=1
end if
if rs.eof or rs.bof then
%>
<tr align="center" bgcolor="#FFFFFF">
<td height="29" colspan="3">还没有专业类别!</td>
</tr>
<%else
rs.absolutepage=pageno
loopno=pmcount
%>
<%i="1"
do while not rs.eof and loopno>0
i=-i
%>
<tr align="center" bgcolor="#FFFFFF">
<td width="211" height="29"> <%=rs("name")%></td>
<td width="140" height="29"><a href="admin_bookclass.asp?action=update&id=<%=rs("id")%>">修改</a></td>
<td width="148" height="29"><a href="admin_bookclass.asp?action=del&id=<%=rs("id")%>">删除</a></td>
</tr>
<%
rs.movenext
loopno=loopno-1
loop
%>
<tr align="center">
<td height="29" colspan="3">
<%
if cint(pageno)<2 then
response.write " 首页 | 上一页"
else
response.write "<a href=admin_bookclass.asp?pageno=1>首页</a> | "
response.write "<a href=admin_bookclass.asp?pageno="&pageno-1&">上一页</a>"
end if
%>
|
<%
if cint(mpage-pageno)<1 then
response.write "下一页 | 尾页"
else
response.write "<a href=admin_bookclass.asp?pageno="&pageno+1&">下一页</a> | "
response.write "<a href=admin_bookclass.asp?pageno="&mpage&">尾页</a>"
end if
%>
| 共计<%=cstr(rcount)%>主题<%=cstr(pageno)&"/"&cstr(mpage)&"页"%></td>
</tr>
<%
rs.close
end if%>
</table>
<br>
<br>
<form name="form1" method="post" action="admin_bookclass.asp?action=add">
<table width="503" height="37" border="1" cellpadding="1" cellspacing="1" bordercolor="#FFFFFF" bgcolor="#E1E1E1" class="xuxian">
<tr align="center">
<td colspan="2" height="27"><font color="#000000">增加专业类别</font></td>
</tr>
<tr align="center">
<td width="128" height="29" bgcolor="#f9f9f9">要增加的专业类别</td>
<td width="372" height="29" align="left" bgcolor="#f9f9f9">
<input type="text" name="fwlei" class="rad">
</td>
</tr>
<tr align="center">
<td height="29" colspan="2" bgcolor="#f9f9f9">
<input type="button" name="Submit" value=" 增加 " class="rad" onclick="checkform()">
</td>
</tr>
</table>
</form><%end sub%>
<br><br><br><br><%sub update()%>
<form name="form1" method="post" action="admin_bookclass.asp?action=updateto">
<table width="503" height="37" border="1" cellpadding="1" cellspacing="1" bordercolor="#FFFFFF" bgcolor="#E1E1E1" class="xuxian">
<tr align="center">
<td colspan="2" height="27"><font color="#000000">修改专业类别</font></td>
</tr>
<tr align="center">
<td width="128" height="29" bgcolor="#f9f9f9">要修改的专业类别</td>
<td width="372" height="29" align="left" bgcolor="#f9f9f9">
<input type="text" name="fwlei" class="rad">
<input type="hidden" name="fwid" class="rad" value="<%=request.querystring("id")%>">
</td>
</tr>
<tr align="center">
<td height="29" colspan="2" bgcolor="#f9f9f9">
<input type="button" name="Submit" value=" 修改 " class="rad" onclick="checkform()">
<input type="button" name="Submit2" value=" 返 回 " class="rad" onclick="javascript:history.go(-1)">
</td>
</tr>
</table>
</form><%end sub
sub add()
fwlei=request.form("fwlei")
set rs=server.createobject("adodb.recordset")
sql="select * from bookclass where name='"&fwlei&"'"
rs.open sql,conn,1,3
if rs.eof or rs.bof then
rs.addnew
rs("name")=fwlei
rs.update
rs.close
%>
<table width="499" height="87" border="1" cellpadding="1" cellspacing="1" bordercolor="#FFFFFF" bgcolor="#E1E1E1" class="xuxian">
<tr>
<td height="32"><font color="#000000"> 增加专业类别</font></td>
</tr>
<tr>
<td bgcolor="#f9f9f9"> <font color="#FF0000"> 增加专业类别成功!<a href="admin_bookclass.asp">返回</a></font></td>
</tr>
</table><%else
response.write "<script language=javascript>"
response.write "alert('已有这个专业类别');"
response.write "javascript:history.go(-1);"
response.write "</script>"
end if%>
<%end sub%> <%sub updateto()
fwlei=request.form("fwlei")
id=request.form("fwid")
set rs=server.createobject("adodb.recordset")
sql="select * from bookclass where id=" & id
rs.open sql,conn,1,3
if not rs.eof or not rs.bof then
rs.update
rs("name")=fwlei
rs.update
rs.close
%>
<table width="499" height="87" border="1" cellpadding="1" cellspacing="1" bordercolor="#FFFFFF" bgcolor="#E1E1E1" class="xuxian">
<tr>
<td height="32"><font color="#000000"> 修改专业类别</font></td>
</tr>
<tr>
<td bgcolor="#f9f9f9"> <font color="#FF0000"> 修改专业类别成功!<a href="admin_bookclass.asp">返回</a></font></td>
</tr>
</table><%else
response.write "<script language=javascript>"
response.write "alert('非法数据!');"
response.write "javascript:history.go(-1);"
response.write "</script>"
end if%>
<%end sub%><%sub del()
id=request.querystring("id")
sql="delete * from bookclass where id=" & id
conn.execute(sql)
%>
<table width="499" height="87" border="1" cellpadding="1" cellspacing="1" bordercolor="#FFFFFF" bgcolor="#E1E1E1" class="xuxian">
<tr>
<td height="32"><font color="#000000"> 删除专业类别</font></td>
</tr>
<tr>
<td bgcolor="#f9f9f9"> <font color="#FF0000"> 删除专业类别成功!<a href="admin_bookclass.asp">返回</a></font></td>
</tr>
</table>
<%end sub%>
<%closeconn%>
</body>
</html>
<%
else
response.write "<script language=javascript>"
response.write "alert('管理员操作超 时..........');"
response.write "javascript:history.go(-1)"
response.write "</script>"
end if%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -