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

📄 messageboard.asp

📁 简单的企业发布信息网站 有留言功能 界面 美观
💻 ASP
字号:
<!--#include file="conn/db.asp"-->
<% 
response.ContentType="text/html;charset=gb2312"
%>
<html>
<head>
<title>岳海鑫源后台管理</title>
<style>
body{ margin: 0 auto; width: 778px; padding: 0; text-align: center;}

#foot{ width: 778px;}

img{ display: block; border: 0;}

#content{ width: 400px; height: 120px;}

h3{ text-align: left;}

#messageboardshow{ text-align: left; margin: 0 0 0 60px;}
#messageboardshow ul{ margin: 0 0 10px 0; padding: 0; list-style-type: none; border: 1px solid #7e7e7e; width: 420px; color: #444; font: 9pt arail;}
#messageboardshow li{ margin: 0 5px 10px 2px; padding: 5px 0 0 0; float: left; }
#messageboardshow li.name{ border-right: 1px solid #7e7e7e; width: 120px;} 
#messageboardshow li img{ display: inline;}

.title{ float: left; width: 420px; padding: 2px; margin: 0; color: #fff; background: #7e7e7e; text-algin: left;}

#center{ width: 778px; margin: 0; padding: 0; background: url("image/bgbgbg.jpg") #fff repeat-y 0 0;}

#c_left{ background: url("image/bgbgbg.jpg") #fff repeat-y 0 0; float: left; padding: 0;}
#c_right{ background: url("image/cont_071.jpg") #fff repeat-y 0 0; width: 31px; height: 461px; padding: 0; float: right;}
#c_center{ width: 489px; float: left; background: #fff; padding: 0; height: 461px; line-height: 120%;}
#c_bottom{ clear: both; background: url("image/cont_left3.jpg") #fff no-repeat 0 0;}
</style>
<script src="common.js" language="javascript" type="text/javascript"></script>
</head>
<body>
<!--#include file="head.asp"-->
    
          <div id="center">
              <div id="c_left">
                   <img src="image/cont_left.jpg" style="float: left; margin: 0 0 0 -3px; display: inline;" />
                   <img src="image/cont_left2.jpg" style="float: left; margin: 0 0 0 -10px;" />
                   <img src="image/cont_left4.jpg" style="margin: 0 0 0 30px; clear: both;" />
              </div>
              <div id="c_center">
                      <img src='image/cont_06_admin.jpg' style="margin: 0 0 0 1px;" />
<div id="messageboardshow">
<%
page=getpage(request.QueryString("page"))
set rs=server.CreateObject("adodb.recordset")
rs.pagesize=6
sql = "select * from bbs order by id "
rs.open sql,conn,3,2 
if rs.eof then

         p "当前没有留言信息"
  
   else 
   ipage=0
   rs.absolutepage=page
   do while not rs.eof and ipage<rs.pagesize
%>   
<div class="title"><span style="float: right">时间: <%=rs("publishtime")%></span><span>主题: <%=rs("title")%></span></div>
<ul>
      <li class="name"><span>姓名:<%=rs("name")%></span><br /><span>地区:<%=rs("address")%></span><br /><img src="image/phone.jpg" width="19pt" title="电话" /><span>:<%=rs("phone")%></span><br /><a href='mailto: <%=rs("email")%>'><img src="image/email.jpg" width="16pt" title="email" /></a>: <%=rs("email")%></li>
      <li><%=rs("content")%></li>
</ul>
<%
  ipage=ipage+1
  rs.movenext
  loop
%>
			<div id="page">
		        共<%= rs.recordcount %>条留言 每页<%= rs.pagesize %>条 页次:<%=page%>/<%= rs.pagecount %>
			<% If page=1 Then %>
			          首页
			          上页 
			<% else %>
			          <a href="messageboard.asp?page=1"><strong>首页</strong></a>
                                  <a href="messageboard.asp?page=<%=(page-1)%>"><strong>上页</strong></a>
			<% end if %>
			<% If page=rs.pagecount Then %>
			          下页
			          尾页 
			<% else %>
			          <a href="messageboard.asp?page=<%=(page+1)%>"><strong>下页</strong></a>
			          <a href="messageboard.asp?page=<%=rs.pagecount%>"><strong>尾页</strong></a>
			<% end if %>		
			</div>
<%   
end if
rs.close
set rs=nothing   
%>
</div>
<div id="messageboardwrite" style="margin: 0 0 0 45px">
     <h3>书写留言</h3>
     <form name="form1" action="messageboardsava.asp" method="post" style="margin: 0;">
               <table border="0" style="font: 9pt arial;">
                        <tbody> 
                               <tr> <td class="left">姓名:</td> <td><input type="text" id="name" name="name" value="" /><span class="red">*</span></td></tr>
                               <tr> <td class="left">电话:</td> <td><input type="text" id="phone" name="phone" value="" />*</td></tr>
                               <tr> <td class="left">地区:</td> <td><input type="text" id="address" name="address" value="" /></td></tr>
                               <tr> <td class="left">邮箱:</td> <td><input type="text" id="email" name="email" value="" /></td></tr>
                               <tr> <td class="left">主题:</td> <td><input type="text" id="title" name="title" value="" /><span class="red">*</span></td></tr>
                               <tr> <td class="left">内容:</td> <td><textarea id="content" name="content"></textarea><span class="red">*</span></td></tr>
                               <tr> <td class="left"></td><td> <input type="submit" id="submit" value="提交" onclick="return checkform();" /> <input type="reset" id="reset" value="取消" /></td></tr>
                        </tbody>
               </table>
     </form>
</div>
<script>
function checkform(){
      if(document.getElementById("name").value==""){
       alert("用户名不能为空!");
       return false;
      }
      if(document.getElementById("title").value==""){
       alert("主题不能为空!");
       return false;
      }
      if(isNaN(document.getElementById("phone").value)){
       alert("你输入的不是数字!");
       return false;
      }
      if(document.getElementById("phone").value==""){
       alert("电话不能为空!");
       return false;
      }
      if(document.getElementById("content").value==""){
       alert("内容不能为空!");
       return false;
      }
}
</script>
              </div>		
              <div id="c_right">
                 &nbsp;
               </div>
          </div>


<!--#include file="foot.asp"-->
</body>
</html>

⌨️ 快捷键说明

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