<% if (Request.QueryString("status")="submit") then %>
Thank you for your submission. Your submission will be reviewed and put up once approved.
<% end if%>
<%
if (Request.QueryString("term") = "") then %>
This section
will enhance your knowledge on Islamic Terms. All the terms are
associated with their meanings. If you don't find any term in
our list please inform us. To add a term use the form below.
<%
elseif (NOT glossary.EOF) then %>
<%=(glossary.Fields.Item("term").Value)%>
<%=(glossary.Fields.Item("explanation").Value)%>
<%
else
%>
Sorry, not available.
<% end if %>
|
<%
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 = 3
strOrientation = "V"
strLayoutType = "C"
Response.Write "
" & vbCRLF
'get the number of records in the database
intNumRecs = glossary.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 "
| " & vbCRLF
Else
glossary.AbsolutePosition = intPosition
'if necessary, check for blank field values and print blank cell
Response.Write "
"
Response.Write " "
Response.Write "" & glossary.Fields("term") & " "
Response.Write " | "
glossary.MoveNext
End If
End Sub
%>