ini_content_theme.inc

来自「该软件是采用微软的.net技术编写的bbs论坛」· INC 代码 · 共 61 行

INC
61
字号
<script language="VB" runat="server">
sub ini_theme_display(num as string)		'num为贴子号
    dim strconn as string
	strconn="data source=localhost;uid=sa;pwd=chicken;database=mybbs"
	dim myconn as sqlconnection
	myconn=new sqlconnection(strconn)
	myconn.open()
	dim mycomm as sqlcommand
	dim strsql as string
	strsql="select theme,sponsor,sponsetime,content from main where num='" & num & "'"
	mycomm=new sqlcommand(strsql,myconn)
	dim mydr as sqldatareader
	mydr=mycomm.executereader()
	'if not mydr.read then
	'response.write(mydr.item("theme"))
	'response.end()
	'else
	'response.write(mydr.item("theme"))
	'response.end()
	'end if
	dim str_theme as string
	dim str_sponsor as string
	dim str_sponsetime as string
	dim str_content as string
    if mydr.read then			'一定要有mydr.read,否则无法读出数据
	str_theme=mydr.item("theme")
	str_sponsor=mydr.item("sponsor")
	str_sponsetime=cstr(mydr.item("sponsetime"))
	str_content=mydr.item("content")
	  else
	    lblmessage.text="您所选择的帖子不存在,请刷行后在看"
		mypanel.visible=false
		exit sub
	end if
	'response.write(str_sponsetime)
	'response.end()
		
	'theme_main.innerhtml="主题:" & mydr.item("theme")
	'为什么上面的写法不行
	theme_main.innerhtml="主题:" & str_theme
	dim sponsor_link as string
	sponsor_link="<a href="
	sponsor_link+="personinfo.aspx?id="
	sponsor_link+=str_sponsor
	sponsor_link+=" target=_new>"
	sponsor_link+=str_sponsor
	sponsor_link+="</a>"
	sponsor.innerhtml="发贴人:" & sponsor_link
	time_main.innerhtml="发贴时间:" & str_sponsetime
	dim send_msg_link as string
	'设置发短小系的连接字符串
	'***************************************
	'由此可以发短消息,功能待完善
	
	'***************************************
	content_main.innerhtml=replace(str_content,chr(13)+chr(10),"<br>")
	myconn.close()
	ini_follow(num)					'初始化跟帖区域
    end sub
</script>

⌨️ 快捷键说明

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