<%@ Language=VBScript %> <% Dim cszReleasedOn(356), cszReleasedFor(356), dReleasedOn(356), iIndex, ii Dim iMAXWIDTH, iPlacerHolder, iMaxDisplay Dim CurrentDate Dim cszAdCodeTower, cszCustomDisclaimer Dim iInDaylightSavingsTime, iReportAttrib Dim dReleasedOnTemp cszCustomDisclaimer ="" Function isDST(argDate) Dim iDST if (iInDaylightSavingsTime = -1) then isDST = isCheckDST(argDate) else isDST = CInt(iInDaylightSavingsTime) end if end Function Function isCheckDST(argDate) Dim iDST, dBegin, dEnd iDST = 0 if (Year(argDate) = 1999) then dBegin = CDate("April 4 1999 2:00 AM") dEnd = CDate("October 31 1999 2:00 AM") if ((argDate > dBegin) AND (argDate < dEnd)) then iDST = 1 end if elseif (Year(argDate) = 2000) then dBegin = CDate("April 2 2000 2:00 AM") dEnd = CDate("October 29 2000 2:00 AM") if ((argDate > dBegin) AND (argDate < dEnd)) then iDST = 1 end if elseif (Year(argDate) = 2001) then dBegin = CDate("April 1 2001 2:00 AM") dEnd = CDate("October 28 2001 2:00 AM") if ((argDate > dBegin) AND (argDate < dEnd)) then iDST = 1 end if elseif (Year(argDate) = 2002) then dBegin = CDate("April 7 2002 2:00 AM") dEnd = CDate("October 27 2002 2:00 AM") if ((argDate > dBegin) AND (argDate < dEnd)) then iDST = 1 end if elseif (Year(argDate) = 2003) then dBegin = CDate("April 6 2003 2:00 AM") dEnd = CDate("October 26 2003 2:00 AM") if ((argDate > dBegin) AND (argDate < dEnd)) then iDST = 1 end if elseif (Year(argDate) = 2004) then dBegin = CDate("April 4 2004 2:00 AM") dEnd = CDate("October 31 2004 2:00 AM") if ((argDate > dBegin) AND (argDate < dEnd)) then iDST = 1 end if elseif (Year(argDate) = 2005) then dBegin = CDate("April 3 2005 2:00 AM") dEnd = CDate("October 30 2005 2:00 AM") if ((argDate > dBegin) AND (argDate < dEnd)) then iDST = 1 end if elseif (Year(argDate) = 2006) then dBegin = CDate("April 2 2006 2:00 AM") dEnd = CDate("October 29 2006 2:00 AM") if ((argDate > dBegin) AND (argDate < dEnd)) then iDST = 1 end if elseif (Year(argDate) = 2007) then dBegin = CDate("March 11 2007 2:00 AM") dEnd = CDate("November 4 2007 2:00 AM") if ((argDate > dBegin) AND (argDate < dEnd)) then iDST = 1 end if elseif (Year(argDate) = 2008) then dBegin = CDate("March 9 2008 2:00 AM") dEnd = CDate("November 2 2008 2:00 AM") if ((argDate > dBegin) AND (argDate < dEnd)) then iDST = 1 end if elseif (Year(argDate) = 2009) then dBegin = CDate("March 8 2009 2:00 AM") dEnd = CDate("November 1 2009 2:00 AM") if ((argDate > dBegin) AND (argDate < dEnd)) then iDST = 1 end if elseif (Year(argDate) = 2010) then dBegin = CDate("March 14 2010 2:00 AM") dEnd = CDate("November 7 2010 2:00 AM") if ((argDate > dBegin) AND (argDate < dEnd)) then iDST = 1 end if elseif (Year(argDate) = 2011) then dBegin = CDate("March 13 2011 2:00 AM") dEnd = CDate("November 6 2011 2:00 AM") if ((argDate > dBegin) AND (argDate < dEnd)) then iDST = 1 end if elseif (Year(argDate) = 2012) then dBegin = CDate("March 11 2012 2:00 AM") dEnd = CDate("November 4 2012 2:00 AM") if ((argDate > dBegin) AND (argDate < dEnd)) then iDST = 1 end if elseif (Year(argDate) = 2013) then dBegin = CDate("March 10 2013 2:00 AM") dEnd = CDate("November 3 2013 2:00 AM") if ((argDate > dBegin) AND (argDate < dEnd)) then iDST = 1 end if elseif (Year(argDate) = 2014) then dBegin = CDate("March 9 2014 2:00 AM") dEnd = CDate("November 2 2014 2:00 AM") if ((argDate > dBegin) AND (argDate < dEnd)) then iDST = 1 end if elseif (Year(argDate) = 2015) then dBegin = CDate("March 8 2015 2:00 AM") dEnd = CDate("November 1 2015 2:00 AM") if ((argDate > dBegin) AND (argDate < dEnd)) then iDST = 1 end if end if isCheckDST = iDST end Function iTimeZone = Request.Cookies("tzone") if (iTimeZone = "") then iTimeZone = -5 end if iInDaylightSavingsTime = Request.Cookies("dsave") if (iInDaylightSavingsTime = "") then iInDaylightSavingsTime = -1 ' ignore this parameter else iInDaylightSavingsTime = CInt(iInDaylightSavingsTime) end if %> <% 'Dim ihtmlinclude CurrentDate = Now() iMAXWIDTH = 700 ' Default here in case users log in ' cszCSS = ""&vbcr&vblf&"" Set conn = server.CreateObject("ADODB.Connection") conn.Open "DSN=econoday", "syncpak1", "2wagon36b" cszCustomer = Request("cust") ' if a cusomter was passed then its a company that has rights to our free display. if (Len(cszCustomer) > 0) then set rs=Server.CreateObject("ADODB.Recordset") sql = "select * from companyname WHERE Enable=1 AND companyname = '" & cszCustomer & "'" rs.Open sql, conn if rs.EOF then rs.Close conn.Close Response.End() ' Should goto a page that displays login for a user else cszSyncPaks = rs("cid") ' save the Company ID, to see which modules we should serve up. iAllowDeliveryMethods = rs("deliverymethods") ihtmlinclude = rs("htmlincludes") cszCSS = rs("cssblock") if (IsNull(cszCSS) OR (Len(Trim(cszCSS)) = 0)) then cszCSS = ""&vbcr&vblf&"" else cszCSS = Trim(cszCSS) end if iMAXWIDTH = rs("imaxwidth") set rs_companyevents=Server.CreateObject("ADODB.Recordset") sql = "select * from companyname_events WHERE cid=" & cszSyncPaks rs_companyevents.Open sql, conn while not rs_companyevents.EOF if (Len(cszSubscribedEvents) = 0) then cszSubscribedEvents = "display_name_id = "&rs_companyevents("display_name_id") else cszSubscribedEvents = cszSubscribedEvents&" OR display_name_id = "&rs_companyevents("display_name_id") end if if (rs_companyevents("display_name_id") = 106) then ' Equity Settlements iIncludeEquitySettlements = 1 end if rs_companyevents.MoveNext() wend rs_companyevents.Close() end if rs.Close else ' Dim irID, cszExclusionIDs ' Dim rs_AccessPermSubModules cszSyncPaks = "" cszSubscribedEvents = "" cszExclusionIDs = "" cszemail = Request.Cookies("il12") 'Response.Write("email = "&cszemail&"
") ''''''''''''''''''''''''''''''''''''''''''' Set connSyncPak = server.CreateObject("ADODB.Connection") connSyncPak.Open "DSN=syncpak", "syncpak1", "2wagon36b" ' lets get the user ID set rs=Server.CreateObject("ADODB.Recordset") sql = "select * from registration WHERE Enable=1 AND email = '" & cszemail & "'" rs.Open sql, connSyncPak if not rs.EOF then irID = rs("rid") ' save the User ID ' get the actual "SyncPaks" this user has active set rs_AccessPerm=Server.CreateObject("ADODB.Recordset") sql = "select * from AccessPerm WHERE (enable=1 AND rid = " & irID & ") AND (id < 4008)" 'Response.Write(sql&"
") rs_AccessPerm.Open sql, connSyncPak while not rs_AccessPerm.EOF ' Response.Write("FOUND "&rs_AccessPerm("id")&"
") if (DateAdd("d", +15, rs_AccessPerm("regdate")) >= CurrentDate) OR (rs_AccessPerm("dExpireDate") > CurrentDate) then ' Response.Write("GOT "&rs_AccessPerm("id")&"
") if (Len(cszSyncPaks) = 0) then cszSyncPaks = "(cid=" & rs_AccessPerm("id") & ")" else cszSyncPaks = cszSyncPaks & " OR (cid=" & rs_AccessPerm("id") & ")" end if set rs_AccessPermSubModules=Server.CreateObject("ADODB.Recordset") sql = "select * from AccessPermSubModules WHERE rid = "&irID& " AND id = "&rs_AccessPerm("id") 'Response.Write(sql&"

