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

📄 show.asp

📁 自己做的毕业设计
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="inc/config.asp"-->
<!--#include file="inc/conndb.asp"-->
<!--#include file="inc/mcfyl.asp"-->
<!--#include file="inc/function.asp"-->
<!--#include file="zhuru.asp"-->
<% 
id=request("id")
name=Request.Cookies("mctb_name")
banzhu=session("mctb_bz")
Set rs1 = Server.CreateObject("ADODB.Recordset") 
rs1.Open "Select * From zhuti where id="&id, conn,3,3 
'纪录访问次数 
rs1("hits")=rs1("hits")+1 
rs1.update 
nhits=rs1("hits") 
'显示回复
Dim ors
Set ors=new Cls_vbsPage	
Set ors.Conn=conn
With ors
.PageSize=bbspage	
.PageName=PageName	
.DbType="AC"			
.RecType=-1	
.JsUrl="inc/"
.Pkey="id"
.Field="id,content,image,name,time"
.Table="retitle"	
.Condition="rid="&id&""	
.OrderBy="id asc"
End With
Rs=ors.ResultSet()
page=cint(request("Page"))
if page="" or page=0 then 
page=1
else
page=page
end if
iRecCount=ors.RecordCount()'记录总数
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%=rs1("title")%>-<%=bbsname%></title>
<link href="images/hotlt.css" rel="stylesheet" type="text/css">
</head>

<body>
<table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="250" valign="top"><img src="images/bbslogo.jpg" ></td>
    <td width="538"><form name="form1" method="get" action="index.asp" style="margin:5px;">
	  <input name="q" type="text" id="q" value="<%=keys%>" size="30">
      <input type="submit" value=" 搜 索 ">
     
      <input name="so" type="radio" value="title" checked>
搜索标题
<input type="radio" name="so" value="name">
搜索作者
    </form></td>
    <td width="160" align="center"><%
if name= "" then
response.write"<A href='login.asp'>登录</A> | <A href='reg.asp'>注册</A>"
elseif name<> "" then
response.write name&" | <A href='exit.asp'>退出</A>"
end if
%></td>
  </tr>
</table>
<table width="99%" border="0" align="center" cellpadding="0" cellspacing="0" class="tit">
  <tr bgcolor="#E8F3FF">
    <td height="25" bgcolor="#FFF5F0">&nbsp;<a href="index.asp"><%=bbsname%></a> &gt;&gt; 浏览主题</td>
    <td width="20%" bgcolor="#FFF5F0">&nbsp;</td>
  </tr>
</table>
<table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="40">&nbsp;<a href="index.asp#new"><img src="images/fatie.gif" width="72" height="24" border="0"></a> <a href="index.asp?so=jinghua"><img src="images/pic05.gif" width="72" height="24" border="0"></a> <a href="help.htm"><img src="images/pic09.gif" width="72" height="24" border="0"></a></td>
    <td width="20%"> </td>
  </tr>
</table>
<table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td valign="top"><% if page<=1 then  %>
      <table width="99%" border="1" align="center" cellpadding="0" cellspacing="1" style="border-style:dashed; border-color:#FF9900">
        <tr>
          <td width="100%" height="30" style="border-style:none;"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
            <tr align="center" bgcolor="#E8F3FF">
              <td width="5%" height="30" bgcolor="#FFF5F0"> </td>
              <td align="left" bgcolor="#FFF5F0">主 题: <%=rs1("title")%> </td>
              <td width="30%" bgcolor="#FFF5F0">已阅:<%=nhits%> / 回复:<%=rs1("recount")%>(楼主)</td>
            </tr>
          </table></td>
        </tr>
      </table>
      <table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr align="center">
          <td width="10%" height="30" class="list"><%if banzhu<>"" then%>
		  <table width="99%"  border="0" align="center" cellpadding="0" cellspacing="0">
            <tr>
              <td height="25" align="right" class="list">&nbsp;</td>
            </tr>
          </table><%end if%>
            <br>
            <table width="99%" border="0" cellpadding="0" cellspacing="0">
              <tr>
                <td bgcolor="#FFFAF7" class="cont"><%=replace(ubbs(rs1("content")),CHR(10),"<br>")%>
			    <%
img=rs1("image")
if trim(img)<>"" then
response.write"<br><br><font color=red>贴子相关图片:</font><br>"
response.write"<div class='cimg'><img src='"&img&"' border='0'></div>"
end if
%></td>
              </tr>
          </table> 
          <br></td>
        </tr>
        <tr align="center">
          <td height="30" class="list"><table width="909%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td>作者:<%=rs1("name")%> (<%=rs1("time")%>)</td>
              <td align="right"><a href="#re">回复此贴</a></td>
            </tr>
          </table></td>
        </tr>
      </table> <% else
 end if%> 	  
<%
if iRecCount<>0 then
For i=0 To Ubound(Rs,2)
%>
      <table width="99%" border="1" align="center" cellpadding="0" cellspacing="1" style="border-style:dashed; border-color:#FF9900">
        <tr>
          <td width="100%" height="30" style="border-style:none;"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
            <tr align="center" bgcolor="#E8F3FF">
              <td width="5%" height="30" bgcolor="#FFF5F0"> </td>
              <td align="left" bgcolor="#FFF5F0">回 复: Re<%=rs1("title")%> </td>
              <td width="20%" bgcolor="#FFF5F0">第 <%=((page-1)* bbspage)+i+1%> 楼</td>
            </tr>
          </table></td>
        </tr>
      </table>
      <table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr align="center">
          <td width="10%" height="30" class="list"><br>
              <table width="99%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td bgcolor="#FFFAF7" class="cont"><%=replace(UBBs(Rs(1,i)),CHR(10),"<br>")%>
                  <%
