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

📄 huodon.asp

📁 在线报价程序V0.1 免费版: 1、后台添加产品 2、后台分类 3、后台添加友情连接 4、会员管理 5、客户留言 6、在线订单 7、捆绑了《忠网广告管理系统》 8、公告发布、管理 管理员:admin
💻 ASP
字号:
<!-- #include file="conn.asp"-->
<%
dim rs,sql
dim mboard

dim currentpage
if request("page")="" or request("page")<1 then
 currentpage=1
else
 currentpage=request("page")
end if
dim maxperpage 
maxperpage=30
dim maxpage
dim count
dim counti 
counti=0
dim countj 
countj=1

set rs=server.CreateObject("ADODB.recordset")
rs.open "index",conn,3,3
name=rs("name")
rs.close
set rs=nothing
%>
<title><%=name%>--管理系统</title>
<link rel="stylesheet" href="style.css" type="text/css">
<meta NAME=GENERATOR Content=""Microsoft FrontPage 4.0"" CHARSET=GB2312>
<style type="text/css">
<!--
.style2 {color: #FF0000}
-->
</style>
<BODY leftmargin="0" bottommargin="0" rightmargin="0" topmargin="0" marginheight="0" marginwidth="0">

<table width="18%"  border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td>&nbsp;</td>
  </tr>
</table>

  <table width="95%" border="0" cellspacing="1" cellpadding="3" align="center" class="tableBorder">
    <form name="form1" method="post" action="huodon_save.asp"><tr>
      <th colspan="2" height="25">添加活动(带<span class="forumrow"><span class="style2">*</span></span>必填项)</th>
    </tr>
    <tr>
      <td width="27%" height="25" class="forumrow"><div align="right">活动主题:</div></td>
      <td width="73%" class="forumrow"><input name="title" type="text" id="title" size="30">
        <span class="style2">*(注:标题不能超出30个汉字,60个英文字符)</span></td>
    </tr>
    <tr>
      <td height="25" class="forumrow"><div align="right">举办单位:</div></td>
      <td class="forumrow"><input name="company" type="text" id="company" size="50">
        <span class="style2">*</span></td>
    </tr>
    <tr>
      <td height="25" class="forumrow">&nbsp;</td>
      <td class="forumrow"><input name="checkbox" type="checkbox" value="checkbox" checked>
        使用HTML语言<span class="style2">*</span></td>
    </tr>
    <tr>
      <td height="25" class="forumrow"><div align="right">活动内容:</div></td>
      <td class="forumrow"><textarea name="content" cols="100" rows="15" wrap="VIRTUAL" id="content"></textarea>
        <span class="style2">* </span></td>
    </tr>
    <tr>
      <td height="25" class="forumrow">&nbsp;</td>
      <td class="forumrow">  	    <input type="submit" name="Submit" value="提交">
          <input type="reset" name="Submit2" value="重置"></td>
    </tr></form>
</table>

  <table width="18%"  border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
      <td>&nbsp;</td>
    </tr>
  </table>
  <%
set rs=server.CreateObject("ADODB.recordset")
sql = "select * from huodon order by id desc"
rs.open sql,conn,3,3
if rs.eof and rs.bof then
  response.write "<br><center>暂时还没有活动!</center>"
  response.end
else
 count=rs.recordcount
 if count mod maxperpage = 0 then
   maxpage=count \ maxperpage 
 else
   maxpage=count \ maxperpage +1
 end if    
 if cint(currentpage) > cint(maxpage) then
   currentpage=1
 end if

sub page
if count<>0 then
%>
  <table width="100%" cellspacing=0 cellpadding=0 class=forumrow align=center>
    <form method="post" name="gopage" action="huodon.asp?mode=<%=mode%>&xxx=<%=xxx%>&search=<%=search%>">
      <tr>
        <td width=100% align=center>
          <%	
if CurrentPage<2 then
    		response.write "共有"&count&"条&nbsp;&nbsp;首页&nbsp;&nbsp;上一页&nbsp;&nbsp;"
  	else
    		response.write "共有"&count&"条&nbsp;&nbsp;<a href=huodon.asp?moad="&mode&"&xxx="&xxx&"&search="&search&"&page=1>首页</a>&nbsp;&nbsp;"
    		response.write "<a href=huodon.asp?moad="&mode&"&xxx="&xxx&"&search="&search&"&page="&CurrentPage-1&">上一页</a>&nbsp;&nbsp;"
  	end if

  	if maxpage-currentpage<1 then
    		response.write "下一页&nbsp;&nbsp;尾页&nbsp;&nbsp;"
  	else
    		response.write "<a href=huodon.asp?moad="&mode&"&xxx="&xxx&"&search="&search&"&page="&(CurrentPage+1)&">"
    		response.write "下一页</a>&nbsp;&nbsp;<a href=huodon.asp?moad="&mode&"&xxx="&xxx&"&search="&search&"&page="&maxpage&">尾页</a>&nbsp;&nbsp;"
  	end if
   	response.write "页次:<strong><font color=red>"&CurrentPage&"</font>/"&maxpage&"</strong>页"
   	response.write "&nbsp;&nbsp;<b>"&maxperpage&"</b>条/页 "
%>
&nbsp;&nbsp;转到
        <select name=page onchange="submit()">
          <%
for i=1 to maxpage
if cint(i)=cint(currentpage) then
flag="selected"
else
flag=""
end if		
response.write "<option " & flag & " value=" & i & ">" & i & "</option>"
next	
%>
        </select>
        页 </td>
      </tr>
    </form>
  </table>
  <%
end if
end sub%>
  <table width="95%" border="0" cellspacing="1" cellpadding="3" align="center" class="tableBorder">
    <tr>
      <th width="100%" colspan="4" height="25">活动管理</th>
    </tr>
    <tr>
      <td width="15%" height="25" class="forumrow" align="center">活动标题:</td>
      <td width="15%" class="forumrow" align="center">举办单位</td>
      <td width="15%" class="forumrow" align="center">活动内容:</td>
      <td width="10%" class="forumrow" align="center">编辑</td>
    </tr>
    <%
if cint(currentpage)<=cint(maxpage) then
rs.move (currentpage-1)*maxperpage
showcontent
end if  
sub showcontent
do while not rs.eof
%>
    <tr>
      <td height="25" class="forumrow" align="center"><%=rs("title")%></td>
      <td class="forumrow" align="center"><%=rs("company")%></td>
      <td class="forumrow" align="center"><%=rs("content")%></td>
      <td class="forumrow" align="center"><a href="huodondel.asp?id=<%=rs("id")%>">删除</a></td>
    </tr>
    <%
counti=counti+1
rs.movenext 
if counti>=maxperpage then
exit do
end if   
loop
end sub
end if
rs.close
set rs=nothing
%>
    <tr>
      <td height="22" colspan="4" class="forumrow">
        <%call page%>
      </td>
    </tr>
  </table>
  <%
conn.close
set conn=nothing
%>
</body>
	</html>

⌨️ 快捷键说明

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