") rs_AccessPermSubModules.Open sql, connSyncPak while not rs_AccessPermSubModules.EOF if (Len(cszExclusionIDs) = 0) then cszExclusionIDs = "(display_name_id <> " & rs_AccessPermSubModules("display_name_id") & ")" else cszExclusionIDs = cszExclusionIDs & " AND (display_name_id <>" & rs_AccessPermSubModules("display_name_id") & ")" end if rs_AccessPermSubModules.MoveNext() wend rs_AccessPermSubModules.Close() end if rs_AccessPerm.MoveNext() wend set rs_companyevents=Server.CreateObject("ADODB.Recordset") sql = "select * from companyname_events WHERE "&cszSyncPaks 'Response.Write(sql&"
") rs_companyevents.Open sql, conn while not rs_companyevents.EOF if (Len(cszSubscribedEvents) = 0) then cszSubscribedEvents = "display_name_id = "&rs_companyevents("display_name_id") else cszSubscribedEvents = cszSubscribedEvents&" OR display_name_id = "&rs_companyevents("display_name_id") end if if (rs_companyevents("display_name_id") = 106) then ' Equity Settlements iIncludeEquitySettlements = 1 end if rs_companyevents.MoveNext() wend rs_companyevents.Close() end if rs.Close() connSyncPak.Close() '''''''''''''''''''''''''''''''''''''''''''''''''''''' conn.Close if (Len(cszSubscribedEvents) = 0) then Response.Write("No EVENTs

