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

📄 show.asp

📁 单版面小型论坛 单版面小型论坛
💻 ASP
字号:
<!--#include file="conn.asp"-->
<!--#include file="char.asp"-->
<!--#include file="set.asp"-->
<!--#include file="func.asp"-->
<%
    id=request.querystring("id")
    if id="" or isempty(id) then id=1
    set reco=server.createobject("adodb.recordset")
    sqlstr="select * from book where id=" &id& " or fid=" &id& " order by id"
    reco.open sqlstr,conn,1,1
    reco.movefirst
    if not reco.eof then 
    bid=cint(reco("bid"))
    if htmlyn="" or htmlyn<>1 or htmlyn<>0 then
        htmlyn=0
    end if
%>
<html>
<head>
<title>my bbs</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="style.css">
</head>

<body bgcolor="#FFFFFF"><!--#include file="top2.asp"-->
<center>
<table width="100%" border="0" cellspacing="2" cellpadding="2" background="images/bg1.gif" bgcolor="#7C96B8" class=buinput>
  <tr>
    <td height="15" width="307"><font color=#336699>版面:<%=session("bname")%></font></td>
    <td height="15" width="293"><font color=#336699>版主:<%=session("dbuser")%></font></td>
  </tr>
  <tr>
    <td height="15" colspan="4" width="307" class=trtop>[ <a href='post.asp?bid=<%=bid%>' title='发表新帖子'>发表</a> ] [ <a href='post.asp?bid=<%=bid%>&id=<%=id%>' title='回复此帖子'>回复</a> ] [ <a href="#" onclick="javascript:print()" title="打印此帖子">打印</a> ] [ <a href='#' onclick="javascript:history.go(-1)" title="返回上一页">返回</a> ]</td>
  </tr>
</table>
<br>
<%
	do while not reco.eof
		title=reco("title")
		wdate=reco("wdate")
		ldate=reco("ldate")
		username=reco("username")
		usermail=reco("usermail")
		content=reco("content")
		reply=reco("reply")
		faceimg=reco("faceimg")
		hits=reco("hits")+1
		
		set uphits=server.createobject("adodb.recordset")
    	sqlstr="update book set hits=" &hits& " where id="&id
    	uphits.open sqlstr,conn
    	set uphits=nothing
		
		if usermail<>"" then
		    userlink="<a href='mailto:" &trim(usermail)& "' title='给 " &username& " 发封妹儿'>" &username& "</a>"
		else
			userlink=username
		end if
		wdate=year(wdate) &"/"& month(wdate) &"/"& day(wdate) &" "& hour(wdate) &":"& minute(wdate)
		ldate=year(ldate) &"/"& month(ldate) &"/"& day(ldate) &" "& hour(ldate) &":"& minute(ldate)
		
		recoinfo=""
		recoldate=""
		if cint(reco("id"))=cint(id) then
		    recoinfo="人气:<font color='red'>" &hits& "</font>&nbsp;回复:<font color='red'>" &reply& "</font>"
		    recoldate="更新于:<font color='red'>" &ldate& "</font>"
		end if
			
%>
<table width="100%" border="0" cellspacing="2" cellpadding="2" class=buinput>
  <tr> 
    <td height="15" width="20"><img src='images/<%=faceimg%>.gif'></td>
    <td height="15" width="580"><b><%=title%></b></td>
  </tr>
  <tr> 
    <td height="50" width="20">&nbsp;</td>
    <td height="50" width="580" valign='top' class=txt>
    <%if htmlyn=0 then%>
        <%showbody(content)%>
    <%else%>
        <%=content%>
    <%end if%>    
    </td>
  </tr>
  <tr> 
    <td height="15" width="20">&nbsp;</td>
    <td height="15" width="580" class=trtop>发言人:<%=userlink%>&nbsp;<%=recoinfo%>&nbsp;发表于:<font color='red'><%=wdate%></font>&nbsp;<%=recoldate%></td>
  </tr>
</table>
<br>
<%
    reco.movenext
    loop
%>
<table width="100%" border="0" cellspacing="2" cellpadding="2" background="images/bg1.gIf" bgcolor="#7C96B8" class=buinput>
  <tr>
    <td height="15" width="307"><font color=#336699>版面:<%=session("bname")%></td>
    <td height="15" width="293"><font color=#336699>版主:<%=session("dbuser")%></td>
  </tr>
  </table>
</center>
</body>
</html>
<%else
errmsg="您 输 入 的 I D 无 效 !"
errshow(errmsg)
end if
set reco=nothing
set conn=nothing
%>
<!--#include file="copyright.asp"-->

⌨️ 快捷键说明

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