📄 link_body.asp
字号:
<%sub adminlink_body()
dim totalnews,Currentpage,totalpages,i
sql="select * from link_class order by l_id ASC"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
%>
<HTML>
<HEAD>
<META content="text/html; charset=gb2312" http-equiv=Content-Type>
<style type="text/css">
A{TEXT-DECORATION: none}
A:link {COLOR: #666666; FONT-FAMILY: 宋体; TEXT-DECORATION: none}
A:visited {COLOR: #666666; FONT-FAMILY: 宋体; TEXT-DECORATION: none}
A:active {FONT-FAMILY: 宋体; TEXT-DECORATION: none}
A:hover {BORDER-BOTTOM: 1px dotted; BORDER-LEFT-WIDTH: 1px; BORDER-RIGHT-WIDTH: 1px; BORDER-TOP-WIDTH: 1px; COLOR: #ff6600; TEXT-DECORATION: none}
BODY {
FONT-SIZE: 12px;
COLOR: #666666;
FONT-FAMILY: 宋体;
background-color: #ffffff;
background-image: url(images/show.gif);
SCROLLBAR-FACE-COLOR: #e8e7e7;
SCROLLBAR-HIGHLIGHT-COLOR: #ffffff;
SCROLLBAR-SHADOW-COLOR: #ffffff;
SCROLLBAR-3DLIGHT-COLOR: #cccccc;
SCROLLBAR-ARROW-COLOR: #ff6600;
SCROLLBAR-TRACK-COLOR: #EFEFEF;
SCROLLBAR-DARKSHADOW-COLOR: #b2b2b2;
SCROLLBAR-BASE-COLOR: #000000
}
TABLE {BORDER-COLLAPSE: collapse; FONT-FAMILY: 宋体; FONT-SIZE: 9pt}
.button{height:18px;width:62px;background:#f6f6f9 url(images/ButtonBg.gif); border:solid 1px #5589AA;color: #000000 ;FONT-SIZE: 9pt}
.lanyu{border:solid 1px #5589AA;color: #000000 ; font-size: 12px;}
.font { filter: DropShadow(Color=#cccccc, OffX=2, OffY=1, Positive=2); text-decoration: none; font-size: 9pt}
</style>
<LINK href="inc/djcss.css" type=text/css rel=StyleSheet>
<META content="MSHTML 6.00.2800.1126" name=GENERATOR>
</HEAD>
<body onkeydown=return(!(event.keyCode==78&&event.ctrlKey)) background=inc/dj_bg.gif>
<table align="center" width="98%" border="1" cellspacing="0" cellpadding="4" bordercolor="#C0C0C0" style="border-collapse: collapse">
<tr>
<td bgcolor="#E8E8E8">联系我们</font></td>
</tr>
<tr bgcolor="#E8E8E8" align="center">
<td class="chinese" width="10%" bgcolor="#F5F5F5">编号</td>
<td class="chinese" width="70%" bgcolor="#F5F5F5">部门名称</td>
<td class="chinese" width="20%" bgcolor="#F5F5F5">操作</td>
</tr>
<%if not rs.eof then
dim newsperpage
newsperpage=10
rs.movefirst
rs.pagesize=newsperpage
if trim(request("page"))<>"" then
currentpage=clng(request("page"))
if currentpage>rs.pagecount then
currentpage=rs.pagecount
end if
else
currentpage=1
end if
totalnews=rs.recordcount
if currentpage<>1 then
if (currentpage-1)*newsperpage<totalnews then
rs.move(currentpage-1)*newsperpage
dim bookmark
bookmark=rs.bookmark
end if
end if
if (totalnews mod newsperpage)=0 then
totalpages=totalnews\newsperpage
else
totalpages=totalnews\newsperpage+1
end if
i=0
do while not rs.eof and i<newsperpage%>
<tr>
<td bgcolor="#FFFFFF" class="chinese" align="center"><%=rs("l_id")%></td>
<td bgcolor="#FFFFFF" class="chinese"><%=rs("l_type")%> <% call v1(rs("l_id"),rs("l_type")) %></td>
<td bgcolor="#FFFFFF" class="chinese" align="center"><a href="admin_link.asp?id=<%=rs("l_id")%>&action=editlink#editlink">修改</a>
<a href="admin_link.asp?id=<%=rs("l_id")%>&action=dellink#dellink">删除</a></td>
</tr>
<%i=i+1
rs.movenext
loop
else
if rs.eof and rs.bof then%>
<tr align="center">
<td bgcolor="#FFFFFF" colspan="3" class="chinese">当前没有部门!</td>
</tr>
<%end if
end if%>
</table>
<table align="center" width="98%" border="0" cellspacing="0" cellpadding="0">
<form name="form2" method="post" action="admin_link.asp">
<tr>
<td class="chinese" align="right"><%=currentpage%> /<%=totalpages%>页,<%=totalnews%>条记录/<%=newsperpage%>篇每页.
<%
i=1
showye=totalpages
if showye>10 then
showye=10
end if
for i=1 to showye
if i=currentpage then
%>
<%=i%>
<%else%>
<a href="admin_link.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_link.asp?page=<%=page%>" title="下一页">>></a>
<%end if%>
<input type="text" name="page" class="textarea" size="4">
<input type="submit" name="Submit" value="Go" class="button"></td>
</tr>
</form>
</table>
<br>
<%if request.QueryString("action")="newlink" then%>
<table align="center" width="98%" border="1" cellspacing="0" cellpadding="4" bordercolor="#C0C0C0" style="border-collapse: collapse">
<form name="form1" method="post" action="">
<tr>
<td bgcolor="#E8E8E8"><a name="newlink">新的部门</a></font></td>
</tr>
<tr>
<td bgcolor="#FFFFFF" class="chinese">部门名称 :
<input name="l_type" type="text" class="textarea" size="20">
</td>
</tr>
<tr>
<td bgcolor="#F5F5F5" class="chinese" height="30" align="center">
<input type="submit" name="Submit2" value="确定新增" class="button">
<input type="reset" name="Reset" value="清空重填" class="button">
</td>
</tr>
<input type="hidden" name="action" value="newlink">
<input type="hidden" name="MM_insert" value="true">
</form>
</table>
<%end if
if request.QueryString("action")="editlink" then
if request.querystring("id")="" then
errmsg=errmsg+"<br>"+"<li>请指定操作的对象!"
call diserror()
response.end
else
if not isinteger(request.querystring("id")) then
errmsg=errmsg+"<br>"+"<li>非法的ID参数!"
call diserror()
response.end
end if
end if
sql="select * from link_class where l_id="&cint(request.querystring("id"))
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
%>
<table align="center" width="98%" border="1" cellspacing="0" cellpadding="4" bordercolor="#C0C0C0" style="border-collapse: collapse">
<form name="form1" method="post" action="">
<tr>
<td bgcolor="#E8E8E8"><a name="editlink">修改新闻</a></font></td>
</tr>
<tr>
<td bgcolor="#FFFFFF" class="chinese">部门名称:
<input type="text" name="l_type" size="20" class="textarea" value="<%=rs("l_type")%>">
</td>
<tr>
<td bgcolor="#F5F5F5" class="chinese" height="30" align="center">
<input type="submit" name="Submit" value="确定修改" class="button">
<input type="reset" name="Reset" value="清空重填" class="button">
[<a href="admin_link.asp">返回</a>] </td>
</tr>
<input type="hidden" name="id" value="<%=rs("l_id")%>">
<input type="hidden" name="action" value="editlink">
<input type="hidden" name="MM_insert" value="true">
</form>
</table>
<%end if
if request.QueryString("action")="dellink" then
if request.querystring("id")="" then
errmsg=errmsg+"<br>"+"<li>请指定操作的对象!"
call diserror()
response.end
else
if not isinteger(request.querystring("id")) then
errmsg=errmsg+"<br>"+"<li>非法的ID参数!"
call diserror()
response.end
end if
end if
sql="select * from link_class where l_id="&cint(request.querystring("id"))
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1%>
<table align="center" width="98%" border="1" cellspacing="0" cellpadding="4" bordercolor="#C0C0C0" style="border-collapse: collapse">
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -