" & vbCRLF Else sortVertical.AbsolutePosition = intPosition 'if necessary, check for blank field values and print blank cell Response.Write "" sortVertical.MoveNext End If End Sub %> <% sortVertical.Close() %>
Sura Index
<% Dim sortVertical 'set dataconn = Server.CreateObject("ADODB.Connection") set sortVertical = Server.CreateObject("ADODB.Recordset") 'dataconn.Open MM_quran_STRING 'sSQL = "SELECT * FROM quran_names ORDER BY surano ASC" 'sortVertical.Open sSQL,dataconn,1,3 sortVertical.ActiveConnection = MM_quran_STRING sortVertical.Source = "SELECT * FROM quran_names ORDER BY surano ASC" sortVertical.CursorType = 1 sortVertical.CursorLocation = 2 sortVertical.LockType = 3 sortVertical.Open() dim intSize 'user defined dimension of table '(could be number of rows or cols) dim intOtherSize 'other dimension of table '(could be number of rows or cols) dim strLayoutType 'whether intSize refers to (C)olumns or (R)ows dim strOrientation 'direction of output: (V)ertical or (H)orizontal dim intNumRecs 'number of records in the database dim intNumCols 'number of columns in table dim intNumRows 'number of rows in table dim intRowIndex 'placeholder for current row dim intColIndex 'placeholder for current column dim intPosition 'placeholder for current record intSize = 4 strOrientation = "V" strLayoutType = "C" Response.Write "

" & vbCRLF 'get the number of records in the database intNumRecs = sortVertical.RecordCount 'Response.Write "
"& intNumRecs 'if size was not passed in then set size equal to the number of records If intSize = "" Then intSize = intNumRecs End If 'get other dimension of the table If intNumRecs Mod intSize = 0 Then intOtherSize = intNumRecs / intSize Else intOtherSize = Int((intNumRecs / intSize)) + 1 End If 'set variables for table size If strLayoutType = "C" Then intNumRows = intOtherSize intNumCols = intSize Else'If strLayoutType = "R" Then intNumRows = intSize intNumCols = intOtherSize End If 'loop thru table by row For intRowIndex = 1 To intNumRows Response.Write "" & vbCRLF If strOrientation = "V" Then intPosition = intRowIndex 'loop thru table by column For intColIndex = 1 To intNumCols PrintRecord intPosition = intPosition + intNumRows Next Else 'otherwise assume "H" 'loop thru table by column For intColIndex = 1 To intNumCols intPosition = intColIndex + ((intRowIndex - 1) * intNumCols) PrintRecord Next End If Response.Write "" & vbCRLF Next Response.Write "
" & vbCRLF %> <% sub PrintRecord 'if position is past EOF print a blank cell If intPosition > intNumRecs Then Response.Write "

 " Response.Write "

" Response.Write sortVertical.Fields("surano") & ". " & sortVertical.Fields("namearabic") & "

" Response.Write "



©2014 Sound Vision Foundation, Inc. All Rights Reserved Worldwide.
9058 S Harlem Ave, Bridgeview, IL 60455, USA
Email: info@soundvision.com