Here is your chance to add your contribution to the project: whatever your expertise or thoughts on the project, just click on a topic to see what's being said and add your views.
<%
strConnString = "driver={SQL Server};server=sql7.globalgold.co.uk;uid=betterthinking;pwd=master-point;database=betterthinking"
set my_Conn = Server.CreateObject("ADODB.Connection")
my_Conn.Open strConnString
strSql = "SELECT * from forum_topics where binary_display=1 order by datetime_date desc"
set rs = my_Conn.Execute (strSql)
%>
<%
Do Until rs.eof
id_forum_topic = rs("idforum_topic")
title_graphic_root = rs("title_graphic_root")
title_graphic_main = rs("title_graphic_main")
topic_summary = rs("topic_summary")
topic_brief = rs("topic_brief")
binary_display = rs("binary_display")
strSql = "SELECT * from forum_posts where binary_display=1 and id_forum_topics=" & id_forum_topic & " order by datetime_date desc"
'response.write(strsql)
set rs_posts = my_Conn.Execute (strsql)
no_of_posts = rs_posts.RecordCount
id_forum_posts = rs_posts("idforumposts")
varchar_post = rs_posts("varchar_post")
varchar_subject = rs_posts("varchar_subject")
datetime_date = rs_posts("datetime_date")
no_of_posts = 0
Do Until rs_posts.eof
no_of_posts=no_of_posts+1
rs_posts.movenext
Loop
no_of_months = -DateDiff("m",now,datetime_date)
no_of_days = -DateDiff("d",now,datetime_date)
no_of_hours = -DateDiff("h",now,datetime_date)
no_of_minutes = -DateDiff("n",now,datetime_date)+9
'response.write("datetime_date:" & datetime_date & ",
date:" & now)
'response.write("m:" & no_of_months & ",
d:" & no_of_days & ",
h:" & no_of_hours & ",
m:" & no_of_minutes &"
")
If no_of_months>0 Then
If no_of_months > 1 then
last_comment_time = no_of_months & " hours ago"
Else
last_comment_time = no_of_months & " hour ago"
End if
Else
If no_of_days>0 Then
If no_of_days > 1 then
last_comment_time = no_of_days & " days ago"
Else
last_comment_time = no_of_days & " day ago"
End if
Else
If no_of_hours>0 Then
If no_of_hours > 1 then
last_comment_time = no_of_hours & " hours ago"
Else
last_comment_time = no_of_hours & " hour ago"
End if
Else
If no_of_minutes>0 Then
If no_of_minutes > 1 then
last_comment_time = no_of_minutes & " minutes ago"
Else
last_comment_time = no_of_minutes & " minute ago"
End if
End if
End if
End if
End if
%>
<%
rs.movenext
loop
%>