% Option Explicit %> <% Dim strSQL, xxx, arrData, blnFoundData Dim intStoryID, intRead intStoryID = cleanData(request("id")) strSQL = strSQL & "SELECT " strSQL = strSQL & "intAutoID, " '------ 0 strSQL = strSQL & "strAuthor," '------- 1 strSQL = strSQL & "strTitle," '-------- 2 strSQL = strSQL & "strStory, " '------- 3 strSQL = strSQL & "intRead " '--------- 4 strSQL = strSQL & "FROM " strSQL = strSQL & "tre_ul_stories " strSQL = strSQL & "WHERE " strSQL = strSQL & "intAutoID = '" & intStoryID & "'" Call db_open() set objRS = objConn.execute(strSQL) if (not(objRS.EOF)) Then blnFoundData = true arrData = objRS.getrows Else blnFoundData = false end if objRS.Close Call db_close() If ((arrData(4,0) = 0) OR (IsNull(arrData(4,0)))) Then intRead = 1 Else intRead = arrData(4,0) + 1 End If Call db_open() set objRS = objConn.execute("UPDATE tre_ul_stories SET intRead = '" & intRead & "' WHERE intAutoID = '" & arrData(0,0) & "'") set objRS = Nothing Call db_close() strTitle = "UltraLadies Stories: " & arrData(2,0) & "" strPage = "ul/stories" Call pageRef(strPage) Call header(strTitle,strPage) Call columnA(strPage) Call columnB(strPage,"contentStart") response.write ("
by " & arrData(1,0) & "
") response.write ("" & formatText(arrData(3,0)) & "
") Else response.write ("Story not found