img=Rs(2,i)
if trim(img)<>"" then
response.write"<br><br><font color=#ff0000>贴子相关图片:</font><br>"
response.write"<div class='cimg'><img src='"&img&"' border='0'></div>"
end if
%></td>
                </tr>
            </table>
              <br></td>
        </tr>
        <tr align="center">
          <td height="30" class="list"><table width="90%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td>作者:<%=Rs(3,i)%> (<%=Rs(4,i)%>)</td>
                <td align="right"><%if banzhu<>"" then%><a href="mctbcz.asp?cz=2&id=<%=rs1("id")%>&rid=<%=Rs(0,i)%>">删除回复</a> |<%end if%> <a href="#re">回复此贴</a></td>
              </tr>
          </table></td>
        </tr>
      </table>
	  <%
    Next	
end if
%> 
      <table width="99%" border="1" align="center" cellpadding="0" cellspacing="1" style="border-style:dashed; border-color:#FF9900">
        <tr>
          <td width="100%" height="30" style="border-style:none;"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#F0F6FD">
            <tr align="center">
              <td width="10%" height="30" bgcolor="#FFF5F0"><%ors.ShowPage()%></td>
            </tr>
          </table></td>
        </tr>
      </table>
    </td>
    <td width="20%" valign="top"><table width=165 border=0 align="center" cellpadding=0 cellspacing=0>
      <tr><td width=165 align=center bgcolor="#F1E2DD"><b> </b></td>
        </tr>
    </table>
      <table width=165 border=0 align="center" cellpadding=0 cellspacing=0 bgcolor="#FFF5F0">
        <tr>
          <td  align=center><table width=139 border=0 cellpadding=0 cellspacing=0>
              <tr>
                <td height=11></td>
              </tr>
              <tr>
                <td>&nbsp;</td>
              </tr>
              <tr>
                <td height=5></td>
              </tr>
            </table>
              <table width=139 border=0 cellpadding=0 cellspacing=0>
                <tr>
                  <td><%=bbsjianjie%></td>
                </tr>
            </table></td>
        </tr>
      </table></td>
  </tr>
</table>
<table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="40"><br><form name="save" method="post" action="tzsave.asp" onSubmit="return regcheck(this);">
	<input name="rid" type="hidden" id="rid" value="<%=rs1("id")%>"><input name="count" type="hidden" id="count" value="<%=ors.RecordCount()%>">
      <table width=99% border=1 align="center" cellpadding=0 cellspacing=0 bordercolor="#FF9900" bgcolor=#FFF5F0 style="border-style:dashed">
      <tr>
        <td width="100%" height="100" style="border-style:none;"><table width=90% border=0 align="center" cellpadding=5 cellspacing=0 bgcolor=#FFF5F0>
          <tr>
            <td width="10%" align="right" valign="top"><strong><a name="re"></a>回复:</strong></td>
            <td><textarea name="content" cols="60" rows="5" id="content"></textarea>
                <img src="images/pic16.gif" width="16" height="16" alt='图片说明' border=0> <a href=#hotlt onClick="javascript:document.save.content.value=document.save.content.value+'[img][/img] \n';">插入图片</a></td>
          </tr>
          <tr>
            <td align="right"><strong>图 片:</strong></td>
            <td><input name="image" type="text" id="image" size="60"></td>
          </tr>
          <tr>
            <td align="right"><strong>作 者:</strong></td>
            <td><%
if name= "" then
response.write"您目前是匿名发表 <A href='../userlogin.asp'>登录</A> | <A href='../zc.asp'>注册</A>"
elseif name<> "" then
response.write name&" | <A href='exit.asp'>退出</A>"
end if
%></td>
          </tr>
          <%if name="" then%>
          <tr>
            <td align="right"><strong>验证码:</strong></td>
            <td><input name="hf_code" type="text" id="hf_code" size="4" maxlength="4">
                <img src="inc/yzms.asp"></td>
          </tr>
          <%end if%>
          <tr>
            <td align="right"> </td>
            <td><input type="submit" name="Submit" value="发表帖子">
              &nbsp;&nbsp;
              <input type="reset" name="Submit" value="重新填写"></td>
          </tr>
        </table></td>
        
      </tr>
    </table>
    <br>   </form> </td>
    <td width="20%"> </td>
  </tr>
</table>
<script language="JavaScript1.2">
function regcheck(formct){
	if (formct.title.value=='' ){
		alert('标题不能为空,请填写');
		return false; 
	}
		if (formct.content.value=='' ){
		alert('内容不能为空,请填写');
		return false; 
	}
		if (formct.hf_code.value=='' ){
		alert('验证码不能为空,请填写');
		return false; 
	}

	formct.Submit.disabled=true;
}
</script>
<table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td align="center" bgcolor="#FFF5F0">图书馆系统</td>
  </tr>
</table>
</body>
</html>
<%
rs1.close
set rs1=nothing
conn.close
set conn=nothing
%>

⌨️ 快捷键说明

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