一个BBS的源代码(一)
发表于:2007-06-30来源:作者:点击数:
标签:
一个BBS的源代码 %@ Language= VB Script % % ‘’================================================================================================== ‘’ 说明部分 ‘’ ‘’ ##################### ‘’ # # ‘’ # 数据库 结构 # ‘’ # # ‘’ ####
一个BBS的源代码
<%@ Language=
VBScript %>
<%
‘’==================================================================================================
‘’ 说明部分
‘’
‘’ #####################
‘’ # #
‘’ #
数据库结构 #
‘’ # #
‘’ #####################
‘’
‘’ bbs
‘’ 序号 INT NOT NULL IDENTITY
‘’ 作者 VARCHAR(80)
‘’ 题目 VARCHAR(255)
‘’ 回复 INT NOT NULL DEFAULT 0
‘’ 点击 INT NOT NULL DEFAULT 0
‘’ 时间 DATETIME DEFAULT GE
TDATE()
‘’ 内容 TEXT
‘’ 邮件通知 BIT DEFAULT 0
‘’
‘’ bbsreply
‘’ 序号 INT NOT NULL IDENTITY
‘’ 原文 INT
‘’ 作者 VARCHAR(80)
‘’ 题目 VARCHAR(255)
‘’ 时间 DATETIME DEFAULT GETDATE()
‘’ 内容 TEXT
‘’
‘’ bbsmember
‘’ 序号 INT NOT NULL IDENTITY
‘’ 账号 VARCHAR(80)
‘’ 密码 VARCHAR(80)
‘’ 邮件 VARCHAR(80)
‘’ 文章数 INT DEFAULT 0
‘’
‘’ ####################
‘’ # #
‘’ # 常用函数 #
‘’ # #
‘’ ####################
Function SqlStr( NormalString )
SqlStr = Replace( NormalString , "‘’" , "‘’‘’" )
End Function
Function FormStr( NormalString )
FormStr = Replace( NormailString , """" , """""" )
End Function
Function CheckEmail( Email )
Dim MailIsRight
Dim Mail
Dim MailLength
Dim AtPosition
Dim LastPointPosition
Mail = Email
AtPosition = InStr( Mail , "@" )
LastPointPosition = InStrRev( Mail , "." )
MailLength = Len( Mail )
MailIsRight = True
If AtPosition <= 1 OR AtPosition = MailLength Then MailIsRight = False
If LastPointPosition <= 1 OR LastPointPosition = MailLength Then MailIsRight = False
If AtPosition > LastPointPosition - 2 Then MailIsRight = False
CheckEmail = MailIsRight
End Function
Function GetID( StringID )
Dim TempID
TempID = StringID
Do While Not IsNumeric( Left( TempID , 1 ) )
If Len( TempID ) > 1 Then
TempID = Mid( TempID , 2 )
Else
TempID = ""
Exit Do
End If
Loop
GetID = TempID
End Function
‘’ ####################
‘’ # #
‘’ # 变量说明 #
‘’ # #
‘’ ####################
ASP_FILE_NAME = "board.asp" ‘’ 程序文件名:board.asp
ListSize = 20 ‘’ 每页显示文章数 ListSize
原文转自:http://www.ltesting.net