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

📄 comment.asp

📁 大家好
💻 ASP
字号:
<%@ language="vbscript" %>
<%
dim boardname,id
if isempty(request("boardname")) then
response.write "bordname error"
response.end
else
boardname=request("boardname")
end if
if isempty(request("id")) then
response.write "id error"
response.end
else
id=request("id")
end if

set conn=server.createObject("ADODB.Connection")
	dbpath=server.mappath("club.mdb")
	conn.open "driver={Microsoft Access Driver (*.mdb)};dbq="&dbpath




sql="update mainboard set clicknum=clicknum+1 where id="&id
conn.execute sql
set rs2=server.createobject("ADODB.RecordSet")
sqltext1="select boardid,guestname,title,whattime,feeling,content,httptitle,httpadd,imgadd,renum,bianma from mainboard where id="&id
rs2.open sqltext1,conn
boardid=rs2("boardid")
set rs1=server.createobject("ADODB.RecordSet")
sqltext="select guestname,title,whattime,feeling,content,httptitle,httpadd,imgadd from mainboard where fatherid="&id&" order by whattime"
rs1.open sqltext,conn,1,1
%>
<html>

<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 3.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>main board</title>
<link rel="stylesheet" href="club.css">
<style type="text/css">
<!--
.botton {  font-size: 12px; line-height: 14px; color: #000000; background-color: #FFFFF8}
-->
</style>
</head>

<body bgcolor="#FFFFF0">
<table width="100%" border="1" bgcolor="#FDE1BB" bordercolorlight="#000000" bordercolordark="#FFFFFF" cellspacing="0" cellpadding="3">
<tr>
    <td align="left"><img src="browimage\<%=trim(rs2("feeling"))%>.gif"> <strong><%=rs2("title")%></strong> 
    </td>
</tr>
<tr>
    <td> <a href="newmesg.asp?geter=<%=rs2("guestname")%>"><em><font color="#0000FF"><%=rs2("guestname")%></font></em></a> 
      发表于<font color="#FF3366"><%=boardname%></font><font color="#3333FF"> (<%=rs2("whattime")%>)</font> 
    </td>
</tr> 
<tr>
	<td><%response.write replace(rs2("content"),chr(13)&chr(10),"<br>")%></td>
</tr>
<%if rs2("httpadd")<>"" then%>
<tr><td><a href="<%=rs2("httpadd")%>" target="_blank">
<%
	if rs2("httptitle")="" then     
		response.write rs2("httpadd")     
	else     
		response.write rs2("httptitle")     
	end if
%>
</a>
</td></tr>
<%
end if     
if rs2("imgadd")<>"" then
%>
<tr><td align="center">
	<img border="0" src="<%=rs2("imgadd")%>">
</td></tr>
<%end if%> 
</table>
<table width="100%" border="1" cellspacing="0" cellpadding="3" bordercolorlight="#000000" bordercolordark="#FFFFFF" bgcolor="#FFF0CE">
<%
if rs1.recordcount>0 then             
	results=rs1.recordcount             
for i=1 to results           
%>
<tr> 
    <td><img src="browimage\<%=trim(rs1("feeling"))%>.gif"> <%=rs1("title")%> -<a href="newmesg.asp?geter=<%=rs1("guestname")%>"><font color="#0000FF"><%=rs1("guestname")%></font></a> 
      回复于<font color="#FF8040"><%=rs1("whattime")%></font>
</td></tr>
<tr><td><%response.write replace(rs1("content"),chr(13)&chr(10),"<br>")%></td></tr>
<%
if rs1("httpadd")<>"" then%>
<tr><td align="left">
<a href="<%=rs1("httpadd")%>" target="_blank">
<%
	if rs1("httptitle")="" then      
		response.write rs1("httpadd")      
	else      
		response.write rs1("httptitle")      
	end if
%></a>
</td></tr>
<%
end if      
if rs1("imgadd")<>"" then%>
<tr><td align="center">
<img border="0" src="<%=rs1("imgadd")%>">
</td></tr>
<%
end if 
rs1.movenext               
if rs1.eof then               
exit for               
end if               
next               
end if
%>
</table>
<%
if session("username")="" then
	response.write "<p>超时操作,不能发言!"
else               
%>
<table border="1" width="100%" bordercolordark="#FFFFFF" bordercolor="#006600" cellpadding="3" cellspacing="0">
  <tr align="center"> 
    <td width="100%"> 
      <form method="POST" action="addarticle.asp">
      <input type="hidden" name="username" value="<%=session("username")%>"><input type="hidden" name="boardname" value="<%=boardname%>"><input type="hidden" name="boardid" value="<%=boardid%>"><input type="hidden" name="id" value="<%=id%>"><input type="hidden" name="bianma" value="<%=rs2("bianma")%>"><input type="hidden" name="renum" value="<%=rs2("renum")%>">
              
        <table width="500" border="0" cellspacing="0" cellpadding="0" align="center">
          <tbody> 
          <tr> 
                  <td colSpan="2" width="745"><font color="#800000">我</font><font color="#FF0000"><%=request("username")%></font><font color="#800000">来发表文章:</font></td>
                </tr>
                <tr> 
                  
            <td nowrap width="15%" align="right"><font color="#800000">〖话题〗</font></td>
                  <td width="85%"><font color="#008040"> 
                    
              <input maxLength="30" name="Title" size="40" value="RE:<%=rs2("title")%>" class="botton">
                    </font></td>
                </tr>
                <tr> 
                  
            <td nowrap width="15%" align="right"><font color="#800000">〖选择表情〗</font></td>
                  <td vAlign="center" width="85%"></td>
                </tr>
                <tr> 
                  <td colSpan="2" nowrap width="100%"> 
                    <table border="0" width="382" cellspacing="0" cellpadding="0" align="center">
                      <tr> 
                        <td nowrap width="56" height="26"> 
                          <input type="radio" value="0" name="feeling" checked tabindex="7">
                          <img src="browimage/0.gif" WIDTH="15" HEIGHT="15"></td>
                        <td nowrap width="56" height="26"> 
                          <input type="radio" value="1" name="feeling">
                          <img src="browimage/1.gif" width="15" height="15"> </td>
                        <td nowrap width="56" height="26"> 
                          <input type="radio" value="2" name="feeling">
                          <img src="browimage/2.gif" WIDTH="15" HEIGHT="15"></td>
                        <td nowrap width="56" height="26"> 
                          <input type="radio" value="3" name="feeling">
                          <img src="browimage/3.gif" WIDTH="15" HEIGHT="15"></td>
                        <td nowrap width="56" height="26"> 
                          <input type="radio" value="4" name="feeling">
                          <img src="browimage/4.gif" WIDTH="15" HEIGHT="15"></td>
                        <td nowrap width="55" height="26"> 
                          <input type="radio" value="5" name="feeling">
                          <img src="browimage/5.gif" WIDTH="15" HEIGHT="15"></td>
                      </tr>
                      <tr> 
                        <td nowrap width="56" height="27"> 
                          <input type="radio" value="6" name="feeling">
                          <img src="browimage/8.gif" WIDTH="15" HEIGHT="15"></td>
                        <td nowrap width="56" height="27"> 
                          <input type="radio" value="7" name="feeling">
                          <img src="browimage/9.gif" WIDTH="15" HEIGHT="15"></td>
                        <td nowrap width="56" height="27"> 
                          <input type="radio" value="8" name="feeling">
                          <img src="browimage/10.gif" WIDTH="15" HEIGHT="15"></td>
                        <td nowrap width="56" height="27"> 
                          <input type="radio" value="9" name="feeling">
                          <img src="browimage/7.gif" WIDTH="15" HEIGHT="15"></td>
                        <td nowrap width="56" height="27"> 
                          <input type="radio" name="feeling" value="10">
                          <img src="browimage/6.gif" WIDTH="15" HEIGHT="15"></td>
                        <td nowrap width="55" height="27"> 
                          <input type="radio" value="11" name="feeling">
                          <img src="browimage/11.gif" WIDTH="15" HEIGHT="15"></td>
                      </tr>
                    </table>
                  </td>
                </tr>
                <tr> 
                  <td colSpan="2" nowrap width="100%"> 
                    <hr color="#f3f3cb">
                  </td>
                </tr>
                <tr> 
                  
            <td width="15%" align="right"><font color="#800000">〖内容〗</font></td>
                  <td width="85%"></td>
                </tr>
                
          <tr align="center"> 
            <td colSpan="2" width="745"> 
              <textarea cols="71" name="Content" rows="5" class="botton"></textarea>
                  </td>
                </tr>
                <tr> 
                  <td colSpan="2" width="100%"> 
                    <hr color="#f3f3cb">
                  </td>
                </tr>
                <tr> 
                  <td width="15%"><font color="#0080c0">链接主题:<br>
                    链接URL :<br>
                    链接图象:</font></td>
                  <td width="85%"><font color="#800000"> 
                    
              <input name="httptitle" size="40" class="botton">
                    <br>
                    
              <input name="httpadd" size="40" value="http://" class="botton">
                    <br>
                    </font> 
                    
              <input name="imgadd" size="40" value="http://" class="botton">
                  </td>
                </tr>
                </tbody> 
              </table>
        <br>
        <input name="btSubmit" type="submit" value="发表文章" class="botton">
        <input name="btClear" type="reset" value="清除内容" class="botton">
         
</form>
    </td>
  </tr>
</table>
<%end if
rs1.close              
set rs1=nothing              
rs2.close              
set rs2=nothing              
conn.close              
set conn=nothing              
%>
</body>
</html>

⌨️ 快捷键说明

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