⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 index.asp

📁 中原商贸城 中原商贸城 项目库 企业库 供求信息 会员 招聘 企业展示
💻 ASP
字号:
<!--#include file=../common/conn.asp -->
<%
Function ChangeToHtmlStr(CTHStr)
  Dim TempStr,i,LenStr
  If IsNull(CTHStr) Then
     ChangeToHtmlStr=""
     Exit Function
  End If
  LenStr=Len(CTHStr)
  TempStr=""
  For i=1 To LenStr
      Select Case Mid(CTHStr,i,1)
             Case "<"
                TempStr=TempStr+"&lt;"
             Case ">"   
                TempStr=TempStr+"&gt;"
             Case "&"      
                TempStr=TempStr+"&amp;"
             Case Chr(34)
                TempStr=TempStr+"&quot;"
             Case Chr(13)
                TempStr=TempStr+"<br>"
             Case Chr(9)
                TempStr=TempStr+"&nbsp;&nbsp;&nbsp;&nbsp;"
             Case Chr(32)
                TempStr=TempStr+"&nbsp;"     
             Case Else
                TempStr=TempStr+Mid(CTHStr,i,1)
             End Select
    Next         
  ChangeToHtmlStr=TempStr                 
End Function
%>

<%
    if request("action")="del" then
	sql="delete from diary where id="&request("newsid")
	conn.execute(sql)
	end if
%>
<%
	sql="select * from diary order by id desc"
	  PageSize   = 30        
   If Request("page") ="" Then
        page=1
       Else
          page=Int(Abs(Request("page")))
       End if
	rs.open sql,conn,1,3
	
	if not rs.eof then
   rs.PageSize     = PageSize      
       TotalPage         = rs.PageCount      
       rs.absolutepage = page      
       total            = rs.RecordCount      
	   end if   

%>
<html>
<head>
<title>管理公告发布</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<META NAME="Description" CONTENT="">
<link rel="stylesheet" href="../../hs.css" type="text/css">
<link rel="stylesheet" href="../.css" type="text/css">
<link rel="stylesheet" href="../images/font.css" type="text/css">
<link href="../users/.css" rel="stylesheet" type="text/css">
</head>
<body bgcolor="#FED17E" text="#ffffff" background="../images/bgpic.gif">
<br>
<table width="90%" border="0" cellspacing="2" cellpadding="0" align="center">
  <tr>
    <td bgcolor="">
      <table width="90%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td valign="bottom"> 
            <div align="center"> 
              <p align="left"> <span class="unnamed1"><font color="#666666">管理公告发布</font></span></p>
            </div>
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td bgcolor="">
      <table width="100%" border="0" cellspacing="1" cellpadding="0" align="center" bgcolor="">
        <tr bgcolor="#E7E7E7"> 
          <td width="15%" height="20" class="unnamed1"> <div align="center"><font color="#666666">编号</font></div></td>
          <td width="46%" height="20" align="center" class="unnamed1"><font color="#666666">公告标题</font> 
            <div align="center"></div></td>
         
          <td width="21%" height="20" class="unnamed1"> <div align="center"><font color="#666666">发布时间</font></div></td>
          <td height="20" width="18%" class="unnamed1"> <div align="center"><font color="#666666">管理</font></div></td>
        </tr>
        <%
	for i=1 to rs.pagesize
	  while not rs.eof 
		%>
        <tr bgcolor=""> 
          <td width="15%" height="20" align="center" class="unnamed1"> <font color="#666666"><%=rs("id")%> </font></td>
          <td height="20" align="center" class="unnamed1"> <font color="#666666"><%=rs("title")%> </font></td>
          
          <td width="21%" height="20" align="center" class="unnamed1"> <font color="#666666"><%=datevalue(rs("time"))%> </font></td>
          <td width="18%" align="center" height="20" class="unnamed1"><a href="edit.asp?id=<%=rs("id")%>&page=<%=page%>">修改</a> <a href="index.asp?action=del&newsid=<%=rs("id")%>&page=<%=page%>" onClick="var a=confirm('确实要删除吗?');if(a==0) return(false);">删除</a></td>
        </tr>
        <%
		rs.movenext
		 wend
		next
		%>
        <tr bgcolor=""> 
          <td colspan="7" height="20"> <font color="#666666"> <span class="unnamed1">
            <% 
			 If totalpage=1 Then
       Response.write "·共有1页·"
    End If
    If Not Page=1 Then
       Response.write "<a href=index.asp?page=1>首页</a>&nbsp;&nbsp;"
       Response.write "<a href=index.asp?page="&Cstr(Page-1)&">前页</a>&nbsp;&nbsp;"
    Else
       Response.write "首页&nbsp;&nbsp;"
       Response.write "前页&nbsp;&nbsp;"
    End If
    If Not Page=totalpage Then
       Response.Write "<a href=index.asp?page="&Cstr(Page+1)&">后页</a>&nbsp;&nbsp;"
       Response.Write "<a href=index.asp?page="&PageCount&">尾页</a>"
    Else
       Response.Write "后页&nbsp;&nbsp;"
       Response.Write "尾页"
    End If
	%>
            <%rs.close%>
            </span></font></td>
        </tr>
      </table>
    </td>
  </tr>
  <tr>
    <td bgcolor="">
  
    </td>
  </tr>
</table>
<table width="90%" border="0" align="center" cellpadding="0" cellspacing="1">
  <tr>
    <td>&nbsp;</td>
  </tr>
</table>
</body>
</html>

⌨️ 快捷键说明

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