毕业论文论文范文课程设计实践报告法律论文英语论文教学论文医学论文农学论文艺术论文行政论文管理论文计算机安全
您现在的位置: 毕业论文 >> 论文 >> 正文

asp留言本源码及论文 第10页

更新时间:2010-4-16:  来源:毕业论文
asp留言本源码及论文 第10页
 function chkdel() {
   var talk = window.confirm("请确定是否删除该条记录!");
   if (talk==false) {return false;}
  }
  </script>
确认是否删除该记录。
<td width="1293" height="182" valign="top">
                    <font size="2">
       <%while not rs.eof and num<=size%>
     <font color="#FF00FF"> 
       [留言主题]</font><%=rs("主题")%>
    <br>
    <font color="#FF00FF">
    [留言内容]</font><%=rs("内容")%><br>
    &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp             
    <%=rs("昵称")%>&nbsp [<%=rs("时间")%>]<font color="#0000FF"> <br>
    <font color="#0000FF">
    +---------------------------------------------------------------------+&nbsp;
    <a href="lybxg.asp?username=<%=rs("昵称")%>" onclick="return  chkdel();" >删除?</a>
       </font> <br>
    <%rs.movenext
            num=num+1
wend
rs.close
set rs=nothing%>
        </font></font>
    <font size="2">
            <a href="lybxg.asp?page=1">[第一页]</a>
  <% select case page
     case 1:            '只有下一页
         if totlepage>1  then
%>
          <a href="lybxg.asp?page=2">[下一页]</a>[第<%=page%>页/共<%=TotlePage%>页][共<%=numzhuce%>条记录]
          <% else %>
          第<%=page%>页/共<%=TotlePage%>页</font>
          <% end if %>
     <% case TotlePage:    '只有上一页
%>
          <a href="lybxg.asp?page=<%=page-1%>">[上一页]</a>[第<%=page%>页/共<%=TotlePage%>页][共<%=numzhuce%>条记录]  
      <% case else:  %>
          <a href="lybxg.asp?page=<%=page-1%>">[上一页]</a> 
          <a href="lybxg.asp?page=<%=page+1%>">[下一页]</a> 
          [第<%=page%>页/共<%=TotlePage%>页][共<%=numzhuce%>条记录]  
      <%  end select %>
<%end if%>
            </td>


4.6 其他程序模块

  以上几节简单的介绍了几个模块的一些比较重点的程序段,但是在本节中介绍一下几个在表面上看不到的,但是却起着相当重要的一些代码。
<%sj=date()
aaa="'"&request("T1")&"','"&request("T2")&"','"&request("T3")&"','"&request("T4")&"','"&request("T5")&"','"&request("s1")&"','"&sj&"'"%>
<%set cn=server.createobject("adodb.connection")
cn.open"dsn=stu;"
%>
<%strsql="insert into lyb(昵称,qq,邮箱,网站,主题,内容,时间) values("&aaa&")"
cn.execute(strsql)
%>
<%cn.close
set cn=nothing%>
<%response.redirect"lyb.asp"%>
  以上这段代码是在后台运行的,该网页是个空的,什么也不显示,当用户写完留言的时候,把表单里所有的东西都要提交到这里,利用ASP提供的insert int 等语句把他传送到服务器的数据库的表格里。
<%response.buffer=true%>
<%usname=request("usname")
uspas=request("uspas")
set rs=server.createobject("adodb.recordset")
rs.open "select * from password","dsn=stu;"
%>
<html>
<head>
<body>
<%while not rs.eof
if usname=rs("用户名") and uspas=rs("密码") then
%>
<%response.redirect "lybxg.asp"%>
<%response.end%>

上一页  [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]  ... 下一页  >> 

asp留言本源码及论文 第10页下载如图片无法显示或论文不完整,请联系qq752018766
设为首页 | 联系站长 | 友情链接 | 网站地图 |

copyright©youerw.com 优文论文网 严禁转载
如果本毕业论文网损害了您的利益或者侵犯了您的权利,请及时联系,我们一定会及时改正。