<% '------------------------------------------------------------------------ ' Title: text.asp ' Description: Retrieves a story from the database with the pid equal to the Request parameter ' Original: Monarch Media ' Review: Andre Daniels 2008-05-07 '------------------------------------------------------------------------ ' Changes ' 2008-05-07 Andre Daniels andre777@ucsc.edu ' clean up and added Check for error to loop over recordset ' ----------------------------------------------------------------------- server.ScriptTimeout= GLOBAL_SCRIPT_TIMEOUT %> [an error occurred while processing this directive] <% On Error Resume Next Dim PID if Request("PID") <> "" then PID = Trim(Request("pid")) else PID = Trim(Request("PressReleaseId")) End If if IsValidPid(pid) Then Dim PageTile PageTitle = GetPageTitle(PID) Response.Write PageTitle Else PID = 0 End If On Error Goto 0 %>
UC Santa CruzUC Santa Cruz Review
About UCSC Academic Programs Research News / Events Administration Admissions / Prospective Students

<% 'If it is an invalid PID then we print out a message, the end of the page, and just end Processing If PID = 0 Then Response.Write("

We are sorry but we cannot find a story to match the story id " & pid & " that was passed to the application. Please use your back button and try another link.

") Elseif (Err.Number > 0) Then PID = 0 Response.Write("

The press releases database is currently unavailable. Please check back shortly.

") End If %> <% If PID = 0 Then %>

 

[an error occurred while processing this directive] <% Response.End End If Response.Write "

Fall 2007

" query="select * from pr_db where Pr_pid =" & PID On Error Resume Next Dim dbConnection Set dbConnection = GetPublicConnection() Dim recordSet set recordSet = server.createObject("ADODB.Recordset") recordSet.open query,dbConnection ' Get category if it was passed Dim category category = Request("cat") & "" If Not IsValidCategory(category) Then category = "" Else category=Replace(category,"+"," ") End If 'Display the story DisplayReviewStory recordSet,category,False 'Cleanup and quit recordSet.close CloseConnection(dbConnection) %>

 

[an error occurred while processing this directive]