📄 teac.asp
字号:
<!--#include file="config.asp"-->
<!--#include file="md5.asp"-->
<!--#include file="Session.asp"-->
<%
If Request("menu")="del" Then
Conn.Execute("Delete * From [T_TeaC] Where T_Id="&int(Request("id"))&"")
' Conn.Execute("Delete * From [T_Ke] Where C_KeId="&Request("id")&"")
End If
If Request("menu")="undisp" Then
Conn.Execute("Update [T_Ke] set C_Disp=False where C_Id="&int(Request("id"))&" ")
End If
If Request("menu")="add" Then
If Request("id")="" Then
Conn.Execute("Insert into [T_TeaC] (T_Name,T_Pwd) values ('"&Request("X_UserName")&"','"&md5(Request("X_PassWord"))&"')")
Else
If len(Request("X_PassWord"))=32 Then
XX_X_PassWord=Request("X_PassWord")
Else
XX_X_PassWord=md5(Request("X_PassWord"))
End If
Conn.Execute("Update [T_TeaC] set T_Name='"&Request("X_UserName")&"',T_Pwd='"&XX_X_PassWord&"',T_LastM='"&now()&"' where T_Id="&int(Request("id"))&" ")
End If
End If
%>
<%
dim MaxPerPage
dim sql
dim rs
dim i,j
if request("se")="" then
se=request.form("se")
else
se=request("se")
end if
if not isEmpty(request("pl")) then
pl=request("pl")
else
pl="xhao"
end if
if not isempty(request("page")) then
currentPage=cint(request("page"))
else
currentPage=1
end if
%>
<%
If Request("id")<>"" and Request("menu")="Edit" Then
Set Rs_Edit=Conn.Execute("Select * From T_TeaC Where T_Id="&int(Request("id"))&"")
X_T_Name=Rs_Edit("T_Name")
X_T_Pwd=Rs_Edit("T_Pwd")
End If
%>
<html><head>
<title><%response.write webname%>-----栏目:教师资料中心</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="images/vpei.css">
<script>
function checkclick(msg){if(confirm(msg)){event.returnValue=true;}else{event.returnValue=false;}}
</script>
</head>
<body topmargin=10 leftmargin=5>
<% Call top() %>
<br>
<table width="100%" align="center" cellspacing="1" cellpadding="1" border="0" bgcolor="#000000">
<form method="POST" action="TeaC.asp?menu=add"><input type="hidden" name="id" value=<%=Request("id")%>>
<tr>
<td bgcolor="#FFFFFF" background="images/cent.gif" height="25"> 添加授课老师</td></tr>
<td bgcolor="#FFFFFF" height="25">
<font color="#000000">老师姓名(即帐号,不可重复):<input type="text" name="X_UserName" size="10" value=<%=X_T_Name%>> 登录密码:<input type="text" name="X_PassWord" size="20" value=<%=X_T_Pwd%>>
<input type="submit" value=" 提交 ">
</td></tr></form></table>
<br>
<table width="100%" align="center" cellspacing="1" cellpadding="1" border="0" bgcolor="#000000">
<form name="searchtitle" method="POST" action="TeaC.asp">
<tr><td bgcolor="#FFFFFF" background="images/cent.gif" height="25">
<font color="#000000">关键词语:<input type="text" name="se" size="40" style="font-family: 宋体; font-size: 9pt; color: #0000FF; border: 1 solid #000000">
搜索范围:
<select name="pl" size="1">
<option value="T_name">姓----名</option>
</select>
<input type="submit" value=" 搜索 ">
</td></tr></form></table>
<br>
<%
set rs=server.createobject("adodb.recordset")
If Request("se")="" Then
sql="select * from T_TeaC order by T_LastM desc"
Else
sql="select * from T_TeaC where "&pl&" like '%"&se&"%' order by T_LastM desc"
End If
rs.open sql,conn,1,3
if rs.eof and rs.bof then %>
<p align="center">没有或没找到任何记录!</p>
<%
else
%>
<table width="100%" cellspacing="1" cellpadding="3" bgcolor="#000000" align="center">
<tr bgcolor=#FFFFFF>
<td width=4% background=images/cent.gif colspan=2><center><font color="#000000">编 辑</font></td>
<td width=8% background=images/cent.gif><center><font color="#000000">姓 名</font></td>
<td width=58% background=images/cent.gif><font color="#000000"><font color=red>所带班级详细情况</font></font></td>
</tr>
<%do while not (rs.eof or err)
k=k-1
%>
<TR bgcolor=#FFFFFF>
<td width=4% align=center><a onclick=checkclick('您真的要删除吗?\n\n请您最好先确认一下需删除的用户!') href=TeaC.asp?Menu=del&id=<%=rs("T_id")%> title=<%=rs("T_id")%>><font color=red>删</font></a></td>
<td width=4% align=center><a href=TeaC.asp?Menu=Edit&id=<%=rs("T_id")%> title=<%=rs("T_id")%>><font color=green>改</font></a></td>
<td width=8% align=center><%=Rs("T_Name")%></td>
<td></td>
</tr>
<%
Rs.MoveNext
loop
End If
%>
</table>
<% Call bottom() %>
</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -