<% Dim any If Request("any") = "" Then any = "2005" Else any = Request("any") End If %> Vacances ::: Experičncies








 

 

Arribes a mitjanit a Dakar i no tens hotel? Has descobert un hotelet bo, bonic i barat als Pirineus i el vols recomanar? Vols saber què et pot costar un dinar a Bangkok? A través del fòrum Experiències Compartides pots resoldre els teus dubtes o ajudar a d'altres viatgers amb les teves recomanacions. Amb les experiències d'uns i altres, de ben segur que els viatges aniran millor.

 

   Nom:   
   E-mail:  (opcional)  
   Tema:   
   Missatge:     

2005 - 2004 - 2003 - 2002 - 2001

<%' FORUM %>
<% ColorFistLevelMsg= "#9DD6ED" forumWidth= 546 'PollID=request("PollID") 'call Poll_GetPollInformation( Cint(PollId)) intPollForum=39 %> <% ProcessForumPage True Dim objMiscRS %> <% Sub Main_Forum_Poll Dim sqlMessage Dim objForumRS, objMessageRS Dim objForumCountRS, objMessageCountRS Dim strThreadList Dim iActiveForumId, iActiveForumName Dim iForumMessageCount Dim iPeriodLooper Dim iPeriodToShow Dim iPeriodsToGoBack Dim strForumBreakdownType Dim dStartDate Dim dEndDate iActiveForumId = intPollForum If IsNumeric(iActiveForumId) Then iActiveForumId = CInt(iActiveForumId) Else iActiveForumId = 0 End If iPeriodToShow = Request.QueryString("pts") If IsNumeric(iPeriodToShow) Then iPeriodToShow = CInt(iPeriodToShow) Else iPeriodToShow = 0 End If CALL OpenDB ' Get Forum Info and count of messages in the forum Set objForumRS = GetRecordset("SELECT * FROM mll_forums;") Set objForumCountRS = GetRecordset("SELECT msg_forum_id, COUNT(*) FROM mll_messages GROUP BY msg_forum_id;") If Not objForumRS.EOF Then objForumRS.MoveFirst Do While Not objForumRS.EOF ' Set to default from script constant strForumBreakdownType = MESSAGE_GROUPING ' Check DB for a value to override If objForumRS.Fields.Count >= 5 Then If objForumRS.Fields(4).Name = "frm_forum_grouping" Then strForumBreakdownType = Trim(LCase(objForumRS.Fields("frm_forum_grouping").Value)) End If End If objForumCountRS.MoveFirst Do Until objForumCountRS.EOF If objForumCountRS.Fields("msg_forum_id") = objForumRS.Fields("frm_forum_id") Then Exit Do objForumCountRS.MoveNext Loop If Not objForumCountRS.EOF Then iForumMessageCount = objForumCountRS.Fields(1) Else iForumMessageCount = 0 End If ' If active forum -> show messages o/w just show forum If objForumRS.Fields("frm_forum_id") = iActiveForumId Then ShowForumLine objForumRS.Fields("frm_forum_id"), "open", objForumRS.Fields("frm_forum_name"), objForumRS.Fields("frm_forum_description"), iForumMessageCount ' Show links to previous months iPeriodsToGoBack = DateDiff("m", objForumRS("frm_forum_start_date"), Now()) ' Make adjustments to periods to go back and show for non-monthly breakdown Select Case strForumBreakdownType Case "7days" iPeriodsToGoBack = iPeriodsToGoBack + 3 Case "monthly" ' Nothing to do! Case Else iPeriodsToGoBack = 0 iPeriodToShow = 0 End Select For iPeriodLooper = 0 To iPeriodsToGoBack If strForumBreakdownType = "7days" Or strForumBreakdownType = "monthly" Then 'Do period message count here. ShowPeriodLine objForumRS.Fields("frm_forum_id"), strForumBreakdownType, iPeriodLooper, 0 End If If iPeriodLooper = iPeriodToShow Then 'Show Root Level Posts for the selected period and their reply count Select Case strForumBreakdownType Case "7days" If iPeriodToShow <= 2 Then dStartDate = Date() - (7 * (iPeriodToShow + 1)) + 1 dEndDate = Date() - (7 * iPeriodToShow) + 1 Else dStartDate = GetNMonthsAgo(iPeriodToShow - 3) dEndDate = GetNMonthsAgo(iPeriodToShow - 4) End If Case "monthly" dStartDate = GetNMonthsAgo(iPeriodToShow) dEndDate = GetNMonthsAgo(iPeriodToShow - 1) Case Else dStartDate = objForumRS.Fields("frm_forum_start_date").Value dEndDate = Date() + 1 End Select 'Response.Write dStartDate & "
" 'Response.Write dEndDate & "
" 'response.write("SELECT * FROM mll_messages WHERE msg_forum_id=" & iActiveForumId & " AND msg_thread_parent=0 AND " & DB_DATE_DELIMITER & FormatTimestampDB(dStartDate) & DB_DATE_DELIMITER & " < msg_message_timestamp AND msg_message_timestamp < " & DB_DATE_DELIMITER & FormatTimestampDB(dEndDate) & DB_DATE_DELIMITER & " ORDER BY msg_thread_id DESC;") sqlMessage = "SELECT * FROM mll_messages WHERE msg_forum_id=" & iActiveForumId & " AND msg_thread_parent=0 AND " & DB_DATE_DELIMITER & FormatTimestampDB(dStartDate) & DB_DATE_DELIMITER & " < msg_message_timestamp AND msg_message_timestamp < " & DB_DATE_DELIMITER & FormatTimestampDB(dEndDate) & DB_DATE_DELIMITER If any <> "" Then sqlMessage = sqlMessage & " AND YEAR(msg_message_timestamp) = '" & any & "'" End If sqlMessage = sqlMessage & " ORDER BY msg_thread_id DESC;" Set objMessageRS = GetRecordset(sqlMessage) objMessageRS.CacheSize = 100 ' Build the list of root posts we need counts for If Not (objMessageRS.BOF And objMessageRS.EOF) Then objMessageRS.MoveFirst Do While Not objMessageRS.EOF strThreadList = strThreadList & objMessageRS("msg_thread_id") & "," objMessageRS.MoveNext Loop strThreadList = Left(strThreadList, Len(strThreadList) - 1) Else strThreadList = (0) End If Set objMessageCountRS = GetRecordset("SELECT msg_thread_id, COUNT(*) FROM mll_messages WHERE msg_thread_id IN (" & strThreadList & ") GROUP BY msg_thread_id ORDER BY msg_thread_id DESC;") objMessageCountRS.CacheSize = 100 'Response.Write objMessageRS.RecordCount & "
" & vbCrLf 'Response.Write objMessageCountRS.RecordCount & "
" & vbCrLf If Not (objMessageRS.BOF And objMessageRS.EOF) Then objMessageRS.MoveFirst objMessageCountRS.MoveFirst Do While Not objMessageRS.EOF '(-)-i ' ShowMessageLine 1, objMessageRS.Fields("msg_message_id"), objMessageRS.Fields("msg_message_subject"), objMessageRS.Fields("msg_message_author"), objMessageRS.Fields("msg_message_author_email"), FormatTimestampDisplay(objMessageRS.Fields("msg_message_timestamp")), objMessageCountRS.Fields(1) - 1, "forum", 0 '(-)-f '(+)-i:messages threads Set objMiscRS = Server.CreateObject("ADODB.RecordSet") objMiscRS.CursorLocation = adUseClient objMiscRS.ActiveConnection = cnnForumDC objMiscRS.CursorType = adOpenStatic objMiscRS.LockType = adLockReadOnly objMiscRS.Open "SELECT * FROM mll_messages WHERE msg_thread_id=" & objMessageRS.Fields("msg_thread_id").Value & " ORDER BY msg_thread_parent" objMiscRS.ActiveConnection = Nothing ShowChildren 0, 0, 0, objMessageRS.Fields("msg_message_id") objMiscRS.Close Set objMiscRS = Nothing objMessageRS.MoveNext if not objMessageCountRS.eof then objMessageCountRS.MoveNext end if '(+)-f Loop End If 'Close Message DB objects objMessageCountRS.Close Set objMessageCountRS = Nothing objMessageRS.Close Set objMessageRS = Nothing End If Next 'iPeriodLooper 'Set active Forum Name for later use in post line iActiveForumName = objForumRS.Fields("frm_forum_name") Else ShowForumLine objForumRS.Fields("frm_forum_id"), "closed", objForumRS.Fields("frm_forum_name"), objForumRS.Fields("frm_forum_description"), iForumMessageCount End If objForumRS.MoveNext Loop Else WriteLine "No hi ha cap forum obert!!" & "
" End If 'Close Forum DB objects objForumCountRS.Close Set objForumCountRS = Nothing objForumRS.Close Set objForumRS = Nothing If iActiveForumId <> 0 Then %>
<% End If %> <% ' ShowSearchForm end sub %>

2004 - 2003 - 2002 - 2001