www.gusucode.com > ASP+ACCESS学生信息管理系统设计(源代码+论文) > ASP+ACCESS学生信息管理系统设计(源代码+论文)\赵超\AdminClass.asp
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <!--#include file="AdminTop.asp"--> <% Call IsBrower() %> <link href="Css/wangye9pt.css" rel="stylesheet" type="text/css"> <table width="779" height="450" border="0" align="center" cellpadding="0" cellspacing="1" class="TableAll"> <tr bgcolor="#FFFFFF" class="TrBody"> <td width="161" valign="top" class="w9pt"><!--#include file="AdminLeft.asp"--> </td> <td width="615" align="center" valign="top"><br> <br> <table width="90%" border="0" cellpadding="0" cellspacing="1" class="TableAll"> <tr> <td height="25" align="center" class="TrTop">增加班级</td> </tr> <tr> <td height="30" align="center" class="TrBody"><form action="" method="post" name="FrmSearch" id="FrmSearch" onSubmit="return Search()"> <table border="0" cellpadding="5" cellspacing="0" class="TrBody"> <tr> <td height="15" align="right">班级名称</td> <td height="15"><input name="UserName" type="text" id="UserName" style="width:100px"></td> <td>班 主 任</td> <td><input name="UserPwd" type="text" id="UserPwd2" style="width:100px" size="10"></td> </tr> <tr> <td height="15" align="right">入学时间</td> <td height="15"><select name="Intime" id="Intime" style="width:100px" > <option selected>2000年9月</option> <option>2001年9月</option> <option>2002年9月</option> <option>2003年9月</option> <option>2004年9月</option> <option>2005年9月</option> <option>2006年9月</option> <option>2007年9月</option> <option>2008年9月</option> <option>2009年9月</option> <option>2010年9月</option> </select></td> <td>毕业时间</td> <td><select name="OutTime" id="OutTime" style="width:100px" > <option>2000年7月</option> <option>2001年7月</option> <option>2002年7月</option> <option>2003年7月</option> <option>2004年7月</option> <option selected>2005年7月</option> <option>2006年7月</option> <option>2007年7月</option> <option>2008年7月</option> <option>2009年7月</option> <option>2010年7月</option> </select></td> </tr> <tr> <td height="15" align="right">所属专业</td> <td height="15" colspan="3"><select name="XcDepID" id="select2" style="width:200px" > <% Str="Select * From XcDepartMent" Set Rs=Conn.execute(Str) Do while Not Rs.eof Response.Write("<option >" & Rs("DepName") & "</option>") Rs.MoveNext Loop %> </select></td> </tr> <tr> <td height="15" colspan="4" align="center"><input type="submit" name="Submit" value="增加班级"> <input type="reset" name="Submit2" value="重置"></td> </tr> <script language="javascript"> function Search() { if(FrmSearch.UserName.value==""){ alert('请输入班级名称!'); FrmSearch.UserName.focus(); return false; } if(FrmSearch.UserPwd.value==""){ alert('请输入班主任!'); FrmSearch.UserPwd.focus(); return false; } return true; } function DeleteUser(UserName,UID) { if(confirm('确实要删除' + UserName + '班级吗?此操作不能恢复!')) { window.location.href='AdminClass.asp?UserName=' + UserName + '&DelID=' + UID; } } </script> </table> </form></td> </tr> </table> <br> <table width="90%" border="0" cellpadding="0" cellspacing="1" class="TableAll"> <tr> <td height="25" align="center" class="TrTop">系统班级列表</td> </tr> <tr> <td height="30" align="center" bgcolor="#FFFFFF"><table width="100%" border="0" cellpadding="0" cellspacing="1" class="TableAll"> <tr align="center" class="TrBody"> <td width="7%">序号</td> <td width="12%" height="25">班级名称</td> <td width="10%">班主任</td> <td width="11%">入学时间</td> <td width="10%">毕业时间</td> <td width="11%">专业</td> <td width="9%">删除</td> </tr> <% Str="Select * From XcClass" Set Rs=Conn.execute(Str) I=1 Do while Not Rs.eof %> <tr align="center" class="TrBody"> <td><%=I%></td> <td height="25"><%=Rs("ClassName")%></td> <td><%=Rs("CTeacher")%></td> <td><%=Rs("Intime")%></td> <td><%=Rs("OutTime")%></td> <td><%=Rs("XcDepID")%></td> <td><a href="#" onClick="DeleteUser('<%=Rs("ClassName")%>','<%=Rs("ID")%>');">删除</a></td> </tr> <% I=I+1 Rs.MoveNext Loop %> </table></td> </tr> </table></td> </tr> </table> <% UserName=ReplaceBadChar(Request.Form("UserName")) UserPwd=ReplaceBadChar(Request.Form("UserPwd")) IF UserName<> "" And UserPwd <> "" Then Call IsOpr() Intime=Request.Form("Intime") OutTime=Request.Form("OutTime") XCDepID=Request.Form("XCDepID") StrSql="Select * From XcClass Where ClassName='" & UserName & "'" Set Rsu=Conn.Execute(StrSql) IF Rsu.Eof Then '------------------------------------------ StrSql="Insert Into XcClass(ClassName,Cteacher,Intime,outTime,XCDepID) Values('" StrSql=StrSql & UserName & "','" & UserPwd & "','" & Intime & "','" & OutTime & "','" & xcDepID &"')" Conn.execute(StrSql) '------------------------------------------ Call UserOpr(" 增加班级:" & UserName) Call ShowMessAge("增加班级成功!","AdminClass.asp") Else ShowMess("班级名称已经存在,请更换名称!") End IF End IF '=========================================== IF Request.QueryString("DelID")<>"" then Call IsOpr() Str="Delete From XcClass where ID=" & Cint(request.QueryString("DelID")) Conn.execute(Str) Username=Request.QueryString("Username") Call UserOpr(" 删除班级:" & UserName) Call ShowMessAge("删除班级成功!","AdminClass.asp") End if %> <!--#include file="Foot.asp"-->