postmsg.asp
资源名称:txl.zip [点击查看]
上传用户:comthink
上传日期:2021-05-06
资源大小:1280k
文件大小:3k
源码类别:
WEB源码(ASP,PHP,...)
开发平台:
HTML/CSS
- <!-- #include file="conn.asp" -->
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
- <title>postmsg</title>
- <style type="text/css">
- <!--
- body {
- background-color: #CCCCFF;
- }
- table {
- font-size: 13px;
- font-weight: lighter;
- color: #000000;
- text-decoration: none;
- border: thin outset #99CC66;
- }
- input {
- font-size: 12px;
- font-weight: lighter;
- color: #000000;
- text-decoration: none;
- background-color: #CCCCFF;
- height: auto;
- border: thin inset #000000;
- cursor: hand;
- }
- select {
- font-size: 12px;
- font-weight: lighter;
- color: #000000;
- text-decoration: underline;
- background-color: #CCCCFF;
- border: thin inset #99CC66;
- cursor: crosshair;
- }
- -->
- </style>
- <script language="JavaScript" type="text/JavaScript">
- <!--
- function MM_openBrWindow(theURL,winName,features) { //v2.0
- window.open(theURL,winName,features);
- }
- //-->
- </script>
- </head>
- <body topmargin="0" leftmargin="0">
- <table width="100%" height="58" border="0">
- <tr>
- <td height="25" colspan="2"><form action="postmsg.asp?ac=addmsg&myself=<%=request.querystring("myself")%>" method="post" name="form1" >
- 你对
- <select name="rname">
- <option>大家</option>
- <%
- '显示在线人数
- set rsout=Server.CreateObject("ADODB.RecordSet")
- sqlout="select * from online where id ORDER BY id DESC"
- rsout.open sqlout,conn,1,1
- for i=1 to 50 step 1
- %>
- <option><%response.Write(rsout("username"))%></option>
- <%
- rsout.movenext
- if rsout.EOF Then Exit For
- next
- %>
- </select>
- 说:
- <input name="msg" type="text" size="30">
- <input name="Submit" type="submit" value="提交发言" height="15">
- <input name="username" type="hidden" id="username" value="<%response.write(request.querystring("myself"))%>">
- </form></td>
- </tr>
- <tr>
- <td width="602" height="25"> </td>
- <td width="185"> </td>
- </tr>
- </table>
- </body>
- </html>
- <%
- ac=request.QueryString("ac")
- if ac="addmsg" then
- set rs=server.createobject("adodb.recordset")
- sql="select * from ip363net where id is null"
- rs.open sql,conn,1,3
- rs.addnew
- rs("username")=request.Form("username")
- rs("rname")=request.form("rname")
- rs("msg")=request.form("msg")
- rs("gif")=request.Form("gif")
- rs("posttime")=time()
- rs.update
- set rs=nothing
- '当聊天数据大于15条时删除最久的数据
- set rsck=server.CreateObject("adodb.recordset")
- sqlck="select * from ip363net where id ORDER BY id"
- rsck.open sqlck,conn,1,1
- nu=rsck.recordcount
- b=rsck("id")
- if nu>35 then
- set rsold=server.CreateObject("adodb.recordset")
- sqldell="delete * from ip363net where id="&b&""
- rsold.open sqldell,conn,1,3
- end if
- end if
- %>
English
