<%@ Language=VBScript %> <% Option Explicit %> <% Response.CodePage="65001" Response.Charset="utf-8" on error resume next If Len( Request.ServerVariables("QUERY_STRING") ) > 100 Then response.redirect "/external/search/search404.htm" End If 'response.buffer = true Dim cn, rs, sSQL, html_string,rr_yes,mcd_found Dim url_str, description, country_array Dim country_page_req, country, formal_name, blurb, type_id, co_links_str, last_update, mdate, lang, co, top, pn, pagesize, querysize, page_links_str, querystart, lastupdate_exception 'Aug 18, 2013 to include nonpub-smt text file Dim nonpubsmt Dim pnstr rr_yes=0 pn = Request.QueryString("pn") If ( Not IsNumeric( pn ) ) OR ( pn = "" ) OR ( Len( pn ) > 2 ) Then pn = 1 End If pagesize = 20 querysize = pn * pagesize querystart = querysize - pagesize if( pn = 0 ) then querystart = 0 end if 'open connection and recordset objects set cn = server.createObject("ADODB.Connection") set rs = server.createObject("ADODB.Recordset") %> <% dim strConn strConn = "Driver={ODBC Driver 11 for SQL Server}; Server=prdinternetdb.IMF.ORG,5876; Database=www_meta; UID=www_meta_user; PWD=usemeta;" 'strConn = "Driver={SQL Server}; Server=prdinternetdb.IMF.ORG,5876; Database=www_meta; UID=www_meta_user; PWD=usemeta;" 'strConn = "Driver={SQL Server}; Server=KREIDNT6\KREIDNT_SQL1.IMF.ORG,5876; Database=www_meta; UID=www_meta_user; PWD=usemeta;" %> <% dim FSAPlink,strConnFSAP,FSAPCount,FSAPSQL,cnFSAP,rsFSAP,FSAPLeftlink,CountryFormalName FSAPLink ="" FSAPLeftlink ="" 'strConn = "Driver={SQL Server}; Server=INTERNETDEVDB.IMF.ORG,5876; Database=www_meta; UID=www_meta_user; PWD=usemeta;" strConnFSAP = "Driver={ODBC Driver 11 for SQL Server}; Server=PRDINTERNETDB.IMF.ORG,5876; Database=exrpubs; UID=fsapWebExtPrdUser; PWD=X8RbJkHiblhM11;" 'strConnContentDB = "Driver={SQL Server}; Server=INTERNETDEVDB.IMF.ORG,5876; Database=CONTENTDB; UID=www_meta_user; PWD=usemeta;" 'strConn = "Driver={SQL Server}; Server=KREIDNT6\KREIDNT_SQL1.IMF.ORG,5876; Database=www_meta; UID=www_meta_user; PWD=usemeta;" set cnFSAP = server.createObject("ADODB.Connection") set rsFSAP = server.createObject("ADODB.Recordset") cnFSAP.open strConnFSAP rsFSAP.activeconnection = cnFSAP Sub Create_FSAP_links(country) FSAPSQL = "[fsap].[usp_sel_FSAPCountByCountry]" & country rsFSAP.open FSAPSQL while not rsFSAP.eof set FSAPCount = rsFSAP.fields("FSAPCOUNT") set CountryFormalName = rsFSAP.fields("CTY_NAME_FORMAL") if(FSAPCount <> 0) Then FSAPlink="| Financial Sector Assessment Program (" & FSAPCount & ") " FSAPLeftlink="Financial Sector Assessment Program" End If rsFSAP.movenext wend rsFSAP.close End Sub %> <% cn.open strConn rs.activeconnection = cn 'Use the path of the script to get the country ISO Code. country_page_req = Request.ServerVariables("SCRIPT_NAME") If( InStr( 1, country_page_req, "/external", 1 ) = 0 ) Then country_page_req = "/external" & country_page_req End If country_array = split( country_page_req, "/", -1, 1 ) country = country_array(3) 'Added TCS on June 03, 2009 for MCD update %> <% Dim html_string_mcd, cn_mcd, rs_mcd, url,fs_mcd,File,filedate 'open connection and recordset objects set cn_mcd = server.createObject("ADODB.Connection") set rs_mcd = server.createObject("ADODB.Recordset") set fs_mcd=Server.CreateObject("Scripting.FileSystemObject") cn_mcd.open strConn rs_mcd.activeconnection = cn_mcd sql= "usp_sel_MCD_data '" & country & "'" rs_mcd.open sql while not (rs_mcd.eof) 'response.write(rs_mcd.fields("url")) if (rs_mcd.fields("url")<> "" ) then mcd_found=1 url=rs_mcd.fields("url") url= replace(url,"\","/") filedate= rs_mcd.fields("date") filedate = MonthName(Month(filedate)) & " " & Day(filedate) & ", " & year(filedate) if(filedate = "Jan 01, 1900" or isnull(filedate)) then if fs_mcd.FileExists(server.mappath("\") & url)=true then Set File = fs_mcd.GetFile(server.mappath("\") & url) filedate= File.DateLastModified filedate= MonthName(month(filedate)) & " " & day(filedate) & ", " & year(filedate) 'rs_mcd.fields("date") end if end if html_string_mcd = "

Program Update

Read the latest Program Note,
" & filedate & "

" end if rs_mcd.movenext wend set rs_mcd = nothing set cn_mcd = nothing %> <% co = Request.QueryString("co") If ( co <> "" ) AND ( Len( co ) = 3 ) Then country = co End If lang = Request.QueryString("lang") If ( lang = "" ) OR ( Len( lang ) <> 3 ) Then lang = "eng" End If type_id = Request.QueryString("type") If ( Not IsNumeric( type_id ) ) OR ( type_id = "" ) OR ( Len( type_id ) > 4 ) Then type_id = 9999 End If top = Request.QueryString("top") If ( Not IsNumeric( top ) ) OR ( Len( top ) > 2 ) Then top = 0 End If If( ubound(country_array) > 4 ) Then ' Must be a call from a ResRep page. Show top 5 links only. top = 5 rr_yes=1 End If If( top = 0 ) Then html_string = "

" & vbcrlf html_string = html_string & "
" Get_CO_Name( country ) html_string = html_string & "" & formal_name & " and the IMF
" & vbcrlf & "
" & vbcrlf Get_max_date( country ) blurb = ReadBlurbFile( country ) 'Aug 18, 2013-- To include nonpubsmt nonpubsmt= ReadNonPubFile( country ) 'Aug 28, 2013-- To include nonpubsmt updated date lastupdate_exception = ReadModifiedDate ( country ) if((lastupdate_exception <> "" AND CDate(lastupdate_exception) > CDate(last_update) ) ) then lastupdate_exception = FormatDateTime( ReadModifiedDate ( country )) lastupdate_exception= MonthName(Month(lastupdate_exception)) & " " & Day(lastupdate_exception) & ", " & year(lastupdate_exception) else lastupdate_exception ="" end if If (lastupdate_exception <> "") Then html_string = html_string & "Updated " & lastupdate_exception & "

" Else html_string = html_string & "Updated " & last_update & "

" End If html_string = html_string & "
" & vbcrlf End If Call Create_FSAP_links(country) Call Create_Links( country, lang, pn, querysize ) html_string = html_string & "" & vbcrlf html_string = html_string & "" & vbcrlf If( type_id = 9999 ) Then If( top > 0 ) Then sSQL = "Get_CO_Data_by_Date_top_New '" & country & "', '" & lang & "', " & top Else sSQL = "Get_CO_Data_by_Date_top_New '" & country & "', '" & lang & "', " & querysize End If ElseIf( type_id = 9998 ) Then sSQL = "Get_CO_Data_by_Type_New '" & country & "', '" & lang & "'" Else sSQL = "Get_CO_Data_Type_New '" & country & "', '" & lang & "', " & type_id End If Get_SQL_Data sSQL set rs = nothing set cn = nothing html_string = html_string & "" html_string = html_string & "
" & co_links_str & "

" & page_links_str & "
" & vbcrlf If( ubound(country_array) > 4 ) Then ' Must be a call from a ResRep page. Print the string response.write html_string End If ' ------------------------------------------------------------------------------------- ' ------------------------------------ Subroutines ------------------------------------ ' ------------------------------------------------------------------------------------- ' ------------------------------------ Get_CO_Name ------------------------------------ Sub Get_CO_Name( country ) sSQL = "Get_CO_Name '" & country & "'" rs.open sSQL If Not rs.eof Then formal_name = rs.fields("country") End If rs.close End Sub ' ------------------------------------ ReadBlurbFile ------------------------------------ Private Function ReadBlurbFile( co ) Const ForReading = 1, ForWriting = 2 Dim fso, f Set fso = CreateObject("Scripting.FileSystemObject") 'Set f = fso.OpenTextFile("d:\htdocs\external\country\" & co & "\includes\blurb.txt", ForReading) 'Nov 9 2016, added a logic for EGY if (co ="EGY") then Set f = fso.OpenTextFile(Server.MapPath("\") & "\external\country\" & co & "\includes\blurb.txt", ForReading) else Set f = fso.OpenTextFile(Server.MapPath("\") & "\external\country\" & co & "\includes\blurb.txt", ForReading) end if ReadBlurbFile = f.ReadAll End Function ' ------------------------------------ ReadLastUpdatedExceptionFile ------------------------------------ Private Function ReadModifiedDate( co ) Dim fs,f Set fs=CreateObject("Scripting.FileSystemObject") Set f=fs.GetFile(Server.MapPath("\") & "\external\country\" & co & "\includes\nonpub-stmt.txt") ReadModifiedDate = f.DateLastModified End Function ' ------------------------------------ ReadNonPubFile ------------------------------------ Private Function ReadNonPubFile( co ) Const ForReading = 1, ForWriting = 2 Dim fso, f Set fso = CreateObject("Scripting.FileSystemObject") Set f = fso.OpenTextFile(Server.MapPath("\") & "\external\country\" & co & "\includes\nonpub-stmt.txt", ForReading) ReadNonPubFile = f.ReadAll End Function ' ------------------------------------ DiffADate ------------------------------------ Function DiffADate( theDate ) Dim Diff Diff = DateDiff( "d", theDate, Now ) If Diff <= 10 Then DiffADate = "" Else DiffADate = "" End If If( ubound(country_array) > 4 ) Then ' Must be a call from a ResRep page. Don't show new gif. DiffADate = "" End If If( InStr( 1, url_str, "external/np/sec/pr/2013/pr13329.htm", 0 ) > 0 ) Then DiffADate = "" End If If( InStr( 1, url_str, "external/pubs/cat/longres.aspx?sk=40923.0", 0 ) > 0 ) Then DiffADate = "" End If If( InStr( 1, url_str, "external/pubs/cat/longres.aspx?sk=43962.0", 0 ) > 0 ) Then DiffADate = "" End If End Function ' ------------------------------------ Get_max_date ------------------------------------ Sub Get_max_date( country ) Dim theMonth, theDay sSQL = "Get_CO_Last_Updated_New '" & country & "', '" & lang & "'" rs.open sSQL If Not rs.eof Then last_update = rs.fields("LAST_UPDATE") Else last_update = Now End If rs.close If Month(last_update) < 10 then theMonth = "0" & Month(last_update) Else theMonth = Month(last_update) End If If Day(last_update) < 10 then theDay = "0" & Day(last_update) Else theDay = Day(last_update) End If mdate = year(last_update) & "-" & theMonth & "-" & theDay If( mdate <> "--" ) Then last_update = MonthName(Month(last_update)) & " " & Day(last_update) & ", " & year(last_update) End If mdate = "" End Sub ' ------------------------------------ Create_type_links ------------------------------------ Sub Create_type_links( country, lang, href_type ) Dim type_name Dim other_category co_links_str = co_links_str & "Show all items sorted by date " sSQL = "Get_CO_Content_Count '" & country & "' ," & lang rs.open sSQL while not rs.eof type_name = rs.fields("Type_Name") if(type_name = "Other") Then type_name = Replace( type_name, " ", " " ) other_category = "| " & type_name & " (" & rs.fields("Total") & ") " Else type_name = Replace( type_name, " ", " " ) co_links_str = co_links_str & "| " & type_name & " (" & rs.fields("Total") & ") " End If rs.movenext wend rs.close If(len(FSAPlink) > 0) Then other_category = FSAPlink & other_category End If If(len(other_category) > 0) Then co_links_str = co_links_str & other_category End If co_links_str = co_links_str & "


" & vbcrlf End Sub ' ------------------------------------ Create_Paging_Links ------------------------------------ Sub Create_Paging_Links( country, lang, pn, querysize ) Dim recCount sSQL = "Get_CO_Content_Count '" & country & "' ," & lang rs.open sSQL while not rs.eof recCount = recCount + rs.fields("total") rs.movenext wend rs.close Dim MaxPages if( recCount/pagesize > round( recCount/pagesize ) ) then MaxPages = round( recCount/pagesize ) + 1 else MaxPages = round( recCount/pagesize ) end if 'response.write recCount & "
" 'response.write MaxPages & "
" if rr_yes=0 then page_links_str = page_links_str & "" page_links_str = page_links_str & " " if( pn = 0 ) then pnstr = "All pages" else pnstr = "Page " & pn & " of " & MaxPages end if page_links_str = page_links_str & " " page_links_str = page_links_str & " " page_links_str = page_links_str & " " page_links_str = page_links_str & " " page_links_str = page_links_str & " " page_links_str = page_links_str & "
" & pnstr & "
" page_links_str = page_links_str & " " page_links_str = page_links_str & " " page_links_str = page_links_str & " " page_links_str = page_links_str & " " page_links_str = page_links_str & " " page_links_str = page_links_str & "
" dim i for i = 1 to MaxPages if( int( pn ) = i ) then page_links_str = page_links_str & i & " " & vbcrlf else if( i = 1 ) then page_links_str = page_links_str & "" & i & " " & vbcrlf else page_links_str = page_links_str & "" & i & " " & vbcrlf end if end if next page_links_str = page_links_str & " " if( pn = 0 ) then page_links_str = page_links_str & " Show All" & vbcrlf else page_links_str = page_links_str & " Show All" & vbcrlf end if page_links_str = page_links_str & "
" page_links_str = page_links_str & "
" end if End Sub ' ------------------------------------ Create_Links ------------------------------------ Sub Create_Links( country, lang, pn, querysize ) If( Int( type_id ) = 9999 ) Then 'If sorted by Date, show link to sort by type. Call Create_Paging_Links( country, lang, pn, querysize ) If( top = 0 ) Then If(nonpubsmt <> "") Then co_links_str = co_links_str & nonpubsmt & "

" End If co_links_str = co_links_str & blurb & "

" co_links_str = co_links_str & page_links_str & "
" End If ElseIf( Int( type_id ) = 9998 ) Then 'If sorted by Type, show links to content bookmark. Call Create_type_links( country, lang, "#" ) Else co_links_str = co_links_str & "" co_links_str = co_links_str & "Show all items sorted by date " & vbcrlf co_links_str = co_links_str & "Show all items sorted by type " & vbcrlf co_links_str = co_links_str & "
" & vbcrlf End If End Sub ' ------------------------------------ Get_SQL_Data ------------------------------------ Sub Get_SQL_Data( query ) Dim DateArray, This_Date, bgcolor, aname_counter, aname_string, last_type_id, title_found, PDate_string title_found = 1 aname_counter = 0 rs.open query bgcolor = "#FFFFFF" while not rs.eof If( Int( type_id ) = 9998 ) Then If( last_type_id <> rs.fields("type_id") AND ( last_type_id <> "" ) ) Then html_string = html_string & "" & vbcrlf End If If( last_type_id <> rs.fields("type_id") ) Then html_string = html_string & "" & rs.fields("content_type") & "" & vbcrlf End If last_type_id = rs.fields("type_id") ElseIf( Int( type_id <> 9999 ) AND ( title_found ) ) Then html_string = html_string & "" & rs.fields("content_type") & "" & vbcrlf title_found = 0 End If aname_counter = aname_counter + 1 if( bgcolor = "#FFFFFF" ) Then bgcolor = "#DDE7D6" Else bgcolor = "#FFFFFF" End If DateArray = split( rs.fields("meta_date"), "-", -1, 1 ) This_Date = MonthName( DateArray(1) ) & " " & DateArray(2) & ", " & DateArray(0) 'This_Date = MonthName( month(rs.fields("meta_date")) ) & " " & Day(rs.fields("meta_date")) & ", " & Year(rs.fields("meta_date")) url_str = rs.fields("URL") If( InStr( 1, url_str, "nullurl", 1 ) = 0 ) Then url_str = "" & rs.fields("Title") & "
" & vbcrlf Else url_str = "" End If If( rs.fields("Descrip") <> "" ) Then description = rs.fields("Descrip") & "
" description = Replace( description, " ;", " |" ) Else description = "" End If If( Int( type_id ) = 9999 ) Then 'Only create the sequential anchors when sorted by date. aname_string = "" Else aname_string = "" End If Dim classString classString = "" PDate_string = DiffADate( rs.fields("PDate") ) if( aname_counter > querystart ) then html_string = html_string & "" & This_Date & " -- " & PDate_string & " " & aname_string & url_str & description & "" & vbcrlf end if 'html_string = html_string & "" & aname_string & url_str & description & "" & "" & This_Date & PDate_string & vbcrlf & "" & vbcrlf rs.movenext wend rs.close End Sub %> <% Dim html_string_weo, cn_weo, rs_weo,rsinterim_weo Dim DataArray(2) Dim data_found Dim country_array_weo, country_weo Dim lastyeardata Dim fyeardata 'The variable values below control the Year range of the data table, the title of the table and the link to the relevant WEO version. KKR Dim FYear, LYear, WEOVersion, WEOURL, InterimFYear, InterimLYear, sql,interimData interimData = "false" FYear = 2017 LYear = FYear + 1 WEOVersion = "April 2017 WEO" WEOURL = "/external/pubs/ft/weo/2017/01/index.htm" 'open connection and recordset objects set cn_weo = server.createObject("ADODB.Connection") set rs_weo = server.createObject("ADODB.Recordset") set rsinterim_weo = server.createObject("ADODB.Recordset") %> <% dim strConn_weo 'Commented by TCS 'strConn_weo = "Driver={SQL Server}; Server=prdinternetdb.IMF.ORG,5876; Database=weodbNewApr07; UID=weo_web_user; PWD=weouser1;" 'For Development 'strConn_weo = "Driver={SQL Server}; Server=prdinternetdb,5876; Database=weodbNewApr09; UID=weo_web_user; PWD=weouser1;" 'strConn_weo = "Driver={SQL Server}; Server=prdinternetdb,5876; Database=weodbNewOct15; UID=weo_web_user; PWD=weouser1;" strConn_weo = "Driver={ODBC Driver 11 for SQL Server}; Server=prdinternetdb,5876; Database=weodbNewApr17; UID=weo_web_user; PWD=weouser1;" %> <% cn_weo.open strConn_weo rs_weo.activeconnection = cn_weo rsinterim_weo.activeconnection = cn_weo 'Use the path of the script to get the country ISO Code. country_page_req = Request.ServerVariables("SCRIPT_NAME") If( InStr( 1, country_page_req, "/external", 1 ) = 0 ) Then country_page_req = "/external" & country_page_req End If country_array_weo = split( country_page_req, "/", -1, 1 ) country_weo = country_array_weo(3) co = Request.QueryString("co") If ( co <> "" ) AND ( Len( co ) = 3 ) Then country_weo = co End If if(interimData = "true") Then 'Added by TCS-Feb 3,2009-For GDP update InterimFYear = 2016 InterimLYear = InterimFYear + 1 sql= "usp_sel_Interimdata '" & country_weo & "', 'Y" & InterimFYear & "', 'Y" & InterimLYear & "','NGDP_RPCH'" rs_weo.open sql while not (rs_weo.eof) if (rs_weo.fields("firstyear")<> "" And rs_weo.fields("lastyear")<> "") then FYear = InterimFYear LYear = InterimLYear interimData = "true" end if rs_weo.movenext wend End If 'below function from fsap.asp (automatically included at index.htm by getrightcol.asp include) Call Create_FSAP_links(country) if (strArtIV_found=1) Then html_string_weo = html_string_weo & "Article IV Staff Reports

" & vbcrlf end if html_string_weo = html_string_weo & FSAPLeftlink&"

" & vbcrlf html_string_weo = html_string_weo & "" & vbcrlf html_string_weo = html_string_weo & " " & vbcrlf html_string_weo = html_string_weo & " " & vbcrlf html_string_weo = html_string_weo & " " & vbcrlf html_string_weo = html_string_weo & " " & vbcrlf html_string_weo = html_string_weo & " " & vbcrlf html_string_weo = html_string_weo & " " & vbcrlf html_string_weo = html_string_weo & "
" & vbcrlf html_string_weo = html_string_weo & " Projected % Change" & vbcrlf html_string_weo = html_string_weo & "
" & vbcrlf html_string_weo = html_string_weo & " " & vbcrlf html_string_weo = html_string_weo & " " & vbcrlf html_string_weo = html_string_weo & " " & vbcrlf html_string_weo = html_string_weo & " " & vbcrlf html_string_weo = html_string_weo & " " & vbcrlf html_string_weo = html_string_weo & " " & vbcrlf if (interimData="true") then Get_WEO_Data "Real GDP" ,"usp_sel_Interimdata '" & country_weo & "', 'Y" & FYear & "', 'Y" & LYear & "','NGDP_RPCH'" 'Get_WEO_Data "Consumer Prices" ,"usp_sel_Interimdata '" & country_weo & "', 'Y" & FYear & "', 'Y" & LYear & "','PCPIPCH'" else 'Modified by TCS--Jan 27, 2010--CR CHG000000917020 'Get_WEO_Data "Real GDP", "select [Descriptor], Y" & FYear & " as firstYear, Y" & LYear & " as lastYear FROM CSVData WHERE Isocode = '" & country_weo & "' AND Series_Code = 'NGDP_RPCH'" 'Get_WEO_Data "Consumer Prices", "select [Descriptor], Y" & FYear & " as firstYear, Y" & LYear & " as lastYear FROM CSVData WHERE Isocode = '" & country_weo & "' AND Series_Code = 'PCPIPCH'" Get_WEO_Data "Real GDP" ,"usp_sel_csvdata '" & country_weo & "', 'Y" & FYear & "', 'Y" & LYear & "','NGDP_RPCH'" Get_WEO_Data "Consumer Prices" ,"usp_sel_csvdata '" & country_weo & "', 'Y" & FYear & "', 'Y" & LYear & "','PCPIPCH'" end if html_string_weo = html_string_weo & "
" & vbcrlf html_string_weo = html_string_weo & "  " & vbcrlf html_string_weo = html_string_weo & " " & vbcrlf html_string_weo = html_string_weo & "  " & FYear & vbcrlf html_string_weo = html_string_weo & " " & vbcrlf html_string_weo = html_string_weo & "  " & LYear & vbcrlf html_string_weo = html_string_weo & "
" & vbcrlf if (interimData="true") then html_string_weo = html_string_weo & " Source: World Economic Outlook Update (April 2017)
" & vbcrlf else html_string_weo = html_string_weo & " Source: World Economic Outlook (April 2017)
" & vbcrlf html_string_weo = html_string_weo & " Please refer to more recent Press Release/Staff reports on this country for possible revisions." & vbcrlf end if html_string_weo = html_string_weo & "

" & vbcrlf If( ( DataArray(0) <> "" AND DataArray(1) <> "" ) AND data_found = 1 ) Then 'response.write html_string_weo Else html_string_weo = "" End If set rs_weo = nothing set cn_weo = nothing set rsinterim_weo = nothing Sub Get_WEO_Data( qtype, query ) data_found = 0 rsinterim_weo.open query DataArray(0) = "" DataArray(1) = "" lastyeardata = "" fyeardata = "" while not rsinterim_weo.eof data_found = 1 if ( CLng(Split(CStr(rsinterim_weo.fields("lastYear")), ".")(1)) = "0") then lastyeardata = int(rsinterim_weo.fields("lastYear")) & ".0" else lastyeardata = Round(rsinterim_weo.fields("lastYear"),1) end if if ( CLng(Split(CStr(rsinterim_weo.fields("firstYear")), ".")(1)) = "0") then fyeardata = int(rsinterim_weo.fields("firstYear")) & ".0" else fyeardata = Round(rsinterim_weo.fields("firstYear"),1) end if html_string_weo = html_string_weo & " " & vbcrlf html_string_weo = html_string_weo & " " & vbcrlf html_string_weo = html_string_weo & " " & qtype & vbcrlf html_string_weo = html_string_weo & " " & vbcrlf html_string_weo = html_string_weo & " " & vbcrlf html_string_weo = html_string_weo & " " & fyeardata & "" & vbcrlf html_string_weo = html_string_weo & " " & vbcrlf html_string_weo = html_string_weo & " " & vbcrlf html_string_weo = html_string_weo & " " & lastyeardata & "" & vbcrlf html_string_weo = html_string_weo & " " & vbcrlf html_string_weo = html_string_weo & " " & vbcrlf if( isNumeric(rsinterim_weo.fields("firstYear")) ) then DataArray(0) = int(rsinterim_weo.fields("firstYear")) else DataArray(0) = "" end if if( isNumeric(rsinterim_weo.fields("lastYear")) ) then DataArray(1) = int(rsinterim_weo.fields("lastYear")) else DataArray(1) = "" end if rsinterim_weo.movenext wend rsinterim_weo.close End Sub %> Serbia and Montenegro and the IMF -- <%=pnstr%> <%=mdate%>
<% on error resume next err.clear dim strConn_bc, show_bc, bc_cn, bc_cmd dim date_now_string, date_now_string1 dim bc_date, bc_country, bc_date_string dim show_next, show_previous date_now_string=month(now()) & "/" & day(now()) & "/" & year(now()) date_now_string1=month(dateadd("d",7,now())) & "/" & day(dateadd("d",7,now())) & "/" & year(dateadd("d",7,now())) bc_date_string="" strConn_bc = "Driver={ODBC Driver 11 for SQL Server}; Server=prdinternetdb,5876; Database=SEC_CMS; UID=imforguser; PWD=w3.imf.org/readonly" 'strConn_bc = "Driver={SQL Server}; Server=dbsswn06d,5876; Database=countrydb; UID=SECCMSWebUser; PWD=schedules" set bc_cn = server.createObject("ADODB.Connection") set bc_cmd = server.createObject("ADODB.Command") dim bc_rs bc_cn.open strConn_bc bc_cmd.ActiveConnection = bc_cn bc_cmd.CommandText = "usp_getDetailsForWeb_Country" bc_cmd.CommandType=4 bc_cmd.Parameters.Refresh bc_cmd.Parameters.item("@fromDate").value = date_now_string bc_cmd.Parameters.item("@toDate").value = date_now_string1 bc_cmd.Parameters.item("@iso_Code").value = country set bc_rs=bc_cmd.Execute show_bc=0 show_next=0 show_previous=0 if err.number=0 then while not bc_rs.eof bc_country=bc_rs.Fields("countryName") bc_date=bc_rs.Fields("dateScheduled") if (not isnull(bc_country)) and (not isnull(bc_date)) then show_bc=1 if bc_date >=cdate("" & month(now()) & "/" & day(now()) & "/" & year(now())) then if show_next=0 then bc_date_string=bc_date_string & "
Next (tentative):
" & monthname(month(bc_date)) & " " & day(bc_date) & ", " & year(bc_date) & "
" else bc_date_string=bc_date_string & monthname(month(bc_date)) & " " & day(bc_date) & ", " & year(bc_date) & "
" end if show_next=1 else if show_previous=0 then bc_date_string=bc_date_string & "
Previous:
" & monthname(month(bc_date)) & " " & day(bc_date) & ", " & year(bc_date) & "
" else bc_date_string=bc_date_string & monthname(month(bc_date)) & " " & day(bc_date) & ", " & year(bc_date) & "
" end if show_previous=1 end if end if bc_rs.movenext wend end if set bc_rs=nothing bc_cn.close set bc_cmd=nothing set bc_cn=nothing %> <%if show_bc=1 then%>
Executive Board
Calendar
Board Discussions
on <%=bc_country%>:
<%=bc_date_string%>

<% end if err.clear 'Added TCS on June 03, 2009 for MCD update if(mcd_found=1 And country <> "tjk" and country <> "MRT" and country <> "mrt" and country <> "TJK" and country <> "LBN" and country <> "lbn" and country <> "AFG" and country <> "afg" and country <> "ARM" and country <> "arm" and country <> "DJI" and country <> "dji" and country <> "GEO" and country <> "geo" and country <> "IRQ" and country <> "irq" and country <> "JOR" and country <> "jor" and country <> "KGZ" and country <> "kgz" and country <> "MAR" and country <> "mar" and country <> "PAK" and country <> "pak" and country <> "TUN" and country <> "tun" and country <> "YEM" and country <> "yem" ) then Response.write html_string_mcd end if %>
Republic of Serbia and the IMF

Republic of Montenegro and the IMF

<%=html_string%>