") ' goto login page ' Response.Redirect("http://my.econoday.com/userlogin.asp") Response.End() end if 'Response.Write(cszSubscribedEvents&"

") if (Len(cszExclusionIDs) > 0) then cszSubscribedEvents = cszSubscribedEvents & ") AND (" & cszExclusionIDs end if ' Response.Write("--"&cszExclusionIDs&"----

") end if %> Economic Release Dates <% cszCSS = Trim(cszCSS) cszCSS = Replace(cszCSS, "public", "reports") Response.Write(cszCSS) %> <% if ((ihtmlinclude AND 32) = 32) then if (Len(cszAdCodeTower) > 0) then iMAXWIDTH = iMAXWIDTH + 120 ' there is a tower ad lets make room for it end if end if %>
<% cszCountryStringSQL = Replace(cszCountryStringSQL, "E." , "") Set conn = server.CreateObject("ADODB.Connection") conn.Open "DSN=econoday", "syncpak1", "2wagon36b" set rs=Server.CreateObject("ADODB.Recordset") sql = "select * from event_name WHERE frequency <> 1 AND (" & cszSubscribedEvents &") "&cszCountryStringSQL&" ORDER BY display_name_text, listingpriority" ' sql = "select * from event_name WHERE frequency <> 1 AND (" & cszSubscribedEvents &") "&cszCountryStringSQL&" ORDER BY truelistorder" set rs=conn.execute(sql) %>
<% while not rs.EOF if ( ((rs("category_id") AND 1) = 1) OR ((rs("category_id") AND 2) = 2)) then ' if Economic only / OR Treasuries set rs_events=Server.CreateObject("ADODB.Recordset") ' dont get Weekly events sql = "select * from events WHERE display_name_id = " & rs("display_name_id") &" AND ((released_on >= '1/1/"&cszNavYear&"') AND (released_on <= '12/31/"&cszNavYear&" 11:59 pm')) ORDER BY released_on" set rs_events=conn.execute(sql) iIndex = 1 ' Get All the Events while not rs_events.EOF dReleasedOn(iIndex) = rs_events("released_on") iReportAttrib = rs("report_attrib") if (IsDate(dReleasedOn(iIndex))) then if ((iReportAttrib AND 32) <> 32) then ' if the event is found over ride any user setting dReleasedOn(iIndex) = DateAdd("h", (iTimeZone+isDST(dReleasedOn(iIndex))), dReleasedOn(iIndex)) end if cszReleasedOn(iIndex) = Month(dReleasedOn(iIndex)) & "/" & Day(dReleasedOn(iIndex)) else cszReleasedOn(iIndex) = "" end if if (Len(Trim(rs_events("released_for"))) > 0) then cszReleasedFor(iIndex) = Trim(rs_events("released_for")) cszTemp = "" ii = InStr(cszReleasedFor(iIndex), ",") if (ii > 0) then cszReleasedFor(iIndex) = Left(cszReleasedFor(iIndex), ii-1) else cszReleasedFor(iIndex) = Trim(cszReleasedFor(iIndex)) end if if (InStr(cszReleasedFor(iIndex), "January")) OR (InStr(cszReleasedFor(iIndex), "February")) OR (InStr(cszReleasedFor(iIndex), "March")) OR (InStr(cszReleasedFor(iIndex), "April")) OR (InStr(cszReleasedFor(iIndex), "May")) OR (InStr(cszReleasedFor(iIndex), "June")) OR (InStr(cszReleasedFor(iIndex), "July")) OR (InStr(cszReleasedFor(iIndex), "August")) OR (InStr(cszReleasedFor(iIndex), "September")) OR (InStr(cszReleasedFor(iIndex), "October")) OR (InStr(cszReleasedFor(iIndex), "November")) OR (InStr(cszReleasedFor(iIndex), "December")) then ' cszReleasedFor(iIndex) = Left(cszReleasedFor(iIndex), 3) &", "&cszTemp cszReleasedFor(iIndex) = Left(cszReleasedFor(iIndex), 3) end if else cszReleasedFor(iIndex) = "" end if iIndex = iIndex + 1 rs_events.MoveNext() wend rs_events.Close() iPlacerHolder = 0 if (rs("display_name_id") = 254) then ' GDP (US) (254) iMaxDisplay = 11 else iMaxDisplay = 14 end if if (iIndex > 1) then ' are there any events for this ? %> <% Response.Write(Trim(rs("display_name_text"))) %> (<% Response.Write(Trim(rs("country"))) %>)
<% ii = 1 while (ii < iIndex) AND (ii < iMaxDisplay) %> <% ii = ii + 1 wend %> <% if (( ((rs("category_id") AND 2) <> 2)) AND (rs("display_name_id") <> 252)) then ' if NOT a Treasury and not FOMC Meeting Announcement (252) if (Len(cszReleasedFor(1)) > 1) then %> <% ii = 1 while (ii < iIndex) AND (ii < iMaxDisplay) %> <% ii = ii + 1 wend %> <% end if if (ii < iIndex) then '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' iMaxDisplay = ii %> <% while (ii < iIndex) %> <% ii = ii + 1 wend %> <% if (( ((rs("category_id") AND 2) <> 2)) AND (rs("display_name_id") <> 252)) then ' if NOT a Treasury and not FOMC Meeting Announcement (252) if (Len(cszReleasedFor(1)) > 1) then %> <% ii = iMaxDisplay while (ii < iIndex) %> <% ii = ii + 1 wend %> <% end if end if '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' end if end if if (rs("display_name_id") = 254) then ' GDP (US) (254) %> <% end if %>
Released On:<% Response.Write(cszReleasedOn(ii)) %>
Released For:<% Response.Write(cszReleasedFor(ii)) %>
Released On:<% Response.Write(cszReleasedOn(ii)) %>
Released For:<% Response.Write(cszReleasedFor(ii)) %>
A: Advance P: Preliminary F: Final

<% end if end if rs.MoveNext() wend %>
[spacer]
<% conn.Close() %>