?? adminteach1_body.asp
字號(hào):
<%sub adminteach1_body()
dim totalart,Currentpage,totalpages,i,colname
sql="select * from teach order by teach_id DESC"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
%>
<!--#include file="admintop.asp"-->
<table width="<%=tablewidth%>" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td width="205" bgcolor="#FFFFFF" valign="top" class="line">
<%call adminmenu()%>
</td>
<td width="565" bgcolor="#FFFFFF" valign="top" align="center" class="linee"> <table width="98%" border="0" cellpadding="0" cellspacing="1" background="images/dh.gif" class="linee">
<tr align="center">
<td width="50%" height="25"><a href="admin_teach1.asp">師資管理</a></td>
<td width="50%"><a href="admin_teach2.asp?action=newteach">新增師資</a></td>
</tr>
</table>
<table width="98%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="6"></td>
</tr>
</table>
<table width="98%" border="1" cellspacing="0" cellpadding="4" bordercolor="#09DD77" style="border-collapse: collapse">
<tr align="center">
<td width="10%" background="images/dh.gif" bgcolor="#FFFFFF">編號(hào)</td>
<td width="60%" background="images/dh.gif" bgcolor="#FFFFFF">寶典標(biāo)題</td>
<td width="10%" background="images/dh.gif" bgcolor="#FFFFFF">瀏覽</td>
<td width="20%" background="images/dh.gif" bgcolor="#FFFFFF">操作</td>
</tr>
<%if not rs.eof then
rs.movefirst
rs.pagesize=teachperpage
if trim(request("page"))<>"" then
currentpage=clng(request("page"))
if currentpage>rs.pagecount then
currentpage=rs.pagecount
end if
else
currentpage=1
end if
totalart=rs.recordcount
if currentpage<>1 then
if(currentpage-1)*teachperpage<totalart then
rs.move(currentpage-1)*teachperpage
dim bookmark
bookmark=rs.bookmark
end if
end if
if (totalart mod teachperpage)=0 then
totalpages=totalart\teachperpage
else
totalpages=totalart\teachperpage+1
end if
i=0
do while not rs.eof and i<teachperpage%>
<tr>
<td bgcolor="#FFFFFF" align="center"><%=rs("teach_id")%></td>
<td bgcolor="#FFFFFF"><a href="showteach.asp?teach_id=<%=rs("teach_id")%>" target="_blank"><%if len(rs("teach_title"))>26 then
response.write ""&left(rs("teach_title"),24)&"..."
else
response.write ""&rs("teach_title")
end if%></a></td>
<td bgcolor="#FFFFFF" align="center"><%=rs("teach_count")%></td>
<td bgcolor="#FFFFFF" align="center"><a href="admin_teach2.asp?teach_id=<%=rs("teach_id")%>&action=editteach">edit</a>
<a href="admin_teach2.asp?teach_id=<%=rs("teach_id")%>&action=delteach">del</a></td>
</tr>
<%
i=i+1
rs.movenext
loop
else
if rs.eof and rs.bof then
%>
<tr align="center">
<td bgcolor="#FFFFFF" colspan="4">當(dāng)前沒有師資!</td>
</tr>
<%end if
end if%>
</table>
<table width="96%" border="0" cellspacing="0" cellpadding="0" align="center">
<form name="form1" method="post" action="admin_teach1.asp">
<tr>
<td align="right"><%=currentpage%> /<%=totalpages%>頁(yè),<%=totalart%>條記錄,<%=teachperpage%>篇/每頁(yè).
<%
i=1
showye=totalpages
if showye>10 then
showye=10
end if
for i=1 to showye
if i=currentpage then
%>
<B><%=i%></B>
<%else%>
<a href="admin_teach1.asp?page=<%=i%>"><%=i%></a>
<%end if
next
if totalpages>currentpage then
if request("page")="" then
page=1
else
page=request("page")+1
end if%>
<a href="admin_teach1.asp?page=<%=page%>" title="下一頁(yè)">>></a>
<%end if%>
<input type="text" name="page" class="input" style="width:30px;">
<input type="submit" name="Submit" value="Go" class="button" style="width:24px;">
</td>
</tr>
</form>
</table>
<br>
</td>
</tr>
</table>
<%
rs.close
set rs=nothing
end sub%>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -