选择显示字体大小

网络寻呼机数据库版显示历史消息history.asp


  <html>

<head>
<meta http-equiv=&quot;content-type&quot; content=&quot;text/html; charset=gb2312&quot;>
<title>历史消息</title>
<script language=&quot;javascript&quot;>
<!--



function checkall(form)  {
  for (var i=0;i<document.checkboxform1.length;i++)    {
    var e = document.checkboxform1[i];
    if (e.name != 'chkall')       e.checked = form.chkall.checked;
   }
  }
  
  // 检查是否选择了记录
function checkbox1(form)
{
    var thelength;
    var i,j;

    thelength = form.id.length;
    i = 0;
    j = 0;

    while(i<thelength){
        if (form.id[i].checked)
            j ++ ;
        i ++ ;
    }

    if (j==0 && !form.id.checked){
        alert(&quot;请先选择删除记录&quot;);
        return false ;
    }
    return true ;
}

// 单击“删除”按钮时触发
function del(form)
{
     if (!checkbox1(form)){
        return false;
    }
    else
        if (confirm('您确信要删除这些记录吗')){
        window.location.href=&quot;deletemessage.asp?page=<%=clng(page)%>&quot;}
}
  -->
  </script>
</head>

<body>
<br><br><%
set conn=server.createobject(&quot;adodb.connection&quot;)
    provider = &quot;provider=microsoft.jet.oledb.4.0;&quot;
    dbpath = &quot;data source=&quot; & server.mappath( &quot;webuser.mdb&quot; )

    conn.open provider & dbpath
    username=session(&quot;username&quot;)
    
    if username<>&quot;&quot; then
    sql=&quot;select * from talks where fromname='&quot;& username & &quot;'or toname='&quot;& username & &quot;' order by adddate desc&quot;
    
    set rs = server.createobject(&quot;adodb.recordset&quot;)
    
    rs.open sql,conn,3,3
    rs.pagesize=15
    page = clng(request(&quot;page&quot;))
    if page < 1 then page = 1
    if page > rs.pagecount then page = rs.pagecount

%>

<table border=&quot;0&quot; cellspacing=&quot;0&quot;  width=590  cellpadding=&quot;0&quot; align=center height=&quot;75&quot;>
  <tr>
    <td width=&quot;100%&quot; height=&quot;24&quot;><font size=&quot;2&quot;>查看我的历史消息(<b><font color=&quot;#ff0000&quot;>聊天记录仅保存一周内容,请自行备份</font></b>)</font></td>
  </tr>
  <% if rs.eof or rs.bof then %>
  <tr>
    <td width=&quot;100%&quot; height=&quot;20&quot;><font color=&quot;#ff0000&quot;>没有你的历史纪录,赶快和大家交流</font>!!!</td>
  </tr>
  <% else %>
  
  <tr>
    <td width=&quot;100%&quot; align=&quot;center&quot;>
    <form action=history.asp name=f1>    
                  <% if page <> 1 then %>             
                      <a href=history.asp?page=1> 第一页</a>          
                      <a href=history.asp?page=<%=(page-1)%>>上一页</a>             
                 <% end if             
                 if page <> rs.pagecount then  %>            
                      <a href=history.asp?page=<%=(page+1)%>>下一页</a>             
                      <a href=history.asp?page=<%=rs.pagecount%>>最后一页</a>              
                 <% end if %>            
                      页次:<font color=&quot;red&quot;><%=page%>/<%=rs.pagecount%></font>       
                           <input type=text size=4 maxlength=4 name=page>    
            </form>
</td>
  </tr>
  <tr>
    <td  ><% show rs, page %></td>
  </tr>
  <% end if %>
  <tr>
    <td width=&quot;100%&quot; height=&quot;16&quot;>
    
    <%
   sub show( rs, page )
       rs.absolutepage =page              
       count=rs.pagesize              
%>
<form name=&quot;checkboxform1&quot; onsubmit=&quot;return del(checkboxform1)&quot; method=post action=&quot;deletemessage.asp?page=<%=clng(page)%>&quot;>
   <table border=&quot;0&quot; cellspacing=&quot;0&quot;  width=&quot;590&quot; cellpadding=&quot;0&quot; align=center>
      <%  
       do while not rs.eof and count>0                
      %>
    <tr bgcolor=&quot;#d8d3cd&quot;>
      <td height=&quot;20&quot;>&nbsp;<input type=&quot;checkbox&quot; name=&quot;id&quot; value=&quot;<%=rs(&quot;id&quot;)%>&quot;>&nbsp;<b><%=rs(&quot;fromname&quot;)%></b>&nbsp;于<%=rs(&quot;adddate&quot;)%>传呼&nbsp;<b><%=rs(&quot;toname&quot;)%></b></td></tr>
    <tr>
      <td height=22><%
       word=replace(rs(&quot;word&quot;),vbcrlf,&quot;<br>&quot;)  
       response.write word %>
      </td>
     </tr>
        <%
        count=count-1
        rs.movenext
        loop
        %>
     <tr>
       <td >
         <input type=&quot;checkbox&quot; id=&quot;check1&quot; name=&quot;chkall&quot; value=&quot;on&quot; onclick=&quot;checkall(this.form)&quot;><label for=&quot;check1&quot;>点击复选框或汉字可全选全清</label> &nbsp;
         <input type=&quot;submit&quot; value=&quot;删除选中的数据&quot; name=&quot;shanchu&quot;></td>
        </tr>
</table>
</form>
<% end sub  %>
    </td>
  </tr>
</table>
<%
sql=&quot;select adddate,id from talks&quot;

set obj=conn.execute(sql)
if not obj.eof then
do while not obj.eof

   sql=&quot;delete from talks where (day(now)-day(adddate)>8)&quot;
   conn.execute(sql)

obj.movenext
loop
end if

obj.close
set obj=nothing
end if


rs.close
set rs=nothing
conn.close
set conn=nothing
%>
</body>

</html>


 


关键字 本文所属关键字

相关 与本文相关文章

分类 所有文章关键字导航

源码编程相关

Java   Asp   PHP   .Net   XML   C/C++   CGI   VB   Jsp   J2ee   J2se   J2me   EJB   Servlet   Tomcat   Resin   Struts   Weblogic   Eclipse   ANT   GUI   JMS   Web servise   IDEA   Webphere   Hibernate   Spring   Jboss   Applet   Swing   Socket   Javamail   Perl   Ajax   P2P   安全   模式   框架   测试   开源   游戏

SQL数据库相关

My-SQL   Ms-SQL   Access   DB2   Oracle   Sybase   SQLserver   索引   存储过程   加密   数据库   分页   视图  

手机无线相关

3G   Wap   CDMA   GRPS   GSM   IVR   彩信   短信   无线   增值业务

网页设计制作相关

HTML   CSS   网页配色   网页特效   Javascript   VBscript   Dreamweaver   Frontpage   JS   Web   网站设计

网站建设推广相关

建站经验   网站优化   网站排名   推广   Alexa

操作系统/服务器相关

Windows XP   Windows 2000   Windows 2003   Windows Me   Windows 9.x   Linux   UNIX   注册表   操作系统   服务器   应用服务器

图形图像多媒体相关

Photoshop   Fireworks   Flash   Coreldraw   Illustrator   Freehand   Photoimpact   多媒体   图形图像

标准 网站致力的规范

Valid CSS!

无不良内容,无不良广告,无恶意代码

Valid XHTML 1.0 Transitional

creativecommons