%@LANGUAGE="VBSCRIPT" CODEPAGE="950"%>
<%
Dim RecMain__MMColParam
RecMain__MMColParam = "1"
If (Request.QueryString("main_id") <> "") Then
RecMain__MMColParam = Request.QueryString("main_id")
End If
%>
<%
Dim RecMain
Dim RecMain_numRows
Set RecMain = Server.CreateObject("ADODB.Recordset")
RecMain.ActiveConnection = MM_connM2_STRING
RecMain.Source = "SELECT *,main_sex+main_face as faceImg FROM postMain WHERE main_id = " + Replace(RecMain__MMColParam, "'", "''") + ""
RecMain.CursorType = 0
RecMain.CursorLocation = 2
RecMain.LockType = 1
RecMain.Open()
RecMain_numRows = 0
%>
<%
Dim RecRe__MMColParam
RecRe__MMColParam = "1"
If (Request.QueryString("main_id") <> "") Then
RecRe__MMColParam = Request.QueryString("main_id")
End If
%>
<%
Dim RecRe
Dim RecRe_numRows
Set RecRe = Server.CreateObject("ADODB.Recordset")
RecRe.ActiveConnection = MM_connM2_STRING
RecRe.Source = "SELECT * ,re_sex+re_face as faceImg FROM postRe WHERE main_id = " + Replace(RecRe__MMColParam, "'", "''") + " ORDER BY re_time DESC"
RecRe.CursorType = 0
RecRe.CursorLocation = 2
RecRe.LockType = 1
RecRe.Open()
RecRe_numRows = 0
%>
<%
Dim Repeat1__numRows
Dim Repeat1__index
Repeat1__numRows = -1
Repeat1__index = 0
RecRe_numRows = RecRe_numRows + Repeat1__numRows
%>
<%
' *** Recordset Stats, Move To Record, and Go To Record: declare stats variables
Dim RecRe_total
Dim RecRe_first
Dim RecRe_last
' set the record count
RecRe_total = RecRe.RecordCount
' set the number of rows displayed on this page
If (RecRe_numRows < 0) Then
RecRe_numRows = RecRe_total
Elseif (RecRe_numRows = 0) Then
RecRe_numRows = 1
End If
' set the first and last displayed record
RecRe_first = 1
RecRe_last = RecRe_first + RecRe_numRows - 1
' if we have the correct record count, check the other stats
If (RecRe_total <> -1) Then
If (RecRe_first > RecRe_total) Then
RecRe_first = RecRe_total
End If
If (RecRe_last > RecRe_total) Then
RecRe_last = RecRe_total
End If
If (RecRe_numRows > RecRe_total) Then
RecRe_numRows = RecRe_total
End If
End If
%>
<%
' *** Recordset Stats: if we don't know the record count, manually count them
If (RecRe_total = -1) Then
' count the total records by iterating through the recordset
RecRe_total=0
While (Not RecRe.EOF)
RecRe_total = RecRe_total + 1
RecRe.MoveNext
Wend
' reset the cursor to the beginning
If (RecRe.CursorType > 0) Then
RecRe.MoveFirst
Else
RecRe.Requery
End If
' set the number of rows displayed on this page
If (RecRe_numRows < 0 Or RecRe_numRows > RecRe_total) Then
RecRe_numRows = RecRe_total
End If
' set the first and last displayed record
RecRe_first = 1
RecRe_last = RecRe_first + RecRe_numRows - 1
If (RecRe_first > RecRe_total) Then
RecRe_first = RecRe_total
End If
If (RecRe_last > RecRe_total) Then
RecRe_last = RecRe_total
End If
End If
%>
<% if RecMain.Fields.Item("main_url").Value <> "" Then 'start db_sc script %>
" target="_blank">
<% end if 'end db_sc script %>
<% if RecMain.Fields.Item("main_email").Value <> "" Then 'start db_sc script %>
">
<% end if 'end db_sc script %>
<%
While ((Repeat1__numRows <> 0) AND (NOT RecRe.EOF))
%>
<% if RecRe.Fields.Item("re_url").Value <> "" Then 'start db_sc script %>
" target="_blank">
<% end if 'end db_sc script %>
<% if RecRe.Fields.Item("re_email").Value <> "" Then 'start db_sc script %>
">
<% end if 'end db_sc script %>