<% Option Explicit %> <% Dim strMode If Request.Form("md") = "" Then strMode = Request.Querystring("md") Else strMode = Request.Form("md") End If Select Case strMode Case "view" Call displayReview() Case Else Call renderTOC() End Select Call releaseObj("objCmd","No") Call releaseObj("dbConn","Yes") Call renderBottom() Sub renderTOC() Call renderTop("main") Call renderContent() Dim dbConn Dim objCmd Dim tempdata Dim i Dim intNewMovie intNewMovie = 3 Set dbConn = Server.CreateObject("ADODB.Connection") dbConn.Open Application("strConn") Set objCmd = Server.CreateObject("ADODB.Command") Set objCmd.ActiveConnection = dbConn With objCmd .CommandText = "sp_select_movie_reviews" .CommandType = adCmdStoredProc tempdata = .Execute.GetRows() End With If IsArray(tempdata) Then Response.Write("" & vbCrLf) Response.Write("

Archived Reviews:

" & vbCrLf) Response.Write("" & vbCrLf) Else Response.Write("No movie reviews at this time." & vbCrLf) End If End Sub Sub renderContent() Response.Write("
" & vbCrLf) Response.Write("

What's better than spending an afternoon or an evening at the " & vbCrLf) Response.Write(" movies?

" & vbCrLf) Response.Write("

I can't think of anything more exciting than getting comfy in " & vbCrLf) Response.Write(" a big, cushy chair, popcorn at hand, lights dimming out, the big " & vbCrLf) Response.Write(" silver screen coming to life with the magic of a movie...And then, " & vbCrLf) Response.Write(" that movie sucks, and you really are pissed. And in that bitterness " & vbCrLf) Response.Write(" you turn into a critic and take your revenge over Hollywood and " & vbCrLf) Response.Write(" the whole movie industry...

" & vbCrLf) Response.Write("

But from time to time you also happen to see a good one and that's " & vbCrLf) Response.Write(" what keeps me going back to those theaters and probably one of " & vbCrLf) Response.Write(" the biggest contributors to the hefty salaries of those Hollywood " & vbCrLf) Response.Write(" executives.

" & vbCrLf) Response.Write("

Here are our latest reviews. Do you have anything to add? Email " & vbCrLf) Response.Write(" me at carlo@mans.com.

" & vbCrLf) Response.Write("

As a possessor of a $8.50 ticket stub, you too are entitled to " & vbCrLf) Response.Write(" voice your opinion. This Week's Reviews:

" & vbCrLf) Response.Write("

" & vbCrLf) End Sub Sub displayReview() Dim dbConn Dim objCmd Dim tempdata Set dbConn = Server.CreateObject("ADODB.Connection") dbConn.Open Application("strConn") Set objCmd = Server.CreateObject("ADODB.Command") Set objCmd.ActiveConnection = dbConn With objCmd .CommandText = "sp_select_movie_review" .CommandType = adCmdStoredProc .Parameters.Append .CreateParameter("ReviewID", _ adInteger, adParamInput, 4, Request.Querystring("id")) tempdata = .Execute.GetRows() End With Call renderTop("sub") If IsArray(tempdata) Then Response.Write("

" & tempdata(0,0) & "

" & vbCrLf) Response.Write("

The Plot

" & vbCrLf) Response.Write("

" & Server.HTMLEncode(tempdata(1,0)) & "

" & VbCrLf) Response.Write("

Reason(s) to see it

" & vbCrLf) Response.Write("

" & Server.HTMLEncode(tempdata(2,0)) & "

" & vbCrLf) Response.Write("

Reason(s) to skip it

" & vbCrLf) Response.Write("

" & Server.HTMLEncode(tempdata(3,0)) & "

" & vbCrLf) Response.Write("

Worth

" & vbCrLf) Response.Write("

" & formatcurrency(tempdata(4,0)) & "

" & vbCrLf) Else Response.Write("

Sorry, review is not available at this time.

" & vbCrLf) End If End Sub %>