用Access制作一个功能完善的论坛(源程序)
时间:2007-12-23 来源:不详 作者:迈克DB
<frameset rows="300,*">
<frame marginheight="3" marginwidth="5" frameborder="no" scrolling="yes" src="messagelist.?
pg=<%=page%>">
<frame name="message" marginwidth="0" marginheight="0" frameborder="no" scrolling="auto"
src="message.?id=<%=addm%>&pg=<%=page%>">
</frameset>
</html>
------------------------------------------------------
Listing 3.0 - discussfuncs.
-------------------------------------------------------
<%
dbPath = "d:\discuss.mdb"
messagesApage = 5
''''''''''''''''''''
' Define Constants
''''''''''''''''''''
adOpenStatic = 3
adLockOptimistic = 3
'''''''''''''''''''''''''''
' Declare Global Variables
'''''''''''''''''''''''''''
DIM Con
copyright dedecms
SUB readyDBCon
IF Con = "" THEN
Set Con = Server.CreateObject( "adodb.Connection" )
Con.Open "PROVIDER=MICROSOFT.JET.OLEDB.4.0;DATA SOURCE=" & dbPath
END IF
END SUB
FUNCTION showUser( theEmail )
whereA = INSTR( theEmail, "@" )
showUser = Server.HTMLEncode( LEFT( theEmail, whereA - 1 ) )
END FUNCTION
FUNCTION formatOutput( theText )
theText = Server.HTMLEncode( theText )
theText = REPLACE( theText, vbNewline & vbNewline, "<p>" )
theText = REPLACE( theText, vbNewline, "<br>" )
formatOutput = theText
END FUNCTION
sub showError( errorMessage, backpage )
%>
<html>
<head><title>Problem</title></head>
<body bgcolor="lightyellow">
<center>
<table width="400" border=0 cellpadding=4 cellspacing=0>
内容来自dedecms
<tr>
<td>
<font face="Arial" size="4" color="red"><b>
There was a problem with the message you entered:</b></font>
<p><font face="Arial" size="3" color="blue"><b>
<%=errorMessage%>. Please click the button below to correct this problem</b></font>
<form method="post" action="<%=backpage%>">
<%
for each thing in Request.Form
%>
<input name="<%=thing%>" type="hidden" value="<%=Server.HTMLEncode( Request(
thing ) )%>">
<%
next
%>
<input type="submit" value="Back">
</form>

上一篇:Access数据库操作中出现的怪现象 下一篇:用asp处理access数据库
文章评论
共有位Admini5网友发表了评论 查看完整内容