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

📄 mymanage.asp

📁 实现一定上传功能
💻 ASP
字号:
<!--#include file="articleconn.asp"-->
<%
IF not(Session("KEY")="super" or session("KEY")="check" or Session("KEY")="input") THEN
	response.redirect "/login.asp"
	response.end
END IF
%>

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>天荣现代农业</title>
<meta name="GENERATOR" content="Microsoft FrontPage 3.0">
<link rel="stylesheet" type="text/css" href="style.css">
<style type="text/css">
<!--
-->
</style>
</head>
<%
   const MaxPerPage=18
   dim totalPut   
   dim CurrentPage
   dim TotalPages
   dim i,j
   dim sql
   dim rs
   dim rstype
   dim typesql
   dim typeid,typename1
   if not isEmpty(request("typeid")) then
	typeid=request("typeid")
   else
	typeid=1
   end if
if not isempty(request("page")) then
      currentPage=cint(request("page"))
   else
      currentPage=1
   end if
%>

<body>
<div align="center" class="unnamed1">
<center>
    <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr bgcolor="#304D7C"> 
        <td bgcolor="#304D7C" class="unnamed1" height="17"> 
          <div align="center"><a href="myaddarticle.asp"><font color="#FFFFFF">增加新闻文章</font></a> 
            <font color="#FFFFFF"><b>|</b></font> <a href="makeindex.asp"><font color="#FFFFFF">生成首页图片新闻</font></a> 
            <font color="#FFFFFF"><b>|</b></font> <a href="newschk.asp"><font color="#FFFFFF">审核新闻</font></a> 
            <font color="#FFFFFF"><b></b></font><font color="#FFFFFF"><b>|</b></font> 
            <a href="usermanage.asp"><font color="#FFFFFF">用户管理</font></a><font color="#FFFFFF"> 
            <b>|</b> </font><a href="change.ASP"><font color="#FFFFFF">栏目管理</font></a> 
            <font color="#FFFFFF"><b>|</b></font> <a href="templates.asp"><font color="#FFFFFF">新闻模版管理</font></a> 
            <font color="#FFFFFF"><b>|</b></font> <a href="mymanage.asp"><font color="#FFFFFF">浏览</font></a><font color="#FFFFFF"> 
            <b>|</b> </font><a href="myaddarticle.asp"><font color="#FFFFFF"></font></a><a href=""><font color="#FFFFFF">退出系统</font></a></div>
        </td>
        <td width="10" valign="bottom" align="right" height="17"><img src="images/x1.gif" width="11" height="11"></td>
      </tr>
    </table>
    <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" height="1">
      <tr> 
        <td bgcolor="#3A5C9F" width="168" height="143" valign="top"> 
          <table width="100%" border="0" cellpadding="0" cellspacing="0">
            <tr bgcolor="#000000"> 
              <td><img src="images/dot.gif" width="1" height="1"></td>
            </tr>
          </table>
          <table width="75%" border="0" align="center" cellpadding="0" cellspacing="0">
            <tr> 
              <td colspan="2" height="2">
                <p align=center>&nbsp;
              </td>
            </tr>
            <tr> 
              <td colspan="2" height="2"><img src="images/%2B.gif" width="15" height="9"></td>
            </tr>
            <tr> 
              <td background="images/line3.gif" height="61" width="9%">&nbsp;</td>
              <td height="61" width="91%" valign="top"> 
                <table width="100%" border="0" cellpadding="0" cellspacing="0">
                  <tr> 
                    <td colspan="2" height="58"><%
Set rst= Server.CreateObject("ADODB.Recordset")
	rst.open "select * from type",conn,1
 if rst.EOF then
	response.write "没有栏目:("
	else
%> <%do while NOT rst.EOF%><img src="images/-.gif" width="20" height="12"><a href="mymanage.asp?typeid=<%=rst("typeid")%>"><font color="#3A5C9F">..</font><font color="#FFFFFF"><%=rst("type")%></font></a><br><br>
<%
	rst.MoveNext
	loop
	end if
rst.close
%> </td>
                  </tr>
                </table>
              </td>
            </tr>
          </table>  
          <table width="75%" border="0" align="center" cellpadding="0" cellspacing="0">
            <tr> 
              <td colspan="2">&nbsp;</td>
            </tr>
          </table>
        </td>
        <td bgcolor="#C4C4C4" width="3" height="143"><img src="images/dot1.gif" width="1" height="1"></td>
        <td colspan="2" height="143" valign="top" align="right">
          <table border="0" width="98%" cellspacing="0" cellpadding="0" align="center">
            <tr> 
              <td width="100%" > 
                <p align="center"><a href='myaddarticle.asp'></a> 
                <div align="center">
                  <%
sql="select * from article where typeid="+cstr(typeid)+" order by dateandtime desc"
Set rs= Server.CreateObject("ADODB.Recordset")
rs.open sql,conn,1,1
  if rs.eof and rs.bof then
       response.write "<p align='center'> 还 没 有 任 何 文 章</p>"
   else
	  totalPut=rs.recordcount
      totalPut=rs.recordcount
      if currentpage<1 then
          currentpage=1
      end if
      if (currentpage-1)*MaxPerPage>totalput then
	   if (totalPut mod MaxPerPage)=0 then
	     currentpage= totalPut \ MaxPerPage
	   else
	      currentpage= totalPut \ MaxPerPage + 1
	   end if

      end if
       if currentPage=1 then
           showpage totalput,MaxPerPage,"mymanage.asp"
            showContent
            showpage totalput,MaxPerPage,"mymanage.asp"
       else
          if (currentPage-1)*MaxPerPage<totalPut then
            rs.move  (currentPage-1)*MaxPerPage
            dim bookmark
            bookmark=rs.bookmark
           showpage totalput,MaxPerPage,"mymanage.asp"
            showContent
             showpage totalput,MaxPerPage,"mymanage.asp"
        else
	        currentPage=1
           showpage totalput,MaxPerPage,"mymanage.asp"
           showContent
           showpage totalput,MaxPerPage,"mymanage.asp"
	      end if
	   end if
   rs.close
   end if
	        
   set rs=nothing  
   conn.close
   set conn=nothing
  

   sub showContent
       dim i
	   i=0

%>
                  <div align="center">
                    <center>
                      <table border="0" cellspacing="1" width="100%" bordercolorlight="#000000" bordercolordark="#FFFFFF" cellpadding="0" bgcolor="#000000">
                        <tr bgcolor="#304D7C"> 
                          <td width="50" align="center" height="20"><strong><font color="#FFFFFF">ID号</font></strong></td>
                          <td width="389" align="center"><strong><font color="#FFFFFF">文章标题</font></strong></td>
                          <td width="148" align="center"><strong><font color="#FFFFFF">日期</font></strong></td>
                        </tr>
                        <%do while not rs.eof%> 
                        <tr bgcolor="#FFFFFF"> 
                          <td height="23" width="50"> 
                            <p align="center"><%=rs("newsid")%> 
                          </td>
                          <td width="389"> 
                            <p align="center"><a href="<%=rs("path")%>/<%=rs("N_Fname")%>"><%=rs("title")%></a> 
                          </td>
                          <td width="148" bgcolor="#FFFFFF"> 
                            <p align="center"><%=rs("dateandtime")%>
                          </td>
                        </tr>
                        <% i=i+1
	      if i>=MaxPerPage then exit do
	      rs.movenext
	   loop
		  %> 
                      </table>
                    </center>
                  </div>
                  <%
   end sub 

function showpage(totalnumber,maxperpage,filename)
  dim n
  if totalnumber mod maxperpage=0 then
     n= totalnumber \ maxperpage
  else
     n= totalnumber \ maxperpage+1
  end if
  response.write "<form method=Post action="&filename&"?typeid="&typeid&">"
  response.write "<p align='center'> "
  if CurrentPage<2 then
    response.write "<font color='#000080'>首页 上一页</font> "
  else
    response.write "<a href="&filename&"?page=1&typeid="&typeid&">首页</a> "
    response.write "<a href="&filename&"?page="&CurrentPage-1&"&typeid="&typeid&">上一页</a> "
  end if
  if n-currentpage<1 then
    response.write "<font color='#000080'>下一页 尾页</font>"
  else
    response.write "<a href="&filename&"?page="&(CurrentPage+1)&"&typeid="&typeid&">"
    response.write "下一页</a> <a href="&filename&"?page="&n&"&typeid="&typeid&">尾页</a>"
  end if
   response.write "<font color='#000080'> 页次:</font><strong><font color=red>"&CurrentPage&"</font><font color='#000080'>/"&n&"</strong>页</font> "
    response.write "<font color='#000080'> 共<b>"&totalnumber&"</b>篇文章 <b>"&maxperpage&"</b>篇文章/页</font> "
   response.write " <font color='#000080'>转到:</font><input type='text' name='page' size=4 maxlength=10 class=smallInput value="&currentpage&">"
   response.write "<input class=buttonface type='submit'  value='Goto'  name='cndok'></span></p></form>"
       
end function

 
%>
                </div>
              </td>
            </tr>
          </table>
        </td>
      </tr>
    </table>
    <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr bgcolor="#304D7C"> 
        <td width="777" bgcolor="#304D7C" class="unnamed1" height="2"> 
          <div align="center">可直接发E-Mail至<a href="mailto:arkbbs@163.com">arkbbs@163.com</a>收 
             QQ:2820202</div>
        </td>
        <td width="10" valign="top" align="right" height="2"><img src="images/x4.gif" width="14" height="12"></td>
      </tr>
    </table>
  </center></div>
</body>
</html>

⌨️ 快捷键说明

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