📄 ini_theme.inc
字号:
<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")
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+=">"
sponsor_link+=str_sponsor
sponsor_link+="</a>"
sponsor.innerhtml="发贴人:" & sponsor_link
time_main.innerhtml="发贴时间:" & str_sponsetime
dim send_msg_link as string
'设置发短小系的连接字符串
'***************************************
'由此可以发短消息,功能待完善
'***************************************
content_main.innertext=str_content
myconn.close()
end sub
</script>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -