% dim intDocumentID dim strTitle, strContent, docType dim adoCn dim strSQL set adoCn = Server.CreateObject("ADODB.Connection") adoCn.Open strConn 'check for variable inputs if IsEmpty(Request.QueryString("C_ID")) then intDocumentID = 12 else intDocumentID = Request.QueryString("C_ID") end if if IsEmpty(request.querystring("doctype")) then docType = "mm" end if dim adoRs set adoRs = Server.CreateObject("ADODB.Recordset") if request.querystring("doctype") = "mm" or docType = "mm" then strSQL = "Select * From MainContent where C_ID=" & intDocumentID else strSQL = "Select * From SubContent where C_ID=" & intDocumentID end if set adoRs = adoCn.Execute(strSQL) If not adoRs.EOF then strTitle = adoRs("C_Title") if trim(adoRs("C_Content")) = "" then strContent = "
" else strContent = adoRs("C_Content") end if End If adoRs.Close set adoRs = nothing adoCn.Close set adoCn = nothing %>
![]() |
||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||