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

📄 foruminfo.asp

📁 企业办公简单管理系统,可以发布信息以及论坛
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>

<!-- #include file="conn/logors.asp" -->
<html>
<head>

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

<DIV class=menuskin id=popmenu 
onmouseover="clearhidemenu();highlightmenu(event,'on')" style="Z-INDEX: 100" 
onmouseout="highlightmenu(event,'off');dynamichide(event)"></DIV><!--顶部表格-->

<SCRIPT language=JavaScript src="style/main.js"></SCRIPT>

<body>
<table width="750"  height="300" align="center" >
  <tr>
    <td class=TableTitle2 height="97">
	  <!-- #include file="sitehead.asp" -->
	</td>
  </tr>
  <tr>
    <td  align="center" valign="top">
	
<% navigation_flag=34 %>
<!-- #include file="func_navigationbar.asp" -->
<%
function CheckInfo(str)
	dim i
	CheckInfo=""
	if not isnull(str) then 
		for i=1 to len(str)
			if mid(str,i,1)=" " then
				CheckInfo=CheckInfo&"&nbsp;"
			elseif mid(str,i,1)=chr(13) and mid(str,i+1,1)=chr(10) then
				CheckInfo=CheckInfo&"<br>"
				i=i+1
			else
				CheckInfo=CheckInfo&mid(str,i,1) 
			end if
		next
	end if
end function

    set rs=createobject("adodb.recordset") 
	if request("saveflag")=1 then
		dim msg,saveserial
		saveserial=1
		msg=""
	
		if trim(request("srcname"))="" then
			msg=saveserial & "、请输入评论人!<br>"
			saveserial=saveserial+1
		end if
	
		if trim(request("content"))="" then
			msg=msg & saveserial & "、意见不能为空,请输入您的意见!<br>"
			saveserial=saveserial+1
		end if
				
		if saveserial<=1 then
			sql="select * from cci_forumback"
			rs.open sql,connobj,3,3
			rs.addnew
			rs("srcid")=request("id")
			rs("srcname")=trim(request("srcname"))
			rs("intime")=now()
			rs("content")=request("content")
			rs.update
			rs.close

			sql="select * from cci_forum where id="& request("id")
			rs.open sql,connobj,3,3
			rs("feedbacksum")=rs("feedbacksum")+1
			rs("lastsrc")=trim(request("srcname"))
			rs("lasttime")=now
			rs.update
			rs.close
			
			msg="保存成功!" & site_title & "谢谢您提供评论!"
		end if
		
		response.Write("<div align=center><font color=#FF0000>" &msg & "</font></div><br>")
	
	end if
	
	
	sql="update cci_forum set visitsum=visitsum+1 where id=" & request("id")
	connobj.execute(sql)
		
    sql="select * from cci_forum where id=" & request("id")
    rs.Open sql,connObj,1,1
    if rs.EOF  then
		response.Redirect("message.asp?rediurl=sharelist.asp&msgurl=讨论区&msginfo=没有找到相关信息!")
    end if
	
%> 
 <table width="100%" cellpadding="1" cellspacing="1" class=tableborder1 align="center">
       
        <tr valign="top" bgcolor="#FFFFFF"> 
          <td height="18" colspan="2" align="center" class=tablebody1><font color="#0000FF"><B><%=rs("title")%></B></font></td>
        </tr>
        <tr> 
          <td width="24%" align="left" class=tablebody1><b>发表用户:</b><%=rs("srcname")%><br>
		  <b>发表时间:</b><%=rs("intime")%>
		  </td>
          <td valign="top" class=tablebody1><%=CheckInfo(rs("content"))%></td>
        </tr>
		<tr><td colspan="2" class=tablebody1 height="20">&nbsp;</td></tr>
        <%
			rs.close()
			sql="select * from cci_forumback where srcid=" & request("id") & " order by intime desc"
    		rs.Open sql,connObj,1,1
    		do while not rs.EOF
	    		response.Write "<tr><td align=left class=tablebody1><b>评论用户:</b>" & rs("srcname") &"<br><b>发表时间:</b><input name=id type=hidden value=" & rs("id")& ">"& rs("intime")&"</td>"
          		response.Write "<td valign=top class=tablebody1><font color=#ff0000>" & CheckInfo(rs("content")) &"</font></td></tr>"
				rs.movenext
			loop
			rs.close()
			set rs=nothing
		%>
        <form name="theform" method="post" action="foruminfo.asp">
          <tr> 
            <td class=tablebody1><input name="srcname" type="text"  value="<%
			  if session("name")<>"" then 
			  	response.Write(session("name"))
			  else
			  	response.Write("游客")
			  end if
			   %>" size="8" maxlength="30">
              评论: </td>
            <td class=tablebody1><textarea name="content" cols="120" rows="8"></textarea> 
            </td>
          </tr>

		 <tr><td class=tablebody1></td>
		    <td class=tablebody1 align="left" > 
              <input type="submit" name="Submit" value=" 发   表 "></td>
			  
		 </tr> 
          <input type=hidden name=saveflag value=1>
		  <input type=hidden name=id value=<%=request("id")%>>
        </form>
      </table>       
	  	<div align="center"><br><a href="javascript:history.go(-1)">返回</a><br></div>
	  </td>
  </tr>
  <tr>
    <td>
	  <!-- #include file="sitefloor.asp" -->    
	</td>
  </tr>
</table>
</body>
</html>

⌨️ 快捷键说明

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