anli_manage.asp

来自「网站的后台管理代码......内容比较全面....新手比较适合」· ASP 代码 · 共 112 行

ASP
112
字号
<%
'====================================================================
'
'           中国企业平台后台管理系统  版权所有:中国企业平台
'
'                公司网址 http://www.cnept.net
'
'                        版权所有 翻版必究
'====================================================================
%>
<script language="javascript">
var lsdz = "";
function checkIn()
   {if(confirm("你真的要删除这条记录?"))
      return true
   else 
      return false;
}
</script>
<!--#include file="../inc/adconn.asp"-->
<!--#include file="../css.asp"-->
<% set rs=server.CreateObject("adodb.recordset")
sql="select * from anli" 
rs.open sql,conn,1,3

if rs.eof then
      response.write "<font color='red'>"
      response.write "暂且没有资料"
	  response.write "</font>"
      response.end
  else
rs.PageSize =10 '每页记录条数
iCount=rs.RecordCount '记录总数
iPageSize=rs.PageSize
maxpage=rs.PageCount 
page=request("page")
  
  if Not IsNumeric(page) or page="" then
    page=1
  else
    page=cint(page)
  end if
  
  if page<1 then
    page=1
  elseif page>maxpage then
    page=maxpage
  end if
  
  rs.AbsolutePage=Page

if page=maxpage then
x=iCount-(maxpage-1)*iPageSize
else
x=iPageSize
end if
i=0
%>
<TABLE border="0" cellspacing="0" width="100%" cellpadding="0">
  <TR>
    <TD height=25 align=left bgcolor="#FFCC00">&gt;&gt;所有案例管理</TD>
  </TR>
</TABLE>
<TABLE width="100%" border="0" cellpadding="4" cellspacing="1" bgcolor="#336699">
    <tr height=25 > 
      <TD width="66" align="center" background="../images/pics/tile_sub.gif"><font color="#FFFFFF"><b>ID号</b></font></TD>
      <TD width="229" align="center" background="../images/pics/tile_sub.gif"><font color="#FFFFFF"><b>标题</b></font></TD>
      <TD width="98" align="center" background="../images/pics/tile_sub.gif"><font color="#FFFFFF"><b>包含图片</b></font></TD>
      <TD width="196" align="center" background="../images/pics/tile_sub.gif"><font color="#FFFFFF"><b>案例类型</b></font></TD>
      <TD width="196" align="center" background="../images/pics/tile_sub.gif"><font color="#FFFFFF"><b>状态</b></font></TD>
      <TD width="125" align="center" background="../images/pics/tile_sub.gif"><font color="#FFFFFF"><b>操作</b></font></TD>
    </TR>
	<% do while not rs.eof and i< rs.pagesize
	i=i+1
	%>
    <tr height="15"> 
      <td width="66" height="28" align="center" bgcolor="#ffffff"><font face="Arial"><b><%=rs("id")%></b></font></td>
      <td width="229" bgcolor="#ffffff"><a href="anli_edite.asp?id=<%=rs("id")%>"><%=rs("title")%></a></td>
      <td width="98" align="center" bgcolor="#ffffff"><% if rs("pic")<>"" then %>
        <img width="79" height="59" src="..<%=rs("pic")%>">
        <%else%>无图片<%end if%></td>
      <td width="196" align="center" bgcolor="#ffffff"><%=rs("sclass")%></td>
      <td width="196" align="center" bgcolor="#ffffff"><% if rs("tuijian")= 1 then%><a href="tuijian.asp?action=0&id=<%=rs("id")%>">推荐</a><%else%><a href="tuijian.asp?action=1&id=<%= rs("id") %>">不推荐</a><%end if%></td>
      <td width="125" align="center" bgcolor="#ffffff"><a href="anli_edite.asp?id=<%=rs("id")%>">修改</a>||<a href="anli_del.asp?id=<%=rs("id")%>" onClick="return checkIn();">删除</a></td>
    </tr>
	<%
	rs.movenext
	loop%>
	<TR> 
              <TD height="30" 
colSpan=8 bgcolor="#FFFFFF" id=mainfoot> <div align="center">共<font color=red><%=maxpage%></font>页 第<%=page%>页 <font color=666666> 
                  <%if page-1>0 then%>
                  <a href="anli_manage.asp?page=<%=page-1%>">上一页</a> 
                  <%else%>
                  <font color=666666>上一页</font> 
                  <%end if%>
                    
                  <%if page+1<=maxpage then%>
                  <a href="anli_manage.asp?page=<%=page+1%>">下一页</a> 
                  <%else%>
                  <font color=666666>下一页</font> 
                  <%end if%>
      </font>共<% =iCount %>条记录</div></TD>
  </TR>
  </table>
  <% rs.close
  set rs=nothing
  conn.close
  set conn=nothing
  end if
   %>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?