当前位置: 首页 > 图文教程 > 网络编程 > ASP > 网络寻呼机数据库版显示消息showmessage.asp

ASP
使用ASP中的VB ActiveX.dll文件
用ADO的COMMAND对象实现对WEB数据库动态数据查询的方法
在ASP中使用简单Java类
借助组件使用asp连接informix全方案
用ADSI编程实现IIS中建立虚拟目录
不刷新页面筛选数据库中的数据
使用ISAPI过滤器增强IIS的功能
利用J2ME与ASP建立数据库连接
用通ASP直接获取用户真实IP地址
用ASP编写计数器的优化方法
通过ASP远程注册自己的组件
检测IP地址是否真正合法的函数
用asp做access的远程接口
错误80004005信息处理方法
ASP学习:urldecode 方法补遗
在HTML页面中实现点击数统计
ASP字数计算函数
用ASP随机生成文件名的函数
单页面判断浏览器是否接受 Cookies
存储过程介绍及asp+存储过程的使用

ASP 中的 网络寻呼机数据库版显示消息showmessage.asp


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-11-03   浏览: 38 ::
收藏到网摘: n/a

  <html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">

<title>显示自己的信息</title>
<script language=javascript>
<!--
function checks(theform1){    
if (theform1.word.value=="")
{
   alert("请随便说几句。");
   theform1.word.focus();
   return false;
   }
   
  return true; }
  
//-->
</script>

</head>

<body>
<br><br>
<%
  
   username=session("username")
Set conn=server.createobject("adodb.connection")
    Provider = "Provider=Microsoft.Jet.OLEDB.4.0;"
    DBPath = "Data Source=" & Server.MapPath( "webuser.mdb" )

    conn.Open Provider & DBPath
    
    set rs=server.createobject("adodb.recordset")
    
    sql="select id,fromname,toname,word,adddate,isread from talks where toname='"& username &"'and  isread=0 order by adddate"
    
    rs.open sql,conn,3,3
    rs.pagesize=1
    Page = CLng(Request("Page"))    
    If Page < 1 Then Page = 1  
    If Page > rs.PageCount Then Page = rs.PageCount
    
    %>

<form method="post" name=form onSubmit="return checks(form)" action="SubmitMessage.asp">
  <table border="1" cellspacing="1" style="border-collapse: collapse" bordercolor="#111111" width="550" id="AutoNumber1" align="center">
    <tr>
      <td width="437" colspan="2" height="14"><b><font size="3">发送短消息</font></b></td>
    </tr>
   
    <tr>
      <td width="437" colspan="2" height="8">
      <table border="0"  width="540" id="AutoNumber2">
        <%  if rs.eof or rs.bof then %>
        <tr>
          <td width="100%"><% response.write"目前没有你的消息" %></td>
        </tr>
        <% else %>
        <tr>
          <td width="100%"><% show rs,page%></td>
        </tr>
        <tr>
          <td width="100%">
<%        
   Sub Show( rs, Page )       
       rs.AbsolutePage = Page
%>  

          <table border="0" cellspacing="0"  width="534" cellpadding="0">
         &