<% Response.Buffer = true genre = FormatTextHTML(request.QueryString("genre")) sortBy = FormatTextHTML(request.QueryString("sortBy")) if sortBy = "" or sortBy = "title" then sortByField = "strTitle" if sortBy = "state" then sortByField = "strState" if sortBy = "fname" then sortByField = "strFirstName" strSQL = "SELECT lngId, strTitle, strFirstName, chrLastInitial, strState FROM tbWriteIt WHERE strGenre = '" & genre & "'" strSQL = strSQL & "and intStatus = 2 order by " & sortByField strQS = "genre="&genre Connect_String="DSN=dotcom" Page_Size = 20 'this is where you set the # of records displayed per page If FormatTextHTML(request("Page")) = "" Then Current_Page = 1 Else Current_Page = CInt(FormatTextHTML(request("Page"))) End If Set MyConn=Server.CreateObject("ADODB.Connection") Set rs = Server.CreateObject("ADODB.Recordset") MyConn.Open Connect_String rs.CursorLocation = 3 rs.PageSize = Page_Size rs.Open strSQL, Connect_String,adOpenDynamic,3 Page_Count = rs.PageCount If 1 > Current_Page Then Current_Page = 1 If Current_Page > Page_Count Then Current_Page = Page_Count if rs.EOF or rs.BOF then blnEmptyRs = true else blnEmptyRs = false rs.AbsolutePage = Current_Page end if %> Scholastic.com | Teachers: Write It | Publish Your Work <% doMenu %>
Write It Poetry
Write It Home
Chat With Fellow Writers
 
Read <%= genre %>
Click on a column heading to sort by student name, state or title. Click a title to read the selection.
Title Written By State/Country
<% if not blnEmptyRs then cnt = 1 Do While rs.AbsolutePage = Current_Page And Not rs.eof id = rs("lngId") title = rs("strTitle") firstname = rs("strFirstName") lastinitial = rs("chrLastInitial") state = rs("strState") modval = cnt mod 2 if modval = 0 then tdbgcolor = "#FFFFFF" if modval = 1 then tdbgcolor = "#FFFFCC" Response.Write "" & vbCrLf Response.Write "" & vbCrLf Response.Write "" & vbCrLf Response.Write "" & vbCrLf Response.Write "" & vbCrLf cnt = cnt+1 rs.MoveNext loop end if set rs = nothing %>
"&title&"" & firstname & " " & lastinitial & "." & state & "
<% Response.Write "" %>

Page: " Response.Write "" & Current_Page & "" & " of " & Page_count & "  " If Page_Count > 1 then Response.Write "|" for i = 1 to Page_count if Current_Page = i then Response.Write "" & i & "" & " | " else Response.Write "" & i & "" & " | " & vbCrLf end if next End IF Response.Write "

Poetry
Essay
Memoir
Short Fiction
Humor

Journalism
Dramatic Script
Science Fiction/Fantasy
Novel
<% doFooter %>