newshow.aspx
(开头部分) 4KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<%@ Page Language="VB" ContentType="text/html" debug="true"%>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.OleDb" %>
<%@ Register TagPrefix="mynews" TagName="top" src="ascx/top.ascx"%>
<%@ Register TagPrefix="mynews" TagName="review" src="ascx/review.ascx"%>
<%@ Register TagPrefix="mynews" TagName="newslist" src="ascx/newslist.ascx"%>
<%@ Register TagPrefix="mynews" TagName="footer" src="ascx/footer.ascx"%>
<script language="VB" runat="server">
Dim sql, newstitle, part1, part2 As String
Dim newsno As Integer
Dim myconn As OleDbConnection
Dim myCmd, newscmd As OleDbCommand
'获取数据子程序
Function getdatareader(ByVal sql As String) As OleDbDataReader
myCmd = New OleDbCommand(sql, myconn)
myconn.Open()
getdatareader = myCmd.ExecuteReader()
End Function
'替换特殊字符子程序
Function changecode(ByVal str As String)
If Len(str) > 0 Then
str = Replace(str, Chr(32), " ")
str = Replace(str, Chr(9), " ")
str = Replace(str, Chr(34), """)
str = Replace(str, Chr(39), "'")
str = Replace(str, Chr(13), "")
str = Replace(str, Chr(10) & Chr(10), "</P><P>")
str = Replace(str, Chr(10), "<BR> ")
str = Replace(str, "[img]", "<img src='")
str = Replace(str, "[/img]", "'>")
str = Replace(str, "[b]", "<b>")
str = Replace(str, "[/b]", "</b>")
str = Replace(str, "[em]", "<em>")
str = Replace(str, "[/em]", "</em>")
str = Replace(str, "[u]", "<u>")
str = Replace(str, "[/u]", "</u>")
str = Replace(str, "[center]", "<center>")
str = Replace(str, "[/center]", "</center>")
str = Replace(str, "[mail]", "<a href='mailto:")
str = Replace(str, "[url]", "<a href='")
str = Replace(str, "[|mail]", "'>")
str = Replace(str, "[|url]", "'>")
str = Replace(str, "[/hyper]", "</a>")
str = Replace(str, "[upimg]", "<img src=upload/")
str = Replace(str, "[/upimg]", ">")
part1 = Left(str, InStr(str, ">"))
part2 = Right(str, (Len(str) - InStr(str, ">")))
str = part1 + part2
Return str
End If
End Function
'读取新闻详细信息
Sub Page_Load(sender As Object, e As EventArgs)
Dim strConn As String
strConn="Provider=Microsoft.Jet.OLEDB.4.0;Data Source="&server.MapPath("./")&"DB_51Aspx/news.mdb"
myConn = New OledbConnection(strConn)
if not page.ispostback then
newsno=Page.request("newsid")
sql="select Title,Author,UpdateTime,Original,Content from News where NewsID="&newsno
后面还有 67 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
