<% cid = request("cid") cid = CInt(cid) set conn = GetSQLServerConnection("DATA001","y2k","y2k415","youth") if cid = 0 then response.redirect "forum.asp" else SQL = "Select * from Counseling_forum where cid = " & cid & " and main = 1" set rs = GetSQLServerRecordset(conn, SQL) end if %> Youth-2000.com [滅罪會 On-line Counseling]
 
<%=rs("title")%>
 
主 題: <%=rs("title")%>
回應主題:<%=rs("title")%>
 
姓 名: (最多10個中文字)
   
內 容:
你的電郵地址:
表 情 公 仔: 開心 激氣
疑惑 奸惡
驚青 傷心

">
 
<% Function GetSQLServerRecordset( conn, source ) Dim rs Set rs = Server.CreateObject("ADODB.Recordset") rs.Open source, conn, 3, 2 Set GetSQLServerRecordset = rs End Function Function GetSQLServerConnection( Computer, UserID, Password, Db ) Dim Params, conn Set GetSQLServerConnection = Nothing Params = "Provider=SQLOLEDB.1" Params = Params & ";Data Source=" & Computer Params = Params & ";User ID=" & UserID Params = Params & ";Password=" & Password Params = Params & ";Initial Catalog=" & Db Set conn = Server.CreateObject("ADODB.Connection") conn.Open Params Set GetSQLServerConnection = conn End Function %>